@imenam/mcp-feature-analyzer 1.0.34 → 1.0.35

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 (99) hide show
  1. package/README.md +6 -5
  2. package/dist/shared/question-thread.d.ts +19 -0
  3. package/dist/shared/question-thread.js +19 -0
  4. package/dist/shared/schemas/analysis.schema.d.ts +43 -1
  5. package/dist/shared/schemas/analysis.schema.js +13 -1
  6. package/dist/shared/schemas/api.schema.d.ts +14 -0
  7. package/dist/shared/schemas/api.schema.js +9 -0
  8. package/dist/shared/schemas/ipc.schema.d.ts +1 -1
  9. package/dist/shared/schemas/ipc.schema.js +1 -0
  10. package/dist/src/core/invariants.js +11 -2
  11. package/dist/src/core/migrate.d.ts +2 -0
  12. package/dist/src/core/migrate.js +22 -0
  13. package/dist/src/core/notifications.d.ts +11 -2
  14. package/dist/src/core/notifications.js +17 -5
  15. package/dist/src/core/review-actions.d.ts +10 -4
  16. package/dist/src/core/review-actions.js +40 -10
  17. package/dist/src/gui-worker.js +7 -1
  18. package/dist/src/index.js +11 -4
  19. package/dist/src/tools/get-analysis.js +9 -4
  20. package/dist/src/tools/notifications.js +2 -0
  21. package/gui/dist/assets/{angular-html-C_Umbo_o.js → angular-html-D6ybriip.js} +1 -1
  22. package/gui/dist/assets/{angular-ts-BS5NFEKQ.js → angular-ts-CZyN0KhI.js} +1 -1
  23. package/gui/dist/assets/{apl-BXNp6RaU.js → apl-Dl58kWHo.js} +1 -1
  24. package/gui/dist/assets/{astro-1di0oIiS.js → astro-DtlnFSUO.js} +1 -1
  25. package/gui/dist/assets/{blade-bFPOELdA.js → blade-DmJ0_rHH.js} +1 -1
  26. package/gui/dist/assets/{c-BLZ_xWbb.js → c-mC1a3Brk.js} +1 -1
  27. package/gui/dist/assets/{chapel-C_HSM6Pq.js → chapel-BzC5d5Li.js} +1 -1
  28. package/gui/dist/assets/{cobol-DXoz67hJ.js → cobol-BbiEwu_G.js} +1 -1
  29. package/gui/dist/assets/{coffee-DlhFbGsO.js → coffee-DE8QSbI2.js} +1 -1
  30. package/gui/dist/assets/{cpp-BaCMyKr2.js → cpp-Bb3xCuxM.js} +1 -1
  31. package/gui/dist/assets/{crystal-CJURYNNT.js → crystal-Dh_G4EEb.js} +1 -1
  32. package/gui/dist/assets/{css-CX_LiCz_.js → css-CMxAsymy.js} +1 -1
  33. package/gui/dist/assets/{edge-CTUGxEgV.js → edge-CniFTb1m.js} +1 -1
  34. package/gui/dist/assets/{elixir-CQwEci3v.js → elixir-ZmJWOMj1.js} +1 -1
  35. package/gui/dist/assets/{elm-BkLKshkr.js → elm-DJRxZUyP.js} +1 -1
  36. package/gui/dist/assets/{erb-1YN1e0vJ.js → erb-BMzBpztO.js} +1 -1
  37. package/gui/dist/assets/{git-rebase-BKS3kIrK.js → git-rebase-CA-NBf_5.js} +1 -1
  38. package/gui/dist/assets/{glimmer-js-CcF_d66k.js → glimmer-js-BhxckZg7.js} +1 -1
  39. package/gui/dist/assets/{glimmer-ts-CY0XDie9.js → glimmer-ts-p7xbN2k1.js} +1 -1
  40. package/gui/dist/assets/{glsl-DccBV_n0.js → glsl-CL99TffA.js} +1 -1
  41. package/gui/dist/assets/{graphql-C2PFH9th.js → graphql-D7Xxg-E7.js} +1 -1
  42. package/gui/dist/assets/{hack-BCI4tEad.js → hack-CUAoLdpX.js} +1 -1
  43. package/gui/dist/assets/{haml-QnmUImKG.js → haml-BXkO6kY5.js} +1 -1
  44. package/gui/dist/assets/{handlebars-CPd4ATQH.js → handlebars-exD0x3TF.js} +1 -1
  45. package/gui/dist/assets/{html-BgGOZsTs.js → html-DHD04EW_.js} +1 -1
  46. package/gui/dist/assets/{html-derivative-DtSxVTSr.js → html-derivative-Bml0cGZy.js} +1 -1
  47. package/gui/dist/assets/{http-VJ1JqsCP.js → http-DMmIRhh5.js} +1 -1
  48. package/gui/dist/assets/{hurl-Byqf3Q4J.js → hurl-DjxNKi3W.js} +1 -1
  49. package/gui/dist/assets/{index-BG2CQy-I.css → index-CUoeDKLH.css} +1 -1
  50. package/gui/dist/assets/{index-D1uZtbvJ.js → index-CsPG2ntk.js} +18 -18
  51. package/gui/dist/assets/{java-B_nJOiTG.js → java-D8DlwLKl.js} +1 -1
  52. package/gui/dist/assets/{javascript-DffeUEnj.js → javascript-DbeJguaR.js} +1 -1
  53. package/gui/dist/assets/{jinja-M0zKdCfa.js → jinja-DZkHuHjU.js} +1 -1
  54. package/gui/dist/assets/{jison-BT0-M0gS.js → jison-CKOOVBcn.js} +1 -1
  55. package/gui/dist/assets/{json-DmyuI1nx.js → json-C_pcKqnE.js} +1 -1
  56. package/gui/dist/assets/{jsx-rE32VeXB.js → jsx-CCems14W.js} +1 -1
  57. package/gui/dist/assets/{julia-DjyTg-6t.js → julia-B67yrJEc.js} +1 -1
  58. package/gui/dist/assets/{just-CK65S3r8.js → just-0ieSYSY9.js} +1 -1
  59. package/gui/dist/assets/{latex-94zewxls.js → latex-CL5phIW-.js} +1 -1
  60. package/gui/dist/assets/{liquid-Dl0qLBwx.js → liquid-CLwqJshL.js} +1 -1
  61. package/gui/dist/assets/{lua-CjD63HfG.js → lua-BpN0_IRI.js} +1 -1
  62. package/gui/dist/assets/{marko-CBzovuJ1.js → marko-CSJfqvxX.js} +1 -1
  63. package/gui/dist/assets/{mdc-B89wcoMe.js → mdc-DiIWpMwC.js} +1 -1
  64. package/gui/dist/assets/{nginx-BtCSV7rr.js → nginx-CjkEKhVl.js} +1 -1
  65. package/gui/dist/assets/{nim-BT2sttEd.js → nim-BWOltqk2.js} +1 -1
  66. package/gui/dist/assets/{org-DyhV0u0R.js → org-D6h3yJk4.js} +1 -1
  67. package/gui/dist/assets/{perl-B0H1z4iL.js → perl-Qm7miafA.js} +1 -1
  68. package/gui/dist/assets/{php-BPT4W6n1.js → php-CtR6lR9E.js} +1 -1
  69. package/gui/dist/assets/{pug-BoCt7RDl.js → pug-xYcJQRn0.js} +1 -1
  70. package/gui/dist/assets/{qml-Cb4Cd08W.js → qml-Bf-2A8LG.js} +1 -1
  71. package/gui/dist/assets/{r-fe_4bIGN.js → r-DjTBoq9t.js} +1 -1
  72. package/gui/dist/assets/{razor-dDhRcZ_O.js → razor-jwcmZNf0.js} +1 -1
  73. package/gui/dist/assets/{regexp-B7rcDdRa.js → regexp-CTtG2g8b.js} +1 -1
  74. package/gui/dist/assets/{rst-DjeWGJRw.js → rst-F-HSIpRG.js} +1 -1
  75. package/gui/dist/assets/{ruby-Dx3POAAI.js → ruby-DyI3kCSP.js} +1 -1
  76. package/gui/dist/assets/{sas-CZOq7qCQ.js → sas-CX6vfJC8.js} +1 -1
  77. package/gui/dist/assets/{scss-DhFtC8D4.js → scss-pSu9IXx-.js} +1 -1
  78. package/gui/dist/assets/{shellscript-Djdriz3m.js → shellscript-BLPw4gsk.js} +1 -1
  79. package/gui/dist/assets/{shellsession-Dkak5s2P.js → shellsession-CqcUPQe7.js} +1 -1
  80. package/gui/dist/assets/{soy-CqlitY2w.js → soy-7ilJpWXu.js} +1 -1
  81. package/gui/dist/assets/{sql-BrLHRKP1.js → sql-DLj5IRs-.js} +1 -1
  82. package/gui/dist/assets/{stata-CZpBofQo.js → stata-DZAwA8QB.js} +1 -1
  83. package/gui/dist/assets/{surrealql-DI5AQTqZ.js → surrealql-DjH0RD4_.js} +1 -1
  84. package/gui/dist/assets/{svelte-U4k0rBt4.js → svelte-CwMYMY9c.js} +1 -1
  85. package/gui/dist/assets/{templ-jjK4_r-Y.js → templ-Yp0HSBmI.js} +1 -1
  86. package/gui/dist/assets/{tex-BwNS-MeE.js → tex-2lbf_Uq9.js} +1 -1
  87. package/gui/dist/assets/{ts-tags-CJ1vUXbL.js → ts-tags-B3HKcZ-U.js} +1 -1
  88. package/gui/dist/assets/{tsx-BwmOEMnR.js → tsx-BoZ28JHl.js} +1 -1
  89. package/gui/dist/assets/{twig-hj02oBmU.js → twig-BTqVjw0Y.js} +1 -1
  90. package/gui/dist/assets/{typescript-BnHEhDG5.js → typescript-H8La8DxN.js} +1 -1
  91. package/gui/dist/assets/{typst-9zNH6XOp.js → typst-LpLhjBbD.js} +1 -1
  92. package/gui/dist/assets/{vue-wqTzy8u9.js → vue-BK8HizoK.js} +1 -1
  93. package/gui/dist/assets/{vue-html-unwCMN4c.js → vue-html-yvbIAfmy.js} +1 -1
  94. package/gui/dist/assets/{vue-vine-C-RiGvWN.js → vue-vine-M85qnu2-.js} +1 -1
  95. package/gui/dist/assets/{xml-2pQenJRT.js → xml-Bt1Y75of.js} +1 -1
  96. package/gui/dist/assets/{xsl-B_MbLqZj.js → xsl-di2-gHQj.js} +1 -1
  97. package/gui/dist/assets/{yaml-COm5VSZw.js → yaml-43tUHb7f.js} +1 -1
  98. package/gui/dist/index.html +2 -2
  99. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-C_Umbo_o.js","./html-BgGOZsTs.js","./javascript-DffeUEnj.js","./css-CX_LiCz_.js","./angular-ts-BS5NFEKQ.js","./scss-DhFtC8D4.js","./apl-BXNp6RaU.js","./xml-2pQenJRT.js","./java-B_nJOiTG.js","./json-DmyuI1nx.js","./astro-1di0oIiS.js","./typescript-BnHEhDG5.js","./postcss-BXeXVLqQ.js","./tsx-BwmOEMnR.js","./blade-bFPOELdA.js","./html-derivative-DtSxVTSr.js","./sql-BrLHRKP1.js","./bsl-_VjlB9mv.js","./sdbl-bTVj8UrX.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./chapel-C_HSM6Pq.js","./c-BLZ_xWbb.js","./cobol-DXoz67hJ.js","./coffee-DlhFbGsO.js","./cpp-BaCMyKr2.js","./regexp-B7rcDdRa.js","./glsl-DccBV_n0.js","./crystal-CJURYNNT.js","./shellscript-Djdriz3m.js","./edge-CTUGxEgV.js","./elixir-CQwEci3v.js","./elm-BkLKshkr.js","./erb-1YN1e0vJ.js","./ruby-Dx3POAAI.js","./haml-QnmUImKG.js","./graphql-C2PFH9th.js","./jsx-rE32VeXB.js","./lua-CjD63HfG.js","./yaml-COm5VSZw.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-xMC7jr7x.js","./gdshader-CBce3t8t.js","./gdscript-DYvRD3hg.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-BKS3kIrK.js","./glimmer-js-CcF_d66k.js","./glimmer-ts-CY0XDie9.js","./hack-BCI4tEad.js","./handlebars-CPd4ATQH.js","./http-VJ1JqsCP.js","./hurl-Byqf3Q4J.js","./csv-Dx-8-gkx.js","./hxml-Dcm88srW.js","./haxe-C8oCnwJJ.js","./jinja-M0zKdCfa.js","./jison-BT0-M0gS.js","./julia-DjyTg-6t.js","./r-fe_4bIGN.js","./just-CK65S3r8.js","./perl-B0H1z4iL.js","./latex-94zewxls.js","./tex-BwNS-MeE.js","./liquid-Dl0qLBwx.js","./marko-CBzovuJ1.js","./less-DVTAwKKz.js","./mdc-B89wcoMe.js","./nextflow-CSgcYZcx.js","./nextflow-groovy-D7IRt6Pp.js","./nginx-BtCSV7rr.js","./nim-BT2sttEd.js","./org-DyhV0u0R.js","./clojure-DqKBuwfJ.js","./csharp-dmMxLVLW.js","./dart-CHZY9Xhz.js","./docker-IyjqRm3v.js","./go-rLFTqkRN.js","./groovy-CacY0gHj.js","./ini-B5eOa1yu.js","./make-Dixweg8N.js","./objective-c-D1A_Heim.js","./ocaml-O90oeIOV.js","./php-BPT4W6n1.js","./vb-DOwzaHZ0.js","./raku-B3gFvitq.js","./rust-DpiIf5JO.js","./scala-BiFt_7mu.js","./zig-CMLA9XwU.js","./xsl-B_MbLqZj.js","./pug-BoCt7RDl.js","./qml-Cb4Cd08W.js","./razor-dDhRcZ_O.js","./rst-DjeWGJRw.js","./cmake-Bj61d0ZC.js","./sas-CZOq7qCQ.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-Dkak5s2P.js","./soy-CqlitY2w.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-CZpBofQo.js","./surrealql-DI5AQTqZ.js","./svelte-U4k0rBt4.js","./templ-jjK4_r-Y.js","./ts-tags-CJ1vUXbL.js","./twig-hj02oBmU.js","./typst-9zNH6XOp.js","./bat-qdxAdBWQ.js","./bibtex-Ci_nEsc7.js","./jsonc-CYpm1nAK.js","./log-BNLmms1o.js","./powershell-QtSnmXcu.js","./swift-CyEgAFGc.js","./system-verilog-Dh5ihWbf.js","./verilog-B2gwz-sJ.js","./vue-wqTzy8u9.js","./vue-html-unwCMN4c.js","./vue-vine-C-RiGvWN.js","./stylus-B6D30XZt.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-D6ybriip.js","./html-DHD04EW_.js","./javascript-DbeJguaR.js","./css-CMxAsymy.js","./angular-ts-CZyN0KhI.js","./scss-pSu9IXx-.js","./apl-Dl58kWHo.js","./xml-Bt1Y75of.js","./java-D8DlwLKl.js","./json-C_pcKqnE.js","./astro-DtlnFSUO.js","./typescript-H8La8DxN.js","./postcss-BXeXVLqQ.js","./tsx-BoZ28JHl.js","./blade-DmJ0_rHH.js","./html-derivative-Bml0cGZy.js","./sql-DLj5IRs-.js","./bsl-_VjlB9mv.js","./sdbl-bTVj8UrX.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./chapel-BzC5d5Li.js","./c-mC1a3Brk.js","./cobol-BbiEwu_G.js","./coffee-DE8QSbI2.js","./cpp-Bb3xCuxM.js","./regexp-CTtG2g8b.js","./glsl-CL99TffA.js","./crystal-Dh_G4EEb.js","./shellscript-BLPw4gsk.js","./edge-CniFTb1m.js","./elixir-ZmJWOMj1.js","./elm-DJRxZUyP.js","./erb-BMzBpztO.js","./ruby-DyI3kCSP.js","./haml-BXkO6kY5.js","./graphql-D7Xxg-E7.js","./jsx-CCems14W.js","./lua-BpN0_IRI.js","./yaml-43tUHb7f.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-xMC7jr7x.js","./gdshader-CBce3t8t.js","./gdscript-DYvRD3hg.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-CA-NBf_5.js","./glimmer-js-BhxckZg7.js","./glimmer-ts-p7xbN2k1.js","./hack-CUAoLdpX.js","./handlebars-exD0x3TF.js","./http-DMmIRhh5.js","./hurl-DjxNKi3W.js","./csv-Dx-8-gkx.js","./hxml-Dcm88srW.js","./haxe-C8oCnwJJ.js","./jinja-DZkHuHjU.js","./jison-CKOOVBcn.js","./julia-B67yrJEc.js","./r-DjTBoq9t.js","./just-0ieSYSY9.js","./perl-Qm7miafA.js","./latex-CL5phIW-.js","./tex-2lbf_Uq9.js","./liquid-CLwqJshL.js","./marko-CSJfqvxX.js","./less-DVTAwKKz.js","./mdc-DiIWpMwC.js","./nextflow-CSgcYZcx.js","./nextflow-groovy-D7IRt6Pp.js","./nginx-CjkEKhVl.js","./nim-BWOltqk2.js","./org-D6h3yJk4.js","./clojure-DqKBuwfJ.js","./csharp-dmMxLVLW.js","./dart-CHZY9Xhz.js","./docker-IyjqRm3v.js","./go-rLFTqkRN.js","./groovy-CacY0gHj.js","./ini-B5eOa1yu.js","./make-Dixweg8N.js","./objective-c-D1A_Heim.js","./ocaml-O90oeIOV.js","./php-CtR6lR9E.js","./vb-DOwzaHZ0.js","./raku-B3gFvitq.js","./rust-DpiIf5JO.js","./scala-BiFt_7mu.js","./zig-CMLA9XwU.js","./xsl-di2-gHQj.js","./pug-xYcJQRn0.js","./qml-Bf-2A8LG.js","./razor-jwcmZNf0.js","./rst-F-HSIpRG.js","./cmake-Bj61d0ZC.js","./sas-CX6vfJC8.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-CqcUPQe7.js","./soy-7ilJpWXu.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-DZAwA8QB.js","./surrealql-DjH0RD4_.js","./svelte-CwMYMY9c.js","./templ-Yp0HSBmI.js","./ts-tags-B3HKcZ-U.js","./twig-BTqVjw0Y.js","./typst-LpLhjBbD.js","./bat-qdxAdBWQ.js","./bibtex-Ci_nEsc7.js","./jsonc-CYpm1nAK.js","./log-BNLmms1o.js","./powershell-QtSnmXcu.js","./swift-CyEgAFGc.js","./system-verilog-Dh5ihWbf.js","./verilog-B2gwz-sJ.js","./vue-BK8HizoK.js","./vue-html-yvbIAfmy.js","./vue-vine-M85qnu2-.js","./stylus-B6D30XZt.js"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var se=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ce(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function le(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ce(le.bind(null,e))}var A={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=le,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ee.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ee.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ce,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function E(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(E)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,O=D.port2;D.port1.onmessage=E,te=function(){O.postMessage(null)}}else te=function(){_(E,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ee(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var E=Object.assign,te=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),re=Symbol.for(`react.profiler`),ie=Symbol.for(`react.consumer`),ae=Symbol.for(`react.context`),oe=Symbol.for(`react.forward_ref`),se=Symbol.for(`react.suspense`),ce=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),A=Symbol.for(`react.lazy`),ue=Symbol.for(`react.activity`),de=Symbol.for(`react.legacy_hidden`),fe=Symbol.for(`react.memo_cache_sentinel`),pe=Symbol.for(`react.view_transition`),me=Symbol.for(`react.recoverable`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var _e=Symbol.for(`react.client.reference`);function ve(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case re:return`Profiler`;case ne:return`StrictMode`;case se:return`Suspense`;case ce:return`SuspenseList`;case ue:return`Activity`;case pe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case ae:return e.displayName||`Context`;case ie:return(e._context.displayName||`Context`)+`.Consumer`;case oe:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case le:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case A:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ye=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],Se=-1;function Ce(e){return{current:e}}function we(e){0>Se||(e.current=xe[Se],xe[Se]=null,Se--)}function N(e,t){Se++,xe[Se]=e.current,e.current=t}var Te=Ce(null),Ee=Ce(null),De=Ce(null),Oe=Ce(null);function ke(e,t){switch(N(De,t),N(Ee,e),N(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}we(Te),N(Te,e)}function Ae(){we(Te),we(Ee),we(De)}function je(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,N(Oe,e)),t=Te.current;var n=mp(t,e.type);t!==n&&(N(Ee,e),N(Te,n))}function Me(e){Ee.current===e&&(we(Te),we(Ee)),Oe.current===e&&(we(Oe),uh._currentValue=be)}var Ne,Pe;function Fe(e){if(Ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||``,Pe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+Ne+e+Pe}var Ie=!1;function Le(e,t){if(!e||Ie)return``;Ie=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -6,8 +6,8 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
6
6
  `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
7
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ie=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Fe(n):``}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Fe(e.type);case 16:return Fe(`Lazy`);case 13:return e.child!==t&&t!==null?Fe(`Suspense Fallback`):Fe(`Suspense`);case 19:return Fe(`SuspenseList`);case 0:case 15:return Le(e.type,!1);case 11:return Le(e.type.render,!1);case 1:return Le(e.type,!0);case 31:return Fe(`Activity`);case 30:return Fe(`ViewTransition`);default:return``}}function ze(e){try{var t=``,n=null;do t+=Re(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
8
  Error generating stack: `+e.message+`
9
- `+e.stack}}var Be=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ue=t.unstable_shouldYield,We=t.unstable_requestPaint,Ge=t.unstable_now,Ke=t.unstable_getCurrentPriorityLevel,qe=t.unstable_ImmediatePriority,P=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,Ze=t.log,Qe=t.unstable_setDisableYieldValue,$e=null,et=null;function tt(e){if(typeof Ze==`function`&&Qe(e),et&&typeof et.setStrictMode==`function`)try{et.setStrictMode($e,e)}catch{}}var nt=Math.clz32?Math.clz32:at,rt=Math.log,it=Math.LN2;function at(e){return e>>>=0,e===0?32:31-(rt(e)/it|0)|0}var ot=256,st=262144,ct=4194304;function lt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ut(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=lt(n))):i=lt(o):i=lt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=lt(n))):i=lt(o)):i=lt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function dt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-nt(n),i=1<<r;t|=e[r],n&=~i}return t}function pt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mt(){var e=ct;return ct<<=1,!(ct&62914560)&&(ct=4194304),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-nt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&vt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function vt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-nt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function bt(e,t){var n=t&-t;return n=n&42?1:xt(n),(n&(e.suspendedLanes|t))===0?n:0}function xt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function St(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ct(){var e=M.p;return e===0?(e=window.event,e===void 0?32:Eh(e.type)):e}function wt(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Tt=Math.random().toString(36).slice(2),Et=`__reactFiber$`+Tt,Dt=`__reactProps$`+Tt,F=`__reactContainer$`+Tt,Ot=`__reactEvents$`+Tt,kt=`__reactListeners$`+Tt,At=`__reactHandles$`+Tt,jt=`__reactResources$`+Tt,Mt=`__reactMarker$`+Tt,Nt=`__reactLoad$`+Tt;function Pt(e){delete e[Et],delete e[Dt],delete e[kt],delete e[At]}function I(e){var t;if(t=e[Et])return t;for(var n=e.parentNode;n;){if(t=n[F]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hm(e);e!==null;){if(n=e[Et])return n;e=hm(e)}return t}e=n,n=e.parentNode}return null}function Ft(e){if(e=e[Et]||e[F]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function It(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Lt(e){var t=e[jt];return t||=e[jt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Rt(e){e[Mt]=!0}function zt(e){e[Nt]=void 0}var Bt=new Set,Vt={};function Ht(e,t){Ut(e,t),Ut(e+`Capture`,t)}function Ut(e,t){for(Vt[e]=t,e=0;e<t.length;e++)Bt.add(t[e])}var Wt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Gt={},Kt={};function qt(e){return Be.call(Kt,e)?!0:Be.call(Gt,e)?!1:Wt.test(e)?Kt[e]=!0:(Gt[e]=!0,!1)}var L=!1;function Jt(){var e=L;return L=!1,e}function Yt(e,t,n){if(qt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Zt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Qt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function $t(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function en(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tn(e){if(!e._valueTracker){var t=$t(e)?`checked`:`value`;e._valueTracker=en(e,t,``+e[t])}}function nn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=$t(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var rn=/[\n"\\]/g;function an(e){return e.replace(rn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function on(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Qt(t)):e.value!==``+Qt(t)&&(e.value=``+Qt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):cn(e,Qt(n)):o===`number`&&e.value==t?cn(e,Qt(e.value)):cn(e,Qt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Qt(s):e.removeAttribute(`name`)}function sn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){tn(e);return}n=n==null?``:``+Qt(n),t=t==null?n:``+Qt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),tn(e)}function cn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function ln(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Qt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function un(e,t,n){t!=null&&(t=``+Qt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Qt(n)}function dn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ye(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Qt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),tn(e)}function fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function mn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||pn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function hn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,L=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(mn(e,a,r),L=!0)}else for(var o in t)t.hasOwnProperty(o)&&mn(e,o,t[o])}function gn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var _n=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),vn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yn(e){return vn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function bn(){}var xn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cn=null,wn=null;function Tn(e){var t=Ft(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(on(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+an(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Dt]||null;if(!a)throw Error(i(90));on(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&nn(r)}break a;case`textarea`:un(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&ln(e,!!n.multiple,t,!1)}}}var En=!1;function Dn(e,t,n){if(En)return e(t,n);En=!0;try{return e(t)}finally{if(En=!1,(Cn!==null||wn!==null)&&(Hd(),Cn&&(t=Cn,e=wn,wn=Cn=null,Tn(t),e)))for(t=0;t<e.length;t++)Tn(e[t])}}function On(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Dt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,An=!1;if(kn)try{var jn={};Object.defineProperty(jn,"passive",{get:function(){An=!0}}),window.addEventListener(`test`,jn,jn),window.removeEventListener(`test`,jn,jn)}catch{An=!1}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,n=t.length,r,i=`value`in Mn?Mn.value:Mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Pn=i.slice(e,1<r?1-r:void 0)}function In(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ln(){return!0}function Rn(){return!1}function zn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Ln:Rn,this.isPropagationStopped=Rn,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=E({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=E({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(E({},qn,{dataTransfer:0})),Xn=zn(E({},Hn,{relatedTarget:0})),Zn=zn(E({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(E({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=zn(E({},Bn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=zn(E({},Hn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=zn(E({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=zn(E({},Bn,{submitter:0})),cr=zn(E({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),lr=zn(E({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ur=zn(E({},qn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),dr=zn(E({},Bn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=kn&&`CompositionEvent`in window,mr=null;kn&&`documentMode`in document&&(mr=document.documentMode);var hr=kn&&`TextEvent`in window&&!mr,gr=kn&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=Fn(),Pn=Nn=Mn=null,xr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){Cn?wn?wn.push(r):wn=[r]:Cn=r,t=Zf(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Wf(e,0)}function Ar(e){if(nn(It(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(kn){var Nr;if(kn){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Sn(e)),Dn(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Be.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gr(e.document)}return t}function Xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Zr=kn&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&Wr(ei,r)||(ei=r,r=Zf($r,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionrun:ri(`Transition`,`TransitionRun`),transitionstart:ri(`Transition`,`TransitionStart`),transitioncancel:ri(`Transition`,`TransitionCancel`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};kn&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionrun`),fi=si(`transitionstart`),pi=si(`transitioncancel`),mi=si(`transitionend`),hi=new Map,gi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);gi.push(`scrollEnd`);function _i(e,t){hi.set(e,t),Ht(t,[e])}var vi=0;function yi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=vi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function bi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function xi(e,t){return e=bi(e),t=bi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Si=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ci=[],wi=0,Ti=0;function Ei(){for(var e=wi,t=Ti=wi=0;t<e;){var n=Ci[t];Ci[t++]=null;var r=Ci[t];Ci[t++]=null;var i=Ci[t];Ci[t++]=null;var a=Ci[t];if(Ci[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ai(n,i,a)}}function Di(e,t,n,r){Ci[wi++]=e,Ci[wi++]=t,Ci[wi++]=n,Ci[wi++]=r,Ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Oi(e,t,n,r){return Di(e,t,n,r),ji(e)}function ki(e,t){return Di(e,null,null,t),ji(e)}function Ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-nt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ji(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ni(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pi(e,t,n,r){return new Ni(e,t,n,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ii(e,t){var n=e.alternate;return n===null?(n=Pi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Li(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ri(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Fi(r)&&(s=1);else if(typeof r==`string`)s=Xm(e,n,Te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ue:return e=Pi(31,n,t,a),e.elementType=ue,e.lanes=o,e;case k:return zi(n.children,a,o,t);case ne:s=8,a|=24;break;case re:return e=Pi(12,n,t,a|2),e.elementType=re,e.lanes=o,e;case se:return e=Pi(13,n,t,a),e.elementType=se,e.lanes=o,e;case ce:return e=Pi(19,n,t,a),e.elementType=ce,e.lanes=o,e;case de:case pe:return e=a|32,e=Pi(30,n,t,e),e.elementType=pe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ae:s=10;break a;case ie:s=9;break a;case oe:s=11;break a;case le:s=14;break a;case A:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function zi(e,t,n,r){return e=Pi(7,e,r,t),e.lanes=n,e}function Bi(e,t,n){return e=Pi(6,e,null,t),e.lanes=n,e}function Vi(e){var t=Pi(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ui=new WeakMap;function Wi(e,t){if(typeof e==`object`&&e){var n=Ui.get(e);return n===void 0?(t={value:e,source:t,stack:ze(t)},Ui.set(e,t),t):n}return{value:e,source:t,stack:ze(t)}}var Gi=[],Ki=0,qi=null,Ji=0,Yi=[],Xi=0,Zi=null,Qi=1,$i=``;function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=qi,qi=e,Ji=t}function ta(e,t,n){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Zi=e;var r=Qi;e=$i;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var a=32-nt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qi=1<<32-nt(t)+i|n<<i|r,$i=a+e}else Qi=1<<a|n<<i|r,$i=e}function na(e){e.return!==null&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null;for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,$i=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null}function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Qi=t.id,$i=t.overflow,Zi=e}var aa=null,oa=null,R=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Et]=e,t[Dt]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),sn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),dn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=bn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(aa=e.return;aa;)switch(aa.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:aa=aa.return}}function pa(e){if(e!==aa)return!1;if(!R)return fa(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||gp(e.type,e.memoizedProps)),n=!n),n&&oa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=mm(e)}else t===27?(t=oa,Tp(e.type)?(e=pm,pm=null,oa=e):oa=t):oa=aa?fm(e.stateNode.nextSibling):null;return!0}function ma(){oa=aa=null,R=!1}function ha(){var e=sa;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=Ce(null),va=null,ya=null;function ba(e,t,n){N(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,we(_a)}function Sa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ca(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Sa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Sa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function wa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[uh]:e.push(uh))}a=a.return}return e!==null&&Ca(t,e,n,r),t.flags|=262144,e!==null}function Ta(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ea(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Da(e){return ka(va,e)}function Oa(e,t){return va===null&&Ea(e),ka(e,t)}function ka(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ja=t.unstable_scheduleCallback,Ma=t.unstable_NormalPriority,Na={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pa(){return{controller:new Aa,data:new Map,refCount:0}}function Fa(e){e.refCount--,e.refCount===0&&ja(Ma,function(){e.controller.abort()})}function Ia(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var La=null;function Ra(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var za=null,Ba=0,Va=0,Ha=null;function Ua(e,t){if(za===null){var n=za=[];Ba=0,Va=Lf(),Ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ba++,t.then(Wa,Wa),t}function Wa(){if(--Ba===0&&(La=null,za!==null)){Ha!==null&&(Ha.status=`fulfilled`);var e=za;za=null,Va=0,Ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ka=j.S;j.S=function(e,t){if(vd=Ge(),typeof t==`object`&&t&&typeof t.then==`function`&&Ua(e,t),La!==null)for(var n=Cf;n!==null;)Ia(n,La),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)Ia(r,n),r=r.next;if(Va!==0){r=La,r===null&&(r=La=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ka!==null&&Ka(e,t)};var qa=Ce(null);function Ja(){var e=qa.current;return e===null?td.pooledCache:e}function Ya(e,t){t===null?N(qa,qa.current):N(qa,t.pool)}function Xa(){var e=Ja();return e===null?null:{parent:Na._currentValue,pool:e}}var Za=Error(i(460)),Qa=Error(i(474)),$a=Error(i(542)),eo={then:function(){}};function to(e){return e=e.status,e===`fulfilled`||e===`rejected`}function no(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(bn,bn);else{if(e=td,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e}throw io=t,Za}}function ro(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(io=e,Za):e}}var io=null;function ao(){if(io===null)throw Error(i(459));var e=io;return io=null,e}function oo(e){if(e===Za||e===$a)throw Error(i(483))}var so=null,co=0;function lo(e){var t=co;return co+=1,so===null&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function fo(e,t){throw t.$$typeof===te?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function po(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Bi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),uo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===A&&ro(i)===t.type)?(t=a(t,n.props),uo(t,n),t.return=e,t):(t=Ri(n.type,n.key,n.props,null,e.mode,r),uo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=zi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ri(t.type,t.key,t.props,null,e.mode,n),uo(n,t),n.return=e,n;case O:return t=Hi(t,e.mode,n),t.return=e,t;case A:return t=ro(t),f(e,t,n)}if(ye(t)||ge(t))return t=zi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,lo(t),n);if(t.$$typeof===ae)return f(e,Oa(e,t),n);fo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case A:return n=ro(n),p(e,t,n,r)}if(ye(n)||ge(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,lo(n),r);if(n.$$typeof===ae)return p(e,t,Oa(e,n),r);fo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case A:return r=ro(r),m(e,t,n,r,i)}if(ye(r)||ge(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,lo(r),i);if(r.$$typeof===ae)return m(e,t,n,Oa(t,r),i);fo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&ea(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&ea(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),R&&ea(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&ea(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&ea(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&ea(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===A&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=zi(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Ri(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Hi(o,e.mode,c),c.return=e,e=c}return s(e);case A:return o=ro(o),_(e,r,o,c)}if(ye(o))return h(e,r,o,c);if(ge(o)){if(l=ge(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===ae)return _(e,r,Oa(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ji(e),Ai(e,null,n),t}return Di(e,r,t,n),ji(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Eo(n[e],t)}var Oo=Ce(null),ko=Ce(0);function Ao(e,t){e=sd,N(ko,e),N(Oo,t),sd=e|t.baseLanes}function jo(){N(ko,sd),N(Oo,Oo.current)}function Mo(){sd=ko.current,we(Oo),we(ko)}var No=Ce(null),Po=null;function Fo(e){var t=e.alternate;N(Bo,Bo.current&1),N(No,e),Po===null&&(t===null||Oo.current!==null||t.memoizedState!==null)&&(Po=e)}function Io(e){N(Bo,Bo.current),N(No,e),Po===null&&(Po=e)}function Lo(e){e.tag===22?(N(Bo,Bo.current),N(No,e),Po===null&&(Po=e)):Ro()}function Ro(){N(Bo,Bo.current),N(No,No.current)}function zo(e){we(No),Po===e&&(Po=null),we(Bo)}var Bo=Ce(0);function Vo(e,t){N(No,No.current),N(Bo,t)}function Ho(e){we(Bo),we(No),Po===e&&(Po=null)}function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lm(n)||um(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wo=0,z=null,Go=null,Ko=null,qo=!1,Jo=!1,Yo=!1,Xo=0,Zo=0,Qo=null,$o=0;function es(){throw Error(i(321))}function ts(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,i,a){return Wo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?vc:yc,Yo=!1,a=n(r,i),Yo=!1,Jo&&(a=is(t,n,r,i)),rs(e),a}function rs(e){j.H=_c;var t=Go!==null&&Go.next!==null;if(Wo=0,Ko=Go=z=null,qo=!1,Zo=0,Qo=null,t)throw Error(i(300));e===null||Ic||(e=e.dependencies,e!==null&&Ta(e)&&(Ic=!0))}function is(e,t,n,r){z=e;var a=0;do{if(Jo&&(Qo=null),Zo=0,Jo=!1,25<=a)throw Error(i(301));if(a+=1,Ko=Go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=bc,o=t(n,r)}while(Jo);return o}function as(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?fs(t):t,e=e.useState()[0],(Go===null?null:Go.memoizedState)!==e&&(z.flags|=1024),t}function os(){var e=Xo!==0;return Xo=0,e}function ss(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cs(e){if(qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qo=!1}Wo=0,Ko=Go=z=null,Jo=!1,Zo=Xo=0,Qo=null}function ls(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ko===null?z.memoizedState=Ko=e:Ko=Ko.next=e,Ko}function us(){if(Go===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=Go.next;var t=Ko===null?z.memoizedState:Ko.next;if(t!==null)Ko=t,Go=e;else{if(e===null)throw z.alternate===null?Error(i(467)):Error(i(310));Go=e,e={memoizedState:Go.memoizedState,baseState:Go.baseState,baseQueue:Go.baseQueue,queue:Go.queue,next:null},Ko===null?z.memoizedState=Ko=e:Ko=Ko.next=e}return Ko}function ds(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fs(e){var t=Zo;return Zo+=1,Qo===null&&(Qo=[]),e=no(Qo,e,t),t=z,(Ko===null?t.memoizedState:Ko.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?vc:yc),e}function ps(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return fs(e);if(e.$$typeof===me)return;if(e.$$typeof===ae)return Da(e)}throw Error(i(438,String(e)))}function ms(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ds(),z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=fe;return t.index++,n}function hs(e,t){return typeof t==`function`?t(e):t}function gs(e){return _s(us(),Go,e)}function _s(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Wo&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Va&&(d=!0);else if((Wo&p)===p){u=u.next,p===Va&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,z.lanes|=p,ld|=p;f=u.action,Yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,z.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Ic=!0,d&&(n=Ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vs(e){var t=us(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ur(o,t.memoizedState)||(Ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ys(e,t,n){var r=z,a=us(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((Go||a).memoizedState,n);if(s&&(a.memoizedState=n,Ic=!0),a=a.queue,Us(Ss.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ko!==null&&!!(Ko.memoizedState.tag&1),Rs(e?9:8,{destroy:void 0},xs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,td===null)throw Error(i(349));o||Wo&127||bs(r,t,n)}return n}function bs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=ds(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xs(e,t,n,r){t.value=n,t.getSnapshot=r,Cs(t)&&ws(e)}function Ss(e,t,n){return n(function(){Cs(t)&&ws(e)})}function Cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function ws(e){var t=ki(e,2);t!==null&&Ld(t,e,2)}function Ts(e){var t=ls();if(typeof e==`function`){var n=e;if(e=n(),Yo){tt(!0);try{n()}finally{tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:e},t}function Es(e,t,n,r){return e.baseState=n,_s(e,Go,typeof r==`function`?r:hs)}function Ds(e,t,n,r,a){if(mc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Os(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Os(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};o.types=a===null?null:a.types,j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),ks(e,t,s)}catch(n){As(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),ks(e,t,a)}catch(n){As(e,t,n)}}function ks(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){B(e,t,n)},function(n){return As(e,t,n)}):B(e,t,n)}function B(e,t,n){t.status=`fulfilled`,t.value=n,js(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Os(e,n)))}function As(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,js(t),t=t.next;while(t!==r)}e.action=null}function js(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ms(e,t){return t}function Ns(e,t){if(R){var n=td.formState;if(n!==null){a:{var r=z;if(R){if(oa){b:{for(var i=oa,a=ca;i.nodeType!==8;)if(!a||(i=fm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){oa=fm(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=ls(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:t},n.queue=r,n=dc.bind(null,z,r),r.dispatch=n,r=Ts(!1),a=pc.bind(null,z,!1,r.queue),r=ls(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ds.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ps(e){return Fs(us(),Go,e)}function Fs(e,t,n){if(t=_s(e,t,Ms)[0],e=gs(hs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=fs(t)}catch(e){throw e===Za?$a:e}else r=t;t=us();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,Rs(9,{destroy:void 0},Is.bind(null,i,n),null)),[r,a,e]}function Is(e,t){e.action=t}function Ls(e){var t=us(),n=Go;if(n!==null)return Fs(t,n,e);us(),t=t.memoizedState,n=us();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=ds(),z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zs(){return us().memoizedState}function Bs(e,t,n,r){var i=ls();z.flags|=e,i.memoizedState=Rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Vs(e,t,n,r){var i=us();r=r===void 0?null:r;var a=i.memoizedState.inst;Go!==null&&r!==null&&ts(r,Go.memoizedState.deps)?i.memoizedState=Rs(t,a,n,r):(z.flags|=e,i.memoizedState=Rs(1|t,a,n,r))}function Hs(e,t){Bs(8390656,8,e,t)}function Us(e,t){Vs(2048,8,e,t)}function Ws(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=ds(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gs(e){var t=us().memoizedState;return Ws({ref:t,nextImpl:e}),function(){if(G&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ks(e,t){return Vs(4,2,e,t)}function qs(e,t){return Vs(4,4,e,t)}function Js(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ys(e,t,n){n=n==null?null:n.concat([e]),Vs(4,4,Js.bind(null,t,e),n)}function Xs(){}function Zs(e,t){var n=us();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qs(e,t){var n=us();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ts(t,r[1]))return r[0];if(r=e(),Yo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r}function $s(e,t,n){return n===void 0||Wo&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),z.lanes|=e,ld|=e,n)}function ec(e,t,n,r){return Ur(n,t)?n:Oo.current===null?!(Wo&106)||Wo&1073741824&&!(q&261930)?(Ic=!0,e.memoizedState=n):(e=Fd(),z.lanes|=e,ld|=e,t):(e=$s(e,n,r),Ur(e,t)||(Ic=!0),e)}function tc(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,pc(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,Ga(c,r),Pd(e)):fc(e,t,r,Pd(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ic(e).queue;tc(e,a,t,be,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:be},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},Pd())}function oc(){return Da(uh)}function sc(){return us().memoizedState}function cc(){return us().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=yo(n);var r=bo(t,e,n);r!==null&&(Ld(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=Oi(e,t,n,r),n!==null&&(Ld(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,Pd())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o))return Di(e,t,i,0),td===null&&Ei(),!1}catch{}if(n=Oi(e,t,i,r),n!==null)return Ld(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(i(479))}else t=Oi(e,n,r,2),t!==null&&Ld(t,e,2)}function mc(e){var t=e.alternate;return e===z||t!==null&&t===z}function hc(e,t){Jo=qo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}var _c={readContext:Da,use:ps,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useLayoutEffect:es,useInsertionEffect:es,useMemo:es,useReducer:es,useRef:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useSyncExternalStore:es,useId:es,useHostTransitionStatus:es,useFormState:es,useActionState:es,useOptimistic:es,useMemoCache:es,useCacheRefresh:es,useEffectEvent:es},vc={readContext:Da,use:ps,useCallback:function(e,t){return ls().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=ls();t=t===void 0?null:t;var r=e();if(Yo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ls();if(n!==void 0){var i=n(t);if(Yo){tt(!0);try{n(t)}finally{tt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=uc.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=ls();return e={current:e},t.memoizedState=e},useState:function(e){e=Ts(e);var t=e.queue,n=dc.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(ls(),e,t)},useTransition:function(){var e=Ts(!1);return e=tc.bind(null,z,e.queue,!0,!1),ls().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=ls();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));q&127||bs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Hs(Ss.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},xs.bind(null,r,o,n,t),null),n},useId:function(){var e=ls(),t=td.identifierPrefix;if(R){var n=$i,r=Qi;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=$o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:oc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e){var t=ls();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=pc.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:ms,useCacheRefresh:function(){return ls().memoizedState=lc.bind(null,z)},useEffectEvent:function(e){var t=ls(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},yc={readContext:Da,use:ps,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:gs,useRef:zs,useState:function(){return gs(hs)},useDebugValue:Xs,useDeferredValue:function(e,t){return ec(us(),Go.memoizedState,e,t)},useTransition:function(){var e=gs(hs)[0],t=us().memoizedState;return[typeof e==`boolean`?e:fs(e),t]},useSyncExternalStore:ys,useId:sc,useHostTransitionStatus:oc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){return Es(us(),Go,e,t)},useMemoCache:ms,useCacheRefresh:cc,useEffectEvent:Gs},bc={readContext:Da,use:ps,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:vs,useRef:zs,useState:function(){return vs(hs)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=us();return Go===null?$s(n,e,t):ec(n,Go.memoizedState,e,t)},useTransition:function(){var e=vs(hs)[0],t=us().memoizedState;return[typeof e==`boolean`?e:fs(e),t]},useSyncExternalStore:ys,useId:sc,useHostTransitionStatus:oc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e,t){var n=us();return Go===null?(n.baseState=e,[e,n.queue.dispatch]):Es(n,Go,e,t)},useMemoCache:ms,useCacheRefresh:cc,useEffectEvent:Gs};function xc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:E({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=yo(r);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Ld(t,e,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=yo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Ld(t,e,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=yo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(Ld(t,e,n),xo(t,e,n))}};function Cc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(i,a):!0}function wc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sc.enqueueReplaceState(t,t.state,null)}function Tc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=E({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ec(e){Si(e)}function Dc(e){console.error(e)}function Oc(e){Si(e)}function kc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ac(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function jc(e,t,n){return n=yo(n),n.tag=3,n.payload={element:null},n.callback=function(){kc(e,t)},n}function Mc(e){return e=yo(e),e.tag=3,e}function Nc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ac(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ac(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Pc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&wa(t,n,a,!0),n=No.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Po===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Yd(),!1}if(R)return t=No.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Wi(r,n),a=jc(e.stateNode,r,a),So(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Wi(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=jc(n.stateNode,r,e),So(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Mc(a),Nc(a,e,n,r),So(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Fc=Error(i(461)),Ic=!1;function Lc(e,t,n,r){t.child=e===null?ho(t,null,n,r):mo(t,e.child,n,r)}function Rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ea(t),r=ns(e,t,n,o,a,i),s=os(),e!==null&&!Ic?(ss(e,t,i),fl(e,t,i)):(R&&s&&na(t),t.flags|=1,Lc(e,t,r,i),t.child)}function zc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Bc(e,t,a,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!pl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return fl(e,t,i)}return t.flags|=1,e=Ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function Bc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Ic=!1,t.pendingProps=r=a,pl(e,i))e.flags&131072&&(Ic=!0);else return t.lanes=e.lanes,fl(e,t,i)}}return Jc(e,t,n,r,i)}function Vc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ya(t,a===null?null:a.cachePool),a===null?jo():Ao(t,a),Lo(t);else return r=t.lanes=536870912,Uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ya(t,null),jo(),Ro()):(Ya(t,a.cachePool),Ao(t,a),Ro(),t.memoizedState=null);return Lc(e,t,i,n),t.child}function Hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Uc(e,t,n,r,i){var a=Ja();return a=a===null?null:{parent:Na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ya(t,null),jo(),Lo(t),e!==null&&wa(e,t,r,!0),t.childLanes=i,null}function Wc(e,t){return t=rl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gc(e,t,n){return mo(t,e.child,null,n),e=Wc(t,t.pendingProps),e.flags|=2,zo(t),t.memoizedState=null,e}function Kc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=Wc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Hc(null,e);if(Io(t),(e=oa)?(e=cm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Wc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Io(t),a){if(t.flags&256)t.flags&=-257,t=Gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ic||wa(e,t,n,!1),a=(n&e.childLanes)!==0,Ic||a){if(Oo.current===null){if(r=td,r!==null&&(s=bt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ki(e,s),Ld(r,e,s),Fc;Yd()}t=Gc(e,t,n)}else e=o.treeContext,oa=fm(s.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=Wc(t,r),t.flags|=134221824;return t}return e=Ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Jc(e,t,n,r,i){return Ea(t),n=ns(e,t,n,r,void 0,i),r=os(),e!==null&&!Ic?(ss(e,t,i),fl(e,t,i)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,i),t.child)}function Yc(e,t,n,r,i,a){return Ea(t),t.updateQueue=null,n=is(t,r,n,i),rs(e),r=os(),e!==null&&!Ic?(ss(e,t,a),fl(e,t,a)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,a),t.child)}function Xc(e,t,n,r,i){if(Ea(t),t.stateNode===null){var a=Mi,o=n.contextType;typeof o==`object`&&o&&(a=Da(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},_o(t),o=n.contextType,a.context=typeof o==`object`&&o?Da(o):Mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(xc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Sc.enqueueReplaceState(a,a.state,null),To(t,r,a,i),wo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Tc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Mi,typeof u==`object`&&u&&(o=Da(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&wc(t,a,r,o),go=!1;var f=t.memoizedState;a.state=f,To(t,r,a,i),wo(),l=t.memoizedState,s||f!==l||go?(typeof d==`function`&&(xc(t,n,d,r),l=t.memoizedState),(c=go||Cc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,vo(e,t),o=t.memoizedProps,u=Tc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Mi,typeof l==`object`&&l&&(c=Da(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&wc(t,a,r,c),go=!1,f=t.memoizedState,a.state=f,To(t,r,a,i),wo();var p=t.memoizedState;o!==d||f!==p||go||e!==null&&e.dependencies!==null&&Ta(e.dependencies)?(typeof s==`function`&&(xc(t,n,s,r),p=t.memoizedState),(u=go||Cc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,qc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=mo(t,e.child,null,i),t.child=mo(t,null,n,i)):Lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=fl(e,t,i),e}function Zc(e,t,n,r){return ma(),t.flags|=256,Lc(e,t,n,r),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:Xa()}}function el(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function tl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Bo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(R){if(i?Fo(t):Ro(),(e=oa)?(e=cm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=um(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ro(),i=t.mode,a=rl({mode:`hidden`,children:a},i),r=zi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=$c(n),r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(null,r)):(Fo(t),nl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return al(e,t,a,o,r,c,s,n)}return i?(Ro(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ii(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=zi(i,a,n,null),i.flags|=2):i=Ii(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Hc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=$c(n):(a=i.cachePool,a===null?a=Xa():(s=Na._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(e.child,r)):(Fo(t),n=e.child,e=n.sibling,n=Ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function nl(e,t){return t=rl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function rl(e,t){return e=Pi(22,e,null,t),e.lanes=0,e}function il(e,t,n){return mo(t,e.child,null,n),e=nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function al(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Fo(t),t.flags&=-257,il(e,t,c)):t.memoizedState===null?(Ro(),o=a.fallback,s=t.mode,a=rl({mode:`visible`,children:a.children},s),o=zi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,mo(t,e.child,null,c),a=t.child,a.memoizedState=$c(c),a.childLanes=el(e,r,c),t.memoizedState=Qc,Hc(null,a)):(Ro(),t.child=e.child,t.flags|=128,null);if(Fo(t),um(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ga({value:a,source:null,stack:null})),il(e,t,c)}if(Ic||wa(e,t,c,!1),r=(c&e.childLanes)!==0,Ic||r){if(Oo.current!==null)return il(e,t,c);if(r=td,r!==null&&(a=bt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,ki(e,a),Ld(r,e,a),Fc;return lm(o)||Yd(),il(e,t,c)}return lm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,oa=fm(o.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=nl(t,a.children),t.flags|=134221824,t)}function ol(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sa(e.return,t,n)}function sl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Uo(n)===null&&(t=e),e=e.sibling}return t}function cl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ll(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ul(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Bo.current;if(t.flags&128)return Vo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Vo(t,o),i===`backwards`&&e!==null?(ll(e),Lc(e,t,r,n),ll(e)):Lc(e,t,r,n),r=R?Ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ol(e,n,t);else if(e.tag===19)ol(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ll(t)),cl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cl(t,!0,n,null,a,r);break;case`together`:cl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cl(t,!1,i,n,a,r)}return t.child}function dl(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Lc(e,t,r.children,n),t.child}function fl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(wa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ta(e)))}function ml(e,t,n){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),ba(t,Na,e.memoizedState.cache),ma();break;case 27:case 5:je(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Io(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Fo(t),t.flags|=128,null;r=wa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?tl(e,t,n):(Fo(t),e=fl(e,t,n),e===null?null:e.sibling)}Fo(t);break;case 19:if(t.flags&128)return ul(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(wa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ul(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vo(t,Bo.current),r)break;return null;case 22:return t.lanes=0,Vc(e,t,n,t.pendingProps);case 24:ba(t,Na,e.memoizedState.cache)}return fl(e,t,n)}function hl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ic=!0;else{if(!pl(e,n)&&!(t.flags&128))return Ic=!1,ml(e,t,n);Ic=!!(e.flags&131072)}}else Ic=!1,R&&t.flags&1048576&&ta(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,typeof e==`function`)Fi(e)?(r=Tc(e,r),t.tag=1,t=Xc(null,t,e,r,n)):(t.tag=0,t=Jc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===oe){t.tag=11,t=Rc(null,t,e,r,n);break a}if(a===le){t.tag=14,t=zc(null,t,e,r,n);break a}if(a===ae){t.tag=10,t.type=e,t=dl(null,t,n);break a}}throw t=ve(e)||e,Error(i(306,t,``))}}return t;case 0:return Jc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Tc(r,t.pendingProps),Xc(e,t,r,a,n);case 3:a:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,vo(e,t),To(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,Na,r),r!==o.cache&&Ca(t,[Na],n,!0),wo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Zc(e,t,r,n);break a}if(r!==a){a=Wi(Error(i(424)),t),ga(a),t=Zc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(oa=fm(e.firstChild),aa=t,R=!0,sa=null,ca=!0,n=ho(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=fl(e,t,n);break a}Lc(e,t,r,n)}t=t.child}return t;case 26:return qc(e,t),e===null?(n=Im(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(t.stateNode=hp(t.type,t.pendingProps,De.current,t)):t.memoizedState=Im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&R&&(r=t.stateNode=vm(t.type,t.pendingProps,De.current),aa=t,ca=!0,a=oa,Tp(t.type)?(pm=a,oa=fm(r.firstChild)):oa=a),Lc(e,t,t.pendingProps.children,n),qc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=oa)&&(r=om(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,aa=t,oa=fm(r.firstChild),ca=!1,a=!0)),a||ua(t)),je(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,gp(a,o)?r=null:s!==null&&gp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ns(e,t,as,null,null,n),uh._currentValue=a),qc(e,t),Lc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=oa)&&(n=sm(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,aa=t,oa=null,e=!0)),e||ua(t)),null;case 13:return tl(e,t,n);case 4:return ke(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):Lc(e,t,r,n),t.child;case 11:return Rc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,qc(e,t),Lc(e,t,r,n),t.child;case 8:return Lc(e,t,t.pendingProps.children,n),t.child;case 12:return Lc(e,t,t.pendingProps.children,n),t.child;case 10:return dl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ea(t),a=Da(a),r=r(a),t.flags|=1,Lc(e,t,r,n),t.child;case 14:return zc(e,t,t.type,t.pendingProps,n);case 15:return Bc(e,t,t.type,t.pendingProps,n);case 19:return ul(e,t,n);case 31:return Kc(e,t,n);case 22:return Vc(e,t,n,t.pendingProps);case 24:return Ea(t),r=Da(Na),e===null?(a=Ja(),a===null&&(a=td,o=Pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},_o(t),ba(t,Na,a)):((e.lanes&n)!==0&&(vo(e,t),To(t,null,null,n),wo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,Na,r),r!==a.cache&&Ca(t,[Na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,Na,r))),Lc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:R&&na(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:qc(e,t),Lc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function gl(e){e.flags|=4}function _l(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Zm(t,r):Zm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw io=eo,Qa}}else e.flags&=-16777217}function vl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t)){if(Kd())e.flags|=8192;else throw io=eo,Qa}}function yl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:mt(),e.lanes|=t,pd|=t)}function bl(e,t){if(!R)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function xl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Sl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xl(t),null;case 1:return xl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(Na),Ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?gl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),xl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(gl(t),o===null?(xl(t),_l(t,a,null,r,n)):(xl(t),vl(t,o))):o?o===e.memoizedState?(xl(t),t.flags&=-16777217):(gl(t),xl(t),vl(t,o)):(e=e.memoizedProps,e!==r&&gl(t),xl(t),_l(t,a,e,r,n)),null;case 27:if(Me(t),n=De.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}e=Te.current,pa(t)?da(t,e):(e=vm(a,r,n),t.stateNode=e,gl(t))}return xl(t),t.subtreeFlags&=-33554433,null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}if(o=Te.current,pa(t))da(t,o);else{var s=fp(De.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Et]=t,o[Dt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ap(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&gl(t)}}return xl(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=De.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=aa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||ua(t,!0)}else e=fp(e).createTextNode(r),e[Et]=t,t.stateNode=e}return xl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Et]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return xl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Et]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),yl(t,t.updateQueue),xl(t),null);case 4:return Ae(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,xl(t),null;case 10:return xa(t.type),xl(t),null;case 19:if(Ho(t),r=t.memoizedState,r===null)return xl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)bl(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Uo(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Li(n,e),n=n.sibling;return Vo(t,Bo.current&1|2),R&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ge()>yd&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!R)return xl(t),null}else 2*Ge()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ge(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||R?Vo(t,o):(n=o,N(No,t),N(Bo,n),Po===null&&(Po=t)),R&&ea(t,r.treeForkCount),e}return xl(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(xl(t),t.subtreeFlags&6&&(t.flags|=8192)):xl(t),n=t.updateQueue,n!==null&&yl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&we(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(Na),xl(t),null;case 25:return null;case 30:return t.flags|=33554432,xl(t),null}throw Error(i(156,t.tag))}function Cl(e,t){switch(ra(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(Na),Ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ho(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ae(),null;case 10:return xa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&we(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(Na),null;case 25:return null;default:return null}}function wl(e,t){switch(ra(t),t.tag){case 3:xa(Na),Ae();break;case 26:case 27:case 5:Me(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Ho(t);break;case 10:xa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&we(qa);break;case 24:xa(Na)}}function Tl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){J(t,t.return,e)}}function El(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){J(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){J(t,t.return,e)}}function Dl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){J(e,e.return,t)}}}function Ol(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){J(e,t,n)}}function kl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=yi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);m(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){J(e,t,n)}}function Al(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){J(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){J(e,t,n)}else n.current=null}}function jl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)rm(e.stateNode,t[n])}function Ml(e){for(var t=e.return;t!==null&&(Fl(t)&&rm(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Nl(e){for(var t=e.return;t!==null&&(Fl(t)&&im(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Pl(e){return e.tag===5||e.tag===3||e.tag===27}function Fl(e){return e&&e.tag===7&&e.stateNode!==null}function Il(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){J(e,e.return,t)}}function Ll(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[Dt]=t}catch(t){J(e,e.return,t)}}function Rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tp(e.type)||e.tag===4}function zl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Tp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bn)),jl(e,r),L=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Tp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),jl(e,r),L=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Tp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Vl(e,t,n,r),e=e.sibling;e!==null;)Vl(e,t,n,r),e=e.sibling}function Hl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ap(t,r,n),t[Et]=e,t[Dt]=n}catch(t){J(e,e.return,t)}}var Ul=!1,Wl=null;function Gl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ul=!0)}var Kl=null;function ql(){var e=Kl;return Kl=null,e}var Jl=0;function Yl(e,t,n,r,i){return Jl=0,Xl(e.child,t,n,r,i)}function Xl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=jp(o);r.push(s),s.view&&(a=!0)}else a||jp(o).view&&(a=!0);Ul=!0,Op(o,Jl===0?t:t+`_`+Jl,n),Jl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Xl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Zl(e,t){for(;e!==null;)e.tag===5?kp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Zl(e.child,t),e=e.sibling}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=xi(t.default,t.share),t!==`none`&&(Yl(e,n,t,null,!1)||Zl(e.child,!1))}e=e.sibling}}function $l(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=yi(r,n),a=xi(r.default,n.paired?r.share:r.enter);a===`none`?Ql(e):Yl(e,i,a,null,!1)?(Ql(e),n.paired||t||Id(e,r.onEnter)):Zl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e,t),e=e.sibling;else Ql(e)}function eu(e){if(Wl!==null&&Wl.size!==0){var t=Wl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=xi(n.default,n.share);if(a!==`none`&&(Yl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Zl(e.child,!1)),t.delete(r),t.size===0)break}}}eu(e)}e=e.sibling}}}function tu(e){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode),r=Wl===null?void 0:Wl.get(n),i=xi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Yl(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Wl.delete(n),Id(e,t.onShare)):Zl(e.child,!1)),Wl!==null&&eu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else Wl!==null&&eu(e)}function nu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode);t=xi(t.default,t.update),e.flags&=-5,t!==`none`&&Yl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&nu(e);e=e.sibling}}function ru(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Zl(e.child,!1))}ru(e)}e=e.sibling}}function iu(e){if(e.tag===30)e.stateNode.paired=null,Zl(e.child,!1),ru(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)iu(e),e=e.sibling;else ru(e)}function au(e){for(e=e.child;e!==null;)e.tag===30?Zl(e.child,!1):e.subtreeFlags&33554432&&au(e),e=e.sibling}function ou(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Jl<a.length){var l=a[Jl],u=jp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Op(c,Jl===0?n:n+`_`+Jl,i),s&&e.flags&4||(Kl===null&&(Kl=[]),Kl.push(c,Jl===0?r:r+`_`+Jl,t.memoizedProps)),Jl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ou(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function su(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=yi(n,r),a=xi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Jl=0,i=ou(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&su(e,t);e=e.sibling}}var cu=!1,V=!1,lu=!1,uu=!1,du=typeof WeakSet==`function`?WeakSet:Set,fu=null,pu=!1,mu=!1,hu=!1,gu=!1;function _u(e,t,n){if(e=e.containerInfo,up=yh,e=Yr(e),Xr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(dp={focusedElem:e,selectionRange:r},yh=!1,n=(n&335544064)===n,fu=t,t=n?9270:1024;fu!==null;){if(e=fu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&tu(r[a]);if(e.alternate===null&&e.flags&2)n&&Gl(e),vu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&tu(r),vu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Gl(e),vu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,fu=r):(n&&nu(e),vu(n))}}Wl=null}function vu(e){for(;fu!==null;){var t=fu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Tc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){J(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)am(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:am(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=yi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=xi(a.default,a.update),a!==`none`&&Yl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,fu=r;break}fu=t.return}}function yu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Lu(e,n),r&4&&Tl(5,n);break;case 1:if(Lu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){J(n,n.return,e)}else{var i=Tc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){J(n,n.return,e)}}}r&64&&Dl(n),r&512&&kl(n,n.return);break;case 3:if(Lu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Do(e,t)}catch(e){J(n,n.return,e)}}break;case 27:t===null&&r&4&&Hl(n);case 26:case 5:Lu(e,n),t===null&&r&4&&Il(n),r&512&&kl(n,n.return);break;case 12:Lu(e,n);break;case 31:Lu(e,n),r&4&&Eu(e,n);break;case 13:Lu(e,n),r&4&&Du(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),dm(e,n))));break;case 22:if(r=n.memoizedState!==null||cu,!r){var a=t!==null&&t.memoizedState!==null||V;t=cu,i=V,cu=r,(V=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),zu(e,n,r)):Lu(e,n),cu=t,V=i}break;case 30:Lu(e,n),r&512&&kl(n,n.return);break;case 7:r&512&&kl(n,n.return);default:Lu(e,n)}}function bu(e,t){for(e=e.child;e!==null;)xu(e,t),e=e.sibling}function xu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){J(e,e.return,t)}Su(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,L=!0}catch(t){J(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Dp(s,!0):Dp(e.stateNode,!1)}catch(t){J(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&bu(e,t);break;default:bu(e,t)}}function Su(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:xu(n,r);break a;case 22:n.memoizedState===null&&Su(n,r);break a;default:Su(n,r)}}e=e.sibling}}function Cu(e){var t=e.alternate;t!==null&&(e.alternate=null,Cu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var H=null,wu=!1;function U(e,t,n){for(n=n.child;n!==null;)Tu(e,t,n),n=n.sibling}function Tu(e,t,n){if(et&&typeof et.onCommitFiberUnmount==`function`)try{et.onCommitFiberUnmount($e,n)}catch{}switch(n.tag){case 26:V||Al(n,t),U(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!V&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:V||Al(n,t),Nl(n);var r=H,i=wu;Tp(n.type)&&(H=n.stateNode,wu=!1),U(e,t,n),ym(n.stateNode,n.type,n.memoizedProps),H=r,wu=i;break;case 5:V||Al(n,t),Nl(n);case 6:if(n.tag===6&&Nl(n),r=H,i=wu,H=null,U(e,t,n),H=r,wu=i,H!==null){if(wu)try{(H.nodeType===9?H.body:H.nodeName===`HTML`?H.ownerDocument.body:H).removeChild(n.stateNode),L=!0}catch(e){J(n,t,e)}else try{H.removeChild(n.stateNode),L=!0}catch(e){J(n,t,e)}}break;case 18:H!==null&&(wu?(e=H,Ep(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gh(e)):Ep(H,n.stateNode));break;case 4:r=H,i=wu,H=n.stateNode.containerInfo,wu=!0,U(e,t,n),H=r,wu=i;break;case 0:case 11:case 14:case 15:El(2,n,t),V||El(4,n,t),U(e,t,n);break;case 1:V||(Al(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ol(n,t,r)),U(e,t,n);break;case 21:U(e,t,n);break;case 22:V=(r=V)||n.memoizedState!==null,U(e,t,n),V=r;break;case 30:Al(n,t),U(e,t,n);break;case 7:V||Al(n,t),U(e,t,n);break;default:U(e,t,n)}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gh(e)}catch(e){J(t,t.return,e)}}}function Du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gh(e)}catch(e){J(t,t.return,e)}}function Ou(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(i(435,e.tag))}}function ku(e,t){var n=Ou(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Au(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Tp(l.type)){H=l.stateNode,wu=!1;break a}break;case 5:H=l.stateNode,wu=!1;break a;case 3:case 4:H=l.stateNode.containerInfo,wu=!0;break a}l=l.return}if(H===null)throw Error(i(160));Tu(s,c,o),H=null,wu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mu(t,e,n),t=t.sibling}var ju=null;function Mu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Au(t,e,n),Nu(e),a&4&&(El(3,e,e.return),Tl(3,e),El(5,e,e.return));break;case 1:Au(t,e,n),Nu(e),a&512&&(V||r===null||Al(r,r.return)),a&64&&cu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ju,Au(t,e,n),Nu(e),a&512&&(V||r===null||Al(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(cu)e.stateNode=hp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Mt]||r[Et]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ap(r,t,n),r[Et]=e,Rt(r),t=r;break a;case`link`:if(o=Jm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Jm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Et]=e,Rt(r),t=r}e.stateNode=t}}else cu||Ym(o,e.type,e.stateNode)}else e.stateNode=Um(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ll(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||V||t.parentNode.removeChild(t)):a.count--,n===null?cu||Ym(o,e.type,e.stateNode):Um(o,n,e.memoizedProps))}break;case 27:Au(t,e,n),Nu(e),a&512&&(V||r===null||Al(r,r.return)),r!==null&&a&4&&Ll(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=lu,lu=!1,Au(t,e,n),lu=o,Nu(e),a&512&&(V||r===null||Al(r,r.return)),e.flags&32){t=e.stateNode;try{fn(t,``),L=!0}catch(t){J(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ll(e,t,r===null?t:r.memoizedProps)),a&1024&&(uu=!0);break;case 6:if(Au(t,e,n),Nu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,L=!0}catch(t){J(e,e.return,t)}}break;case 3:if(L=!1,qm=null,o=ju,ju=Cm(t.containerInfo),Au(t,e,n),ju=o,Nu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(t){J(e,e.return,t)}uu&&(uu=!1,Pu(e)),L=!1;break;case 4:a=lu,lu=cu,r=Jt(),o=ju,ju=Cm(e.stateNode.containerInfo),Au(t,e,n),Nu(e),ju=o,L&&mu&&(hu=!0),L=r,lu=a;break;case 12:Au(t,e,n),Nu(e);break;case 31:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 13:Au(t,e,n),Nu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Ge()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=cu,l=V,u=lu;cu=c||o,lu=u||o,V=l||s,Au(t,e,n),V=l,lu=u,cu=c,Nu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||cu||V||(t=s||V,n=cu,r=V,cu=o||cu,V=t,Ru(e,2),cu=n,V=r),!o&&lu||bu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ku(e,n))));break;case 19:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 30:a&512&&(V||r===null||Al(r,r.return)),a=Jt(),o=mu,s=(n&335544064)===n,c=e.memoizedProps,mu=s&&xi(c.default,c.update)!==`none`,Au(t,e,n),Nu(e),s&&r!==null&&L&&(e.flags|=4),mu=o,L=a;break;case 21:break;case 7:a&512&&(V||r===null||Al(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Au(t,e,n),Nu(e)}}function Nu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Rl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Fl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Pl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Vl(e,zl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(fn(l,``),n.flags&=-33),Vl(e,zl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Bl(e,zl(e),u,s);break;default:throw Error(i(161))}}catch(t){J(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,yh=!0,t.reset(),yh=!1),e=e.sibling}}function Fu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Iu(t,e),t=t.sibling;else su(t,!1)}function Iu(e,t){var n=e.alternate;if(n===null)$l(e,!1);else switch(e.tag){case 3:if(gu=pu=!1,ql(),Fu(t,e),!pu&&!hu){if(e=Kl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];kp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),gu=!0}Kl=null;break;case 5:Fu(t,e);break;case 4:r=pu,pu=!1,Fu(t,e),pu&&(hu=!0),pu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Fu(t,e):$l(e,!1));break;case 30:r=pu,i=ql(),pu=!1,Fu(t,e),pu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=yi(a,o),o=yi(n.memoizedProps,o);var s=xi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Jl=0,t=ou(e,n,t,o,s,a,!0),Jl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),Kl=i):i!==null&&(i.push.apply(i,Kl),Kl=i),pu=e.flags&32?!0:r;break;default:Fu(t,e)}}function Lu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yu(e,t.alternate,t),t=t.sibling}function Ru(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:El(4,n,n.return),Ru(n,r);break;case 1:Al(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ol(n,n.return,i),Ru(n,r);break;case 27:r&2&&ym(n.stateNode,n.type,n.memoizedProps);case 5:Al(n,n.return),n.tag!==5&&n.tag!==27||Nl(n),Ru(n,r);break;case 6:Nl(n);break;case 26:Al(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||V||i.parentNode.removeChild(i),Ru(n,r);break;case 22:n.memoizedState===null&&Ru(n,r);break;case 30:Al(n,n.return),Ru(n,r);break;case 7:Al(n,n.return);default:Ru(n,r)}e=e.sibling}}function zu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:zu(i,a,n),Tl(4,a);break;case 1:if(zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){J(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Eo(l[i],c)}catch(e){J(r,r.return,e)}}s&&o&64&&Dl(a),kl(a,a.return);break;case 27:n&2&&Hl(a);case 5:a.tag!==5&&a.tag!==27||Ml(a),zu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 6:Ml(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||cu||Ym(Cm(c.ownerDocument),a.type,c),zu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 12:zu(i,a,n);break;case 31:zu(i,a,n),s&&o&4&&Eu(i,a);break;case 13:zu(i,a,n),s&&o&4&&Du(i,a);break;case 22:a.memoizedState===null&&zu(i,a,n),kl(a,a.return);break;case 30:zu(i,a,n),kl(a,a.return);break;case 7:kl(a,a.return);default:zu(i,a,n)}t=t.sibling}}function Bu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Fa(n))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fa(e))}function Hu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Uu(e,t,n,r),t=t.sibling;else i&&au(t)}function Uu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&iu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Hu(e,t,n,r),a&2048&&Tl(9,t);break;case 1:Hu(e,t,n,r);break;case 3:Hu(e,t,n,r),i&&gu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Fa(a)));break;case 12:if(a&2048){Hu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){J(t,t.return,e)}}else Hu(e,t,n,r);break;case 31:Hu(e,t,n,r);break;case 13:Hu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&iu(t),o._visibility&2?Hu(e,t,n,r):(o._visibility|=2,Wu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&iu(s),o._visibility&2?Hu(e,t,n,r):Gu(e,t)),a&2048&&Bu(s,t);break;case 24:Hu(e,t,n,r),a&2048&&Vu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Zl(a.child,!0),Zl(t.child,!0))),Hu(e,t,n,r);break;default:Hu(e,t,n,r)}}function Wu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Wu(a,o,s,c,i),Tl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Wu(a,o,s,c,i)):u._visibility&2?Wu(a,o,s,c,i):Gu(a,o),i&&l&2048&&Bu(o.alternate,o);break;case 24:Wu(a,o,s,c,i),i&&l&2048&&Vu(o.alternate,o);break;default:Wu(a,o,s,c,i)}t=t.sibling}}function Gu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Gu(n,r),i&2048&&Bu(r.alternate,r);break;case 24:Gu(n,r),i&2048&&Vu(r.alternate,r);break;default:Gu(n,r)}t=t.sibling}}var Ku=8192;function W(e,t,n){if(e.subtreeFlags&Ku)for(e=e.child;e!==null;)qu(e,t,n),e=e.sibling}function qu(e,t,n){switch(e.tag){case 26:W(e,t,n),e.flags&Ku&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&eh(n,e)):th(n,ju,e.memoizedState,e.memoizedProps));break;case 5:W(e,t,n),e.flags&Ku&&(e=e.stateNode,(t&335544128)===t&&eh(n,e));break;case 3:case 4:var r=ju;ju=Cm(e.stateNode.containerInfo),W(e,t,n),ju=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ku,Ku=16777216,W(e,t,n),Ku=r):W(e,t,n));break;case 30:if((e.flags&Ku)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Wl===null&&(Wl=new Map),Wl.set(r,i)}W(e,t,n);break;default:W(e,t,n)}}function Ju(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,Qu(r,e)}Ju(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xu(e),e=e.sibling}function Xu(e){switch(e.tag){case 0:case 11:case 15:Yu(e),e.flags&2048&&El(9,e,e.return);break;case 3:Yu(e);break;case 12:Yu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zu(e)):Yu(e);break;default:Yu(e)}}function Zu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,Qu(r,e)}Ju(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),Zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zu(t));break;default:Zu(t)}e=e.sibling}}function Qu(e,t){for(;fu!==null;){var n=fu;switch(n.tag){case 0:case 11:case 15:El(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fu=r;else a:for(n=e;fu!==null;){r=fu;var i=r.sibling,a=r.return;if(Cu(r),r===n){fu=null;break a}if(i!==null){i.return=a,fu=i;break a}fu=a}}}var $u={getCacheForType:function(e){var t=Da(Na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Da(Na).controller.signal}},ed=typeof WeakMap==`function`?WeakMap:Map,G=0,td=null,K=null,q=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return G&2&&q!==0?q&-q:j.T===null?Ct():Lf()}function Fd(){if(fd===0){if(!(q&536870912)||R){var e=st;st<<=1,!(st&3932160)&&(st=262144),fd=e}else fd=536870912}return e=No.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(yi(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===td&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,q,fd,!1)),gt(e,n),G&2&&e===td||(e===td&&(!(G&2)&&(ud|=n),cd===4&&Vd(e,q,fd,!1)),kf(e))}function Rd(e,t,n){if(G&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||dt(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n))a=Xd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Ge(),10<a)){if(Vd(r,t,fd,!id),ut(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=yp(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);kf(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},Wl=null,qu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ah.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Ge():(a&4194048)===a?vd-Ge():0,m=rh(d,m),m!==null)?(Td=a,e.cancelPendingCommit=m(of.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l)):of(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vd(e,t,n,r){t=ft(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-nt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&vt(e,n,t)}function Hd(){return G&6?!0:(Af(0,!1),!1)}function Ud(){if(K!==null){if(nd===0)var e=K.return;else e=K,ya=va=null,cs(e),so=null,co=0,e=K;for(;e!==null;)wl(e.alternate,e),e=e.return;K=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),td=e,K=n=Ii(e.current,null),q=t,nd=0,rd=null,id=!1,ad=dt(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=ft(e,t),Ei(),n}function Gd(e,t){z=null,j.H=_c,t===Za||t===$a?(t=ao(),nd=3):t===Qa?(t=ao(),nd=4):nd=t===Fc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,K===null&&(cd=1,kc(e,Wi(t,e.current)))}function Kd(){var e=No.current;return e===null?!0:(q&4194048)===q?Po===null:(q&62914560)===q||q&536870912?e===Po:!1}function qd(){var e=j.H;return j.H=_c,e===null?_c:e}function Jd(){var e=j.A;return j.A=$u,e}function Yd(){cd=4,id||(q&4194048)!==q&&No.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||td===null||Vd(td,q,fd,!1)}function Xd(e,t,n){var r=G;G|=2;var i=qd(),a=Jd();(td!==e||q!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&K!==null){var s=K,c=rd;switch(nd){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:No.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,nf(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,nf(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,G=r,j.H=i,j.A=a,K===null&&(td=null,q=0,Ei()),o}function Zd(){for(;K!==null;)ef(K)}function Qd(e,t){var n=G;G|=2;var r=qd(),a=Jd();td!==e||q!==t?(bd=null,yd=Ge()+500,Wd(e,t)):ad=dt(e,t);a:do try{if(nd!==0&&K!==null){t=K;var o=rd;b:switch(nd){case 1:nd=0,rd=null,nf(e,t,o,1);break;case 2:case 9:if(to(o)){nd=0,rd=null,tf(t);break}t=function(){nd!==2&&nd!==9||td!==e||(nd=7),kf(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:to(o)?(nd=0,rd=null,tf(t)):(nd=0,rd=null,nf(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Qm(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,rf(u))}break b}}nd=0,rd=null,nf(e,t,o,5);break;case 6:nd=0,rd=null,nf(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return ya=va=null,j.H=r,j.A=a,G=n,K===null?(td=null,q=0,Ei(),cd):0}function $d(){for(;K!==null&&!Ue();)ef(K)}function ef(e){var t=hl(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?rf(e):K=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=Yc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:cs(t);var r=t;r===aa&&(R?(fa(r),r.tag===5&&r.stateNode!=null&&(oa=r.stateNode)):(fa(r),R=!0));default:wl(n,t),t=K=Li(t,sd),t=hl(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?rf(e):K=t}function nf(e,t,n,r){ya=va=null,cs(t),so=null,co=0;var i=t.return;try{if(Pc(e,i,t,n,q)){cd=1,kc(e,Wi(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;cd=1,kc(e,Wi(n,e.current)),K=null;return}t.flags&32768?(R||r===1?e=!0:ad||q&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=No.current,r!==null&&r.tag===13&&(r.flags|=16384))),af(t,e)):rf(t)}function rf(e){var t=e;do{if(t.flags&32768){af(t,id);return}e=t.return;var n=Sl(t.alternate,t,sd);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);cd===0&&(cd=5)}function af(e,t){do{var n=Cl(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);cd=6,K=null}function of(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do mf();while(Sd!==0);if(G&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===td&&(K=td=null,q=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,sf(e,t,n,s,c,l,f)}}function sf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=Ti,_t(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=Ra(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Je,function(){return hf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ul=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,a=G,G|=4;try{_u(e,t,n)}finally{G=a,M.p=i,j.T=r}}Sd=1,Ul?kd=Fp(o,e.containerInfo,jd,uf,df,lf,ff,hf,cf,null,null):(uf(),df(),ff())}function cf(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function lf(){Sd===3&&(Sd=0,Iu(wd,Cd),Sd=4)}function uf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=j.T,j.T=null;var i=M.p;M.p=2;var a=G;G|=4;try{mu=hu=!1,Mu(t,e,n),n=dp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=qr(s,h),v=qr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yh=!!up,dp=up=null}finally{G=a,M.p=i,j.T=r}}e.current=t,Sd=2}}function df(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=G;G|=4;try{yu(e,t.alternate,t)}finally{G=i,M.p=r,j.T=n}}Sd=3}}function ff(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,We();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,pf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),St(r),n=n.stateNode,et&&typeof et.onCommitFiberRoot==`function`)try{et.onCommitFiberRoot($e,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=j.T,a=M.p,M.p=2,j.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{j.T=n,M.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&mf(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),Af(0,!1)}}function pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fa(t)))}function mf(){return kd!==null&&(kd.skipTransition(),kd=null),uf(),df(),ff(),hf()}function hf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=St(Td),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,G&6)throw Error(i(331));var c=G;if(G|=4,Xu(o.current),Uu(o,o.current,s,n),G=c,Af(0,!1),et&&typeof et.onPostCommitFiberRoot==`function`)try{et.onPostCommitFiberRoot($e,o)}catch{}return!0}finally{M.p=a,j.T=r,pf(e,t)}}function gf(e,t,n){t=Wi(n,t),t=jc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(gt(e,2),kf(e))}function J(e,t,n){if(e.tag===3)gf(e,e,n);else for(;t!==null;){if(t.tag===3){gf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Wi(n,e),n=Mc(2),r=bo(t,n,2),r!==null&&(Nc(n,r,t,e),gt(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ed;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,td===e&&(q&n)===n&&(cd===4||cd===3&&(q&62914560)===q&&300>Ge()-_d?G&2?dd|=n:Wd(e,0):dd|=n,pd===q&&(pd=0)),kf(e)}function yf(e,t){t===0&&(t=mt()),e=ki(e,t),e!==null&&(gt(e,t),kf(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return Ve(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-nt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=q,a=ut(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||dt(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&vp()&&(e=Of);for(var t=Ge(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}Sd!==0&&Sd!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-nt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=pt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=td,n=q,n=ut(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&He(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&He(r),St(n)){case 2:case 8:n=P;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=Pf.bind(null,e),n=Ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&He(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mf()&&e.callbackNode!==n)return null;var r=q;return r=ut(e,e===td?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),Nf(e,Ge()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(mf())return null;Rd(e,t,!0)}function If(){Cp(function(){G&6?Ve(qe,jf):Mf()})}function Lf(){if(Of===0){var e=Va;e===0&&(e=ot,ot<<=1,!(ot&261888)&&(ot=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:yn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[Dt]||null).action),o=r.submitter;o&&(t=(t=o[Dt]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);rc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),rc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<gi.length;Bf++){var Vf=gi[Bf];_i(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}_i(ci,`onAnimationEnd`),_i(li,`onAnimationIteration`),_i(ui,`onAnimationStart`),_i(`dblclick`,`onDoubleClick`),_i(`focusin`,`onFocus`),_i(`focusout`,`onBlur`),_i(di,`onTransitionRun`),_i(fi,`onTransitionStart`),_i(pi,`onTransitionCancel`),_i(mi,`onTransitionEnd`),Ut(`onMouseEnter`,[`mouseout`,`mouseover`]),Ut(`onMouseLeave`,[`mouseout`,`mouseover`]),Ut(`onPointerEnter`,[`pointerout`,`pointerover`]),Ut(`onPointerLeave`,[`pointerout`,`pointerover`]),Ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Si(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Si(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[Ot];n===void 0&&(n=t[Ot]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Bt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Eh(t)){case 2:var i=bh;break;case 8:i=xh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!An||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=I(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Dn(function(){var r=a,i=Sn(n),s=[];a:{var c=hi.get(e);if(c!==void 0){var l=Vn,u=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=Xn;break;case`focusout`:u=`blur`,l=Xn;break;case`beforeblur`:case`afterblur`:l=Xn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case ci:case li:case ui:l=Zn;break;case mi:l=lr;break;case`scroll`:case`scrollend`:l=Un;break;case`wheel`:l=ur;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=dr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=On(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==xn&&(u=n.relatedTarget||n.fromElement)&&(I(u)||u[F]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?I(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:It(c),h=l==null?u:It(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,I(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?ee(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?It(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&gn(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?It(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(s,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(s,n,i)}var y;if(pr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else xr?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,xr=!0)),v=Zf(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?Sr(e,n):Cr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=On(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=On(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=On(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=On(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
10
- `).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function X(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&fn(e,``+r);else return;break;case`className`:Xt(e,`class`,r);break;case`tabIndex`:Xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Xt(e,n,r);break;case`style`:hn(e,r,o);return;case`data`:if(t!==`object`){Xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&X(e,t,`name`,a.name,a,null),X(e,t,`formEncType`,a.formEncType,a,null),X(e,t,`formMethod`,a.formMethod,a,null),X(e,t,`formTarget`,a.formTarget,a,null)):(X(e,t,`encType`,a.encType,a,null),X(e,t,`method`,a.method,a,null),X(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=bn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=yn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),Yt(e,`popover`,r);break;case`xlinkActuate`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Yt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=_n.get(n)||n,Yt(e,n,r);else return}L=!0}function ip(e,t,n,r,a,o){switch(n){case`style`:hn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)fn(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=bn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Dt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}L=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Yt(e,n,r)}return}L=!0}function ap(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,o,s,n,null)}}a&&X(e,t,`srcSet`,n.srcSet,n,null),r&&X(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:X(e,t,r,d,n,null)}}sn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:X(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&ln(e,!!r,n,!0):ln(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:X(e,t,s,c,n,null)}dn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:X(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,u,r,n,null)}return;default:if(gn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ip(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&X(e,t,c,r,n,null))}var op={};function sp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||X(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(L=!0),o=m;break;case`name`:m!==f&&(L=!0),a=m;break;case`checked`:m!==f&&(L=!0),u=m;break;case`defaultChecked`:m!==f&&(L=!0),d=m;break;case`value`:m!==f&&(L=!0),s=m;break;case`defaultValue`:m!==f&&(L=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&X(e,t,p,m,r,f)}}on(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||X(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(L=!0),p=o;break;case`defaultValue`:o!==l&&(L=!0),c=o;break;case`multiple`:o!==l&&(L=!0),s=o;default:o!==l&&X(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?ln(e,!!n,n?[]:``,!1):ln(e,!!n,t,!0)):ln(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:X(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(L=!0),p=a;break;case`defaultValue`:a!==o&&(L=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&X(e,t,s,a,r,o)}un(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:X(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(L=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:X(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&X(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:X(e,t,u,p,r,m)}return;default:if(gn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ip(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ip(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&X(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||X(e,t,f,p,r,m)}function cp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function lp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&cp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&cp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var up=null,dp=null;function fp(e){return e.nodeType===9?e:e.ownerDocument}function pp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function mp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function hp(e,t,n,r){return n=fp(n).createElement(e),n[Et]=r,n[Dt]=t,ap(n,e,t),Rt(n),n}function gp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _p=null;function vp(){var e=window.event;return e&&e.type===`popstate`?e!==_p&&(_p=e,!0):(_p=null,!1)}var yp=typeof setTimeout==`function`?setTimeout:void 0,bp=typeof clearTimeout==`function`?clearTimeout:void 0,xp=typeof Promise==`function`?Promise:void 0,Sp=typeof requestAnimationFrame==`function`?requestAnimationFrame:yp,Cp=typeof queueMicrotask==`function`?queueMicrotask:xp===void 0?yp:function(e){return xp.resolve(null).then(e).catch(wp)};function wp(e){setTimeout(function(){throw e})}function Tp(e){return e===`head`}function Ep(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bm(e.ownerDocument.body)}n=i}while(n);Gh(t)}function Dp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Op(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function kp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ap(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function jp(e){return Ap(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ap(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=$m(f),u>nh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:E({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Rp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Rp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Up(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Vp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,zp,e,s,r)}this._eventListeners=a}};function zp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Rp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Up(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Vp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Bp,e,n,i),r.splice(t,1),a!==null&&a()}};function Bp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Vp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Hp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Up(e,t,n,r){if(e.length===0)return-1;r=Hp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Hp(a.optionsOrUseCapture)===r)return i}return-1}Rp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Rp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),gm(e,t))}Rp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Gp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Wp(t[n],e);n--);};function Gp(e,t){return t.push(e),!1}Rp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=fp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0))};function Kp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Rp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0)};function qp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Rp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Jp,e,void 0,void 0);for(var n=t=0;n<Yp.length;n++){var r=Yp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Yp[t++]=r}Yp.length=t}};function Jp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Yp=[],Xp=!1;function Zp(e,t,n){Yp.push({fragmentInstance:e,observer:t,instance:n}),Xp||(Xp=!0,_m(function(){Xp=!1;var e=Yp;Yp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Rp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Qp,e,void 0,void 0),e};function Qp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Rp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Rp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Gp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$p(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $p(e,t,n,r,i){var a=I(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=ee(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=ee(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function em(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Rp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Gp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),em(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),em(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function tm(e,t){return e=b(e),nm(e,t),!1}function nm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Yp.length;i++){var a=Yp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Yp[r++]=a)}Yp.length=r,n.observe(e)}),nm(e,t))}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Zp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:am(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function om(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=fm(e.nextSibling),e===null)break}return null}function sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fm(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fm(e.nextSibling),e===null))return null;return e}function lm(e){return e.data===`$?`||e.data===`$~`}function um(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function dm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function fm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pm=null;function mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return fm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function _m(e){Sp(function(){Sp(function(t){return e(t)})})}function vm(e,t,n){switch(t=fp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ym(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&X(e,t,r,null,op,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===bn&&(e.onclick=null),Pt(e)}function bm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var xm=new Map,Sm=new Set;function Cm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var wm=M.d;M.d={f:Tm,r:Em,D:km,C:Am,L:jm,m:Mm,X:Pm,S:Nm,M:Fm};function Tm(){var e=wm.f(),t=Hd();return e||t}function Em(e){var t=Ft(e);t!==null&&t.tag===5&&t.type===`form`?ac(t):wm.r(e)}var Dm=typeof document>`u`?null:document;function Om(e,t,n){var r=Dm;if(r&&typeof t==`string`&&t){var i=an(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sm.has(i)||(Sm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function km(e){wm.D(e),Om(`dns-prefetch`,e,null)}function Am(e,t){wm.C(e,t),Om(`preconnect`,e,t)}function jm(e,t,n){wm.L(e,t,n);var r=Dm;if(r&&e&&t){var i=`link[rel="preload"][as="`+an(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+an(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+an(n.imageSizes)+`"]`)):i+=`[href="`+an(e)+`"]`;var a=i;switch(t){case`style`:a=Lm(e);break;case`script`:a=Vm(e)}if(!(xm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rm(a))||t===`script`&&r.querySelector(Hm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function Mm(e,t){wm.m(e,t);var n=Dm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+an(r)+`"][href="`+an(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vm(e)}if(!xm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),xm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Nm(e,t,n){wm.S(e,t,n);var r=Dm;if(r&&e){var i=Lt(r).hoistableStyles,a=Lm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xm.get(a))&&Gm(e,n);var c=o=r.createElement(`link`);Rt(c),ap(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pm(e,t){wm.X(e,t);var n=Dm;if(n&&e){var r=Lt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=E({src:e,async:!0},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Rt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t){wm.M(e,t);var n=Dm;if(n&&e){var r=Lt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Rt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t,n,r){var a=(a=De.current)?Cm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Lm(n.href),t=Lt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lm(n.href);var o=Lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=xm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xm.set(e,o)),Bm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Vm(n),t=Lt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lm(e){return`href="`+an(e)+`"`}function Rm(e){return`link[rel="stylesheet"][`+e+`]`}function zm(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=zt.bind(null,t),ap(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Vm(e){return`[src="`+an(e)+`"]`}function Hm(e){return`script[async]`+e}function Um(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+an(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),ap(r,`style`,a),Wm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lm(n.href);var o=e.querySelector(Rm(a));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=zm(n),(a=xm.get(a))&&Gm(r,a),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Wm(o,n.precedence,e),t.instance=o;case`script`:return o=Vm(n.src),(a=e.querySelector(Hm(o)))?(t.instance=a,Rt(a),a):(r=n,(a=xm.get(o))&&(r=E({},n),Km(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Rt(a),ap(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wm(r,n.precedence,e));return t.instance}function Wm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qm=null;function Jm(e,t,n){if(qm===null){var r=new Map,i=qm=new Map;i.set(n,r)}else i=qm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Mt]||a[Et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lm(r.href),a=t.querySelector(Rm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=zm(r),(i=xm.get(i))&&Gm(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&nh===0&&(nh=62500*lp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ah.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var uh={$$typeof:ae,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function dh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Pi(3,null,null,t),e.current=a,a.stateNode=e,t=Pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},_o(a),e}function ph(e){return e?(e=Mi,e):Mi}function mh(e,t,n,r,i,a){i=ph(i),r.context===null?r.context=i:r.pendingContext=i,r=yo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=bo(e,r,t),n!==null&&(Ld(n,e,t),xo(n,e,t))}function hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gh(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function _h(e){if(e.tag===13||e.tag===31){var t=ki(e,67108864);t!==null&&Ld(t,e,67108864),gh(e,67108864)}}function vh(e){if(e.tag===13||e.tag===31){var t=Pd();t=xt(t);var n=ki(e,t);n!==null&&Ld(n,e,t),gh(e,t)}}var yh=!0;function bh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,Sh(e,t,n,r)}finally{M.p=a,j.T=i}}function xh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,Sh(e,t,n,r)}finally{M.p=a,j.T=i}}function Sh(e,t,n,r){if(yh){var i=Ch(r);if(i===null)Yf(e,t,r,wh,n),Fh(e,r);else if(Lh(i,e,t,n,r))r.stopPropagation();else if(Fh(e,r),t&4&&-1<Ph.indexOf(e)){for(;i!==null;){var a=Ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=lt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-nt(o);s.entanglements[1]|=c,o&=~c}kf(a),!(G&6)&&(yd=Ge()+500,Af(0,!1))}}break;case 31:case 13:s=ki(a,2),s!==null&&Ld(s,a,2),Hd(),gh(a,2)}if(a=Ch(r),a===null&&Yf(e,t,r,wh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function Ch(e){return e=Sn(e),Th(e)}var wh=null;function Th(e){if(wh=null,e=I(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wh=e,null}function Eh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ke()){case qe:return 2;case P:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Dh=!1,Oh=null,kh=null,Ah=null,jh=new Map,Mh=new Map,Nh=[],Ph=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fh(e,t){switch(e){case`focusin`:case`focusout`:Oh=null;break;case`dragenter`:case`dragleave`:kh=null;break;case`mouseover`:case`mouseout`:Ah=null;break;case`pointerover`:case`pointerout`:jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mh.delete(t.pointerId)}}function Ih(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ft(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lh(e,t,n,r,i){switch(t){case`focusin`:return Oh=Ih(Oh,e,t,n,r,i),!0;case`dragenter`:return kh=Ih(kh,e,t,n,r,i),!0;case`mouseover`:return Ah=Ih(Ah,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jh.set(a,Ih(jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mh.set(a,Ih(Mh.get(a)||null,e,t,n,r,i)),!0}return!1}function Rh(e){var t=I(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,wt(e.priority,function(){vh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,wt(e.priority,function(){vh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xn=r,n.target.dispatchEvent(r),xn=null}else return t=Ft(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function Bh(e,t,n){zh(e)&&n.delete(t)}function Vh(){Dh=!1,Oh!==null&&zh(Oh)&&(Oh=null),kh!==null&&zh(kh)&&(kh=null),Ah!==null&&zh(Ah)&&(Ah=null),jh.forEach(Bh),Mh.forEach(Bh)}function Hh(e,n){e.blockedOn===n&&(e.blockedOn=null,Dh||(Dh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vh)))}var Uh=null;function Wh(e){Uh!==e&&(Uh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Th(r||n)===null)continue;break}var a=Ft(n);a!==null&&(e.splice(t,3),t-=3,rc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gh(e){function t(t){return Hh(t,e)}Oh!==null&&Hh(Oh,e),kh!==null&&Hh(kh,e),Ah!==null&&Hh(Ah,e),jh.forEach(t),Mh.forEach(t);for(var n=0;n<Nh.length;n++){var r=Nh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Nh.length&&(n=Nh[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&Nh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Dt]||null;if(typeof a==`function`)o||Wh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Dt]||null)s=o.formAction;else if(Th(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wh(n)}}}function Kh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qh(e){this._internalRoot=e}Jh.prototype.render=qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mh(n,Pd(),e,t,null,null)},Jh.prototype.unmount=qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),Hd(),t[F]=null}};function Jh(e){this._internalRoot=e}Jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nh.length&&t!==0&&t<Nh[n].priority;n++);Nh.splice(n,0,e),n===0&&Rh(e)}};var Yh=n.version;if(Yh!==`19.3.0`)throw Error(i(527,Yh,`19.3.0`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Xh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{$e=Zh.inject(Xh),et=Zh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ec,s=Dc,c=Oc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fh(e,1,!1,null,null,n,r,null,o,s,c,Kh),e[F]=t.current,qf(e),new qh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=[`summary`,`files`,`findings`,`diagrams`];function x(e){try{return decodeURIComponent(e)}catch{return null}}function S(e){let t=e.replace(/^#/,``),n=t.indexOf(`?`),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1),a=r.split(`/`).filter(e=>e!==``);if(a.length===0)return{name:`home`};let o=x(a[0]);if(o===null)return{name:`not_found`,hash:e};let[s,...c]=a.slice(1);if(s===void 0)return{name:`feature`,id:o,tab:`summary`};if(b.includes(s)&&c.length===0)return{name:`feature`,id:o,tab:s};if(s===`finish`&&c.length===0)return{name:`finish`,id:o};if(s===`review`&&c.length<=1){let t=c.length===1?x(c[0]):null;if(c.length===1&&t===null)return{name:`not_found`,hash:e};let n=new URLSearchParams(i).get(`line`);return{name:`review`,id:o,path:t,line:n!==null&&/^[1-9]\d*$/.test(n)?Number(n):null}}return{name:`not_found`,hash:e}}function C(e){return`${window.location.pathname}${window.location.search}${e}`}var w={home:()=>C(`#/`),feature:(e,t=`summary`)=>C(t===`summary`?`#/${encodeURIComponent(e)}`:`#/${encodeURIComponent(e)}/${t}`),review:(e,t,n)=>{let r=`#/${encodeURIComponent(e)}/review`;return C(t?`${r}/${encodeURIComponent(t)}${n?`?line=${n}`:``}`:r)},finish:e=>C(`#/${encodeURIComponent(e)}/finish`)};function T(e,t={}){t.replace?window.location.replace(e):window.location.assign(e)}function ee(e){return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}function E(){return window.location.hash}function te(){return S((0,v.useSyncExternalStore)(ee,E))}var D=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),O=o(((e,t)=>{t.exports=D()}))();function k({analysis:e}){return(0,O.jsx)(`button`,{type:`button`,className:`button button-primary topbar-action`,onClick:()=>T(w.finish(e.id)),children:`Terminer la revue`})}var ne=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},re=(e=>e?ne(e):ne),ie=e=>e;function ae(e,t=ie){let n=v.useSyncExternalStore(e.subscribe,v.useCallback(()=>t(e.getState()),[e,t]),v.useCallback(()=>t(e.getInitialState()),[e,t]));return v.useDebugValue(n),n}var oe=e=>{let t=re(e),n=e=>ae(t,e);return Object.assign(n,t),n},se=(e=>e?oe(e):oe),ce=class extends Error{status;constructor(e,t){super(t),this.name=`ApiError`,this.status=e}};async function le(e,t){let n=await fetch(`api/${e}`,{...t,headers:t?.body?{"Content-Type":`application/json`}:void 0});if(!n.ok){let e=`HTTP ${n.status}`;try{let t=await n.json();t?.error&&(e=t.error)}catch{}throw new ce(n.status,e)}return await n.json()}function A(e){return`analyses/${encodeURIComponent(e)}`}function ue(e,t,n){return le(t,{method:e,body:JSON.stringify(n)})}var de={getConfig:()=>le(`config`),getChanges:e=>le(e?`changes?since=${e.seq}&epoch=${encodeURIComponent(e.epoch)}`:`changes`),listAnalyses:()=>le(`analyses`),getAnalysis:e=>le(A(e)),getDiff:e=>le(`${A(e)}/diff`),setFileReviewed:(e,t)=>ue(`POST`,`${A(e)}/files/reviewed`,t),setFileLevel:(e,t)=>ue(`POST`,`${A(e)}/files/level`,t),setFindingStatus:(e,t,n)=>ue(`POST`,`${A(e)}/findings/${encodeURIComponent(t)}/status`,n),addNote:(e,t)=>ue(`POST`,`${A(e)}/notes`,t),updateNote:(e,t,n)=>ue(`PATCH`,`${A(e)}/notes/${encodeURIComponent(t)}`,n),deleteNote:(e,t,n)=>ue(`DELETE`,`${A(e)}/notes/${encodeURIComponent(t)}`,n),markAnswerSeen:(e,t,n)=>ue(`POST`,`${A(e)}/notes/${encodeURIComponent(t)}/answer-seen`,n),getWatchers:()=>le(`watchers`),submitReview:(e,t)=>ue(`POST`,`${A(e)}/review`,t),markProcessed:(e,t)=>ue(`POST`,`${A(e)}/review/processed`,t)};async function fe(e){if(!navigator.clipboard)throw Error(`le presse-papiers n'est accessible que sur une page servie en HTTPS ou sur localhost. Ouvrez la GUI par une de ces adresses.`);try{await navigator.clipboard.writeText(e)}catch(e){throw Error(`le navigateur a refusé l'écriture dans le presse-papiers (${e.message}).`)}}var pe=400,me=.5;function he(e){let t=[];for(let n of e.matchAll(/[\p{L}\p{N}_$]+|\s+|[^\p{L}\p{N}_$\s]/gu))t.push({text:n[0],start:n.index});return t}function ge(e){return e.text.trim()===``}function _e(e,t){let n=t.length+1,r=new Uint32Array((e.length+1)*n);for(let i=e.length-1;i>=0;i--)for(let a=t.length-1;a>=0;a--)r[i*n+a]=e[i].text===t[a].text?r[(i+1)*n+a+1]+1:Math.max(r[(i+1)*n+a],r[i*n+a+1]);let i=new Set,a=new Set,o=0,s=0;for(;o<e.length&&s<t.length;)e[o].text===t[s].text?(i.add(o++),a.add(s++)):r[(o+1)*n+s]>=r[o*n+s+1]?o++:s++;return{inA:i,inB:a}}function ve(e,t){let n=[];return e.forEach((r,i)=>{if(t.has(i))return;let a=n[n.length-1];a&&a[a.length-1]===e[i-1]?a.push(r):n.push([r])}),n.flatMap(e=>{let t=e.findIndex(e=>!ge(e));if(t===-1)return[];let n=e.length-1-[...e].reverse().findIndex(e=>!ge(e));return[{start:e[t].start,end:e[n].start+e[n].text.length}]})}function ye(e,t){if(e===t)return null;let n=he(e),r=he(t);if(n.length>pe||r.length>pe)return null;let{inA:i,inB:a}=_e(n,r),o=[...i].filter(e=>!ge(n[e])).length,s=Math.max(n.filter(e=>!ge(e)).length,r.filter(e=>!ge(e)).length);return s===0||o/s<me?null:{removed:ve(n,i),added:ve(r,a)}}function j(e){let t=new Map,n=(t,n)=>e[t]?.oldLine===null&&e[t].line.type===n,r=0;for(;r<e.length;){if(!n(r,`del`)){r++;continue}let i=[],a=[];for(;n(r,`del`);)i.push(e[r++].line);for(;n(r,`add`);)a.push(e[r++].line);for(let e=0;e<Math.min(i.length,a.length);e++){let n=ye(i[e].text,a[e].text);n&&(t.set(i[e],n.removed),t.set(a[e],n.added))}}return t}function M(e){return e.slice(0,e.length-e.trimStart().length)}function be(e,t){let n=M(e),r=M(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return{start:i,oldEnd:n.length,newEnd:r.length}}function xe(e,t){let n=e=>e.map(e=>e.text.trimStart()),r=n(e),i=n(t),a=i.length+1,o=new Uint32Array((r.length+1)*a);for(let e=r.length-1;e>=0;e--)for(let t=i.length-1;t>=0;t--)o[e*a+t]=r[e]===i[t]?o[(e+1)*a+t+1]+1:Math.max(o[(e+1)*a+t],o[e*a+t+1]);let s=[],c=0,l=0;for(;c<r.length&&l<i.length;)r[c]===i[l]?s.push([c++,l++]):o[(c+1)*a+l]>=o[c*a+l+1]?c++:l++;return s}function Se(e){let t=[],n=0;for(;n<e.length;){if(e[n].type!==`del`){t.push({line:e[n++],oldLine:null});continue}let r=[],i=[];for(;n<e.length&&e[n].type===`del`;)r.push(e[n++]);for(;n<e.length&&e[n].type===`add`;)i.push(e[n++]);let a=0,o=0,s=(e,n)=>{for(;a<e;a++)t.push({line:r[a],oldLine:null});for(;o<n;o++)t.push({line:i[o],oldLine:null})};for(let[e,n]of xe(r,i))s(e,n),t.push({line:i[o++],oldLine:r[a++]});s(r.length,i.length)}return t}function Ce(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function we(e,t=`|`){return e.map(e=>Je(e)).join(t)}function N(e,t){return typeof t==`bigint`?t.toString():t}var Te=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ee(e){return new Te(e)}function De(e){return e==null}function Oe(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ke(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function Ae(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function je(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Me(e){return je(e._zod.def)??e._zod.def.shape}function Ne(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Ae(this,t,e),e},enumerable:!0,configurable:!0})}function Pe(e,t,n){t in e?Ae(e,t,n):e[t]=n}function Fe(e,t,n,r){let i=Me(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Ne(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Pe(e,a,r?r(n.value,a):n.value))}}function Ie(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Ne(e,n,()=>t[n]):Pe(e,n,r.value))}}function Le(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Re(e){return JSON.stringify(e)}function ze(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ve(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var He=Ee(()=>{if(Lt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ue(e){if(Ve(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ve(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function We(e){return Ue(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Ge=new Set([`string`,`number`,`symbol`]);function Ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function qe(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Je(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ye(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Xe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ze={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Qe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Fe(i,e,$e(e,t)),qe(e,Le(n,{shape:i,checks:[]}))}function $e(e,t){let n=Me(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function et(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set($e(e,t)),a={};return Fe(a,e,Reflect.ownKeys(Me(e)).filter(e=>!i.has(e))),qe(e,Le(n,{shape:a,checks:[]}))}function tt(e,t){if(!Ue(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Me(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return qe(e,Le(e._zod.def,{shape:nt(e,t)}))}function nt(e,t){let n={};return Fe(n,e,Reflect.ownKeys(Me(e))),Ie(n,t),n}function rt(e,t){if(!Ue(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return qe(e,Le(e._zod.def,{shape:nt(e,t)}))}function it(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Fe(n,e,Reflect.ownKeys(Me(e))),Fe(n,t,Reflect.ownKeys(Me(t))),qe(e,Le(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function at(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set($e(t,n)):void 0,o={};return Fe(o,t,Reflect.ownKeys(Me(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),qe(t,Le(t._zod.def,{shape:o,checks:[]}))}function ot(e,t,n){let r=n?new Set($e(t,n)):void 0,i={};return Fe(i,t,Reflect.ownKeys(Me(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),qe(t,Le(t._zod.def,{shape:i}))}function st(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ct(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function lt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ut(e){return typeof e==`string`?e:e?.message}function dt(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ft(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function pt(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ut(e.inst?._zod.def?.error?.(e))??ut(a?.(e))??ut(t?.error?.(e))??ut(n.customError?.(e))??ut(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var mt=/[\uD800-\uDBFF]/;function ht(e){let t=e.length;if(!mt.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function gt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function _t(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function vt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function yt(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ct(e,n,r.value)}}function bt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function xt(e,t,n){return bt(e,t,n,!1)}function St(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return bt(this,n,r(this))},set(e){bt(this,n,e)}})}return t}function Ct(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:bt(this,t,n.bind(this))},set(e){bt(this,t,e)}})}function wt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Tt,Et=!1,Dt={configurable:!0,get(){Et=!0}};function F(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Tt!==e._zod?Tt=void 0:(Tt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Dt);let e=Et;Et=!1;try{let r=n(this);return Et?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Et||=e,r}catch(n){throw delete this[t],Et||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Ot(e,t,n,r){let i=wt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var kt=`~constantCatch`;function At(e){let t=()=>e;return t[kt]=!0,t}var jt,Mt={value:void 0,enumerable:!1},Nt=`captureStackTrace`in Error?Error:null;function Pt(e){let t=Nt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Nt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function I(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Mt.value=new a(r);try{Object.defineProperty(n,"_zod",Mt)}finally{Mt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),yt(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Pt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Ft=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},It=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(jt=globalThis).__zod_globalConfig??(jt.__zod_globalConfig={});var Lt=globalThis.__zod_globalConfig;function Rt(e){return e&&Object.assign(Lt,e),Lt}function zt(){let e=this._zod;return e.message??=JSON.stringify(e.def,N,2),e.message}function Bt(e){this._zod.message=e}var Vt={get:zt,set:Bt,enumerable:!0,configurable:!0},Ht={value:void 0,enumerable:!1},Ut=new WeakSet([Object.prototype,Error.prototype]),Wt=I(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Ht.value=t,Object.defineProperty(e,"issues",Ht),Ht.value=void 0,Object.defineProperty(e,"message",Vt);let n=Object.getPrototypeOf(e);Ut.has(n)||(Ut.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Gt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Kt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Gt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function qt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function L(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Jt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Ft;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>pt(e,o,Rt())));throw Be(n,a?.callee??t),n}return s.value};return t},Yt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>pt(e,o,Rt())));throw Be(n,a?.callee??t),n}return s.value};return t},Xt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ft;return a.issues.length?Zt(e,a.issues,i):{success:!0,data:a.value}};function Zt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>pt(e,n,Rt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Qt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Zt(e,a.issues,i):{success:!0,data:a.value}},$t=Symbol.for(`zod.compile.invalid`),en=Symbol.for(`zod.compile.fallback`),tn=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==$t)return!0;if(r.definite===!0&&n===void 0)return!1}return nn(e,t,n)});function nn(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[en]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Ft;return a.issues.length===0}var rn=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},an=e=>{let t=Jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,L(n,a))};return n},on=e=>{let t=Jt(e),n=(e,r,i,a)=>t(e,r,i,L(n,a));return n},sn=e=>{let t=Yt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,L(n,a))};return n},cn=e=>{let t=Yt(e),n=async(e,r,i,a)=>await t(e,r,i,L(n,a));return n},ln=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Xt(e)(t,n,i)},un=e=>(t,n,r)=>Xt(e)(t,n,r),dn=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Qt(e)(t,n,i)},fn=e=>async(t,n,r)=>Qt(e)(t,n,r),pn=/^[cC][0-9a-z]{6,}$/,mn=/^[0-9a-z]+$/,hn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,gn=/^[0-9a-vA-V]{20}$/,_n=/^[A-Za-z0-9]{27}$/,vn=/^[a-zA-Z0-9_-]{21}$/;function yn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var bn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Sn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Cn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wn=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Tn(){return new RegExp(wn,`u`)}var En=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Dn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,On=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,kn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,An=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Mn=/^https?$/,Nn=/^\+[1-9]\d{6,14}$/,Pn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Fn(e){return RegExp(`^${e}$`)}var In=Fn(Pn);function Ln(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Rn(e){return RegExp(`^${Ln(e)}$`)}function zn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Ln({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Ln({precision:e.precision})}`:n;return RegExp(`^${Pn}T(?:${r})$`)}var Bn=/^[\s\S]{0,}$/,Vn=/^-?\d+(?:\.\d+)?$/,Hn=/^(?:true|false)$/i,Un=/^[^A-Z]*$/,Wn=/^[^a-z]*$/,Gn=I(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kn=e=>{let t=e.value;return!De(t)&&t.length!==void 0},qn={number:`number`,bigint:`bigint`,object:`date`},Jn=I(`$ZodCheckLessThan`,(e,t)=>{Gn.init(e,t);let n=qn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:qn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Yn=I(`$ZodCheckGreaterThan`,(e,t)=>{Gn.init(e,t);let n=qn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:qn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xn=I(`$ZodCheckMultipleOf`,(e,t)=>{Gn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ke(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Zn=I(`$ZodCheckNumberFormat`,(e,t)=>{Gn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Xe[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Qn=I(`$ZodCheckMaxLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ht(r):i)<=t.maximum)return;let a=gt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=I(`$ZodCheckMinLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ht(r):i)>=t.minimum)return;let a=gt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),er=I(`$ZodCheckLengthEquals`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ht(r):i;if(a===t.length)return;let o=gt(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tr=I(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Gn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nr=I(`$ZodCheckRegex`,(e,t)=>{tr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rr=I(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Un,tr.init(e,t)}),ir=I(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Wn,tr.init(e,t)}),ar=I(`$ZodCheckIncludes`,(e,t)=>{Gn.init(e,t);let n=Ke(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),or=I(`$ZodCheckStartsWith`,(e,t)=>{Gn.init(e,t);let n=RegExp(`^${Ke(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),sr=I(`$ZodCheckEndsWith`,(e,t)=>{Gn.init(e,t);let n=RegExp(`.*${Ke(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),cr=I(`$ZodCheckOverwrite`,(e,t)=>{Gn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),lr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
9
+ `+e.stack}}var Be=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ue=t.unstable_shouldYield,We=t.unstable_requestPaint,Ge=t.unstable_now,Ke=t.unstable_getCurrentPriorityLevel,qe=t.unstable_ImmediatePriority,P=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,Ze=t.log,Qe=t.unstable_setDisableYieldValue,$e=null,et=null;function tt(e){if(typeof Ze==`function`&&Qe(e),et&&typeof et.setStrictMode==`function`)try{et.setStrictMode($e,e)}catch{}}var nt=Math.clz32?Math.clz32:at,rt=Math.log,it=Math.LN2;function at(e){return e>>>=0,e===0?32:31-(rt(e)/it|0)|0}var ot=256,st=262144,ct=4194304;function lt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ut(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=lt(n))):i=lt(o):i=lt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=lt(n))):i=lt(o)):i=lt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function dt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-nt(n),i=1<<r;t|=e[r],n&=~i}return t}function pt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mt(){var e=ct;return ct<<=1,!(ct&62914560)&&(ct=4194304),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-nt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&vt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function vt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-nt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function bt(e,t){var n=t&-t;return n=n&42?1:xt(n),(n&(e.suspendedLanes|t))===0?n:0}function xt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function St(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ct(){var e=M.p;return e===0?(e=window.event,e===void 0?32:Eh(e.type)):e}function wt(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Tt=Math.random().toString(36).slice(2),Et=`__reactFiber$`+Tt,Dt=`__reactProps$`+Tt,F=`__reactContainer$`+Tt,Ot=`__reactEvents$`+Tt,kt=`__reactListeners$`+Tt,At=`__reactHandles$`+Tt,jt=`__reactResources$`+Tt,Mt=`__reactMarker$`+Tt,Nt=`__reactLoad$`+Tt;function Pt(e){delete e[Et],delete e[Dt],delete e[kt],delete e[At]}function I(e){var t;if(t=e[Et])return t;for(var n=e.parentNode;n;){if(t=n[F]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hm(e);e!==null;){if(n=e[Et])return n;e=hm(e)}return t}e=n,n=e.parentNode}return null}function Ft(e){if(e=e[Et]||e[F]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function It(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Lt(e){var t=e[jt];return t||=e[jt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Rt(e){e[Mt]=!0}function zt(e){e[Nt]=void 0}var Bt=new Set,Vt={};function Ht(e,t){Ut(e,t),Ut(e+`Capture`,t)}function Ut(e,t){for(Vt[e]=t,e=0;e<t.length;e++)Bt.add(t[e])}var Wt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Gt={},Kt={};function qt(e){return Be.call(Kt,e)?!0:Be.call(Gt,e)?!1:Wt.test(e)?Kt[e]=!0:(Gt[e]=!0,!1)}var L=!1;function Jt(){var e=L;return L=!1,e}function Yt(e,t,n){if(qt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Zt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Qt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function $t(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function en(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tn(e){if(!e._valueTracker){var t=$t(e)?`checked`:`value`;e._valueTracker=en(e,t,``+e[t])}}function nn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=$t(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var rn=/[\n"\\]/g;function an(e){return e.replace(rn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function on(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Qt(t)):e.value!==``+Qt(t)&&(e.value=``+Qt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):cn(e,Qt(n)):o===`number`&&e.value==t?cn(e,Qt(e.value)):cn(e,Qt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Qt(s):e.removeAttribute(`name`)}function sn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){tn(e);return}n=n==null?``:``+Qt(n),t=t==null?n:``+Qt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),tn(e)}function cn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function ln(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Qt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function un(e,t,n){t!=null&&(t=``+Qt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Qt(n)}function dn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ye(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Qt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),tn(e)}function fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function mn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||pn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function hn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,L=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(mn(e,a,r),L=!0)}else for(var o in t)t.hasOwnProperty(o)&&mn(e,o,t[o])}function gn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var _n=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),vn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yn(e){return vn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function bn(){}var xn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cn=null,wn=null;function Tn(e){var t=Ft(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(on(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+an(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Dt]||null;if(!a)throw Error(i(90));on(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&nn(r)}break a;case`textarea`:un(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&ln(e,!!n.multiple,t,!1)}}}var En=!1;function Dn(e,t,n){if(En)return e(t,n);En=!0;try{return e(t)}finally{if(En=!1,(Cn!==null||wn!==null)&&(Hd(),Cn&&(t=Cn,e=wn,wn=Cn=null,Tn(t),e)))for(t=0;t<e.length;t++)Tn(e[t])}}function On(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Dt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,An=!1;if(kn)try{var jn={};Object.defineProperty(jn,"passive",{get:function(){An=!0}}),window.addEventListener(`test`,jn,jn),window.removeEventListener(`test`,jn,jn)}catch{An=!1}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,n=t.length,r,i=`value`in Mn?Mn.value:Mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Pn=i.slice(e,1<r?1-r:void 0)}function In(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ln(){return!0}function Rn(){return!1}function zn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Ln:Rn,this.isPropagationStopped=Rn,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=E({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=E({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(E({},qn,{dataTransfer:0})),Xn=zn(E({},Hn,{relatedTarget:0})),Zn=zn(E({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(E({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=zn(E({},Bn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=zn(E({},Hn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=zn(E({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=zn(E({},Bn,{submitter:0})),cr=zn(E({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),lr=zn(E({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ur=zn(E({},qn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),dr=zn(E({},Bn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=kn&&`CompositionEvent`in window,mr=null;kn&&`documentMode`in document&&(mr=document.documentMode);var hr=kn&&`TextEvent`in window&&!mr,gr=kn&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=Fn(),Pn=Nn=Mn=null,xr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){Cn?wn?wn.push(r):wn=[r]:Cn=r,t=Zf(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Wf(e,0)}function Ar(e){if(nn(It(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(kn){var Nr;if(kn){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Sn(e)),Dn(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Be.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gr(e.document)}return t}function Xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Zr=kn&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&Wr(ei,r)||(ei=r,r=Zf($r,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionrun:ri(`Transition`,`TransitionRun`),transitionstart:ri(`Transition`,`TransitionStart`),transitioncancel:ri(`Transition`,`TransitionCancel`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};kn&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionrun`),fi=si(`transitionstart`),pi=si(`transitioncancel`),mi=si(`transitionend`),hi=new Map,gi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);gi.push(`scrollEnd`);function _i(e,t){hi.set(e,t),Ht(t,[e])}var vi=0;function yi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=vi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function bi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function xi(e,t){return e=bi(e),t=bi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Si=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ci=[],wi=0,Ti=0;function Ei(){for(var e=wi,t=Ti=wi=0;t<e;){var n=Ci[t];Ci[t++]=null;var r=Ci[t];Ci[t++]=null;var i=Ci[t];Ci[t++]=null;var a=Ci[t];if(Ci[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ai(n,i,a)}}function Di(e,t,n,r){Ci[wi++]=e,Ci[wi++]=t,Ci[wi++]=n,Ci[wi++]=r,Ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Oi(e,t,n,r){return Di(e,t,n,r),ji(e)}function ki(e,t){return Di(e,null,null,t),ji(e)}function Ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-nt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ji(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ni(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pi(e,t,n,r){return new Ni(e,t,n,r)}function Fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ii(e,t){var n=e.alternate;return n===null?(n=Pi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Li(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ri(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Fi(r)&&(s=1);else if(typeof r==`string`)s=Xm(e,n,Te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ue:return e=Pi(31,n,t,a),e.elementType=ue,e.lanes=o,e;case k:return zi(n.children,a,o,t);case ne:s=8,a|=24;break;case re:return e=Pi(12,n,t,a|2),e.elementType=re,e.lanes=o,e;case se:return e=Pi(13,n,t,a),e.elementType=se,e.lanes=o,e;case ce:return e=Pi(19,n,t,a),e.elementType=ce,e.lanes=o,e;case de:case pe:return e=a|32,e=Pi(30,n,t,e),e.elementType=pe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ae:s=10;break a;case ie:s=9;break a;case oe:s=11;break a;case le:s=14;break a;case A:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function zi(e,t,n,r){return e=Pi(7,e,r,t),e.lanes=n,e}function Bi(e,t,n){return e=Pi(6,e,null,t),e.lanes=n,e}function Vi(e){var t=Pi(18,null,null,0);return t.stateNode=e,t}function Hi(e,t,n){return t=Pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ui=new WeakMap;function Wi(e,t){if(typeof e==`object`&&e){var n=Ui.get(e);return n===void 0?(t={value:e,source:t,stack:ze(t)},Ui.set(e,t),t):n}return{value:e,source:t,stack:ze(t)}}var Gi=[],Ki=0,qi=null,Ji=0,Yi=[],Xi=0,Zi=null,Qi=1,$i=``;function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=qi,qi=e,Ji=t}function ta(e,t,n){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Zi=e;var r=Qi;e=$i;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var a=32-nt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Qi=1<<32-nt(t)+i|n<<i|r,$i=a+e}else Qi=1<<a|n<<i|r,$i=e}function na(e){e.return!==null&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null;for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,$i=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null}function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=$i,Yi[Xi++]=Zi,Qi=t.id,$i=t.overflow,Zi=e}var aa=null,oa=null,R=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Et]=e,t[Dt]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),sn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),dn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=bn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(aa=e.return;aa;)switch(aa.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:aa=aa.return}}function pa(e){if(e!==aa)return!1;if(!R)return fa(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||gp(e.type,e.memoizedProps)),n=!n),n&&oa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));oa=mm(e)}else t===27?(t=oa,Tp(e.type)?(e=pm,pm=null,oa=e):oa=t):oa=aa?fm(e.stateNode.nextSibling):null;return!0}function ma(){oa=aa=null,R=!1}function ha(){var e=sa;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=Ce(null),va=null,ya=null;function ba(e,t,n){N(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,we(_a)}function Sa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ca(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Sa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Sa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function wa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[uh]:e.push(uh))}a=a.return}return e!==null&&Ca(t,e,n,r),t.flags|=262144,e!==null}function Ta(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ea(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Da(e){return ka(va,e)}function Oa(e,t){return va===null&&Ea(e),ka(e,t)}function ka(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ja=t.unstable_scheduleCallback,Ma=t.unstable_NormalPriority,Na={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pa(){return{controller:new Aa,data:new Map,refCount:0}}function Fa(e){e.refCount--,e.refCount===0&&ja(Ma,function(){e.controller.abort()})}function Ia(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var La=null;function Ra(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var za=null,Ba=0,Va=0,Ha=null;function Ua(e,t){if(za===null){var n=za=[];Ba=0,Va=Lf(),Ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ba++,t.then(Wa,Wa),t}function Wa(){if(--Ba===0&&(La=null,za!==null)){Ha!==null&&(Ha.status=`fulfilled`);var e=za;za=null,Va=0,Ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ka=j.S;j.S=function(e,t){if(vd=Ge(),typeof t==`object`&&t&&typeof t.then==`function`&&Ua(e,t),La!==null)for(var n=Cf;n!==null;)Ia(n,La),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)Ia(r,n),r=r.next;if(Va!==0){r=La,r===null&&(r=La=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ka!==null&&Ka(e,t)};var qa=Ce(null);function Ja(){var e=qa.current;return e===null?nd.pooledCache:e}function Ya(e,t){t===null?N(qa,qa.current):N(qa,t.pool)}function Xa(){var e=Ja();return e===null?null:{parent:Na._currentValue,pool:e}}var Za=Error(i(460)),Qa=Error(i(474)),$a=Error(i(542)),eo={then:function(){}};function to(e){return e=e.status,e===`fulfilled`||e===`rejected`}function no(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(bn,bn);else{if(e=nd,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,oo(e),e}throw io=t,Za}}function ro(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(io=e,Za):e}}var io=null;function ao(){if(io===null)throw Error(i(459));var e=io;return io=null,e}function oo(e){if(e===Za||e===$a)throw Error(i(483))}var so=null,co=0;function lo(e){var t=co;return co+=1,so===null&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function fo(e,t){throw t.$$typeof===te?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function po(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Bi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),uo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===A&&ro(i)===t.type)?(t=a(t,n.props),uo(t,n),t.return=e,t):(t=Ri(n.type,n.key,n.props,null,e.mode,r),uo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=zi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ri(t.type,t.key,t.props,null,e.mode,n),uo(n,t),n.return=e,n;case O:return t=Hi(t,e.mode,n),t.return=e,t;case A:return t=ro(t),f(e,t,n)}if(ye(t)||ge(t))return t=zi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,lo(t),n);if(t.$$typeof===ae)return f(e,Oa(e,t),n);fo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case A:return n=ro(n),p(e,t,n,r)}if(ye(n)||ge(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,lo(n),r);if(n.$$typeof===ae)return p(e,t,Oa(e,n),r);fo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case A:return r=ro(r),m(e,t,n,r,i)}if(ye(r)||ge(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,lo(r),i);if(r.$$typeof===ae)return m(e,t,n,Oa(t,r),i);fo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&ea(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&ea(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),R&&ea(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&ea(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&ea(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&ea(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),uo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===A&&ro(l)===r.type){n(e,r.sibling),c=a(r,o.props),uo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=zi(o.props.children,e.mode,c,o.key),uo(c,o),c.return=e,e=c):(c=Ri(o.type,o.key,o.props,null,e.mode,c),uo(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Hi(o,e.mode,c),c.return=e,e=c}return s(e);case A:return o=ro(o),_(e,r,o,c)}if(ye(o))return h(e,r,o,c);if(ge(o)){if(l=ge(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,lo(o),c);if(o.$$typeof===ae)return _(e,r,Oa(e,o),c);fo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{co=0;var i=_(e,t,n,r);return so=null,i}catch(t){if(t===Za||t===$a)throw t;var a=Pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var mo=po(!0),ho=po(!1),go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ji(e),Ai(e,null,n),t}return Di(e,r,t,n),ji(e)}function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Co=!1;function wo(){if(Co){var e=Ha;if(e!==null)throw e}}function To(e,t,n,r){Co=!1;var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(K&f)===f:(r&f)===f){f!==0&&f===Va&&(Co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:go=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function Eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Do(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Eo(n[e],t)}var Oo=Ce(null),ko=Ce(0);function Ao(e,t){e=sd,N(ko,e),N(Oo,t),sd=e|t.baseLanes}function jo(){N(ko,sd),N(Oo,Oo.current)}function Mo(){sd=ko.current,we(Oo),we(ko)}var No=Ce(null),Po=null;function Fo(e){var t=e.alternate;N(Bo,Bo.current&1),N(No,e),Po===null&&(t===null||Oo.current!==null||t.memoizedState!==null)&&(Po=e)}function Io(e){N(Bo,Bo.current),N(No,e),Po===null&&(Po=e)}function Lo(e){e.tag===22?(N(Bo,Bo.current),N(No,e),Po===null&&(Po=e)):Ro()}function Ro(){N(Bo,Bo.current),N(No,No.current)}function zo(e){we(No),Po===e&&(Po=null),we(Bo)}var Bo=Ce(0);function Vo(e,t){N(No,No.current),N(Bo,t)}function Ho(e){we(Bo),we(No),Po===e&&(Po=null)}function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lm(n)||um(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wo=0,z=null,Go=null,Ko=null,qo=!1,Jo=!1,Yo=!1,Xo=0,Zo=0,Qo=null,$o=0;function es(){throw Error(i(321))}function ts(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,i,a){return Wo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?vc:yc,Yo=!1,a=n(r,i),Yo=!1,Jo&&(a=is(t,n,r,i)),rs(e),a}function rs(e){j.H=_c;var t=Go!==null&&Go.next!==null;if(Wo=0,Ko=Go=z=null,qo=!1,Zo=0,Qo=null,t)throw Error(i(300));e===null||Ic||(e=e.dependencies,e!==null&&Ta(e)&&(Ic=!0))}function is(e,t,n,r){z=e;var a=0;do{if(Jo&&(Qo=null),Zo=0,Jo=!1,25<=a)throw Error(i(301));if(a+=1,Ko=Go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=bc,o=t(n,r)}while(Jo);return o}function as(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?fs(t):t,e=e.useState()[0],(Go===null?null:Go.memoizedState)!==e&&(z.flags|=1024),t}function os(){var e=Xo!==0;return Xo=0,e}function ss(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cs(e){if(qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qo=!1}Wo=0,Ko=Go=z=null,Jo=!1,Zo=Xo=0,Qo=null}function ls(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ko===null?z.memoizedState=Ko=e:Ko=Ko.next=e,Ko}function us(){if(Go===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=Go.next;var t=Ko===null?z.memoizedState:Ko.next;if(t!==null)Ko=t,Go=e;else{if(e===null)throw z.alternate===null?Error(i(467)):Error(i(310));Go=e,e={memoizedState:Go.memoizedState,baseState:Go.baseState,baseQueue:Go.baseQueue,queue:Go.queue,next:null},Ko===null?z.memoizedState=Ko=e:Ko=Ko.next=e}return Ko}function ds(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fs(e){var t=Zo;return Zo+=1,Qo===null&&(Qo=[]),e=no(Qo,e,t),t=z,(Ko===null?t.memoizedState:Ko.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?vc:yc),e}function ps(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return fs(e);if(e.$$typeof===me)return;if(e.$$typeof===ae)return Da(e)}throw Error(i(438,String(e)))}function ms(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ds(),z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=fe;return t.index++,n}function hs(e,t){return typeof t==`function`?t(e):t}function gs(e){return _s(us(),Go,e)}function _s(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Wo&f)===f:(K&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Va&&(d=!0);else if((Wo&p)===p){u=u.next,p===Va&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,z.lanes|=p,ld|=p;f=u.action,Yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,z.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Ic=!0,d&&(n=Ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vs(e){var t=us(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ur(o,t.memoizedState)||(Ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ys(e,t,n){var r=z,a=us(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((Go||a).memoizedState,n);if(s&&(a.memoizedState=n,Ic=!0),a=a.queue,Us(Ss.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ko!==null&&!!(Ko.memoizedState.tag&1),Rs(e?9:8,{destroy:void 0},xs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,nd===null)throw Error(i(349));o||Wo&127||bs(r,t,n)}return n}function bs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=ds(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xs(e,t,n,r){t.value=n,t.getSnapshot=r,Cs(t)&&ws(e)}function Ss(e,t,n){return n(function(){Cs(t)&&ws(e)})}function Cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function ws(e){var t=ki(e,2);t!==null&&Ld(t,e,2)}function Ts(e){var t=ls();if(typeof e==`function`){var n=e;if(e=n(),Yo){tt(!0);try{n()}finally{tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:e},t}function Es(e,t,n,r){return e.baseState=n,_s(e,Go,typeof r==`function`?r:hs)}function Ds(e,t,n,r,a){if(mc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Os(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Os(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};o.types=a===null?null:a.types,j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),ks(e,t,s)}catch(n){As(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),ks(e,t,a)}catch(n){As(e,t,n)}}function ks(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){B(e,t,n)},function(n){return As(e,t,n)}):B(e,t,n)}function B(e,t,n){t.status=`fulfilled`,t.value=n,js(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Os(e,n)))}function As(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,js(t),t=t.next;while(t!==r)}e.action=null}function js(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ms(e,t){return t}function Ns(e,t){if(R){var n=nd.formState;if(n!==null){a:{var r=z;if(R){if(oa){b:{for(var i=oa,a=ca;i.nodeType!==8;)if(!a||(i=fm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){oa=fm(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=ls(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:t},n.queue=r,n=dc.bind(null,z,r),r.dispatch=n,r=Ts(!1),a=pc.bind(null,z,!1,r.queue),r=ls(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ds.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ps(e){return Fs(us(),Go,e)}function Fs(e,t,n){if(t=_s(e,t,Ms)[0],e=gs(hs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=fs(t)}catch(e){throw e===Za?$a:e}else r=t;t=us();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,Rs(9,{destroy:void 0},Is.bind(null,i,n),null)),[r,a,e]}function Is(e,t){e.action=t}function Ls(e){var t=us(),n=Go;if(n!==null)return Fs(t,n,e);us(),t=t.memoizedState,n=us();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=ds(),z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zs(){return us().memoizedState}function Bs(e,t,n,r){var i=ls();z.flags|=e,i.memoizedState=Rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Vs(e,t,n,r){var i=us();r=r===void 0?null:r;var a=i.memoizedState.inst;Go!==null&&r!==null&&ts(r,Go.memoizedState.deps)?i.memoizedState=Rs(t,a,n,r):(z.flags|=e,i.memoizedState=Rs(1|t,a,n,r))}function Hs(e,t){Bs(8390656,8,e,t)}function Us(e,t){Vs(2048,8,e,t)}function Ws(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=ds(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gs(e){var t=us().memoizedState;return Ws({ref:t,nextImpl:e}),function(){if(W&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ks(e,t){return Vs(4,2,e,t)}function qs(e,t){return Vs(4,4,e,t)}function Js(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ys(e,t,n){n=n==null?null:n.concat([e]),Vs(4,4,Js.bind(null,t,e),n)}function Xs(){}function Zs(e,t){var n=us();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qs(e,t){var n=us();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ts(t,r[1]))return r[0];if(r=e(),Yo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r}function $s(e,t,n){return n===void 0||Wo&1073741824&&!(K&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),z.lanes|=e,ld|=e,n)}function ec(e,t,n,r){return Ur(n,t)?n:Oo.current===null?!(Wo&106)||Wo&1073741824&&!(K&261930)?(Ic=!0,e.memoizedState=n):(e=Fd(),z.lanes|=e,ld|=e,t):(e=$s(e,n,r),Ur(e,t)||(Ic=!0),e)}function tc(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,pc(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,Ga(c,r),Pd(e)):fc(e,t,r,Pd(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ic(e).queue;tc(e,a,t,be,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:be},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},Pd())}function oc(){return Da(uh)}function sc(){return us().memoizedState}function cc(){return us().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=yo(n);var r=bo(t,e,n);r!==null&&(Ld(r,t,n),xo(r,t,n)),t={cache:Pa()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=Oi(e,t,n,r),n!==null&&(Ld(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,Pd())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o))return Di(e,t,i,0),nd===null&&Ei(),!1}catch{}if(n=Oi(e,t,i,r),n!==null)return Ld(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(i(479))}else t=Oi(e,n,r,2),t!==null&&Ld(t,e,2)}function mc(e){var t=e.alternate;return e===z||t!==null&&t===z}function hc(e,t){Jo=qo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}var _c={readContext:Da,use:ps,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useLayoutEffect:es,useInsertionEffect:es,useMemo:es,useReducer:es,useRef:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useSyncExternalStore:es,useId:es,useHostTransitionStatus:es,useFormState:es,useActionState:es,useOptimistic:es,useMemoCache:es,useCacheRefresh:es,useEffectEvent:es},vc={readContext:Da,use:ps,useCallback:function(e,t){return ls().memoizedState=[e,t===void 0?null:t],e},useContext:Da,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=ls();t=t===void 0?null:t;var r=e();if(Yo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ls();if(n!==void 0){var i=n(t);if(Yo){tt(!0);try{n(t)}finally{tt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=uc.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=ls();return e={current:e},t.memoizedState=e},useState:function(e){e=Ts(e);var t=e.queue,n=dc.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(ls(),e,t)},useTransition:function(){var e=Ts(!1);return e=tc.bind(null,z,e.queue,!0,!1),ls().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=ls();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),nd===null)throw Error(i(349));K&127||bs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Hs(Ss.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},xs.bind(null,r,o,n,t),null),n},useId:function(){var e=ls(),t=nd.identifierPrefix;if(R){var n=$i,r=Qi;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=$o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:oc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e){var t=ls();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=pc.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:ms,useCacheRefresh:function(){return ls().memoizedState=lc.bind(null,z)},useEffectEvent:function(e){var t=ls(),n={impl:e};return t.memoizedState=n,function(){if(W&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},yc={readContext:Da,use:ps,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:gs,useRef:zs,useState:function(){return gs(hs)},useDebugValue:Xs,useDeferredValue:function(e,t){return ec(us(),Go.memoizedState,e,t)},useTransition:function(){var e=gs(hs)[0],t=us().memoizedState;return[typeof e==`boolean`?e:fs(e),t]},useSyncExternalStore:ys,useId:sc,useHostTransitionStatus:oc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){return Es(us(),Go,e,t)},useMemoCache:ms,useCacheRefresh:cc,useEffectEvent:Gs},bc={readContext:Da,use:ps,useCallback:Zs,useContext:Da,useEffect:Us,useImperativeHandle:Ys,useInsertionEffect:Ks,useLayoutEffect:qs,useMemo:Qs,useReducer:vs,useRef:zs,useState:function(){return vs(hs)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=us();return Go===null?$s(n,e,t):ec(n,Go.memoizedState,e,t)},useTransition:function(){var e=vs(hs)[0],t=us().memoizedState;return[typeof e==`boolean`?e:fs(e),t]},useSyncExternalStore:ys,useId:sc,useHostTransitionStatus:oc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e,t){var n=us();return Go===null?(n.baseState=e,[e,n.queue.dispatch]):Es(n,Go,e,t)},useMemoCache:ms,useCacheRefresh:cc,useEffectEvent:Gs};function xc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:E({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=yo(r);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Ld(t,e,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=yo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,r),t!==null&&(Ld(t,e,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=yo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(Ld(t,e,n),xo(t,e,n))}};function Cc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(i,a):!0}function wc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sc.enqueueReplaceState(t,t.state,null)}function Tc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=E({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ec(e){Si(e)}function Dc(e){console.error(e)}function Oc(e){Si(e)}function kc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ac(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function jc(e,t,n){return n=yo(n),n.tag=3,n.payload={element:null},n.callback=function(){kc(e,t)},n}function Mc(e){return e=yo(e),e.tag=3,e}function Nc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ac(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ac(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Pc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&wa(t,n,a,!0),n=No.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Po===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===eo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Yd(),!1}if(R)return t=No.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Wi(r,n),a=jc(e.stateNode,r,a),So(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Wi(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=jc(n.stateNode,r,e),So(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Mc(a),Nc(a,e,n,r),So(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Fc=Error(i(461)),Ic=!1;function Lc(e,t,n,r){t.child=e===null?ho(t,null,n,r):mo(t,e.child,n,r)}function Rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ea(t),r=ns(e,t,n,o,a,i),s=os(),e!==null&&!Ic?(ss(e,t,i),fl(e,t,i)):(R&&s&&na(t),t.flags|=1,Lc(e,t,r,i),t.child)}function zc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Bc(e,t,a,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!pl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return fl(e,t,i)}return t.flags|=1,e=Ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function Bc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Ic=!1,t.pendingProps=r=a,pl(e,i))e.flags&131072&&(Ic=!0);else return t.lanes=e.lanes,fl(e,t,i)}}return Jc(e,t,n,r,i)}function Vc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ya(t,a===null?null:a.cachePool),a===null?jo():Ao(t,a),Lo(t);else return r=t.lanes=536870912,Uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ya(t,null),jo(),Ro()):(Ya(t,a.cachePool),Ao(t,a),Ro(),t.memoizedState=null);return Lc(e,t,i,n),t.child}function Hc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Uc(e,t,n,r,i){var a=Ja();return a=a===null?null:{parent:Na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ya(t,null),jo(),Lo(t),e!==null&&wa(e,t,r,!0),t.childLanes=i,null}function Wc(e,t){return t=rl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gc(e,t,n){return mo(t,e.child,null,n),e=Wc(t,t.pendingProps),e.flags|=2,zo(t),t.memoizedState=null,e}function Kc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=Wc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Hc(null,e);if(Io(t),(e=oa)?(e=cm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Wc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Io(t),a){if(t.flags&256)t.flags&=-257,t=Gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ic||wa(e,t,n,!1),a=(n&e.childLanes)!==0,Ic||a){if(Oo.current===null){if(r=nd,r!==null&&(s=bt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ki(e,s),Ld(r,e,s),Fc;Yd()}t=Gc(e,t,n)}else e=o.treeContext,oa=fm(s.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=Wc(t,r),t.flags|=134221824;return t}return e=Ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Jc(e,t,n,r,i){return Ea(t),n=ns(e,t,n,r,void 0,i),r=os(),e!==null&&!Ic?(ss(e,t,i),fl(e,t,i)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,i),t.child)}function Yc(e,t,n,r,i,a){return Ea(t),t.updateQueue=null,n=is(t,r,n,i),rs(e),r=os(),e!==null&&!Ic?(ss(e,t,a),fl(e,t,a)):(R&&r&&na(t),t.flags|=1,Lc(e,t,n,a),t.child)}function Xc(e,t,n,r,i){if(Ea(t),t.stateNode===null){var a=Mi,o=n.contextType;typeof o==`object`&&o&&(a=Da(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},_o(t),o=n.contextType,a.context=typeof o==`object`&&o?Da(o):Mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(xc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Sc.enqueueReplaceState(a,a.state,null),To(t,r,a,i),wo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Tc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Mi,typeof u==`object`&&u&&(o=Da(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&wc(t,a,r,o),go=!1;var f=t.memoizedState;a.state=f,To(t,r,a,i),wo(),l=t.memoizedState,s||f!==l||go?(typeof d==`function`&&(xc(t,n,d,r),l=t.memoizedState),(c=go||Cc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,vo(e,t),o=t.memoizedProps,u=Tc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Mi,typeof l==`object`&&l&&(c=Da(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&wc(t,a,r,c),go=!1,f=t.memoizedState,a.state=f,To(t,r,a,i),wo();var p=t.memoizedState;o!==d||f!==p||go||e!==null&&e.dependencies!==null&&Ta(e.dependencies)?(typeof s==`function`&&(xc(t,n,s,r),p=t.memoizedState),(u=go||Cc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,qc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=mo(t,e.child,null,i),t.child=mo(t,null,n,i)):Lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=fl(e,t,i),e}function Zc(e,t,n,r){return ma(),t.flags|=256,Lc(e,t,n,r),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:Xa()}}function el(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function tl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Bo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(R){if(i?Fo(t):Ro(),(e=oa)?(e=cm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi===null?null:{id:Qi,overflow:$i},retryLane:536870912,hydrationErrors:null},n=Vi(e),n.return=t,t.child=n,aa=t,oa=null)):e=null,e===null)throw ua(t);return t.lanes=um(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ro(),i=t.mode,a=rl({mode:`hidden`,children:a},i),r=zi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=$c(n),r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(null,r)):(Fo(t),nl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return al(e,t,a,o,r,c,s,n)}return i?(Ro(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ii(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=zi(i,a,n,null),i.flags|=2):i=Ii(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Hc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=$c(n):(a=i.cachePool,a===null?a=Xa():(s=Na._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=el(e,o,n),t.memoizedState=Qc,Hc(e.child,r)):(Fo(t),n=e.child,e=n.sibling,n=Ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function nl(e,t){return t=rl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function rl(e,t){return e=Pi(22,e,null,t),e.lanes=0,e}function il(e,t,n){return mo(t,e.child,null,n),e=nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function al(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Fo(t),t.flags&=-257,il(e,t,c)):t.memoizedState===null?(Ro(),o=a.fallback,s=t.mode,a=rl({mode:`visible`,children:a.children},s),o=zi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,mo(t,e.child,null,c),a=t.child,a.memoizedState=$c(c),a.childLanes=el(e,r,c),t.memoizedState=Qc,Hc(null,a)):(Ro(),t.child=e.child,t.flags|=128,null);if(Fo(t),um(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ga({value:a,source:null,stack:null})),il(e,t,c)}if(Ic||wa(e,t,c,!1),r=(c&e.childLanes)!==0,Ic||r){if(Oo.current!==null)return il(e,t,c);if(r=nd,r!==null&&(a=bt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,ki(e,a),Ld(r,e,a),Fc;return lm(o)||Yd(),il(e,t,c)}return lm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,oa=fm(o.nextSibling),aa=t,R=!0,sa=null,ca=!1,e!==null&&ia(t,e),t=nl(t,a.children),t.flags|=134221824,t)}function ol(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sa(e.return,t,n)}function sl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Uo(n)===null&&(t=e),e=e.sibling}return t}function cl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ll(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ul(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Bo.current;if(t.flags&128)return Vo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Vo(t,o),i===`backwards`&&e!==null?(ll(e),Lc(e,t,r,n),ll(e)):Lc(e,t,r,n),r=R?Ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ol(e,n,t);else if(e.tag===19)ol(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ll(t)),cl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cl(t,!0,n,null,a,r);break;case`together`:cl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=sl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cl(t,!1,i,n,a,r)}return t.child}function dl(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Lc(e,t,r.children,n),t.child}function fl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(wa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ta(e)))}function ml(e,t,n){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),ba(t,Na,e.memoizedState.cache),ma();break;case 27:case 5:je(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Io(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Fo(t),t.flags|=128,null;r=wa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?tl(e,t,n):(Fo(t),e=fl(e,t,n),e===null?null:e.sibling)}Fo(t);break;case 19:if(t.flags&128)return ul(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(wa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ul(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vo(t,Bo.current),r)break;return null;case 22:return t.lanes=0,Vc(e,t,n,t.pendingProps);case 24:ba(t,Na,e.memoizedState.cache)}return fl(e,t,n)}function hl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ic=!0;else{if(!pl(e,n)&&!(t.flags&128))return Ic=!1,ml(e,t,n);Ic=!!(e.flags&131072)}}else Ic=!1,R&&t.flags&1048576&&ta(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,typeof e==`function`)Fi(e)?(r=Tc(e,r),t.tag=1,t=Xc(null,t,e,r,n)):(t.tag=0,t=Jc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===oe){t.tag=11,t=Rc(null,t,e,r,n);break a}if(a===le){t.tag=14,t=zc(null,t,e,r,n);break a}if(a===ae){t.tag=10,t.type=e,t=dl(null,t,n);break a}}throw t=ve(e)||e,Error(i(306,t,``))}}return t;case 0:return Jc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Tc(r,t.pendingProps),Xc(e,t,r,a,n);case 3:a:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,vo(e,t),To(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,Na,r),r!==o.cache&&Ca(t,[Na],n,!0),wo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Zc(e,t,r,n);break a}if(r!==a){a=Wi(Error(i(424)),t),ga(a),t=Zc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(oa=fm(e.firstChild),aa=t,R=!0,sa=null,ca=!0,n=ho(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=fl(e,t,n);break a}Lc(e,t,r,n)}t=t.child}return t;case 26:return qc(e,t),e===null?(n=Im(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(t.stateNode=hp(t.type,t.pendingProps,De.current,t)):t.memoizedState=Im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&R&&(r=t.stateNode=vm(t.type,t.pendingProps,De.current),aa=t,ca=!0,a=oa,Tp(t.type)?(pm=a,oa=fm(r.firstChild)):oa=a),Lc(e,t,t.pendingProps.children,n),qc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=oa)&&(r=om(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,aa=t,oa=fm(r.firstChild),ca=!1,a=!0)),a||ua(t)),je(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,gp(a,o)?r=null:s!==null&&gp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ns(e,t,as,null,null,n),uh._currentValue=a),qc(e,t),Lc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=oa)&&(n=sm(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,aa=t,oa=null,e=!0)),e||ua(t)),null;case 13:return tl(e,t,n);case 4:return ke(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mo(t,null,r,n):Lc(e,t,r,n),t.child;case 11:return Rc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,qc(e,t),Lc(e,t,r,n),t.child;case 8:return Lc(e,t,t.pendingProps.children,n),t.child;case 12:return Lc(e,t,t.pendingProps.children,n),t.child;case 10:return dl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ea(t),a=Da(a),r=r(a),t.flags|=1,Lc(e,t,r,n),t.child;case 14:return zc(e,t,t.type,t.pendingProps,n);case 15:return Bc(e,t,t.type,t.pendingProps,n);case 19:return ul(e,t,n);case 31:return Kc(e,t,n);case 22:return Vc(e,t,n,t.pendingProps);case 24:return Ea(t),r=Da(Na),e===null?(a=Ja(),a===null&&(a=nd,o=Pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},_o(t),ba(t,Na,a)):((e.lanes&n)!==0&&(vo(e,t),To(t,null,null,n),wo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,Na,r),r!==a.cache&&Ca(t,[Na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,Na,r))),Lc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:R&&na(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:qc(e,t),Lc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function gl(e){e.flags|=4}function _l(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Zm(t,r):Zm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw io=eo,Qa}}else e.flags&=-16777217}function vl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t)){if(Kd())e.flags|=8192;else throw io=eo,Qa}}function yl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:mt(),e.lanes|=t,pd|=t)}function bl(e,t){if(!R)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function xl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Sl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xl(t),null;case 1:return xl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(Na),Ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?gl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),xl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(gl(t),o===null?(xl(t),_l(t,a,null,r,n)):(xl(t),vl(t,o))):o?o===e.memoizedState?(xl(t),t.flags&=-16777217):(gl(t),xl(t),vl(t,o)):(e=e.memoizedProps,e!==r&&gl(t),xl(t),_l(t,a,e,r,n)),null;case 27:if(Me(t),n=De.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}e=Te.current,pa(t)?da(t,e):(e=vm(a,r,n),t.stateNode=e,gl(t))}return xl(t),t.subtreeFlags&=-33554433,null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return xl(t),t.subtreeFlags&=-33554433,null}if(o=Te.current,pa(t))da(t,o);else{var s=fp(De.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Et]=t,o[Dt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ap(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&gl(t)}}return xl(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=De.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=aa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||ua(t,!0)}else e=fp(e).createTextNode(r),e[Et]=t,t.stateNode=e}return xl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Et]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zo(t),t):(zo(t),null);if(t.flags&128)throw Error(i(558))}return xl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Et]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xl(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(zo(t),t):(zo(t),null)}return zo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),yl(t,t.updateQueue),xl(t),null);case 4:return Ae(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,xl(t),null;case 10:return xa(t.type),xl(t),null;case 19:if(Ho(t),r=t.memoizedState,r===null)return xl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)bl(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Uo(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Li(n,e),n=n.sibling;return Vo(t,Bo.current&1|2),R&&ea(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ge()>yd&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!R)return xl(t),null}else 2*Ge()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,bl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ge(),e.sibling=null,o=Bo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||R?Vo(t,o):(n=o,N(No,t),N(Bo,n),Po===null&&(Po=t)),R&&ea(t,r.treeForkCount),e}return xl(t),null;case 22:case 23:return zo(t),Mo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(xl(t),t.subtreeFlags&6&&(t.flags|=8192)):xl(t),n=t.updateQueue,n!==null&&yl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&we(qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(Na),xl(t),null;case 25:return null;case 30:return t.flags|=33554432,xl(t),null}throw Error(i(156,t.tag))}function Cl(e,t){switch(ra(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(Na),Ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(zo(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ho(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ae(),null;case 10:return xa(t.type),null;case 22:case 23:return zo(t),Mo(),e!==null&&we(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(Na),null;case 25:return null;default:return null}}function wl(e,t){switch(ra(t),t.tag){case 3:xa(Na),Ae();break;case 26:case 27:case 5:Me(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&zo(t);break;case 13:zo(t);break;case 19:Ho(t);break;case 10:xa(t.type);break;case 22:case 23:zo(t),Mo(),e!==null&&we(qa);break;case 24:xa(Na)}}function Tl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){J(t,t.return,e)}}function El(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){J(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){J(t,t.return,e)}}function Dl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Do(t,n)}catch(t){J(e,e.return,t)}}}function Ol(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){J(e,t,n)}}function kl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=yi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);m(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){J(e,t,n)}}function Al(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){J(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){J(e,t,n)}else n.current=null}}function jl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)rm(e.stateNode,t[n])}function Ml(e){for(var t=e.return;t!==null&&(Fl(t)&&rm(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Nl(e){for(var t=e.return;t!==null&&(Fl(t)&&im(e.stateNode,t.stateNode),!Pl(t));)t=t.return}function Pl(e){return e.tag===5||e.tag===3||e.tag===27}function Fl(e){return e&&e.tag===7&&e.stateNode!==null}function Il(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){J(e,e.return,t)}}function Ll(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[Dt]=t}catch(t){J(e,e.return,t)}}function Rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tp(e.type)||e.tag===4}function zl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Tp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bn)),jl(e,r),L=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Tp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),jl(e,r),L=!0;else if(i!==4&&(i===27&&(jl(e,r),r=null,Tp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Vl(e,t,n,r),e=e.sibling;e!==null;)Vl(e,t,n,r),e=e.sibling}function Hl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ap(t,r,n),t[Et]=e,t[Dt]=n}catch(t){J(e,e.return,t)}}var Ul=!1,Wl=null;function Gl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ul=!0)}var Kl=null;function ql(){var e=Kl;return Kl=null,e}var Jl=0;function Yl(e,t,n,r,i){return Jl=0,Xl(e.child,t,n,r,i)}function Xl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=jp(o);r.push(s),s.view&&(a=!0)}else a||jp(o).view&&(a=!0);Ul=!0,Op(o,Jl===0?t:t+`_`+Jl,n),Jl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Xl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Zl(e,t){for(;e!==null;)e.tag===5?kp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Zl(e.child,t),e=e.sibling}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=xi(t.default,t.share),t!==`none`&&(Yl(e,n,t,null,!1)||Zl(e.child,!1))}e=e.sibling}}function $l(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=yi(r,n),a=xi(r.default,n.paired?r.share:r.enter);a===`none`?Ql(e):Yl(e,i,a,null,!1)?(Ql(e),n.paired||t||Id(e,r.onEnter)):Zl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e,t),e=e.sibling;else Ql(e)}function eu(e){if(Wl!==null&&Wl.size!==0){var t=Wl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=xi(n.default,n.share);if(a!==`none`&&(Yl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Zl(e.child,!1)),t.delete(r),t.size===0)break}}}eu(e)}e=e.sibling}}}function tu(e){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode),r=Wl===null?void 0:Wl.get(n),i=xi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Yl(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Wl.delete(n),Id(e,t.onShare)):Zl(e.child,!1)),Wl!==null&&eu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else Wl!==null&&eu(e)}function nu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=yi(t,e.stateNode);t=xi(t.default,t.update),e.flags&=-5,t!==`none`&&Yl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&nu(e);e=e.sibling}}function ru(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Zl(e.child,!1))}ru(e)}e=e.sibling}}function iu(e){if(e.tag===30)e.stateNode.paired=null,Zl(e.child,!1),ru(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)iu(e),e=e.sibling;else ru(e)}function au(e){for(e=e.child;e!==null;)e.tag===30?Zl(e.child,!1):e.subtreeFlags&33554432&&au(e),e=e.sibling}function ou(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Jl<a.length){var l=a[Jl],u=jp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Op(c,Jl===0?n:n+`_`+Jl,i),s&&e.flags&4||(Kl===null&&(Kl=[]),Kl.push(c,Jl===0?r:r+`_`+Jl,t.memoizedProps)),Jl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ou(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function su(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=yi(n,r),a=xi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Jl=0,i=ou(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&su(e,t);e=e.sibling}}var cu=!1,V=!1,lu=!1,uu=!1,du=typeof WeakSet==`function`?WeakSet:Set,fu=null,pu=!1,mu=!1,hu=!1,gu=!1;function _u(e,t,n){if(e=e.containerInfo,up=yh,e=Yr(e),Xr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(dp={focusedElem:e,selectionRange:r},yh=!1,n=(n&335544064)===n,fu=t,t=n?9270:1024;fu!==null;){if(e=fu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&tu(r[a]);if(e.alternate===null&&e.flags&2)n&&Gl(e),vu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&tu(r),vu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Gl(e),vu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,fu=r):(n&&nu(e),vu(n))}}Wl=null}function vu(e){for(;fu!==null;){var t=fu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Tc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){J(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)am(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:am(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=yi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=xi(a.default,a.update),a!==`none`&&Yl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,fu=r;break}fu=t.return}}function yu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Lu(e,n),r&4&&Tl(5,n);break;case 1:if(Lu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){J(n,n.return,e)}else{var i=Tc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){J(n,n.return,e)}}}r&64&&Dl(n),r&512&&kl(n,n.return);break;case 3:if(Lu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Do(e,t)}catch(e){J(n,n.return,e)}}break;case 27:t===null&&r&4&&Hl(n);case 26:case 5:Lu(e,n),t===null&&r&4&&Il(n),r&512&&kl(n,n.return);break;case 12:Lu(e,n);break;case 31:Lu(e,n),r&4&&U(e,n);break;case 13:Lu(e,n),r&4&&Du(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),dm(e,n))));break;case 22:if(r=n.memoizedState!==null||cu,!r){var a=t!==null&&t.memoizedState!==null||V;t=cu,i=V,cu=r,(V=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),zu(e,n,r)):Lu(e,n),cu=t,V=i}break;case 30:Lu(e,n),r&512&&kl(n,n.return);break;case 7:r&512&&kl(n,n.return);default:Lu(e,n)}}function bu(e,t){for(e=e.child;e!==null;)xu(e,t),e=e.sibling}function xu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){J(e,e.return,t)}Su(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,L=!0}catch(t){J(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Dp(s,!0):Dp(e.stateNode,!1)}catch(t){J(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&bu(e,t);break;default:bu(e,t)}}function Su(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:xu(n,r);break a;case 22:n.memoizedState===null&&Su(n,r);break a;default:Su(n,r)}}e=e.sibling}}function Cu(e){var t=e.alternate;t!==null&&(e.alternate=null,Cu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var wu=null,Tu=!1;function H(e,t,n){for(n=n.child;n!==null;)Eu(e,t,n),n=n.sibling}function Eu(e,t,n){if(et&&typeof et.onCommitFiberUnmount==`function`)try{et.onCommitFiberUnmount($e,n)}catch{}switch(n.tag){case 26:V||Al(n,t),H(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!V&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:V||Al(n,t),Nl(n);var r=wu,i=Tu;Tp(n.type)&&(wu=n.stateNode,Tu=!1),H(e,t,n),ym(n.stateNode,n.type,n.memoizedProps),wu=r,Tu=i;break;case 5:V||Al(n,t),Nl(n);case 6:if(n.tag===6&&Nl(n),r=wu,i=Tu,wu=null,H(e,t,n),wu=r,Tu=i,wu!==null){if(Tu)try{(wu.nodeType===9?wu.body:wu.nodeName===`HTML`?wu.ownerDocument.body:wu).removeChild(n.stateNode),L=!0}catch(e){J(n,t,e)}else try{wu.removeChild(n.stateNode),L=!0}catch(e){J(n,t,e)}}break;case 18:wu!==null&&(Tu?(e=wu,Ep(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gh(e)):Ep(wu,n.stateNode));break;case 4:r=wu,i=Tu,wu=n.stateNode.containerInfo,Tu=!0,H(e,t,n),wu=r,Tu=i;break;case 0:case 11:case 14:case 15:El(2,n,t),V||El(4,n,t),H(e,t,n);break;case 1:V||(Al(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ol(n,t,r)),H(e,t,n);break;case 21:H(e,t,n);break;case 22:V=(r=V)||n.memoizedState!==null,H(e,t,n),V=r;break;case 30:Al(n,t),H(e,t,n);break;case 7:V||Al(n,t),H(e,t,n);break;default:H(e,t,n)}}function U(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gh(e)}catch(e){J(t,t.return,e)}}}function Du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gh(e)}catch(e){J(t,t.return,e)}}function Ou(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(i(435,e.tag))}}function ku(e,t){var n=Ou(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Au(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Tp(l.type)){wu=l.stateNode,Tu=!1;break a}break;case 5:wu=l.stateNode,Tu=!1;break a;case 3:case 4:wu=l.stateNode.containerInfo,Tu=!0;break a}l=l.return}if(wu===null)throw Error(i(160));Eu(s,c,o),wu=null,Tu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mu(t,e,n),t=t.sibling}var ju=null;function Mu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Au(t,e,n),Nu(e),a&4&&(El(3,e,e.return),Tl(3,e),El(5,e,e.return));break;case 1:Au(t,e,n),Nu(e),a&512&&(V||r===null||Al(r,r.return)),a&64&&cu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ju,Au(t,e,n),Nu(e),a&512&&(V||r===null||Al(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(cu)e.stateNode=hp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Mt]||r[Et]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ap(r,t,n),r[Et]=e,Rt(r),t=r;break a;case`link`:if(o=Jm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Jm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Et]=e,Rt(r),t=r}e.stateNode=t}}else cu||Ym(o,e.type,e.stateNode)}else e.stateNode=Um(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ll(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||V||t.parentNode.removeChild(t)):a.count--,n===null?cu||Ym(o,e.type,e.stateNode):Um(o,n,e.memoizedProps))}break;case 27:Au(t,e,n),Nu(e),a&512&&(V||r===null||Al(r,r.return)),r!==null&&a&4&&Ll(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=lu,lu=!1,Au(t,e,n),lu=o,Nu(e),a&512&&(V||r===null||Al(r,r.return)),e.flags&32){t=e.stateNode;try{fn(t,``),L=!0}catch(t){J(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ll(e,t,r===null?t:r.memoizedProps)),a&1024&&(uu=!0);break;case 6:if(Au(t,e,n),Nu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,L=!0}catch(t){J(e,e.return,t)}}break;case 3:if(L=!1,qm=null,o=ju,ju=Cm(t.containerInfo),Au(t,e,n),ju=o,Nu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(t){J(e,e.return,t)}uu&&(uu=!1,Pu(e)),L=!1;break;case 4:a=lu,lu=cu,r=Jt(),o=ju,ju=Cm(e.stateNode.containerInfo),Au(t,e,n),Nu(e),ju=o,L&&mu&&(hu=!0),L=r,lu=a;break;case 12:Au(t,e,n),Nu(e);break;case 31:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 13:Au(t,e,n),Nu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Ge()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=cu,l=V,u=lu;cu=c||o,lu=u||o,V=l||s,Au(t,e,n),V=l,lu=u,cu=c,Nu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||cu||V||(t=s||V,n=cu,r=V,cu=o||cu,V=t,Ru(e,2),cu=n,V=r),!o&&lu||bu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ku(e,n))));break;case 19:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 30:a&512&&(V||r===null||Al(r,r.return)),a=Jt(),o=mu,s=(n&335544064)===n,c=e.memoizedProps,mu=s&&xi(c.default,c.update)!==`none`,Au(t,e,n),Nu(e),s&&r!==null&&L&&(e.flags|=4),mu=o,L=a;break;case 21:break;case 7:a&512&&(V||r===null||Al(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Au(t,e,n),Nu(e)}}function Nu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Rl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Fl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Pl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Vl(e,zl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(fn(l,``),n.flags&=-33),Vl(e,zl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Bl(e,zl(e),u,s);break;default:throw Error(i(161))}}catch(t){J(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,yh=!0,t.reset(),yh=!1),e=e.sibling}}function Fu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Iu(t,e),t=t.sibling;else su(t,!1)}function Iu(e,t){var n=e.alternate;if(n===null)$l(e,!1);else switch(e.tag){case 3:if(gu=pu=!1,ql(),Fu(t,e),!pu&&!hu){if(e=Kl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];kp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),gu=!0}Kl=null;break;case 5:Fu(t,e);break;case 4:r=pu,pu=!1,Fu(t,e),pu&&(hu=!0),pu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Fu(t,e):$l(e,!1));break;case 30:r=pu,i=ql(),pu=!1,Fu(t,e),pu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=yi(a,o),o=yi(n.memoizedProps,o);var s=xi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Jl=0,t=ou(e,n,t,o,s,a,!0),Jl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),Kl=i):i!==null&&(i.push.apply(i,Kl),Kl=i),pu=e.flags&32?!0:r;break;default:Fu(t,e)}}function Lu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yu(e,t.alternate,t),t=t.sibling}function Ru(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:El(4,n,n.return),Ru(n,r);break;case 1:Al(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ol(n,n.return,i),Ru(n,r);break;case 27:r&2&&ym(n.stateNode,n.type,n.memoizedProps);case 5:Al(n,n.return),n.tag!==5&&n.tag!==27||Nl(n),Ru(n,r);break;case 6:Nl(n);break;case 26:Al(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||V||i.parentNode.removeChild(i),Ru(n,r);break;case 22:n.memoizedState===null&&Ru(n,r);break;case 30:Al(n,n.return),Ru(n,r);break;case 7:Al(n,n.return);default:Ru(n,r)}e=e.sibling}}function zu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:zu(i,a,n),Tl(4,a);break;case 1:if(zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){J(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Eo(l[i],c)}catch(e){J(r,r.return,e)}}s&&o&64&&Dl(a),kl(a,a.return);break;case 27:n&2&&Hl(a);case 5:a.tag!==5&&a.tag!==27||Ml(a),zu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 6:Ml(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||cu||Ym(Cm(c.ownerDocument),a.type,c),zu(i,a,n),s&&r===null&&o&4&&Il(a),kl(a,a.return);break;case 12:zu(i,a,n);break;case 31:zu(i,a,n),s&&o&4&&U(i,a);break;case 13:zu(i,a,n),s&&o&4&&Du(i,a);break;case 22:a.memoizedState===null&&zu(i,a,n),kl(a,a.return);break;case 30:zu(i,a,n),kl(a,a.return);break;case 7:kl(a,a.return);default:zu(i,a,n)}t=t.sibling}}function Bu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Fa(n))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Fa(e))}function Hu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Uu(e,t,n,r),t=t.sibling;else i&&au(t)}function Uu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&iu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Hu(e,t,n,r),a&2048&&Tl(9,t);break;case 1:Hu(e,t,n,r);break;case 3:Hu(e,t,n,r),i&&gu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Fa(a)));break;case 12:if(a&2048){Hu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){J(t,t.return,e)}}else Hu(e,t,n,r);break;case 31:Hu(e,t,n,r);break;case 13:Hu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&iu(t),o._visibility&2?Hu(e,t,n,r):(o._visibility|=2,Wu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&iu(s),o._visibility&2?Hu(e,t,n,r):Gu(e,t)),a&2048&&Bu(s,t);break;case 24:Hu(e,t,n,r),a&2048&&Vu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Zl(a.child,!0),Zl(t.child,!0))),Hu(e,t,n,r);break;default:Hu(e,t,n,r)}}function Wu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Wu(a,o,s,c,i),Tl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Wu(a,o,s,c,i)):u._visibility&2?Wu(a,o,s,c,i):Gu(a,o),i&&l&2048&&Bu(o.alternate,o);break;case 24:Wu(a,o,s,c,i),i&&l&2048&&Vu(o.alternate,o);break;default:Wu(a,o,s,c,i)}t=t.sibling}}function Gu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Gu(n,r),i&2048&&Bu(r.alternate,r);break;case 24:Gu(n,r),i&2048&&Vu(r.alternate,r);break;default:Gu(n,r)}t=t.sibling}}var Ku=8192;function qu(e,t,n){if(e.subtreeFlags&Ku)for(e=e.child;e!==null;)Ju(e,t,n),e=e.sibling}function Ju(e,t,n){switch(e.tag){case 26:qu(e,t,n),e.flags&Ku&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&eh(n,e)):th(n,ju,e.memoizedState,e.memoizedProps));break;case 5:qu(e,t,n),e.flags&Ku&&(e=e.stateNode,(t&335544128)===t&&eh(n,e));break;case 3:case 4:var r=ju;ju=Cm(e.stateNode.containerInfo),qu(e,t,n),ju=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ku,Ku=16777216,qu(e,t,n),Ku=r):qu(e,t,n));break;case 30:if((e.flags&Ku)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Wl===null&&(Wl=new Map),Wl.set(r,i)}qu(e,t,n);break;default:qu(e,t,n)}}function Yu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,$u(r,e)}Yu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zu(e),e=e.sibling}function Zu(e){switch(e.tag){case 0:case 11:case 15:Xu(e),e.flags&2048&&El(9,e,e.return);break;case 3:Xu(e);break;case 12:Xu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qu(e)):Xu(e);break;default:Xu(e)}}function Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,$u(r,e)}Yu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),Qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function $u(e,t){for(;fu!==null;){var n=fu;switch(n.tag){case 0:case 11:case 15:El(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fu=r;else a:for(n=e;fu!==null;){r=fu;var i=r.sibling,a=r.return;if(Cu(r),r===n){fu=null;break a}if(i!==null){i.return=a,fu=i;break a}fu=a}}}var ed={getCacheForType:function(e){var t=Da(Na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Da(Na).controller.signal}},td=typeof WeakMap==`function`?WeakMap:Map,W=0,nd=null,G=null,K=0,q=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return W&2&&K!==0?K&-K:j.T===null?Ct():Lf()}function Fd(){if(fd===0){if(!(K&536870912)||R){var e=st;st<<=1,!(st&3932160)&&(st=262144),fd=e}else fd=536870912}return e=No.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(yi(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===nd&&(q===2||q===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,K,fd,!1)),gt(e,n),W&2&&e===nd||(e===nd&&(!(W&2)&&(ud|=n),cd===4&&Vd(e,K,fd,!1)),kf(e))}function Rd(e,t,n){if(W&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||dt(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n))a=Xd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Ge(),10<a)){if(Vd(r,t,fd,!id),ut(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=yp(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);kf(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},Wl=null,Ju(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ah.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Ge():(a&4194048)===a?vd-Ge():0,m=rh(d,m),m!==null)?(Td=a,e.cancelPendingCommit=m(of.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l)):of(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vd(e,t,n,r){t=ft(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-nt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&vt(e,n,t)}function Hd(){return W&6?!0:(Af(0,!1),!1)}function Ud(){if(G!==null){if(q===0)var e=G.return;else e=G,ya=va=null,cs(e),so=null,co=0,e=G;for(;e!==null;)wl(e.alternate,e),e=e.return;G=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),nd=e,G=n=Ii(e.current,null),K=t,q=0,rd=null,id=!1,ad=dt(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=ft(e,t),Ei(),n}function Gd(e,t){z=null,j.H=_c,t===Za||t===$a?(t=ao(),q=3):t===Qa?(t=ao(),q=4):q=t===Fc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,G===null&&(cd=1,kc(e,Wi(t,e.current)))}function Kd(){var e=No.current;return e===null?!0:(K&4194048)===K?Po===null:(K&62914560)===K||K&536870912?e===Po:!1}function qd(){var e=j.H;return j.H=_c,e===null?_c:e}function Jd(){var e=j.A;return j.A=ed,e}function Yd(){cd=4,id||(K&4194048)!==K&&No.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||nd===null||Vd(nd,K,fd,!1)}function Xd(e,t,n){var r=W;W|=2;var i=qd(),a=Jd();(nd!==e||K!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(q!==0&&G!==null){var s=G,c=rd;switch(q){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:No.current===null&&(t=!0);var l=q;if(q=0,rd=null,nf(e,s,c,l),n&&ad){o=0;break a}break;default:l=q,q=0,rd=null,nf(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,W=r,j.H=i,j.A=a,G===null&&(nd=null,K=0,Ei()),o}function Zd(){for(;G!==null;)ef(G)}function Qd(e,t){var n=W;W|=2;var r=qd(),a=Jd();nd!==e||K!==t?(bd=null,yd=Ge()+500,Wd(e,t)):ad=dt(e,t);a:do try{if(q!==0&&G!==null){t=G;var o=rd;b:switch(q){case 1:q=0,rd=null,nf(e,t,o,1);break;case 2:case 9:if(to(o)){q=0,rd=null,tf(t);break}t=function(){q!==2&&q!==9||nd!==e||(q=7),kf(e)},o.then(t,t);break a;case 3:q=7;break a;case 4:q=5;break a;case 7:to(o)?(q=0,rd=null,tf(t)):(q=0,rd=null,nf(e,t,o,7));break;case 5:var s=null;switch(G.tag){case 26:s=G.memoizedState;case 5:case 27:var c=G;if(s?Qm(s):c.stateNode.complete){q=0,rd=null;var l=c.sibling;if(l!==null)G=l;else{var u=c.return;u===null?G=null:(G=u,rf(u))}break b}}q=0,rd=null,nf(e,t,o,5);break;case 6:q=0,rd=null,nf(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return ya=va=null,j.H=r,j.A=a,W=n,G===null?(nd=null,K=0,Ei(),cd):0}function $d(){for(;G!==null&&!Ue();)ef(G)}function ef(e){var t=hl(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?rf(e):G=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yc(n,t,t.pendingProps,t.type,void 0,K);break;case 11:t=Yc(n,t,t.pendingProps,t.type.render,t.ref,K);break;case 5:cs(t);var r=t;r===aa&&(R?(fa(r),r.tag===5&&r.stateNode!=null&&(oa=r.stateNode)):(fa(r),R=!0));default:wl(n,t),t=G=Li(t,sd),t=hl(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?rf(e):G=t}function nf(e,t,n,r){ya=va=null,cs(t),so=null,co=0;var i=t.return;try{if(Pc(e,i,t,n,K)){cd=1,kc(e,Wi(n,e.current)),G=null;return}}catch(t){if(i!==null)throw G=i,t;cd=1,kc(e,Wi(n,e.current)),G=null;return}t.flags&32768?(R||r===1?e=!0:ad||K&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=No.current,r!==null&&r.tag===13&&(r.flags|=16384))),af(t,e)):rf(t)}function rf(e){var t=e;do{if(t.flags&32768){af(t,id);return}e=t.return;var n=Sl(t.alternate,t,sd);if(n!==null){G=n;return}if(t=t.sibling,t!==null){G=t;return}G=t=e}while(t!==null);cd===0&&(cd=5)}function af(e,t){do{var n=Cl(e.alternate,e);if(n!==null){n.flags&=32767,G=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){G=e;return}G=e=n}while(e!==null);cd=6,G=null}function of(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do mf();while(Sd!==0);if(W&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===nd&&(G=nd=null,K=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,sf(e,t,n,s,c,l,f)}}function sf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=Ti,_t(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=Ra(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Je,function(){return hf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ul=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,a=W,W|=4;try{_u(e,t,n)}finally{W=a,M.p=i,j.T=r}}Sd=1,Ul?kd=Fp(o,e.containerInfo,jd,uf,df,lf,ff,hf,cf,null,null):(uf(),df(),ff())}function cf(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function lf(){Sd===3&&(Sd=0,Iu(wd,Cd),Sd=4)}function uf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=j.T,j.T=null;var i=M.p;M.p=2;var a=W;W|=4;try{mu=hu=!1,Mu(t,e,n),n=dp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=qr(s,h),v=qr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yh=!!up,dp=up=null}finally{W=a,M.p=i,j.T=r}}e.current=t,Sd=2}}function df(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=W;W|=4;try{yu(e,t.alternate,t)}finally{W=i,M.p=r,j.T=n}}Sd=3}}function ff(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,We();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,pf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),St(r),n=n.stateNode,et&&typeof et.onCommitFiberRoot==`function`)try{et.onCommitFiberRoot($e,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=j.T,a=M.p,M.p=2,j.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{j.T=n,M.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&mf(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),Af(0,!1)}}function pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Fa(t)))}function mf(){return kd!==null&&(kd.skipTransition(),kd=null),uf(),df(),ff(),hf()}function hf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=St(Td),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,W&6)throw Error(i(331));var c=W;if(W|=4,Zu(o.current),Uu(o,o.current,s,n),W=c,Af(0,!1),et&&typeof et.onPostCommitFiberRoot==`function`)try{et.onPostCommitFiberRoot($e,o)}catch{}return!0}finally{M.p=a,j.T=r,pf(e,t)}}function gf(e,t,n){t=Wi(n,t),t=jc(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(gt(e,2),kf(e))}function J(e,t,n){if(e.tag===3)gf(e,e,n);else for(;t!==null;){if(t.tag===3){gf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Wi(n,e),n=Mc(2),r=bo(t,n,2),r!==null&&(Nc(n,r,t,e),gt(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nd===e&&(K&n)===n&&(cd===4||cd===3&&(K&62914560)===K&&300>Ge()-_d?W&2?dd|=n:Wd(e,0):dd|=n,pd===K&&(pd=0)),kf(e)}function yf(e,t){t===0&&(t=mt()),e=ki(e,t),e!==null&&(gt(e,t),kf(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return Ve(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-nt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=K,a=ut(r,r===nd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||dt(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&vp()&&(e=Of);for(var t=Ge(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}Sd!==0&&Sd!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-nt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=pt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=nd,n=K,n=ut(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(q===2||q===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&He(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&He(r),St(n)){case 2:case 8:n=P;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=Pf.bind(null,e),n=Ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&He(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mf()&&e.callbackNode!==n)return null;var r=K;return r=ut(e,e===nd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),Nf(e,Ge()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(mf())return null;Rd(e,t,!0)}function If(){Cp(function(){W&6?Ve(qe,jf):Mf()})}function Lf(){if(Of===0){var e=Va;e===0&&(e=ot,ot<<=1,!(ot&261888)&&(ot=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:yn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[Dt]||null).action),o=r.submitter;o&&(t=(t=o[Dt]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);rc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),rc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<gi.length;Bf++){var Vf=gi[Bf];_i(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}_i(ci,`onAnimationEnd`),_i(li,`onAnimationIteration`),_i(ui,`onAnimationStart`),_i(`dblclick`,`onDoubleClick`),_i(`focusin`,`onFocus`),_i(`focusout`,`onBlur`),_i(di,`onTransitionRun`),_i(fi,`onTransitionStart`),_i(pi,`onTransitionCancel`),_i(mi,`onTransitionEnd`),Ut(`onMouseEnter`,[`mouseout`,`mouseover`]),Ut(`onMouseLeave`,[`mouseout`,`mouseover`]),Ut(`onPointerEnter`,[`pointerout`,`pointerover`]),Ut(`onPointerLeave`,[`pointerout`,`pointerover`]),Ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Si(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Si(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[Ot];n===void 0&&(n=t[Ot]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Bt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Eh(t)){case 2:var i=bh;break;case 8:i=xh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!An||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=I(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Dn(function(){var r=a,i=Sn(n),s=[];a:{var c=hi.get(e);if(c!==void 0){var l=Vn,u=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=Xn;break;case`focusout`:u=`blur`,l=Xn;break;case`beforeblur`:case`afterblur`:l=Xn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case ci:case li:case ui:l=Zn;break;case mi:l=lr;break;case`scroll`:case`scrollend`:l=Un;break;case`wheel`:l=ur;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=dr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=On(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==xn&&(u=n.relatedTarget||n.fromElement)&&(I(u)||u[F]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?I(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:It(c),h=l==null?u:It(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,I(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?ee(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?It(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&gn(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?It(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(s,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(s,n,i)}var y;if(pr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else xr?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,xr=!0)),v=Zf(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?Sr(e,n):Cr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=On(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=On(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=On(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=On(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
10
+ `).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function X(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&fn(e,``+r);else return;break;case`className`:Xt(e,`class`,r);break;case`tabIndex`:Xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Xt(e,n,r);break;case`style`:hn(e,r,o);return;case`data`:if(t!==`object`){Xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&X(e,t,`name`,a.name,a,null),X(e,t,`formEncType`,a.formEncType,a,null),X(e,t,`formMethod`,a.formMethod,a,null),X(e,t,`formTarget`,a.formTarget,a,null)):(X(e,t,`encType`,a.encType,a,null),X(e,t,`method`,a.method,a,null),X(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=bn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=yn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),Yt(e,`popover`,r);break;case`xlinkActuate`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Yt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=_n.get(n)||n,Yt(e,n,r);else return}L=!0}function ip(e,t,n,r,a,o){switch(n){case`style`:hn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)fn(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=bn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Dt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}L=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Yt(e,n,r)}return}L=!0}function ap(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,o,s,n,null)}}a&&X(e,t,`srcSet`,n.srcSet,n,null),r&&X(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:X(e,t,r,d,n,null)}}sn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:X(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&ln(e,!!r,n,!0):ln(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:X(e,t,s,c,n,null)}dn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:X(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,u,r,n,null)}return;default:if(gn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ip(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&X(e,t,c,r,n,null))}var op={};function sp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||X(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(L=!0),o=m;break;case`name`:m!==f&&(L=!0),a=m;break;case`checked`:m!==f&&(L=!0),u=m;break;case`defaultChecked`:m!==f&&(L=!0),d=m;break;case`value`:m!==f&&(L=!0),s=m;break;case`defaultValue`:m!==f&&(L=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&X(e,t,p,m,r,f)}}on(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||X(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(L=!0),p=o;break;case`defaultValue`:o!==l&&(L=!0),c=o;break;case`multiple`:o!==l&&(L=!0),s=o;default:o!==l&&X(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?ln(e,!!n,n?[]:``,!1):ln(e,!!n,t,!0)):ln(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:X(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(L=!0),p=a;break;case`defaultValue`:a!==o&&(L=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&X(e,t,s,a,r,o)}un(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:X(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(L=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:X(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&X(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:X(e,t,u,p,r,m)}return;default:if(gn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ip(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ip(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&X(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||X(e,t,f,p,r,m)}function cp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function lp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&cp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&cp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var up=null,dp=null;function fp(e){return e.nodeType===9?e:e.ownerDocument}function pp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function mp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function hp(e,t,n,r){return n=fp(n).createElement(e),n[Et]=r,n[Dt]=t,ap(n,e,t),Rt(n),n}function gp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _p=null;function vp(){var e=window.event;return e&&e.type===`popstate`?e!==_p&&(_p=e,!0):(_p=null,!1)}var yp=typeof setTimeout==`function`?setTimeout:void 0,bp=typeof clearTimeout==`function`?clearTimeout:void 0,xp=typeof Promise==`function`?Promise:void 0,Sp=typeof requestAnimationFrame==`function`?requestAnimationFrame:yp,Cp=typeof queueMicrotask==`function`?queueMicrotask:xp===void 0?yp:function(e){return xp.resolve(null).then(e).catch(wp)};function wp(e){setTimeout(function(){throw e})}function Tp(e){return e===`head`}function Ep(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bm(e.ownerDocument.body)}n=i}while(n);Gh(t)}function Dp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Op(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function kp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ap(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function jp(e){return Ap(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ap(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=$m(f),u>nh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:E({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Rp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Rp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Up(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Vp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,zp,e,s,r)}this._eventListeners=a}};function zp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Rp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Up(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Vp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Bp,e,n,i),r.splice(t,1),a!==null&&a()}};function Bp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Vp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Hp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Up(e,t,n,r){if(e.length===0)return-1;r=Hp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Hp(a.optionsOrUseCapture)===r)return i}return-1}Rp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Rp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),gm(e,t))}Rp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Gp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Wp(t[n],e);n--);};function Gp(e,t){return t.push(e),!1}Rp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=fp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0))};function Kp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Rp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0)};function qp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Rp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Jp,e,void 0,void 0);for(var n=t=0;n<Yp.length;n++){var r=Yp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Yp[t++]=r}Yp.length=t}};function Jp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Yp=[],Xp=!1;function Zp(e,t,n){Yp.push({fragmentInstance:e,observer:t,instance:n}),Xp||(Xp=!0,_m(function(){Xp=!1;var e=Yp;Yp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Rp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Qp,e,void 0,void 0),e};function Qp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Rp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Rp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Gp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$p(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $p(e,t,n,r,i){var a=I(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=ee(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=ee(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function em(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Rp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Gp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),em(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),em(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function tm(e,t){return e=b(e),nm(e,t),!1}function nm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Yp.length;i++){var a=Yp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Yp[r++]=a)}Yp.length=r,n.observe(e)}),nm(e,t))}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Zp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:am(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function om(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=fm(e.nextSibling),e===null)break}return null}function sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fm(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fm(e.nextSibling),e===null))return null;return e}function lm(e){return e.data===`$?`||e.data===`$~`}function um(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function dm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function fm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pm=null;function mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return fm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function _m(e){Sp(function(){Sp(function(t){return e(t)})})}function vm(e,t,n){switch(t=fp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ym(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&X(e,t,r,null,op,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===bn&&(e.onclick=null),Pt(e)}function bm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var xm=new Map,Sm=new Set;function Cm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var wm=M.d;M.d={f:Tm,r:Em,D:km,C:Am,L:jm,m:Mm,X:Pm,S:Nm,M:Fm};function Tm(){var e=wm.f(),t=Hd();return e||t}function Em(e){var t=Ft(e);t!==null&&t.tag===5&&t.type===`form`?ac(t):wm.r(e)}var Dm=typeof document>`u`?null:document;function Om(e,t,n){var r=Dm;if(r&&typeof t==`string`&&t){var i=an(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sm.has(i)||(Sm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Rt(t),r.head.appendChild(t)))}}function km(e){wm.D(e),Om(`dns-prefetch`,e,null)}function Am(e,t){wm.C(e,t),Om(`preconnect`,e,t)}function jm(e,t,n){wm.L(e,t,n);var r=Dm;if(r&&e&&t){var i=`link[rel="preload"][as="`+an(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+an(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+an(n.imageSizes)+`"]`)):i+=`[href="`+an(e)+`"]`;var a=i;switch(t){case`style`:a=Lm(e);break;case`script`:a=Vm(e)}if(!(xm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rm(a))||t===`script`&&r.querySelector(Hm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){zt(o)}),Rt(o),r.head.appendChild(o)}}}function Mm(e,t){wm.m(e,t);var n=Dm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+an(r)+`"][href="`+an(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vm(e)}if(!xm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),xm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Rt(r),n.head.appendChild(r)}}}function Nm(e,t,n){wm.S(e,t,n);var r=Dm;if(r&&e){var i=Lt(r).hoistableStyles,a=Lm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xm.get(a))&&Gm(e,n);var c=o=r.createElement(`link`);Rt(c),ap(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pm(e,t){wm.X(e,t);var n=Dm;if(n&&e){var r=Lt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=E({src:e,async:!0},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Rt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t){wm.M(e,t);var n=Dm;if(n&&e){var r=Lt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Rt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t,n,r){var a=(a=De.current)?Cm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Lm(n.href),t=Lt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lm(n.href);var o=Lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=xm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xm.set(e,o)),Bm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Vm(n),t=Lt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lm(e){return`href="`+an(e)+`"`}function Rm(e){return`link[rel="stylesheet"][`+e+`]`}function zm(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=zt.bind(null,t),ap(t,`link`,n),Rt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Vm(e){return`[src="`+an(e)+`"]`}function Hm(e){return`script[async]`+e}function Um(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+an(n.href)+`"]`);if(r)return t.instance=r,Rt(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Rt(r),ap(r,`style`,a),Wm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lm(n.href);var o=e.querySelector(Rm(a));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;r=zm(n),(a=xm.get(a))&&Gm(r,a),o=(e.ownerDocument||e).createElement(`link`),Rt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Wm(o,n.precedence,e),t.instance=o;case`script`:return o=Vm(n.src),(a=e.querySelector(Hm(o)))?(t.instance=a,Rt(a),a):(r=n,(a=xm.get(o))&&(r=E({},n),Km(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Rt(a),ap(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wm(r,n.precedence,e));return t.instance}function Wm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qm=null;function Jm(e,t,n){if(qm===null){var r=new Map,i=qm=new Map;i.set(n,r)}else i=qm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Mt]||a[Et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lm(r.href),a=t.querySelector(Rm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Rt(a);return}a=t.ownerDocument||t,r=zm(r),(i=xm.get(i))&&Gm(r,i),a=a.createElement(`link`),Rt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&nh===0&&(nh=62500*lp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ah.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var uh={$$typeof:ae,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function dh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Pi(3,null,null,t),e.current=a,a.stateNode=e,t=Pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},_o(a),e}function ph(e){return e?(e=Mi,e):Mi}function mh(e,t,n,r,i,a){i=ph(i),r.context===null?r.context=i:r.pendingContext=i,r=yo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=bo(e,r,t),n!==null&&(Ld(n,e,t),xo(n,e,t))}function hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gh(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function _h(e){if(e.tag===13||e.tag===31){var t=ki(e,67108864);t!==null&&Ld(t,e,67108864),gh(e,67108864)}}function vh(e){if(e.tag===13||e.tag===31){var t=Pd();t=xt(t);var n=ki(e,t);n!==null&&Ld(n,e,t),gh(e,t)}}var yh=!0;function bh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,Sh(e,t,n,r)}finally{M.p=a,j.T=i}}function xh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,Sh(e,t,n,r)}finally{M.p=a,j.T=i}}function Sh(e,t,n,r){if(yh){var i=Ch(r);if(i===null)Yf(e,t,r,wh,n),Fh(e,r);else if(Lh(i,e,t,n,r))r.stopPropagation();else if(Fh(e,r),t&4&&-1<Ph.indexOf(e)){for(;i!==null;){var a=Ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=lt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-nt(o);s.entanglements[1]|=c,o&=~c}kf(a),!(W&6)&&(yd=Ge()+500,Af(0,!1))}}break;case 31:case 13:s=ki(a,2),s!==null&&Ld(s,a,2),Hd(),gh(a,2)}if(a=Ch(r),a===null&&Yf(e,t,r,wh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function Ch(e){return e=Sn(e),Th(e)}var wh=null;function Th(e){if(wh=null,e=I(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wh=e,null}function Eh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ke()){case qe:return 2;case P:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Dh=!1,Oh=null,kh=null,Ah=null,jh=new Map,Mh=new Map,Nh=[],Ph=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fh(e,t){switch(e){case`focusin`:case`focusout`:Oh=null;break;case`dragenter`:case`dragleave`:kh=null;break;case`mouseover`:case`mouseout`:Ah=null;break;case`pointerover`:case`pointerout`:jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mh.delete(t.pointerId)}}function Ih(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ft(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lh(e,t,n,r,i){switch(t){case`focusin`:return Oh=Ih(Oh,e,t,n,r,i),!0;case`dragenter`:return kh=Ih(kh,e,t,n,r,i),!0;case`mouseover`:return Ah=Ih(Ah,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jh.set(a,Ih(jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mh.set(a,Ih(Mh.get(a)||null,e,t,n,r,i)),!0}return!1}function Rh(e){var t=I(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,wt(e.priority,function(){vh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,wt(e.priority,function(){vh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xn=r,n.target.dispatchEvent(r),xn=null}else return t=Ft(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function Bh(e,t,n){zh(e)&&n.delete(t)}function Vh(){Dh=!1,Oh!==null&&zh(Oh)&&(Oh=null),kh!==null&&zh(kh)&&(kh=null),Ah!==null&&zh(Ah)&&(Ah=null),jh.forEach(Bh),Mh.forEach(Bh)}function Hh(e,n){e.blockedOn===n&&(e.blockedOn=null,Dh||(Dh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vh)))}var Uh=null;function Wh(e){Uh!==e&&(Uh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Th(r||n)===null)continue;break}var a=Ft(n);a!==null&&(e.splice(t,3),t-=3,rc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gh(e){function t(t){return Hh(t,e)}Oh!==null&&Hh(Oh,e),kh!==null&&Hh(kh,e),Ah!==null&&Hh(Ah,e),jh.forEach(t),Mh.forEach(t);for(var n=0;n<Nh.length;n++){var r=Nh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Nh.length&&(n=Nh[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&Nh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Dt]||null;if(typeof a==`function`)o||Wh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Dt]||null)s=o.formAction;else if(Th(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wh(n)}}}function Kh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qh(e){this._internalRoot=e}Jh.prototype.render=qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mh(n,Pd(),e,t,null,null)},Jh.prototype.unmount=qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),Hd(),t[F]=null}};function Jh(e){this._internalRoot=e}Jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nh.length&&t!==0&&t<Nh[n].priority;n++);Nh.splice(n,0,e),n===0&&Rh(e)}};var Yh=n.version;if(Yh!==`19.3.0`)throw Error(i(527,Yh,`19.3.0`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Xh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{$e=Zh.inject(Xh),et=Zh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ec,s=Dc,c=Oc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fh(e,1,!1,null,null,n,r,null,o,s,c,Kh),e[F]=t.current,qf(e),new qh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=[`summary`,`files`,`findings`,`diagrams`];function x(e){try{return decodeURIComponent(e)}catch{return null}}function S(e){let t=e.replace(/^#/,``),n=t.indexOf(`?`),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1),a=r.split(`/`).filter(e=>e!==``);if(a.length===0)return{name:`home`};let o=x(a[0]);if(o===null)return{name:`not_found`,hash:e};let[s,...c]=a.slice(1);if(s===void 0)return{name:`feature`,id:o,tab:`summary`};if(b.includes(s)&&c.length===0)return{name:`feature`,id:o,tab:s};if(s===`finish`&&c.length===0)return{name:`finish`,id:o};if(s===`review`&&c.length<=1){let t=c.length===1?x(c[0]):null;if(c.length===1&&t===null)return{name:`not_found`,hash:e};let n=new URLSearchParams(i).get(`line`);return{name:`review`,id:o,path:t,line:n!==null&&/^[1-9]\d*$/.test(n)?Number(n):null}}return{name:`not_found`,hash:e}}function C(e){return`${window.location.pathname}${window.location.search}${e}`}var w={home:()=>C(`#/`),feature:(e,t=`summary`)=>C(t===`summary`?`#/${encodeURIComponent(e)}`:`#/${encodeURIComponent(e)}/${t}`),review:(e,t,n)=>{let r=`#/${encodeURIComponent(e)}/review`;return C(t?`${r}/${encodeURIComponent(t)}${n?`?line=${n}`:``}`:r)},finish:e=>C(`#/${encodeURIComponent(e)}/finish`)};function T(e,t={}){t.replace?window.location.replace(e):window.location.assign(e)}function ee(e){return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}function E(){return window.location.hash}function te(){return S((0,v.useSyncExternalStore)(ee,E))}var D=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),O=o(((e,t)=>{t.exports=D()}))();function k({analysis:e}){return(0,O.jsx)(`button`,{type:`button`,className:`button button-primary topbar-action`,onClick:()=>T(w.finish(e.id)),children:`Terminer la revue`})}var ne=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},re=(e=>e?ne(e):ne),ie=e=>e;function ae(e,t=ie){let n=v.useSyncExternalStore(e.subscribe,v.useCallback(()=>t(e.getState()),[e,t]),v.useCallback(()=>t(e.getInitialState()),[e,t]));return v.useDebugValue(n),n}var oe=e=>{let t=re(e),n=e=>ae(t,e);return Object.assign(n,t),n},se=(e=>e?oe(e):oe),ce=class extends Error{status;constructor(e,t){super(t),this.name=`ApiError`,this.status=e}};async function le(e,t){let n=await fetch(`api/${e}`,{...t,headers:t?.body?{"Content-Type":`application/json`}:void 0});if(!n.ok){let e=`HTTP ${n.status}`;try{let t=await n.json();t?.error&&(e=t.error)}catch{}throw new ce(n.status,e)}return await n.json()}function A(e){return`analyses/${encodeURIComponent(e)}`}function ue(e,t,n){return le(t,{method:e,body:JSON.stringify(n)})}var de={getConfig:()=>le(`config`),getChanges:e=>le(e?`changes?since=${e.seq}&epoch=${encodeURIComponent(e.epoch)}`:`changes`),listAnalyses:()=>le(`analyses`),getAnalysis:e=>le(A(e)),getDiff:e=>le(`${A(e)}/diff`),setFileReviewed:(e,t)=>ue(`POST`,`${A(e)}/files/reviewed`,t),setFileLevel:(e,t)=>ue(`POST`,`${A(e)}/files/level`,t),setFindingStatus:(e,t,n)=>ue(`POST`,`${A(e)}/findings/${encodeURIComponent(t)}/status`,n),addNote:(e,t)=>ue(`POST`,`${A(e)}/notes`,t),updateNote:(e,t,n)=>ue(`PATCH`,`${A(e)}/notes/${encodeURIComponent(t)}`,n),deleteNote:(e,t,n)=>ue(`DELETE`,`${A(e)}/notes/${encodeURIComponent(t)}`,n),markAnswerSeen:(e,t,n)=>ue(`POST`,`${A(e)}/notes/${encodeURIComponent(t)}/answer-seen`,n),replyToQuestion:(e,t,n)=>ue(`POST`,`${A(e)}/notes/${encodeURIComponent(t)}/replies`,n),getWatchers:()=>le(`watchers`),submitReview:(e,t)=>ue(`POST`,`${A(e)}/review`,t),markProcessed:(e,t)=>ue(`POST`,`${A(e)}/review/processed`,t)};async function fe(e){if(!navigator.clipboard)throw Error(`le presse-papiers n'est accessible que sur une page servie en HTTPS ou sur localhost. Ouvrez la GUI par une de ces adresses.`);try{await navigator.clipboard.writeText(e)}catch(e){throw Error(`le navigateur a refusé l'écriture dans le presse-papiers (${e.message}).`)}}var pe=400,me=.5;function he(e){let t=[];for(let n of e.matchAll(/[\p{L}\p{N}_$]+|\s+|[^\p{L}\p{N}_$\s]/gu))t.push({text:n[0],start:n.index});return t}function ge(e){return e.text.trim()===``}function _e(e,t){let n=t.length+1,r=new Uint32Array((e.length+1)*n);for(let i=e.length-1;i>=0;i--)for(let a=t.length-1;a>=0;a--)r[i*n+a]=e[i].text===t[a].text?r[(i+1)*n+a+1]+1:Math.max(r[(i+1)*n+a],r[i*n+a+1]);let i=new Set,a=new Set,o=0,s=0;for(;o<e.length&&s<t.length;)e[o].text===t[s].text?(i.add(o++),a.add(s++)):r[(o+1)*n+s]>=r[o*n+s+1]?o++:s++;return{inA:i,inB:a}}function ve(e,t){let n=[];return e.forEach((r,i)=>{if(t.has(i))return;let a=n[n.length-1];a&&a[a.length-1]===e[i-1]?a.push(r):n.push([r])}),n.flatMap(e=>{let t=e.findIndex(e=>!ge(e));if(t===-1)return[];let n=e.length-1-[...e].reverse().findIndex(e=>!ge(e));return[{start:e[t].start,end:e[n].start+e[n].text.length}]})}function ye(e,t){if(e===t)return null;let n=he(e),r=he(t);if(n.length>pe||r.length>pe)return null;let{inA:i,inB:a}=_e(n,r),o=[...i].filter(e=>!ge(n[e])).length,s=Math.max(n.filter(e=>!ge(e)).length,r.filter(e=>!ge(e)).length);return s===0||o/s<me?null:{removed:ve(n,i),added:ve(r,a)}}function j(e){let t=new Map,n=(t,n)=>e[t]?.oldLine===null&&e[t].line.type===n,r=0;for(;r<e.length;){if(!n(r,`del`)){r++;continue}let i=[],a=[];for(;n(r,`del`);)i.push(e[r++].line);for(;n(r,`add`);)a.push(e[r++].line);for(let e=0;e<Math.min(i.length,a.length);e++){let n=ye(i[e].text,a[e].text);n&&(t.set(i[e],n.removed),t.set(a[e],n.added))}}return t}function M(e){return e.slice(0,e.length-e.trimStart().length)}function be(e,t){let n=M(e),r=M(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return{start:i,oldEnd:n.length,newEnd:r.length}}function xe(e,t){let n=e=>e.map(e=>e.text.trimStart()),r=n(e),i=n(t),a=i.length+1,o=new Uint32Array((r.length+1)*a);for(let e=r.length-1;e>=0;e--)for(let t=i.length-1;t>=0;t--)o[e*a+t]=r[e]===i[t]?o[(e+1)*a+t+1]+1:Math.max(o[(e+1)*a+t],o[e*a+t+1]);let s=[],c=0,l=0;for(;c<r.length&&l<i.length;)r[c]===i[l]?s.push([c++,l++]):o[(c+1)*a+l]>=o[c*a+l+1]?c++:l++;return s}function Se(e){let t=[],n=0;for(;n<e.length;){if(e[n].type!==`del`){t.push({line:e[n++],oldLine:null});continue}let r=[],i=[];for(;n<e.length&&e[n].type===`del`;)r.push(e[n++]);for(;n<e.length&&e[n].type===`add`;)i.push(e[n++]);let a=0,o=0,s=(e,n)=>{for(;a<e;a++)t.push({line:r[a],oldLine:null});for(;o<n;o++)t.push({line:i[o],oldLine:null})};for(let[e,n]of xe(r,i))s(e,n),t.push({line:i[o++],oldLine:r[a++]});s(r.length,i.length)}return t}function Ce(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function we(e,t=`|`){return e.map(e=>Je(e)).join(t)}function N(e,t){return typeof t==`bigint`?t.toString():t}var Te=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ee(e){return new Te(e)}function De(e){return e==null}function Oe(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ke(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function Ae(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function je(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Me(e){return je(e._zod.def)??e._zod.def.shape}function Ne(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Ae(this,t,e),e},enumerable:!0,configurable:!0})}function Pe(e,t,n){t in e?Ae(e,t,n):e[t]=n}function Fe(e,t,n,r){let i=Me(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Ne(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Pe(e,a,r?r(n.value,a):n.value))}}function Ie(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Ne(e,n,()=>t[n]):Pe(e,n,r.value))}}function Le(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Re(e){return JSON.stringify(e)}function ze(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ve(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var He=Ee(()=>{if(Lt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ue(e){if(Ve(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ve(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function We(e){return Ue(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Ge=new Set([`string`,`number`,`symbol`]);function Ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function qe(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Je(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ye(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Xe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ze={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Qe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Fe(i,e,$e(e,t)),qe(e,Le(n,{shape:i,checks:[]}))}function $e(e,t){let n=Me(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function et(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set($e(e,t)),a={};return Fe(a,e,Reflect.ownKeys(Me(e)).filter(e=>!i.has(e))),qe(e,Le(n,{shape:a,checks:[]}))}function tt(e,t){if(!Ue(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Me(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return qe(e,Le(e._zod.def,{shape:nt(e,t)}))}function nt(e,t){let n={};return Fe(n,e,Reflect.ownKeys(Me(e))),Ie(n,t),n}function rt(e,t){if(!Ue(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return qe(e,Le(e._zod.def,{shape:nt(e,t)}))}function it(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Fe(n,e,Reflect.ownKeys(Me(e))),Fe(n,t,Reflect.ownKeys(Me(t))),qe(e,Le(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function at(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set($e(t,n)):void 0,o={};return Fe(o,t,Reflect.ownKeys(Me(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),qe(t,Le(t._zod.def,{shape:o,checks:[]}))}function ot(e,t,n){let r=n?new Set($e(t,n)):void 0,i={};return Fe(i,t,Reflect.ownKeys(Me(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),qe(t,Le(t._zod.def,{shape:i}))}function st(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ct(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function lt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ut(e){return typeof e==`string`?e:e?.message}function dt(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ft(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function pt(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ut(e.inst?._zod.def?.error?.(e))??ut(a?.(e))??ut(t?.error?.(e))??ut(n.customError?.(e))??ut(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var mt=/[\uD800-\uDBFF]/;function ht(e){let t=e.length;if(!mt.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function gt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function _t(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function vt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function yt(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ct(e,n,r.value)}}function bt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function xt(e,t,n){return bt(e,t,n,!1)}function St(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return bt(this,n,r(this))},set(e){bt(this,n,e)}})}return t}function Ct(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:bt(this,t,n.bind(this))},set(e){bt(this,t,e)}})}function wt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Tt,Et=!1,Dt={configurable:!0,get(){Et=!0}};function F(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Tt!==e._zod?Tt=void 0:(Tt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Dt);let e=Et;Et=!1;try{let r=n(this);return Et?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Et||=e,r}catch(n){throw delete this[t],Et||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Ot(e,t,n,r){let i=wt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var kt=`~constantCatch`;function At(e){let t=()=>e;return t[kt]=!0,t}var jt,Mt={value:void 0,enumerable:!1},Nt=`captureStackTrace`in Error?Error:null;function Pt(e){let t=Nt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Nt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function I(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Mt.value=new a(r);try{Object.defineProperty(n,"_zod",Mt)}finally{Mt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),yt(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Pt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Ft=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},It=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(jt=globalThis).__zod_globalConfig??(jt.__zod_globalConfig={});var Lt=globalThis.__zod_globalConfig;function Rt(e){return e&&Object.assign(Lt,e),Lt}function zt(){let e=this._zod;return e.message??=JSON.stringify(e.def,N,2),e.message}function Bt(e){this._zod.message=e}var Vt={get:zt,set:Bt,enumerable:!0,configurable:!0},Ht={value:void 0,enumerable:!1},Ut=new WeakSet([Object.prototype,Error.prototype]),Wt=I(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Ht.value=t,Object.defineProperty(e,"issues",Ht),Ht.value=void 0,Object.defineProperty(e,"message",Vt);let n=Object.getPrototypeOf(e);Ut.has(n)||(Ut.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Gt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Kt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Gt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function qt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function L(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Jt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Ft;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>pt(e,o,Rt())));throw Be(n,a?.callee??t),n}return s.value};return t},Yt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>pt(e,o,Rt())));throw Be(n,a?.callee??t),n}return s.value};return t},Xt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ft;return a.issues.length?Zt(e,a.issues,i):{success:!0,data:a.value}};function Zt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>pt(e,n,Rt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Qt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Zt(e,a.issues,i):{success:!0,data:a.value}},$t=Symbol.for(`zod.compile.invalid`),en=Symbol.for(`zod.compile.fallback`),tn=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==$t)return!0;if(r.definite===!0&&n===void 0)return!1}return nn(e,t,n)});function nn(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[en]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Ft;return a.issues.length===0}var rn=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},an=e=>{let t=Jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,L(n,a))};return n},on=e=>{let t=Jt(e),n=(e,r,i,a)=>t(e,r,i,L(n,a));return n},sn=e=>{let t=Yt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,L(n,a))};return n},cn=e=>{let t=Yt(e),n=async(e,r,i,a)=>await t(e,r,i,L(n,a));return n},ln=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Xt(e)(t,n,i)},un=e=>(t,n,r)=>Xt(e)(t,n,r),dn=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Qt(e)(t,n,i)},fn=e=>async(t,n,r)=>Qt(e)(t,n,r),pn=/^[cC][0-9a-z]{6,}$/,mn=/^[0-9a-z]+$/,hn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,gn=/^[0-9a-vA-V]{20}$/,_n=/^[A-Za-z0-9]{27}$/,vn=/^[a-zA-Z0-9_-]{21}$/;function yn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var bn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Sn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Cn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wn=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Tn(){return new RegExp(wn,`u`)}var En=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Dn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,On=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,kn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,An=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Mn=/^https?$/,Nn=/^\+[1-9]\d{6,14}$/,Pn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Fn(e){return RegExp(`^${e}$`)}var In=Fn(Pn);function Ln(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Rn(e){return RegExp(`^${Ln(e)}$`)}function zn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Ln({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Ln({precision:e.precision})}`:n;return RegExp(`^${Pn}T(?:${r})$`)}var Bn=/^[\s\S]{0,}$/,Vn=/^-?\d+(?:\.\d+)?$/,Hn=/^(?:true|false)$/i,Un=/^[^A-Z]*$/,Wn=/^[^a-z]*$/,Gn=I(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kn=e=>{let t=e.value;return!De(t)&&t.length!==void 0},qn={number:`number`,bigint:`bigint`,object:`date`},Jn=I(`$ZodCheckLessThan`,(e,t)=>{Gn.init(e,t);let n=qn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:qn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Yn=I(`$ZodCheckGreaterThan`,(e,t)=>{Gn.init(e,t);let n=qn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:qn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xn=I(`$ZodCheckMultipleOf`,(e,t)=>{Gn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ke(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Zn=I(`$ZodCheckNumberFormat`,(e,t)=>{Gn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Xe[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Qn=I(`$ZodCheckMaxLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ht(r):i)<=t.maximum)return;let a=gt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=I(`$ZodCheckMinLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ht(r):i)>=t.minimum)return;let a=gt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),er=I(`$ZodCheckLengthEquals`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ht(r):i;if(a===t.length)return;let o=gt(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tr=I(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Gn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nr=I(`$ZodCheckRegex`,(e,t)=>{tr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rr=I(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Un,tr.init(e,t)}),ir=I(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Wn,tr.init(e,t)}),ar=I(`$ZodCheckIncludes`,(e,t)=>{Gn.init(e,t);let n=Ke(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),or=I(`$ZodCheckStartsWith`,(e,t)=>{Gn.init(e,t);let n=RegExp(`^${Ke(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),sr=I(`$ZodCheckEndsWith`,(e,t)=>{Gn.init(e,t);let n=RegExp(`.*${Ke(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),cr=I(`$ZodCheckOverwrite`,(e,t)=>{Gn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),lr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
11
11
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
12
12
  `)}\n};`)(...Object.values(this.closed))}},ur={major:4,minor:6,patch:7},dr=I(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ur;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=st(t),a;for(let o of n){if(o._zod.def.when){if(ct(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Ft;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ft(t.issues,n,e),i||=st(t,n))});else{if(t.issues.length===n)continue;ft(t.issues,n,e),i||=st(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(st(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ft;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Ft;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return xt(this,`~standard`,mr(this))},set"~standard"(e){bt(this,`~standard`,e)}}),fr=(e,t)=>e.issues.length?{issues:e.issues.map(e=>pt(e,t,Rt()))}:{value:e.value};async function pr(e,t){let n={async:!0};return fr(await e._zod.run({value:t,issues:[]},n),n)}function mr(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return fr(r,n)}catch{}return pr(e,t)},vendor:`zod`,version:1}}var hr=I(`$ZodString`,(e,t)=>{dr.init(e,t),e._zod.pattern=t.pattern??Bn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),gr=I(`$ZodStringFormat`,(e,t)=>{tr.init(e,t),hr.init(e,t)}),_r=I(`$ZodGUID`,(e,t)=>{t.pattern??=xn,gr.init(e,t)}),vr=I(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Sn(e)}else t.pattern??=Sn();gr.init(e,t)}),yr=I(`$ZodEmail`,(e,t)=>{t.pattern??=Cn,gr.init(e,t)});function br(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function xr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?br(e)||2:Sr(e,t)}function Sr(e,t){if(!t.normalize&&t.protocol?.source===Mn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Cr=/[\t\n\r]/g;function wr(e){return e.replace(Cr,``)}function Tr(e,t){return t.lastIndex=0,t.test(e.hostname)}function Er(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Dr=I(`$ZodURL`,(e,t)=>{gr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=xr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=wr(r);return}t.hostname&&!Tr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Er(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:wr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Or=I(`$ZodEmoji`,(e,t)=>{t.pattern??=Tn(),gr.init(e,t)}),kr=I(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?vn:yn(t.length),gr.init(e,t)}),Ar=I(`$ZodCUID`,(e,t)=>{t.pattern??=pn,gr.init(e,t)}),jr=I(`$ZodCUID2`,(e,t)=>{t.pattern??=mn,gr.init(e,t)}),Mr=I(`$ZodULID`,(e,t)=>{t.pattern??=hn,gr.init(e,t)}),Nr=I(`$ZodXID`,(e,t)=>{t.pattern??=gn,gr.init(e,t)}),Pr=I(`$ZodKSUID`,(e,t)=>{t.pattern??=_n,gr.init(e,t)}),Fr=I(`$ZodISODateTime`,(e,t)=>{t.pattern??=zn(t),gr.init(e,t)}),Ir=I(`$ZodISODate`,(e,t)=>{t.pattern??=In,gr.init(e,t)}),Lr=I(`$ZodISOTime`,(e,t)=>{t.pattern??=Rn(t),gr.init(e,t)}),Rr=I(`$ZodISODuration`,(e,t)=>{t.pattern??=bn,gr.init(e,t)}),zr=I(`$ZodIPv4`,(e,t)=>{t.pattern??=En,gr.init(e,t)}),Br=/^[0-9a-fA-F:.]+$/;function Vr(e){return Br.test(e)?br(`http://[${e}]`):!1}var Hr=I(`$ZodIPv6`,(e,t)=>{t.pattern??=Dn,gr.init(e,t),e._zod.check=n=>{Vr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Ur=I(`$ZodCIDRv4`,(e,t)=>{t.pattern??=On,gr.init(e,t)});function Wr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Vr(n)}var Gr=I(`$ZodCIDRv6`,(e,t)=>{t.pattern??=kn,gr.init(e,t),e._zod.check=n=>{Wr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Kr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var qr=/^[0-9a-zA-Z+/]*={0,2}$/,Jr=I(`$ZodBase64`,(e,t)=>{t.pattern??=qr,gr.init(e,t),e._zod.check=n=>{Kr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Yr=/^[A-Za-z0-9_-]*$/;function Xr(e){if(!Yr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Kr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Zr=I(`$ZodBase64URL`,(e,t)=>{t.pattern??=Yr,gr.init(e,t),e._zod.check=n=>{Xr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Qr=I(`$ZodE164`,(e,t)=>{t.pattern??=Nn,gr.init(e,t)});function $r(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ei=I(`$ZodJWT`,(e,t)=>{gr.init(e,t),e._zod.check=n=>{$r(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ti=I(`$ZodNumber`,(e,t)=>{dr.init(e,t),e._zod.pattern=Vn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ni=I(`$ZodNumberFormat`,(e,t)=>{Zn.init(e,t),ti.init(e,t)}),ri=I(`$ZodBoolean`,(e,t)=>{dr.init(e,t),e._zod.pattern=Hn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ii=I(`$ZodUnknown`,(e,t)=>{dr.init(e,t),e._zod.parse=e=>e}),ai=I(`$ZodNever`,(e,t)=>{dr.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function oi(e,t){let n=dt(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of dt(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,ft(n.issues,t,e),n}}return i(n,a)}}var si=e=>Array.isArray(e)?e.length:-1;function ci(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var li=I(`$ZodArray`,(e,t)=>{dr.init(e,t);let n=Lt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>ci(t,r,e)));else if(ci(c,r,e),s&&c.issues.length!==0&&st(c))break}return o.length?Promise.all(o).then(()=>r):r},oi(e,si)});function ui(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...lt(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var di=[];function fi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:di,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Ye(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function pi(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(st(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>ui(e,n,i,t,d,f))):ui(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var mi=I(`$ZodObject`,(e,t)=>{dr.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Ee(()=>fi(t));F(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Ae(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Ve,o=t.catchall,s,c=Lt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(st(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>ui(n,t,e,r,a,o))):ui(s,t,e,r,a,o)}return o?pi(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),hi=I(`$ZodObjectJIT`,(e,t)=>{mi.init(e,t);let n=e._zod.parse,r=Ee(()=>fi(t)),i=Lt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new lr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
13
13
  let ${e}_ab = false;
@@ -61,17 +61,17 @@ Error generating stack: `+e.message+`
61
61
 
62
62
  `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ve,c=!Lt.jitless,l=c&&He.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?pi([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function gi(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!st(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>pt(e,r,Rt())))}),t)}var _i=I(`$ZodUnion`,(e,t)=>{dr.init(e,t),F(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),F(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),F(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),F(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Oe(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>gi(t,r,e,i)):gi(o,r,e,i)}}),vi=I(`$ZodIntersection`,(e,t)=>{dr.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>bi(e,t,n)):bi(e,i,a)}});function yi(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ue(e)&&Ue(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=yi(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=yi(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bi(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=yi(t.value,n.value);if(!c.valid){if(st(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var xi=I(`$ZodEnum`,(e,t)=>{dr.init(e,t);let n=Ce(t.entries),r=new Set(n);e._zod.values=r,F(e,`pattern`,e=>{let t=Ce(e.def.entries).filter(e=>Ge.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ke(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Si=I(`$ZodTransform`,(e,t)=>{dr.init(e,t),e._zod.optin=`optional`,Lt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new It(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Ft;return n.value=i,n}});function Ci(e,t){return e.value=t.issues.length?void 0:t.value,e}var wi=I(`$ZodOptional`,(e,t)=>{dr.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,F(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),F(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Oe(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ci(e,t)):Ci(e,r)}return t.innerType._zod.run(e,n)}}),Ti=I(`$ZodExactOptional`,(e,t)=>{wi.init(e,t),F(e,`values`,e=>e.def.innerType._zod.values),F(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ei=I(`$ZodNullable`,(e,t)=>{dr.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin),F(e,`optout`,e=>e.def.innerType._zod.optout),F(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Oe(t.source)}|null)$`):void 0}),F(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Di=I(`$ZodDefault`,(e,t)=>{dr.init(e,t),e._zod.optin=`defaulted`,F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t)):Oi(r,t)}});function Oi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ki=I(`$ZodPrefault`,(e,t)=>{dr.init(e,t),e._zod.optin=`defaulted`,F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ai=I(`$ZodNonOptional`,(e,t)=>{dr.init(e,t),F(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ji(t,e)):ji(i,e)}});function ji(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Mi(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>pt(e,r,Rt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ni=I(`$ZodCatch`,(e,t)=>{dr.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),F(e,`optout`,e=>e.def.innerType._zod.optout),F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Mi(e,r,t,n)):Mi(e,r,t,n)}}),Pi=I(`$ZodPipe`,(e,t)=>{dr.init(e,t),F(e,`values`,e=>e.def.in._zod.values),F(e,`optin`,e=>e.def.in._zod.optin),F(e,`optout`,e=>e.def.out._zod.optout),F(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Fi(e,t.in,n)):Fi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Fi(e,t.out,n)):Fi(r,t.out,n)}});function Fi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Ii=I(`$ZodReadonly`,(e,t)=>{dr.init(e,t),F(e,`propValues`,e=>e.def.innerType._zod.propValues),F(e,`values`,e=>e.def.innerType._zod.values),F(e,`optin`,e=>e.def.innerType?._zod?.optin),F(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Li):Li(r)}});function Li(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Ri=I(`$ZodCustom`,(e,t)=>{Gn.init(e,t),dr.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>zi(t,n,r,e));zi(i,n,r,e)}});function zi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(vt(e))}}var Bi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Vi=`~memo`,Hi=[];function Ui(e){return typeof e==`object`&&!!e}function Wi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Gi=new WeakMap,Ki=0,qi=1,Ji=2;function Yi(e,t,n){let r=Gi.get(e);if(r!==void 0)return r?Ji:Ki;if(t.has(e))return Ji;t.add(e);let i=Ki,a=e=>{if(i!==Ji&&e?._zod){let r=Yi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Ki;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?qi:o.value?._zod?Yi(o.value,t,n):Ki;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=je(c);s(e?o(e,!0):qi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Yi(r,t,!1):qi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Xi(e,i)}function Xi(e,t){return t!==qi&&Gi.set(e,t===Ji),t}function Zi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Qi,$i=[],ea={alloc(e,t,n){let r=Qi;if(!r)return n;Qi=void 0;let i={value:n,issues:null};return r.set(t.value,i),$i.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&na(n,e.value))throw new Bi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Yi(e,new Set,!1);if(i===Ki)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ji||r?n=!0:r=!0}let l=s.value;if(!Ui(l))return t(s,c);let u=c[Vi];u||(u={buckets:new WeakMap,backEdges:void 0},c[Vi]=u);let d;i===c?d=a:(d=Zi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Wi(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Qi=d;let p=$i.length,m=t(s,c);Qi=void 0;let h=$i.length>p?$i.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Wi(e.issues):Hi),e)):(h&&(h.issues=m.issues.length?Wi(m.issues):Hi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ta(){return ea}function na(e,t){let n=e[Vi]?.backEdges;return n!==void 0&&Ui(t)&&n.has(t)}var ra=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(_t(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Je(e.values[0])}`:`Invalid option: expected one of ${we(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${we(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ia(){return{localeError:ra()}}var aa,oa=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function R(){return new oa}(aa=globalThis).__zod_globalRegistry??(aa.__zod_globalRegistry=R());var sa=globalThis.__zod_globalRegistry;function ca(e){return e.checks&&=[...e.checks],e}function la(e,t){return new e(ca({type:`string`,...P(t)}))}function ua(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...P(t)})}function da(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...P(t)})}function fa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...P(t)})}function pa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...P(t)})}function ma(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...P(t)})}function ha(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...P(t)})}function ga(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...P(t)})}function _a(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...P(t)})}function va(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...P(t)})}function ya(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...P(t)})}function ba(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...P(t)})}function xa(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...P(t)})}function Sa(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...P(t)})}function Ca(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...P(t)})}function wa(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...P(t)})}function Ta(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...P(t)})}function Ea(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...P(t)})}function Da(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...P(t)})}function Oa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...P(t)})}function ka(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...P(t)})}function Aa(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...P(t)})}function ja(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...P(t)})}function Ma(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...P(t)})}function Na(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...P(t)})}function Pa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...P(t)})}function Fa(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...P(t)})}function Ia(e,t){return new e(ca({type:`number`,checks:[],...P(t)}))}function La(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...P(t)})}function Ra(e,t){return new e({type:`boolean`,...P(t)})}function za(e){return new e({type:`unknown`})}function Ba(e,t){return new e({type:`never`,...P(t)})}function Va(e,t){return new Jn({check:`less_than`,...P(t),value:e,inclusive:!1})}function Ha(e,t){return new Jn({check:`less_than`,...P(t),value:e,inclusive:!0})}function Ua(e,t){return new Yn({check:`greater_than`,...P(t),value:e,inclusive:!1})}function Wa(e,t){return new Yn({check:`greater_than`,...P(t),value:e,inclusive:!0})}function Ga(e,t){return new Xn({check:`multiple_of`,...P(t),value:e})}function Ka(e,t){return new Qn({check:`max_length`,...P(t),maximum:e})}function qa(e,t){return new $n({check:`min_length`,...P(t),minimum:e})}function Ja(e,t){return new er({check:`length_equals`,...P(t),length:e})}function Ya(e,t){return new nr({check:`string_format`,format:`regex`,...P(t),pattern:e})}function Xa(e){return new rr({check:`string_format`,format:`lowercase`,...P(e)})}function Za(e){return new ir({check:`string_format`,format:`uppercase`,...P(e)})}function Qa(e,t){return new ar({check:`string_format`,format:`includes`,...P(t),includes:e})}function $a(e,t){return new or({check:`string_format`,format:`starts_with`,...P(t),prefix:e})}function eo(e,t){return new sr({check:`string_format`,format:`ends_with`,...P(t),suffix:e})}function to(e){return new cr({check:`overwrite`,tx:e})}function no(e){return to(t=>t.normalize(e))}function ro(){return to(e=>e.trim())}function io(){return to(e=>e.toLowerCase())}function ao(){return to(e=>e.toUpperCase())}function oo(){return to(e=>ze(e))}function so(e,t,n){return new e({type:`array`,element:t,...P(n)})}function co(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...P(n)})}function lo(e,t){let n=uo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(vt(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(vt(r))}},e(t.value,t)),t);return n}function uo(e,t){let n=new Gn({check:`custom`,...P(t)});return n._zod.check=e,n}function fo(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Ae(e,t,n[t]);return e}function po(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??sa,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function mo(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ho(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ho(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&fo(o.schema,c),t.io===`input`&&To(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function go(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function _o(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${go(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+go(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
63
63
 
64
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;vo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Ae(n,r,e.length===1?e[0]:So(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=xo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):fo(i,s),fo(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())vo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Co(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}fo(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Ae(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},Oo=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ko=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ao=(e,t)=>{Oo(e,`minimum`,t),ko(e,`maximum`,t)},jo=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Mo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},No=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Po=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Fo=(e,t)=>Oo(e,`minimum`,t.minimum),Io=(e,t)=>ko(e,`maximum`,t.maximum),Lo=e=>(t,n)=>{Po(t,n.format);let[r,i]=e[n.format];Oo(t,`minimum`,r),ko(t,`maximum`,i)},Ro={greater_than:(e,t)=>Oo(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>ko(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>jo(e,t.value),number_format:Lo(Xe),bigint_format:Lo(Ze),min_length:Fo,max_length:Io,length_equals:(e,t)=>Ao(e,t.length),min_size:Fo,max_size:Io,size_equals:(e,t)=>Ao(e,t.size),string_format:(e,t)=>{Po(e,t.format),t.pattern&&Mo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>No(e,t.mime)};function zo(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Ro[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Oo(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Oo(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&ko(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&ko(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&jo(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&No(t,i.mime);for(let e of i.patterns??[])Mo(t,e);return t}var Bo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Vo=new Map([[qr,An],[Yr,jn]]),Ho=e=>Vo.get(e)??e,Uo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=zo(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Bo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Ho);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Wo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=zo(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},z=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{n.not={}},Ko=(e,t,n,r)=>{let i=e._zod.def,a=Ce(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},qo=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=zo(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function Xo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Xo(t.out):t.type===`catch`?Xo(t.innerType):e._zod.optin}var Zo=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Ae(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Xo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Qo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},$o=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},es=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ns=Symbol();function rs(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),ns):JSON.parse(o)}var is=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=rs(i.defaultValue,e,t,n,r);o!==ns&&(n.default=o)},as=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=rs(i.defaultValue,e,t,n,r);o!==ns&&(n._prefault=o)},os=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ss=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ho(o,t,r);let s=t.seen.get(e);s.ref=o},cs=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ls=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},us=new WeakSet([Object.prototype,Error.prototype]);function ds(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var fs=I(`ZodError`,(e,t)=>{Wt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);us.has(n)||(us.add(n),ds(n,`format`,e=>t=>qt(e,t)),ds(n,`flatten`,e=>t=>Kt(e,t)),ds(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,N,2)}),ds(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,N,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),ps=Jt(fs),ms=Yt(fs),hs=Xt(fs),gs=Qt(fs),_s=an(fs),vs=on(fs),ys=sn(fs),bs=cn(fs),xs=ln(fs),Ss=un(fs),Cs=dn(fs),ws=fn(fs);function Ts(){Lt.localeError||Rt(ia())}function Es(){Lt.memoizer||Rt({memoizer:ta()})}var Ds=I(`ZodType`,(e,t)=>(Ts(),dr.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Le(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return qe(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Vc(e,t))},superRefine(e,t){return this.check(Hc(e,t))},overwrite(e){return this.check(to(e))},optional(){return Cc(this)},exactOptional(){return Tc(this)},nullable(){return Dc(this)},nullish(){return Cc(Dc(this))},nonoptional(e){return Nc(this,e)},array(){return dc(this)},or(e){return hc([this,e])},and(e){return _c(this,e)},transform(e){return Lc(this,xc(e))},default(e){return kc(this,e)},prefault(e){return jc(this,e)},catch(e){return Fc(this,e)},pipe(e){return Lc(this,e)},readonly(){return zc(this)},describe(e){let t=this.clone();return sa.add(t,{description:e}),t},meta(...e){if(e.length===0)return sa.get(this);let t=this.clone();return sa.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return xt(this,`~standard`,{...mr(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){bt(this,`~standard`,e)},parse:function e(t,n){return ps(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ms(this,t,n,{callee:e})},safeParse(e,t){return hs(this,e,t)},async safeParseAsync(e,t){return gs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){bt(this,`spa`,e)},validate(e,t){return tn(this,e,t)},validateAsync(e,t){return rn(this,e,t)},encode:function e(t,n){return _s(this,t,n,{callee:e})},decode:function e(t,n){return vs(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ys(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await bs(this,t,n,{callee:e})},safeEncode(e,t){return xs(this,e,t)},safeDecode(e,t){return Ss(this,e,t)},async safeEncodeAsync(e,t){return Cs(this,e,t)},async safeDecodeAsync(e,t){return ws(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return sa.get(this)?.description},get _def(){return this._zod.def}}),Os=I(`_ZodString`,(e,t)=>{hr.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r)},St({format:e=>zo(e).format??null,minLength:e=>zo(e).minimum??null,maxLength:e=>zo(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ks=I(`ZodString`,(e,t)=>{hr.init(e,t),Os.init(e,t)},{email(e){return this.check(ua(Fs,e))},url(e){return this.check(ga(Rs,e))},jwt(e){return this.check(ja($s,e))},emoji(e){return this.check(_a(zs,e))},guid(e){return this.check(da(Is,e))},uuid(e){return this.check(fa(Ls,e))},uuidv4(e){return this.check(pa(Ls,e))},uuidv6(e){return this.check(ma(Ls,e))},uuidv7(e){return this.check(ha(Ls,e))},nanoid(e){return this.check(va(Bs,e))},cuid(e){return this.check(ya(Vs,e))},cuid2(e){return this.check(ba(Hs,e))},ulid(e){return this.check(xa(Us,e))},base64(e){return this.check(Oa(Xs,e))},base64url(e){return this.check(ka(Zs,e))},xid(e){return this.check(Sa(Ws,e))},ksuid(e){return this.check(Ca(Gs,e))},ipv4(e){return this.check(wa(Ks,e))},ipv6(e){return this.check(Ta(qs,e))},cidrv4(e){return this.check(Ea(Js,e))},cidrv6(e){return this.check(Da(Ys,e))},e164(e){return this.check(Aa(Qs,e))},datetime(e){return this.check(Ma(js,e))},date(e){return this.check(Na(Ms,e))},time(e){return this.check(Pa(Ns,e))},duration(e){return this.check(Fa(Ps,e))}});function B(e){return la(ks,e)}var As=I(`ZodStringFormat`,(e,t)=>{gr.init(e,t),Os.init(e,t)}),js=I(`ZodISODateTime`,(e,t)=>{Fr.init(e,t),As.init(e,t)}),Ms=I(`ZodISODate`,(e,t)=>{Ir.init(e,t),As.init(e,t)}),Ns=I(`ZodISOTime`,(e,t)=>{Lr.init(e,t),As.init(e,t)}),Ps=I(`ZodISODuration`,(e,t)=>{Rr.init(e,t),As.init(e,t)}),Fs=I(`ZodEmail`,(e,t)=>{yr.init(e,t),As.init(e,t)}),Is=I(`ZodGUID`,(e,t)=>{_r.init(e,t),As.init(e,t)}),Ls=I(`ZodUUID`,(e,t)=>{vr.init(e,t),As.init(e,t)}),Rs=I(`ZodURL`,(e,t)=>{Dr.init(e,t),As.init(e,t)}),zs=I(`ZodEmoji`,(e,t)=>{Or.init(e,t),As.init(e,t)}),Bs=I(`ZodNanoID`,(e,t)=>{kr.init(e,t),As.init(e,t)}),Vs=I(`ZodCUID`,(e,t)=>{Ar.init(e,t),As.init(e,t)}),Hs=I(`ZodCUID2`,(e,t)=>{jr.init(e,t),As.init(e,t)}),Us=I(`ZodULID`,(e,t)=>{Mr.init(e,t),As.init(e,t)}),Ws=I(`ZodXID`,(e,t)=>{Nr.init(e,t),As.init(e,t)}),Gs=I(`ZodKSUID`,(e,t)=>{Pr.init(e,t),As.init(e,t)}),Ks=I(`ZodIPv4`,(e,t)=>{zr.init(e,t),As.init(e,t)}),qs=I(`ZodIPv6`,(e,t)=>{Hr.init(e,t),As.init(e,t)}),Js=I(`ZodCIDRv4`,(e,t)=>{Ur.init(e,t),As.init(e,t)}),Ys=I(`ZodCIDRv6`,(e,t)=>{Gr.init(e,t),As.init(e,t)}),Xs=I(`ZodBase64`,(e,t)=>{Jr.init(e,t),As.init(e,t)}),Zs=I(`ZodBase64URL`,(e,t)=>{Zr.init(e,t),As.init(e,t)}),Qs=I(`ZodE164`,(e,t)=>{Qr.init(e,t),As.init(e,t)}),$s=I(`ZodJWT`,(e,t)=>{ei.init(e,t),As.init(e,t)}),ec=I(`ZodNumber`,(e,t)=>{ti.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),e.isFinite=!0},St({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=zo(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=zo(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=zo(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>zo(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(rc(e))},safe(e){return this.check(rc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function tc(e){return Ia(ec,e)}var nc=I(`ZodNumberFormat`,(e,t)=>{ni.init(e,t),ec.init(e,t)});function rc(e){return La(nc,e)}var ic=I(`ZodBoolean`,(e,t)=>{ri.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z(e,t,n,r)});function ac(e){return Ra(ic,e)}var oc=I(`ZodUnknown`,(e,t)=>{ii.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function sc(){return za(oc)}var cc=I(`ZodNever`,(e,t)=>{ai.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Go(e,t,n,r)});function lc(e){return Ba(cc,e)}var uc=I(`ZodArray`,(e,t)=>{Es(),li.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function dc(e,t){return so(uc,e,t)}var fc=I(`ZodObject`,(e,t)=>{Es(),hi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r),Ot(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return yc(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Le(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Le(this._zod.def,{catchall:sc()}))},loose(){return this.clone(Le(this._zod.def,{catchall:sc()}))},strict(){return this.clone(Le(this._zod.def,{catchall:lc()}))},strip(){return this.clone(Le(this._zod.def,{catchall:void 0}))},extend(e){return tt(this,e)},safeExtend(e){return rt(this,e)},merge(e){return it(this,e)},pick(e){return Qe(this,e)},omit(e){return et(this,e)},partial(...e){return at(Sc,this,e[0])},exactPartial(...e){return at(wc,this,e[0],`exactPartial`)},required(...e){return ot(Mc,this,e[0])}});function pc(e,t){return new fc({type:`object`,shape:e??{},...P(t)})}var mc=I(`ZodUnion`,(e,t)=>{_i.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qo(e,t,n,r),e.options=t.options});function hc(e,t){return new mc({type:`union`,options:e,...P(t)})}var gc=I(`ZodIntersection`,(e,t)=>{vi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r)});function _c(e,t){return new gc({type:`intersection`,left:e,right:t})}var vc=I(`ZodEnum`,(e,t)=>{xi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ko(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new vc({...t,checks:[],...P(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new vc({...t,checks:[],...P(r),entries:i})}});function yc(e,t){return new vc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...P(t)})}var bc=I(`ZodTransform`,(e,t)=>{Es(),Si.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new It(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(vt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(vt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function xc(e){return new bc({type:`transform`,transform:e})}var Sc=I(`ZodOptional`,(e,t)=>{wi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cc(e){return new Sc({type:`optional`,innerType:e})}var wc=I(`ZodExactOptional`,(e,t)=>{Ti.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tc(e){return new wc({type:`optional`,innerType:e})}var Ec=I(`ZodNullable`,(e,t)=>{Ei.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Dc(e){return new Ec({type:`nullable`,innerType:e})}var Oc=I(`ZodDefault`,(e,t)=>{Di.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kc(e,t){return new Oc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():We(t)}})}var Ac=I(`ZodPrefault`,(e,t)=>{ki.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>as(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jc(e,t){return new Ac({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():We(t)}})}var Mc=I(`ZodNonOptional`,(e,t)=>{Ai.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Nc(e,t){return new Mc({type:`nonoptional`,innerType:e,...P(t)})}var Pc=I(`ZodCatch`,(e,t)=>{Ni.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fc(e,t){return new Pc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:At(t)})}var Ic=I(`ZodPipe`,(e,t)=>{Pi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.in=t.in,e.out=t.out});function Lc(e,t){return new Ic({type:`pipe`,in:e,out:t})}var Rc=I(`ZodReadonly`,(e,t)=>{Ii.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zc(e){return new Rc({type:`readonly`,innerType:e})}var Bc=I(`ZodCustom`,(e,t)=>{Ri.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Vc(e,t={}){return co(Bc,e,t)}function Hc(e,t){return lo(e,t)}var Uc=[`branch`,`working_tree`],Wc=[`added`,`modified`,`deleted`,`renamed`,`untracked`],Gc=[`critical`,`major`,`minor`,`trivial`],Kc=[`issue`,`requirement_gap`],qc=[`open`,`ignored`,`outdated`],Jc=[`new`,`old`],Yc=[`current`,`outdated`],Xc=[`flow`,`layers`,`mindmap`],Zc=[`box`,`pill`,`decision`],Qc=[`new`,`modified`,`impacted`,`existing`,`finding`,`missing`],$c=[`pending`,`submitted`],el=[`approve`,`request_changes`,`reject`],tl=[`agent`,`user`],nl=[`central`,`check`,`skim`],rl=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,il=B().regex(/^[A-Za-z0-9_-]{1,64}$/,`must contain only letters, digits, '_' or '-' (1 to 64 characters)`),al=tc().int().positive(),ol=B().min(1),sl=pc({level:yc(nl),reason:B().min(1),reviewerLevel:yc(nl).nullable()}),cl=pc({path:B().min(1),oldPath:B().min(1).nullable(),status:yc(Wc),additions:tc().int().nonnegative(),deletions:tc().int().nonnegative(),binary:ac(),contentAvailable:ac(),lineCount:tc().int().nonnegative(),reviewed:ac(),classification:sl.nullable()}),ll=pc({path:B().min(1),startLine:al,endLine:al}),ul=pc({id:il,severity:yc(Gc),kind:yc(Kc),title:B().min(1),body:B(),location:ll.nullable(),anchorText:B().nullable(),suggestion:B().nullable(),prompt:B().nullable(),status:yc(qc),createdAt:ol}),dl=pc({path:B().min(1),side:yc(Jc),startLine:al,endLine:al}),fl=pc({id:il,title:B().min(1),body:B().min(1),location:dl,anchorText:B(),status:yc(Yc),createdAt:ol}),pl=pc({path:B().min(1),line:al.nullable()}),ml=pc({askedAt:ol,answer:pc({text:B().min(1),at:ol}).nullable(),answerSeenAt:ol.nullable()}),hl=pc({id:il,location:pl.nullable(),findingId:il.nullable(),text:B().min(1),createdAt:ol,question:ml.nullable()}),gl=pc({path:B().min(1),line:al.nullable()}),_l=pc({id:il,label:B().min(1),shape:yc(Zc),status:yc(Qc),layer:B().min(1).nullable(),detail:B().nullable(),location:gl.nullable()}),vl=pc({from:il,to:il,label:B().nullable()}),yl=pc({id:il,title:B().min(1),kind:yc(Xc),layers:dc(B().min(1)),nodes:dc(_l),links:dc(vl),updatedAt:ol}),bl=pc({at:ol,note:B().min(1).nullable(),by:yc(tl)}),xl=pc({decision:yc(el),submittedAt:ol,processed:bl.nullable(),findings:dc(pc({id:il,title:B().min(1)})),notes:dc(pc({id:il,location:pl.nullable(),text:B().min(1)})),excludedFindingIds:dc(il),excludedNoteIds:dc(il)}),Sl=pc({state:yc($c),decision:yc(el).nullable(),selectedFindingIds:dc(il),selectedNoteIds:dc(il),prompt:B().nullable(),submittedAt:ol.nullable(),processed:bl.nullable(),previousSubmission:xl.nullable()}),Cl=pc({text:B().min(1),source:B().min(1).nullable()}),wl=pc({objective:B().min(1),approach:B().min(1),attentionPoints:dc(B().min(1))}),Tl=B().min(1).refine(e=>e===e.trim(),`must not start or end with whitespace`);pc({id:B().regex(rl),title:B().min(1),project:Tl,repoPath:B().min(1),mode:yc(Uc),base:B().min(1),head:B().min(1).nullable(),baseCommit:B().min(1),headCommit:B().min(1).nullable(),snapshotAt:ol,request:Cl.nullable(),followUpOf:B().regex(rl).nullable(),overview:wl.nullable(),summary:dc(B().min(1)),files:dc(cl),findings:dc(ul),explanations:dc(fl),notes:dc(hl),diagrams:dc(yl),review:Sl,revision:tc().int().nonnegative(),createdAt:ol,updatedAt:ol,lastEditor:yc(tl)});var El=[`not_started`,`in_progress`,`files_reviewed`,`submitted`];function Dl(e){return Gc.indexOf(e)}function Ol(e,t){return Dl(e)-Dl(t)}function kl(e){return[...e].sort((e,t)=>Ol(e.severity,t.severity))}function Al(e){if(e===``)return[];let t=e.split(`
64
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;vo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Ae(n,r,e.length===1?e[0]:So(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=xo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):fo(i,s),fo(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())vo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Co(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}fo(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Ae(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},Oo=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ko=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ao=(e,t)=>{Oo(e,`minimum`,t),ko(e,`maximum`,t)},jo=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Mo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},No=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Po=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Fo=(e,t)=>Oo(e,`minimum`,t.minimum),Io=(e,t)=>ko(e,`maximum`,t.maximum),Lo=e=>(t,n)=>{Po(t,n.format);let[r,i]=e[n.format];Oo(t,`minimum`,r),ko(t,`maximum`,i)},Ro={greater_than:(e,t)=>Oo(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>ko(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>jo(e,t.value),number_format:Lo(Xe),bigint_format:Lo(Ze),min_length:Fo,max_length:Io,length_equals:(e,t)=>Ao(e,t.length),min_size:Fo,max_size:Io,size_equals:(e,t)=>Ao(e,t.size),string_format:(e,t)=>{Po(e,t.format),t.pattern&&Mo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>No(e,t.mime)};function zo(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Ro[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Oo(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Oo(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&ko(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&ko(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&jo(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&No(t,i.mime);for(let e of i.patterns??[])Mo(t,e);return t}var Bo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Vo=new Map([[qr,An],[Yr,jn]]),Ho=e=>Vo.get(e)??e,Uo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=zo(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Bo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Ho);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Wo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=zo(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},z=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{n.not={}},Ko=(e,t,n,r)=>{let i=e._zod.def,a=Ce(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},qo=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=zo(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function Xo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Xo(t.out):t.type===`catch`?Xo(t.innerType):e._zod.optin}var Zo=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Ae(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Xo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Qo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},$o=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},es=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ns=Symbol();function rs(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),ns):JSON.parse(o)}var is=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=rs(i.defaultValue,e,t,n,r);o!==ns&&(n.default=o)},as=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=rs(i.defaultValue,e,t,n,r);o!==ns&&(n._prefault=o)},os=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ss=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ho(o,t,r);let s=t.seen.get(e);s.ref=o},cs=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ls=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},us=new WeakSet([Object.prototype,Error.prototype]);function ds(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var fs=I(`ZodError`,(e,t)=>{Wt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);us.has(n)||(us.add(n),ds(n,`format`,e=>t=>qt(e,t)),ds(n,`flatten`,e=>t=>Kt(e,t)),ds(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,N,2)}),ds(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,N,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),ps=Jt(fs),ms=Yt(fs),hs=Xt(fs),gs=Qt(fs),_s=an(fs),vs=on(fs),ys=sn(fs),bs=cn(fs),xs=ln(fs),Ss=un(fs),Cs=dn(fs),ws=fn(fs);function Ts(){Lt.localeError||Rt(ia())}function Es(){Lt.memoizer||Rt({memoizer:ta()})}var Ds=I(`ZodType`,(e,t)=>(Ts(),dr.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Le(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return qe(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Vc(e,t))},superRefine(e,t){return this.check(Hc(e,t))},overwrite(e){return this.check(to(e))},optional(){return Cc(this)},exactOptional(){return Tc(this)},nullable(){return Dc(this)},nullish(){return Cc(Dc(this))},nonoptional(e){return Nc(this,e)},array(){return dc(this)},or(e){return hc([this,e])},and(e){return _c(this,e)},transform(e){return Lc(this,xc(e))},default(e){return kc(this,e)},prefault(e){return jc(this,e)},catch(e){return Fc(this,e)},pipe(e){return Lc(this,e)},readonly(){return zc(this)},describe(e){let t=this.clone();return sa.add(t,{description:e}),t},meta(...e){if(e.length===0)return sa.get(this);let t=this.clone();return sa.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return xt(this,`~standard`,{...mr(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){bt(this,`~standard`,e)},parse:function e(t,n){return ps(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ms(this,t,n,{callee:e})},safeParse(e,t){return hs(this,e,t)},async safeParseAsync(e,t){return gs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){bt(this,`spa`,e)},validate(e,t){return tn(this,e,t)},validateAsync(e,t){return rn(this,e,t)},encode:function e(t,n){return _s(this,t,n,{callee:e})},decode:function e(t,n){return vs(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ys(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await bs(this,t,n,{callee:e})},safeEncode(e,t){return xs(this,e,t)},safeDecode(e,t){return Ss(this,e,t)},async safeEncodeAsync(e,t){return Cs(this,e,t)},async safeDecodeAsync(e,t){return ws(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return sa.get(this)?.description},get _def(){return this._zod.def}}),Os=I(`_ZodString`,(e,t)=>{hr.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r)},St({format:e=>zo(e).format??null,minLength:e=>zo(e).minimum??null,maxLength:e=>zo(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ks=I(`ZodString`,(e,t)=>{hr.init(e,t),Os.init(e,t)},{email(e){return this.check(ua(Fs,e))},url(e){return this.check(ga(Rs,e))},jwt(e){return this.check(ja($s,e))},emoji(e){return this.check(_a(zs,e))},guid(e){return this.check(da(Is,e))},uuid(e){return this.check(fa(Ls,e))},uuidv4(e){return this.check(pa(Ls,e))},uuidv6(e){return this.check(ma(Ls,e))},uuidv7(e){return this.check(ha(Ls,e))},nanoid(e){return this.check(va(Bs,e))},cuid(e){return this.check(ya(Vs,e))},cuid2(e){return this.check(ba(Hs,e))},ulid(e){return this.check(xa(Us,e))},base64(e){return this.check(Oa(Xs,e))},base64url(e){return this.check(ka(Zs,e))},xid(e){return this.check(Sa(Ws,e))},ksuid(e){return this.check(Ca(Gs,e))},ipv4(e){return this.check(wa(Ks,e))},ipv6(e){return this.check(Ta(qs,e))},cidrv4(e){return this.check(Ea(Js,e))},cidrv6(e){return this.check(Da(Ys,e))},e164(e){return this.check(Aa(Qs,e))},datetime(e){return this.check(Ma(js,e))},date(e){return this.check(Na(Ms,e))},time(e){return this.check(Pa(Ns,e))},duration(e){return this.check(Fa(Ps,e))}});function B(e){return la(ks,e)}var As=I(`ZodStringFormat`,(e,t)=>{gr.init(e,t),Os.init(e,t)}),js=I(`ZodISODateTime`,(e,t)=>{Fr.init(e,t),As.init(e,t)}),Ms=I(`ZodISODate`,(e,t)=>{Ir.init(e,t),As.init(e,t)}),Ns=I(`ZodISOTime`,(e,t)=>{Lr.init(e,t),As.init(e,t)}),Ps=I(`ZodISODuration`,(e,t)=>{Rr.init(e,t),As.init(e,t)}),Fs=I(`ZodEmail`,(e,t)=>{yr.init(e,t),As.init(e,t)}),Is=I(`ZodGUID`,(e,t)=>{_r.init(e,t),As.init(e,t)}),Ls=I(`ZodUUID`,(e,t)=>{vr.init(e,t),As.init(e,t)}),Rs=I(`ZodURL`,(e,t)=>{Dr.init(e,t),As.init(e,t)}),zs=I(`ZodEmoji`,(e,t)=>{Or.init(e,t),As.init(e,t)}),Bs=I(`ZodNanoID`,(e,t)=>{kr.init(e,t),As.init(e,t)}),Vs=I(`ZodCUID`,(e,t)=>{Ar.init(e,t),As.init(e,t)}),Hs=I(`ZodCUID2`,(e,t)=>{jr.init(e,t),As.init(e,t)}),Us=I(`ZodULID`,(e,t)=>{Mr.init(e,t),As.init(e,t)}),Ws=I(`ZodXID`,(e,t)=>{Nr.init(e,t),As.init(e,t)}),Gs=I(`ZodKSUID`,(e,t)=>{Pr.init(e,t),As.init(e,t)}),Ks=I(`ZodIPv4`,(e,t)=>{zr.init(e,t),As.init(e,t)}),qs=I(`ZodIPv6`,(e,t)=>{Hr.init(e,t),As.init(e,t)}),Js=I(`ZodCIDRv4`,(e,t)=>{Ur.init(e,t),As.init(e,t)}),Ys=I(`ZodCIDRv6`,(e,t)=>{Gr.init(e,t),As.init(e,t)}),Xs=I(`ZodBase64`,(e,t)=>{Jr.init(e,t),As.init(e,t)}),Zs=I(`ZodBase64URL`,(e,t)=>{Zr.init(e,t),As.init(e,t)}),Qs=I(`ZodE164`,(e,t)=>{Qr.init(e,t),As.init(e,t)}),$s=I(`ZodJWT`,(e,t)=>{ei.init(e,t),As.init(e,t)}),ec=I(`ZodNumber`,(e,t)=>{ti.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),e.isFinite=!0},St({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=zo(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=zo(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=zo(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>zo(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(rc(e))},safe(e){return this.check(rc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function tc(e){return Ia(ec,e)}var nc=I(`ZodNumberFormat`,(e,t)=>{ni.init(e,t),ec.init(e,t)});function rc(e){return La(nc,e)}var ic=I(`ZodBoolean`,(e,t)=>{ri.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z(e,t,n,r)});function ac(e){return Ra(ic,e)}var oc=I(`ZodUnknown`,(e,t)=>{ii.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function sc(){return za(oc)}var cc=I(`ZodNever`,(e,t)=>{ai.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Go(e,t,n,r)});function lc(e){return Ba(cc,e)}var uc=I(`ZodArray`,(e,t)=>{Es(),li.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function dc(e,t){return so(uc,e,t)}var fc=I(`ZodObject`,(e,t)=>{Es(),hi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r),Ot(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return yc(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Le(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Le(this._zod.def,{catchall:sc()}))},loose(){return this.clone(Le(this._zod.def,{catchall:sc()}))},strict(){return this.clone(Le(this._zod.def,{catchall:lc()}))},strip(){return this.clone(Le(this._zod.def,{catchall:void 0}))},extend(e){return tt(this,e)},safeExtend(e){return rt(this,e)},merge(e){return it(this,e)},pick(e){return Qe(this,e)},omit(e){return et(this,e)},partial(...e){return at(Sc,this,e[0])},exactPartial(...e){return at(wc,this,e[0],`exactPartial`)},required(...e){return ot(Mc,this,e[0])}});function pc(e,t){return new fc({type:`object`,shape:e??{},...P(t)})}var mc=I(`ZodUnion`,(e,t)=>{_i.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qo(e,t,n,r),e.options=t.options});function hc(e,t){return new mc({type:`union`,options:e,...P(t)})}var gc=I(`ZodIntersection`,(e,t)=>{vi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r)});function _c(e,t){return new gc({type:`intersection`,left:e,right:t})}var vc=I(`ZodEnum`,(e,t)=>{xi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ko(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new vc({...t,checks:[],...P(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new vc({...t,checks:[],...P(r),entries:i})}});function yc(e,t){return new vc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...P(t)})}var bc=I(`ZodTransform`,(e,t)=>{Es(),Si.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new It(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(vt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(vt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function xc(e){return new bc({type:`transform`,transform:e})}var Sc=I(`ZodOptional`,(e,t)=>{wi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cc(e){return new Sc({type:`optional`,innerType:e})}var wc=I(`ZodExactOptional`,(e,t)=>{Ti.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tc(e){return new wc({type:`optional`,innerType:e})}var Ec=I(`ZodNullable`,(e,t)=>{Ei.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Dc(e){return new Ec({type:`nullable`,innerType:e})}var Oc=I(`ZodDefault`,(e,t)=>{Di.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kc(e,t){return new Oc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():We(t)}})}var Ac=I(`ZodPrefault`,(e,t)=>{ki.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>as(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jc(e,t){return new Ac({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():We(t)}})}var Mc=I(`ZodNonOptional`,(e,t)=>{Ai.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Nc(e,t){return new Mc({type:`nonoptional`,innerType:e,...P(t)})}var Pc=I(`ZodCatch`,(e,t)=>{Ni.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fc(e,t){return new Pc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:At(t)})}var Ic=I(`ZodPipe`,(e,t)=>{Pi.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.in=t.in,e.out=t.out});function Lc(e,t){return new Ic({type:`pipe`,in:e,out:t})}var Rc=I(`ZodReadonly`,(e,t)=>{Ii.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zc(e){return new Rc({type:`readonly`,innerType:e})}var Bc=I(`ZodCustom`,(e,t)=>{Ri.init(e,t),Ds.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Vc(e,t={}){return co(Bc,e,t)}function Hc(e,t){return lo(e,t)}var Uc=[`branch`,`working_tree`],Wc=[`added`,`modified`,`deleted`,`renamed`,`untracked`],Gc=[`critical`,`major`,`minor`,`trivial`],Kc=[`issue`,`requirement_gap`],qc=[`open`,`ignored`,`outdated`],Jc=[`new`,`old`],Yc=[`current`,`outdated`],Xc=[`flow`,`layers`,`mindmap`],Zc=[`box`,`pill`,`decision`],Qc=[`new`,`modified`,`impacted`,`existing`,`finding`,`missing`],$c=[`pending`,`submitted`],el=[`approve`,`request_changes`,`reject`],tl=[`agent`,`user`],nl=[`central`,`check`,`skim`],rl=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,il=B().regex(/^[A-Za-z0-9_-]{1,64}$/,`must contain only letters, digits, '_' or '-' (1 to 64 characters)`),al=tc().int().positive(),ol=B().min(1),sl=pc({level:yc(nl),reason:B().min(1),reviewerLevel:yc(nl).nullable()}),cl=pc({path:B().min(1),oldPath:B().min(1).nullable(),status:yc(Wc),additions:tc().int().nonnegative(),deletions:tc().int().nonnegative(),binary:ac(),contentAvailable:ac(),lineCount:tc().int().nonnegative(),reviewed:ac(),classification:sl.nullable()}),ll=pc({path:B().min(1),startLine:al,endLine:al}),ul=pc({id:il,severity:yc(Gc),kind:yc(Kc),title:B().min(1),body:B(),location:ll.nullable(),anchorText:B().nullable(),suggestion:B().nullable(),prompt:B().nullable(),status:yc(qc),createdAt:ol}),dl=pc({path:B().min(1),side:yc(Jc),startLine:al,endLine:al}),fl=pc({id:il,title:B().min(1),body:B().min(1),location:dl,anchorText:B(),status:yc(Yc),createdAt:ol}),pl=pc({path:B().min(1),line:al.nullable()}),ml=pc({text:B().min(1),at:ol}),hl=pc({text:B().min(1),askedAt:ol,answer:ml.nullable(),answerSeenAt:ol.nullable()}),gl=pc({askedAt:ol,answer:ml.nullable(),answerSeenAt:ol.nullable(),followUps:dc(hl)}),_l=pc({id:il,location:pl.nullable(),findingId:il.nullable(),text:B().min(1),createdAt:ol,question:gl.nullable()}),vl=pc({path:B().min(1),line:al.nullable()}),yl=pc({id:il,label:B().min(1),shape:yc(Zc),status:yc(Qc),layer:B().min(1).nullable(),detail:B().nullable(),location:vl.nullable()}),bl=pc({from:il,to:il,label:B().nullable()}),xl=pc({id:il,title:B().min(1),kind:yc(Xc),layers:dc(B().min(1)),nodes:dc(yl),links:dc(bl),updatedAt:ol}),Sl=pc({at:ol,note:B().min(1).nullable(),by:yc(tl)}),Cl=pc({decision:yc(el),submittedAt:ol,processed:Sl.nullable(),findings:dc(pc({id:il,title:B().min(1)})),notes:dc(pc({id:il,location:pl.nullable(),text:B().min(1)})),excludedFindingIds:dc(il),excludedNoteIds:dc(il)}),wl=pc({state:yc($c),decision:yc(el).nullable(),selectedFindingIds:dc(il),selectedNoteIds:dc(il),prompt:B().nullable(),submittedAt:ol.nullable(),processed:Sl.nullable(),previousSubmission:Cl.nullable()}),Tl=pc({text:B().min(1),source:B().min(1).nullable()}),El=pc({objective:B().min(1),approach:B().min(1),attentionPoints:dc(B().min(1))}),Dl=B().min(1).refine(e=>e===e.trim(),`must not start or end with whitespace`);pc({id:B().regex(rl),title:B().min(1),project:Dl,repoPath:B().min(1),mode:yc(Uc),base:B().min(1),head:B().min(1).nullable(),baseCommit:B().min(1),headCommit:B().min(1).nullable(),snapshotAt:ol,request:Tl.nullable(),followUpOf:B().regex(rl).nullable(),overview:El.nullable(),summary:dc(B().min(1)),files:dc(cl),findings:dc(ul),explanations:dc(fl),notes:dc(_l),diagrams:dc(xl),review:wl,revision:tc().int().nonnegative(),createdAt:ol,updatedAt:ol,lastEditor:yc(tl)});var Ol=[`not_started`,`in_progress`,`files_reviewed`,`submitted`];function kl(e){return Gc.indexOf(e)}function Al(e,t){return kl(e)-kl(t)}function jl(e){return[...e].sort((e,t)=>Al(e.severity,t.severity))}function Ml(e){if(e===``)return[];let t=e.split(`
65
65
  `).map(e=>e.endsWith(`\r`)?e.slice(0,-1):e);return t[t.length-1]===``&&e.endsWith(`
66
- `)&&t.pop(),t}function jl(e,t,n=`-`){return e===t?`${e}`:`${e}${n}${t}`}function Ml(e){return e.line===null?e.path:`${e.path}:${e.line}`}function Nl(e,t){let n=e.findings.flatMap(e=>e.location?.path===t?[{finding:e,startLine:e.location.startLine,endLine:e.location.endLine}]:[]);return n.sort((e,t)=>e.startLine-t.startLine||e.endLine-t.endLine),n.map((e,t)=>({...e,number:t+1}))}function Pl(e){let t=new Set;for(let n of e.hunks)for(let e of n.lines)e.newNo!==null&&t.add(e.newNo);return t}function Fl(e,t,n){for(let r=t;r<=n;r++)if(e.has(r))return r;return null}var Il={off:{icon:`eye-off`,label:`Sans correctif`,description:`Le diff seul`},"before-after":{icon:`git-compare`,label:`Avant / après`,description:`Lignes visées barrées, correctif dessous`},applied:{icon:`wand-sparkles`,label:`Code corrigé`,description:`Correctif à la place des lignes visées`}},Ll={diff:{icon:`diff`,label:`Unifié`,description:`Lignes supprimées au-dessus des lignes ajoutées`},split:{icon:`columns-2`,label:`Côte à côte`,description:`Ancien code à gauche, nouveau à droite`},new:{icon:`file-code`,label:`Nouveau code`,description:`Le nouveau code seul, ajouts marqués d'un filet`}},Rl={changes:{icon:`fold-vertical`,label:`Modifications`,description:`Les blocs du diff et leurs lignes de contexte`},file:{icon:`unfold-vertical`,label:`Fichier entier`,description:`Tout le fichier, lignes inchangées comprises`}};function zl(e,t,n){return e.hunks.some(e=>{let r=e.lines.flatMap(e=>e.newNo===null?[]:[e.newNo]);return r.includes(t)&&r.includes(n)})}function Bl(e,t,n,r){let i=new Map,a=[];for(let o of e){let{finding:e}=o;if(e.suggestion===null)i.set(e.id,{state:`none`});else if(!zl(t,o.startLine,o.endLine))i.set(e.id,{state:`outside`});else if(r===`off`||!n(e))i.set(e.id,{state:`hidden`});else{let t=a.find(e=>e.startLine<=o.endLine&&o.startLine<=e.endLine);t?i.set(e.id,{state:`blocked`,blockedBy:t.number}):(a.push(o),i.set(e.id,{state:`shown`}))}}return i}function Vl(e){return e.kind===`line`?iu(e.line):ou(e.entry.finding.id)}function Hl(e){return e.kind===`line`?e.line:e.entry.startLine-.5}function Ul(e,t){return e===null||t===null?!1:e.kind===`line`?t.kind===`line`&&e.line===t.line:t.kind===`fix`&&e.entry.finding.id===t.entry.finding.id}function Wl(e,t,n){let r=new Map;if(n!==`applied`)return r;for(let n of e)if(t.get(n.finding.id)?.state===`shown`)for(let e=n.startLine;e<=n.endLine;e++)r.set(e,n);return r}function Gl(e,t){let n=t.get(e);return n?{kind:`fix`,entry:n}:{kind:`line`,line:e}}function Kl(e,t,n,r){if(t.get(e.finding.id)?.state===`shown`)return{kind:`fix`,entry:e};for(let t=e.startLine;t<=e.endLine;t++)if(n.has(t)&&!r.has(t))return{kind:`line`,line:t};let i=Fl(n,e.startLine,e.endLine);return i===null?null:Gl(i,r)}function ql(e){return{severity:e.severity,muted:e.status!==`open`}}function Jl(e,t){let n=null;for(let{finding:r,startLine:i,endLine:a}of e)t<i||t>a||(n===null||r.status===`open`&&n.status!==`open`||r.status===`open`==(n.status===`open`)&&Ol(r.severity,n.severity)<0)&&(n=r);return n?ql(n):null}function Yl(e){return Al(e.finding.suggestion??``).map((t,n)=>({kind:`fix-line`,text:t,index:n,entry:e,bar:ql(e.finding)}))}function Xl(e,t){return e.explanations.filter(e=>e.location.path===t).sort((e,t)=>e.location.startLine-t.location.startLine||(e.location.side===t.location.side?0:e.location.side===`old`?-1:1)||e.location.endLine-t.location.endLine)}function Zl(e,t){let{side:n,startLine:r,endLine:i}=e.location,a=n===`new`?t.newNo:t.type===`add`?null:t.oldNo;return a!==null&&a>=r&&a<=i}function Ql(e,t,n,r){for(let i of e.hunks){let e=i.lines.findIndex(e=>Zl(t,e));if(e===-1)continue;let a=i.lines[e];if(a.newNo!==null){let e=Gl(a.newNo,n);return{selector:Vl(e),order:Hl(e)}}let o=i.lines.slice(e).find(e=>e.newNo!==null),s=i.lines.slice(0,e).findLast(e=>e.newNo!==null);if(r===`new`){let e=o??s;if(!e)continue;let t=Gl(e.newNo,n);return{selector:Vl(t),order:Hl(t)+(o?-.25:.25)}}let c=o?o.newNo-.25:s?s.newNo+.25:i.newStart;return{selector:au(a.oldNo),order:c}}return null}function $l(e,t,n,r,i,a){let o=Pl(e),s=Wl(t,n,r),c=t.filter(e=>n.get(e.finding.id)?.state===`shown`),l=new Map,u=new Map;for(let e of t){if(n.get(e.finding.id)?.state===`shown`)continue;let t=Kl(e,n,o,s);if(t?.kind===`line`&&l.set(t.line,[...l.get(t.line)??[],e]),t?.kind===`fix`){let n=t.entry.finding.id;u.set(n,[...u.get(n)??[],e])}}let d=e=>({kind:`fix-strip`,entry:e,bar:ql(e.finding),pills:u.get(e.finding.id)??[]});return e.hunks.map(e=>{let n=[],o=Se(e.lines),s=j(o);for(let{line:e,oldLine:u}of o){if(a===`new`&&e.type===`del`)continue;let o=e.newNo,f=o===null?void 0:c.find(e=>o>=e.startLine&&o<=e.endLine);r===`applied`&&f?f.startLine===o&&n.push(d(f),...Yl(f)):(f&&f.startLine===o&&n.push(d(f)),n.push({kind:`line`,line:e,oldLine:u,inline:s.get(e)??null,replaced:f!==void 0&&e.type!==`del`,explained:i.some(t=>Zl(t,e)||u!==null&&Zl(t,u)),bar:f?ql(f.finding):o===null?null:Jl(t,o),pills:o===null?[]:l.get(o)??[]}),f&&f.endLine===o&&n.push(...Yl(f)))}return{hunk:e,rows:n}})}function eu(e){switch(e.kind){case`line`:return e.line.newNo===null?`o${e.line.oldNo}`:`n${e.line.newNo}`;case`fix-strip`:return`s${e.entry.finding.id}`;case`fix-line`:return`f${e.entry.finding.id}:${e.index}`}}function tu(e){switch(e.kind){case`line`:return e.line.text;case`fix-strip`:return null;case`fix-line`:return e.text}}function nu(e,t){return e?.kind===`line`&&e.oldLine===null&&e.line.type===t}function ru(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r.kind===`fix-strip`)t.push({kind:`full`,row:r}),n++;else if(r.kind===`line`&&r.oldLine!==null)t.push({kind:`pair`,left:r,right:r}),n++;else if(r.kind===`fix-line`||nu(r,`add`))t.push({kind:`pair`,left:null,right:r}),n++;else if(nu(r,`context`))t.push({kind:`pair`,left:r,right:r}),n++;else{let r=[],i=[];for(let t=e[n];nu(t,`del`);t=e[++n])r.push(t);for(let t=e[n];nu(t,`add`);t=e[++n])i.push(t);for(let e=0;e<Math.max(r.length,i.length);e++)t.push({kind:`pair`,left:r[e]??null,right:i[e]??null})}}return t}function iu(e){return`[data-line="${e}"]`}function au(e){return`[data-old-line="${e}"]`}function ou(e){return`[data-fix="${e}"]`}function su(e,t){return e.notes.filter(e=>e.location?.path===t&&e.location.line!==null).sort((e,t)=>e.location.line-t.location.line)}function cu(e){if(e.kind===`fix-line`)return{kind:null,added:[],deleted:[],newNo:null,strip:null};let{line:t}=e,n=e.oldLine===null?t.type===`context`?null:t.type:`reindent`;return{kind:n,added:n===`add`||n===`reindent`?[t.newNo]:[],deleted:n===`del`?[t.oldNo]:[],newNo:t.newNo,strip:null}}function V(e){return{kind:null,added:[],deleted:[],newNo:null,strip:e}}function lu(e,t){return e.flatMap(e=>t===`split`?ru(e.rows).map(e=>{if(e.kind===`full`)return V(e.row.entry);let t=e.left?cu(e.left):null,n=e.right?cu(e.right):null;if(n?.kind===`reindent`)return n;let r=n?.kind===`add`?n.added:[],i=t?.kind===`del`?t.deleted:[];return{kind:r.length>0?i.length>0?`mod`:`add`:i.length>0?`del`:null,added:r,deleted:i,newNo:n?.newNo??null,strip:null}}):e.rows.map(e=>e.kind===`fix-strip`?V(e.entry):cu(e)))}function uu(e,t){return`${e} ligne${e>1?`s`:``} ${t}${e>1?`s`:``}`}function du(e){let t=Math.min(...e),n=Math.max(...e);return t===n?`ligne ${t}`:`lignes ${t} à ${n}`}function fu(e,t,n){switch(e){case`add`:return`${uu(t.length,`ajoutée`)} · ${du(t)}`;case`del`:return`${uu(n.length,`supprimée`)} · ancienne ${du(n)}`;case`mod`:return`${uu(n.length,`supprimée`)}, ${t.length} ajoutée${t.length>1?`s`:``} · ${du(t)}`;case`reindent`:return`Indentation modifiée · ${du(t)}`}}function pu(e,t,n,r){let i=lu(e,t),a=[];for(let e=0;e<i.length;){let t=i[e].kind,n=e+1;for(;n<i.length&&i[n].kind===t;)n++;if(t!==null){let r=i.slice(e,n);a.push({kind:t,start:e,end:n,label:fu(t,r.flatMap(e=>e.added),r.flatMap(e=>e.deleted))})}e=n}let o=[];for(let e of n){let t=i.findIndex(t=>t.strip?.finding.id===e.finding.id||t.newNo!==null&&t.newNo>=e.startLine&&t.newNo<=e.endLine);t!==-1&&o.push({kind:`finding`,entry:e,row:t})}for(let e of r){let t=i.findIndex(t=>t.newNo===e);t!==-1&&o.push({kind:`note`,line:e,row:t})}return{changes:a,dots:o}}function mu(e,t){return e===t?`la ligne ${e}`:`les lignes ${e} à ${t}`}var hu=`feature-analyzer.`;function gu(e,t,n){try{let r=window.localStorage.getItem(hu+e);return r!==null&&Object.hasOwn(t,r)?r:n}catch{return n}}function _u(e,t){try{window.localStorage.setItem(hu+e,t)}catch{}}function vu(e,t){if(e.watchedAnalyses===null)return null;let n=new Map((e.analyses??[]).map(e=>[e.id,e])),r=new Set,i=t;for(;i!==void 0&&!r.has(i);){if(e.watchedAnalyses.has(i))return!0;r.add(i),i=n.get(i)?.followUpOf?.id}return!1}var yu=5e3,bu=0,xu,Su=null,Cu=`L'analyse a été modifiée entre-temps (par l'agent ou un autre onglet) : elle vient d'être rechargée. Vérifiez l'état affiché puis refaites votre action.`,H=se((e,t)=>{async function n(n,r){let i=t().current?.analysis;if(!i)return!1;e({saving:!0});try{let n=await r(i);return t().current?.id===n.analysis.id&&e({current:{id:n.analysis.id,analysis:n.analysis,links:t().current?.links??null,error:null}}),!0}catch(e){return e instanceof ce&&e.status===409?(await t().reloadCurrent(),t().notify(`info`,Cu)):t().notify(`error`,`${n} : ${e.message}`),!1}finally{e({saving:!1})}}return{config:null,analyses:null,unreadable:[],listError:null,current:null,diff:null,diffError:null,saving:!1,notice:null,homeFilter:`to_review`,collapsedProjects:new Set,fixMode:gu(`fix-mode`,Il,`before-after`),codeView:gu(`code-view`,Ll,`diff`),diffScope:gu(`diff-scope`,Rl,`changes`),gapsCollapsed:!1,filesPanelCollapsed:!1,zenMode:!1,findingsShown:!0,explanationsShown:!0,watchedAnalyses:null,setHomeFilter:t=>e({homeFilter:t}),toggleProject:n=>{let r=new Set(t().collapsedProjects);r.has(n)?r.delete(n):r.add(n),e({collapsedProjects:r})},setFixMode:t=>{_u(`fix-mode`,t),e({fixMode:t})},setCodeView:t=>{_u(`code-view`,t),e({codeView:t})},setDiffScope:t=>{_u(`diff-scope`,t),e({diffScope:t})},setGapsCollapsed:t=>e({gapsCollapsed:t}),setFilesPanelCollapsed:t=>e({filesPanelCollapsed:t}),setZenMode:t=>e({zenMode:t}),setFindingsShown:t=>e({findingsShown:t}),setExplanationsShown:t=>e({explanationsShown:t}),loadConfig:async()=>{try{e({config:await de.getConfig()})}catch(e){t().notify(`error`,`Configuration illisible : ${e.message}`)}},setListing:t=>e({analyses:t.analyses,unreadable:t.unreadable,listError:null}),loadAnalyses:async()=>{try{t().setListing(await de.listAnalyses())}catch(t){e({listError:`Liste des analyses illisible : ${t.message}`})}},openAnalysis:n=>{t().current?.id!==n&&(e({current:{id:n,analysis:null,links:null,error:null}}),t().reloadCurrent())},reloadCurrent:async()=>{let n=t().current?.id;if(n)try{let{analysis:r,links:i}=await de.getAnalysis(n);if(t().current?.id!==n)return;e({current:{id:n,analysis:r,links:i,error:null}}),await t().ensureDiff()}catch(r){if(t().current?.id!==n)return;e({current:{id:n,analysis:null,links:null,error:r.message}})}},ensureDiff:async()=>{let n=t().current?.analysis;if(!n)return;let r=t().diff;if(r&&r.id===n.id&&r.snapshotAt===n.snapshotAt)return;let i=`${n.id}@${n.snapshotAt}`;if(Su?.key===i)return Su.promise;let a=(async()=>{try{let{diff:r}=await de.getDiff(n.id);if(t().current?.analysis?.id!==n.id)return;e({diff:{id:n.id,snapshotAt:n.snapshotAt,snapshot:r},diffError:null})}catch(t){e({diffError:`Diff illisible : ${t.message}`})}finally{Su?.key===i&&(Su=null)}})();return Su={key:i,promise:a},a},setFileReviewed:(e,t)=>n(`Marquage du fichier impossible`,n=>de.setFileReviewed(n.id,{path:e,reviewed:t,baseRevision:n.revision})),setFileLevel:(e,t)=>n(`Reclassement impossible`,n=>de.setFileLevel(n.id,{path:e,level:t,baseRevision:n.revision})),setFindingStatus:(e,t)=>n(`Changement de statut impossible`,n=>de.setFindingStatus(n.id,e,{status:t,baseRevision:n.revision})),addNote:(e,t,r,i,a)=>n(a?`Question non envoyée`:`Remarque non enregistrée`,n=>de.addNote(n.id,{path:e,line:t,findingId:i,text:r,askAgent:a,baseRevision:n.revision})),markAnswerSeen:e=>n(`Lecture de la réponse non enregistrée`,t=>de.markAnswerSeen(t.id,e,{baseRevision:t.revision})),setWatchedAnalyses:t=>e({watchedAnalyses:new Set(t)}),updateNote:(e,t)=>n(`Remarque non modifiée`,n=>de.updateNote(n.id,e,{text:t,baseRevision:n.revision})),deleteNote:e=>n(`Suppression impossible`,t=>de.deleteNote(t.id,e,{baseRevision:t.revision})),submitReview:(e,t,r)=>n(`Retour non enregistré`,n=>de.submitReview(n.id,{decision:e,findingIds:t,noteIds:r,baseRevision:n.revision})),markProcessed:async(n,r)=>{e({saving:!0});try{return await de.markProcessed(n.id,{note:r,baseRevision:n.revision}),await t().loadAnalyses(),t().current?.id===n.id&&await t().reloadCurrent(),t().notify(`info`,`« ${n.title} » est marquée traitée.`),!0}catch(e){return e instanceof ce&&e.status===409?(await t().loadAnalyses(),t().notify(`info`,Cu)):t().notify(`error`,`Marquage impossible : ${e.message}`),!1}finally{e({saving:!1})}},copy:async(e,n)=>{try{await fe(e),t().notify(`info`,n)}catch(e){t().notify(`error`,`Copie impossible : ${e.message}`)}},notify:(t,n)=>{clearTimeout(xu),e({notice:{id:++bu,kind:t,text:n}}),xu=setTimeout(()=>e({notice:null}),yu)},dismissNotice:()=>{clearTimeout(xu),e({notice:null})}}}),wu={"scan-search":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}),(0,O.jsx)(`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}),(0,O.jsx)(`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}),(0,O.jsx)(`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,O.jsx)(`path`,{d:`m16 16-1.9-1.9`})]}),"git-branch":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`}),(0,O.jsx)(`circle`,{cx:`18`,cy:`6`,r:`3`}),(0,O.jsx)(`circle`,{cx:`6`,cy:`18`,r:`3`}),(0,O.jsx)(`path`,{d:`M18 9a9 9 0 0 1-9 9`})]}),"chevron-down":(0,O.jsx)(`path`,{d:`m6 9 6 6 6-6`}),"chevron-right":(0,O.jsx)(`path`,{d:`m9 18 6-6-6-6`}),"arrow-left":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m12 19-7-7 7-7`}),(0,O.jsx)(`path`,{d:`M19 12H5`})]}),"arrow-right":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M5 12h14`}),(0,O.jsx)(`path`,{d:`m12 5 7 7-7 7`})]}),sparkles:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`}),(0,O.jsx)(`path`,{d:`M20 3v4`}),(0,O.jsx)(`path`,{d:`M22 5h-4`}),(0,O.jsx)(`path`,{d:`M4 17v2`}),(0,O.jsx)(`path`,{d:`M5 18H3`})]}),bot:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 8V4H8`}),(0,O.jsx)(`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}),(0,O.jsx)(`path`,{d:`M2 14h2`}),(0,O.jsx)(`path`,{d:`M20 14h2`}),(0,O.jsx)(`path`,{d:`M15 13v2`}),(0,O.jsx)(`path`,{d:`M9 13v2`})]}),circle:(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),"circle-check":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),"circle-dot":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1`})]}),"circle-x":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`m15 9-6 6`}),(0,O.jsx)(`path`,{d:`m9 9 6 6`})]}),square:(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),"square-check":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),check:(0,O.jsx)(`path`,{d:`M20 6 9 17l-5-5`}),pencil:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}),(0,O.jsx)(`path`,{d:`m15 5 4 4`})]}),copy:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,O.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]}),info:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`M12 16v-4`}),(0,O.jsx)(`path`,{d:`M12 8h.01`})]}),save:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}),(0,O.jsx)(`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}),(0,O.jsx)(`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`})]}),"message-square":(0,O.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`}),"messages-square":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z`}),(0,O.jsx)(`path`,{d:`M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1`})]}),send:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`}),(0,O.jsx)(`path`,{d:`m21.854 2.147-10.94 10.939`})]}),"loader-circle":(0,O.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}),bell:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}),(0,O.jsx)(`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`})]}),trash:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 6h18`}),(0,O.jsx)(`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`}),(0,O.jsx)(`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2`})]}),"triangle-alert":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,O.jsx)(`path`,{d:`M12 9v4`}),(0,O.jsx)(`path`,{d:`M12 17h.01`})]}),network:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,O.jsx)(`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,O.jsx)(`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}),(0,O.jsx)(`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}),(0,O.jsx)(`path`,{d:`M12 12V8`})]}),workflow:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}),(0,O.jsx)(`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`})]}),"brain-circuit":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`}),(0,O.jsx)(`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`}),(0,O.jsx)(`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`}),(0,O.jsx)(`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`}),(0,O.jsx)(`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`}),(0,O.jsx)(`path`,{d:`M12 13h4`}),(0,O.jsx)(`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`}),(0,O.jsx)(`path`,{d:`M12 8h8`}),(0,O.jsx)(`path`,{d:`M16 8V5a2 2 0 0 1 2-2`}),(0,O.jsx)(`circle`,{cx:`16`,cy:`13`,r:`.5`}),(0,O.jsx)(`circle`,{cx:`18`,cy:`3`,r:`.5`}),(0,O.jsx)(`circle`,{cx:`20`,cy:`21`,r:`.5`}),(0,O.jsx)(`circle`,{cx:`20`,cy:`8`,r:`.5`})]}),"file-code":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,O.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}),(0,O.jsx)(`path`,{d:`M10 12.5 8 15l2 2.5`}),(0,O.jsx)(`path`,{d:`m14 12.5 2 2.5-2 2.5`})]}),"flask-conical":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`}),(0,O.jsx)(`path`,{d:`M6.453 15h11.094`}),(0,O.jsx)(`path`,{d:`M8.5 2h7`})]}),minus:(0,O.jsx)(`path`,{d:`M5 12h14`}),plus:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M5 12h14`}),(0,O.jsx)(`path`,{d:`M12 5v14`})]}),maximize:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`}),(0,O.jsx)(`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`}),(0,O.jsx)(`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`}),(0,O.jsx)(`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`})]}),minimize:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`}),(0,O.jsx)(`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`}),(0,O.jsx)(`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`}),(0,O.jsx)(`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`})]}),focus:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,O.jsx)(`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}),(0,O.jsx)(`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}),(0,O.jsx)(`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}),(0,O.jsx)(`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`})]}),"eye-off":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}),(0,O.jsx)(`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}),(0,O.jsx)(`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}),(0,O.jsx)(`path`,{d:`m2 2 20 20`})]}),"rotate-ccw":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,O.jsx)(`path`,{d:`M3 3v5h5`})]}),"panel-left-close":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M9 3v18`}),(0,O.jsx)(`path`,{d:`m16 15-3-3 3-3`})]}),"panel-left-open":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M9 3v18`}),(0,O.jsx)(`path`,{d:`m14 9 3 3-3 3`})]}),folder:(0,O.jsx)(`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}),eye:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),"clipboard-check":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`}),(0,O.jsx)(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}),(0,O.jsx)(`path`,{d:`m9 14 2 2 4-4`})]}),hourglass:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M5 22h14`}),(0,O.jsx)(`path`,{d:`M5 2h14`}),(0,O.jsx)(`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}),(0,O.jsx)(`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`})]}),list:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 12h.01`}),(0,O.jsx)(`path`,{d:`M3 18h.01`}),(0,O.jsx)(`path`,{d:`M3 6h.01`}),(0,O.jsx)(`path`,{d:`M8 12h13`}),(0,O.jsx)(`path`,{d:`M8 18h13`}),(0,O.jsx)(`path`,{d:`M8 6h13`})]}),"corner-up-left":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`}),(0,O.jsx)(`path`,{d:`M9 14 4 9l5-5`})]}),"corner-down-right":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m15 10 5 5-5 5`}),(0,O.jsx)(`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`})]}),move:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 2v20`}),(0,O.jsx)(`path`,{d:`m15 19-3 3-3-3`}),(0,O.jsx)(`path`,{d:`m19 9 3 3-3 3`}),(0,O.jsx)(`path`,{d:`M2 12h20`}),(0,O.jsx)(`path`,{d:`m5 9-3 3 3 3`}),(0,O.jsx)(`path`,{d:`m9 5 3-3 3 3`})]}),"chevron-up":(0,O.jsx)(`path`,{d:`m18 15-6-6-6 6`}),"fold-vertical":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 22v-6`}),(0,O.jsx)(`path`,{d:`M12 8V2`}),(0,O.jsx)(`path`,{d:`M4 12H2`}),(0,O.jsx)(`path`,{d:`M10 12H8`}),(0,O.jsx)(`path`,{d:`M16 12h-2`}),(0,O.jsx)(`path`,{d:`M22 12h-2`}),(0,O.jsx)(`path`,{d:`m15 19-3-3-3 3`}),(0,O.jsx)(`path`,{d:`m15 5-3 3-3-3`})]}),"unfold-vertical":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 22v-6`}),(0,O.jsx)(`path`,{d:`M12 8V2`}),(0,O.jsx)(`path`,{d:`M4 12H2`}),(0,O.jsx)(`path`,{d:`M10 12H8`}),(0,O.jsx)(`path`,{d:`M16 12h-2`}),(0,O.jsx)(`path`,{d:`M22 12h-2`}),(0,O.jsx)(`path`,{d:`m15 19-3 3-3-3`}),(0,O.jsx)(`path`,{d:`m15 5-3-3-3 3`})]}),diff:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 3v14`}),(0,O.jsx)(`path`,{d:`M5 10h14`}),(0,O.jsx)(`path`,{d:`M5 21h14`})]}),"columns-2":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M12 3v18`})]}),"git-compare":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`18`,cy:`18`,r:`3`}),(0,O.jsx)(`circle`,{cx:`6`,cy:`6`,r:`3`}),(0,O.jsx)(`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}),(0,O.jsx)(`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`})]}),"wand-sparkles":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`}),(0,O.jsx)(`path`,{d:`m14 7 3 3`}),(0,O.jsx)(`path`,{d:`M5 6v4`}),(0,O.jsx)(`path`,{d:`M19 14v4`}),(0,O.jsx)(`path`,{d:`M10 2v2`}),(0,O.jsx)(`path`,{d:`M7 8H3`}),(0,O.jsx)(`path`,{d:`M21 16h-4`}),(0,O.jsx)(`path`,{d:`M11 3H9`})]}),target:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`6`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`})]}),"chevrons-right":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m6 17 5-5-5-5`}),(0,O.jsx)(`path`,{d:`m13 17 5-5-5-5`})]}),"arrow-up-down":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m21 16-4 4-4-4`}),(0,O.jsx)(`path`,{d:`M17 20V4`}),(0,O.jsx)(`path`,{d:`m3 8 4-4 4 4`}),(0,O.jsx)(`path`,{d:`M7 4v16`})]}),"circle-alert":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}),(0,O.jsx)(`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`})]}),"circle-help":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),(0,O.jsx)(`path`,{d:`M12 17h.01`})]})};function U({name:e,size:t=14,color:n,className:r}){return(0,O.jsx)(`svg`,{className:r,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:n??`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:wu[e]})}function Tu(){let e=H(e=>e.notice),t=H(e=>e.dismissNotice);return e?(0,O.jsxs)(`div`,{className:`notice notice-${e.kind}`,role:e.kind===`error`?`alert`:`status`,children:[(0,O.jsx)(U,{name:e.kind===`error`?`triangle-alert`:`info`}),(0,O.jsx)(`span`,{className:`notice-text`,children:e.text}),(0,O.jsx)(`button`,{type:`button`,className:`notice-close`,onClick:t,"aria-label":`Fermer le message`,children:(0,O.jsx)(U,{name:`circle-x`})})]},e.id):null}function Eu({analysis:e}){let t=e.files.length,n=e.files.filter(e=>e.reviewed).length,r=t===0?0:n/t*100;return(0,O.jsxs)(`div`,{className:`topbar-progress`,title:`${n} fichier(s) revu(s) sur ${t}`,children:[(0,O.jsxs)(`span`,{className:`topbar-progress-label mono`,children:[n,`/`,t,` revus`]}),(0,O.jsx)(`div`,{className:`topbar-progress-bar`,role:`progressbar`,"aria-label":`Fichiers revus`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":n,children:(0,O.jsx)(`div`,{className:`progress-fill`,style:{width:`${r}%`}})})]})}var Du={critical:{label:`Critique`,color:`#f0625a`,background:`#34191c`},major:{label:`Majeur`,color:`#e3a33b`,background:`#33270f`},minor:{label:`Mineur`,color:`#6fb3ff`,background:`#13243a`},trivial:{label:`Détail`,color:`#9aa1b1`,background:`#1c2029`}},Ou={label:`Remarque`,color:`#c4a8ff`,background:`#241d3a`},ku={label:`Question`,color:`#8b97ff`,background:`#1f2540`},Au={open:`Ouvert`,ignored:`Ignoré`,outdated:`Obsolète`},ju={issue:`Problème`,requirement_gap:`Exigence manquante`},Mu={added:`Ajouté`,modified:`Modifié`,deleted:`Supprimé`,renamed:`Renommé`,untracked:`Non suivi`},Nu={added:`A`,modified:`M`,deleted:`D`,renamed:`R`,untracked:`U`},Pu={central:{label:`Central`,description:`Règle métier ou calcul`},check:{label:`À vérifier`,description:`Appelant ou écran qui branche une règle`},skim:{label:`Survol`,description:`Tests, suppressions, imports, routes`}},Fu={branch:`Branche`,working_tree:`Copie de travail`},Iu={approve:`Approuver`,request_changes:`Demander des corrections`,reject:`Rejeter`},Lu={not_started:{label:`Non commencée`,color:`#9aa1b1`,background:`#1c2029`},in_progress:{label:`En cours`,color:`#6fb3ff`,background:`#13243a`},files_reviewed:{label:`Fichiers revus`,color:`#8b97ff`,background:`#1b1f3d`},submitted:{label:`Soumise`,color:`#3fb950`,background:`#11201a`}},Ru={label:`Traitée`,color:`#5fd4c4`,background:`#10272a`},zu={approve:{label:`Approuvée`,color:`#3fb950`,background:`#11201a`},request_changes:{label:`Corrections demandées`,color:`#e3a33b`,background:`#33270f`},reject:{label:`Rejetée`,color:`#f0625a`,background:`#34191c`}},Bu={new:{label:`Nouveau`,fill:`#11201a`,stroke:`#2c6b3a`,text:`#bfeccd`,accent:`#3fb950`},modified:{label:`Modifié`,fill:`#151a2b`,stroke:`#36407a`,text:`#d5daff`,accent:`#8b97ff`},impacted:{label:`Impacté, non modifié`,fill:`#13161f`,stroke:`#2a2f3d`,text:`#7b8396`,accent:`#646b7b`},existing:{label:`Existant`,fill:`#13161f`,stroke:`#2a2f3d`,text:`#9aa1b1`,accent:`#646b7b`},finding:{label:`Constat`,fill:`#221416`,stroke:`#6b2a2d`,text:`#f0a09a`,accent:`#f0625a`},missing:{label:`Attendu, absent`,fill:null,stroke:`#6b2a2d`,text:`#f0776f`,accent:`#b0605b`}};function Vu(e){let t=e.lastIndexOf(`/`);return t===-1?{folder:``,name:e}:{folder:e.slice(0,t+1),name:e.slice(t+1)}}function Hu(e,t=Date.now()){let n=Math.max(0,Math.round((t-Date.parse(e))/1e3));if(n<60)return`à l'instant`;let r=Math.round(n/60);if(r<60)return`il y a ${r} min`;let i=Math.round(r/60);return i<24?`il y a ${i} h`:`il y a ${Math.round(i/24)} j`}function Uu(e){let t=new Date(e);return`${t.toLocaleDateString(`fr-FR`)} à ${t.toLocaleTimeString(`fr-FR`,{hour:`2-digit`,minute:`2-digit`})}`}function Wu(e){return e.by===`user`?`Marquée traitée par le relecteur`:`Traitée par l'agent`}function Gu(e){return`${Wu(e)} le ${Uu(e.at)}${e.note===null?``:` — ${e.note}`}`}function Ku(e,t=new Date){let n=new Date(e),r=n.toLocaleTimeString(`fr-FR`,{hour:`2-digit`,minute:`2-digit`});return n.toDateString()===t.toDateString()?r:n.getFullYear()===t.getFullYear()?`${n.toLocaleDateString(`fr-FR`,{day:`2-digit`,month:`2-digit`})} ${r}`:n.toLocaleDateString(`fr-FR`)}function W(e,t,n=`${t}s`){return`${e} ${e>1?n:t}`}function qu(e,t){return W(t,Du[e].label.toLowerCase())}var Ju={critical:[`critique`,`critiques`],major:[`majeur`,`majeurs`],minor:[`mineur`,`mineurs`],trivial:[`de détail`,`de détail`]};function Yu(e,t){let[n,r]=Ju[e];return t>1?`${t} constats ${r} ouverts`:`${t} constat ${n} ouvert`}function Xu(e,t=4){let n=e.lastIndexOf(`.`),r=n>0?e.length-n:0,i=Math.max(0,e.length-r-t);return{head:e.slice(0,i),tail:e.slice(i)}}function Zu(e){return/^[0-9a-f]{40}$/.test(e)?e.slice(0,7):e}function Qu(e){if(e.mode===`working_tree`)return Fu.working_tree;if(e.head===null)throw Error(`L'analyse ${e.id} est en mode branche sans ref de tête.`);return Zu(e.head)}function $u(e){return e.mode===`working_tree`?Fu.working_tree:`${Qu(e)} → ${Zu(e.base)}`}function ed(e,t){let n=e.location;return n?`${Vu(n.path).name}:${jl(n.startLine,n.endLine,`–`)}`:t?.source?`demande ${t.source}`:`exigence manquante`}function G(e){if(!e.location)return`analyse entière`;let t=Vu(e.location.path).name;return e.location.line===null?t:`${t}:${e.location.line}`}function td(e,t){return e===t?`ligne ${e}`:`lignes ${e}–${t}`}function K(e){return e.files.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0})}var q=[`to_review`,`to_process`,`processed`,`approved`,`all`];function nd(e,t){let{state:n,decision:r,processed:i,toProcess:a}=e.progress;if(t!==`all`&&e.followedBy!==null)return!1;switch(t){case`to_review`:return n!==`submitted`;case`processed`:return n===`submitted`&&i!==null;case`to_process`:return a;case`approved`:return n===`submitted`&&r===`approve`&&i===null;case`all`:return!0}}function rd(e,t){return e.filter(e=>nd(e,t))}function id(e){return Object.fromEntries(q.map(t=>[t,rd(e,t).length]))}function ad(e){let t=new Map;for(let n of e){let e=t.get(n.project);e?e.push(n):t.set(n.project,[n])}return[...t].map(([e,t])=>({project:e,analyses:t,counts:El.map(e=>({state:e,count:t.filter(t=>t.progress.state===e).length})).filter(({count:e})=>e>0)}))}function od(e){return Gc.map(t=>({severity:t,count:e.openFindings[t]})).filter(({count:e})=>e>0)}function sd(e){let{reviewedFiles:t,totalFiles:n}=e.progress;return n===0?0:t/n*100}function cd(e){return e.answer===null?1:e.answerSeenAt===null?0:2}function ld(e){return e.notes.filter(e=>e.question!==null).sort((e,t)=>cd(e.question)-cd(t.question)||t.question.askedAt.localeCompare(e.question.askedAt))}function ud(e){if(!e.location)return`Revue entière`;let t=e.location.path.split(`/`).pop()??e.location.path;return e.location.line===null?t:`${t} · l. ${e.location.line}`}function dd({question:e}){return e.answer===null?(0,O.jsx)(`span`,{className:`questions-row-status is-waiting`,children:`Agent notifié`}):e.answerSeenAt===null?(0,O.jsx)(`span`,{className:`questions-row-status is-answered`,children:`Réponse reçue`}):(0,O.jsx)(`span`,{className:`questions-row-status is-read`,children:`Lue`})}function fd({listened:e}){return(0,O.jsxs)(`span`,{className:`agent-presence${e?` is-live`:``}`,title:e?`Un agent a activé les notifications de cette revue : il reçoit vos questions et la fin de revue dès qu'elles sont envoyées.`:`Aucun agent n'a activé les notifications de cette revue : vos questions l'attendront jusqu'à ce qu'il le fasse.`,children:[(0,O.jsx)(`span`,{className:`agent-presence-dot`,"aria-hidden":`true`}),e?`Agent à l'écoute`:`Aucun agent à l'écoute`]})}function pd({analysis:e}){let t=H(t=>vu(t,e.id)),[n,r]=(0,v.useState)(!1),i=(0,v.useRef)(null);if((0,v.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]),t===null)return null;let a=t,o=ld(e),s=o.filter(e=>e.question.answer!==null&&e.question.answerSeenAt===null).length;return(0,O.jsxs)(`div`,{className:`agent-questions`,ref:i,children:[(0,O.jsx)(fd,{listened:a}),o.length>0&&(0,O.jsxs)(`button`,{type:`button`,className:`questions-button${n?` is-open`:``}`,"aria-haspopup":`menu`,"aria-expanded":n,onClick:()=>r(!n),children:[(0,O.jsx)(U,{name:`messages-square`}),`Questions`,s>0&&(0,O.jsx)(`span`,{className:`questions-badge`,title:W(s,`nouvelle réponse`,`nouvelles réponses`),children:s})]}),n&&o.length>0&&(0,O.jsxs)(`div`,{className:`questions-menu`,role:`menu`,children:[(0,O.jsxs)(`div`,{className:`questions-menu-head`,children:[(0,O.jsx)(`span`,{className:`questions-menu-title`,children:`Questions de la revue`}),s>0&&(0,O.jsx)(`span`,{className:`questions-menu-unread`,children:W(s,`nouvelle réponse`,`nouvelles réponses`)})]}),o.map(t=>(0,O.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`questions-row${t.question.answer!==null&&t.question.answerSeenAt===null?` is-unread`:``}`,onClick:()=>{r(!1),T(w.review(e.id,t.location?.path??null,t.location?.line??null))},children:[(0,O.jsx)(`span`,{className:`questions-row-text`,children:t.text}),(0,O.jsxs)(`span`,{className:`questions-row-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:ud(t)}),(0,O.jsx)(dd,{question:t.question})]})]},t.id)),(0,O.jsxs)(`div`,{className:`questions-menu-foot`,children:[(0,O.jsx)(U,{name:`bell`,size:13}),a?`L'agent est notifié de chaque question et de la fin de revue.`:`Aucun agent à l'écoute : vos questions lui parviendront dès qu'il activera les notifications.`]})]})]})}function md({severity:e,fixed:t=!0}){let n=Du[e];return(0,O.jsx)(`span`,{className:`pill${t?` pill-fixed`:``}`,style:{color:n.color,background:n.background},children:n.label})}function hd({fixed:e=!0}){return(0,O.jsx)(`span`,{className:`pill${e?` pill-fixed`:``}`,style:{color:Ou.color,background:Ou.background},children:Ou.label})}function gd({fixed:e=!0}){return(0,O.jsxs)(`span`,{className:`pill pill-question${e?` pill-fixed`:``}`,style:{color:ku.color,background:ku.background},children:[(0,O.jsx)(U,{name:`send`,size:11}),ku.label]})}function _d({status:e}){return e===`open`?null:(0,O.jsx)(`span`,{className:`tag tag-${e}`,children:Au[e]})}function vd({kind:e}){return e===`requirement_gap`?(0,O.jsx)(`span`,{className:`tag tag-gap`,children:ju[e]}):null}function yd({severity:e,count:t,title:n,href:r}){return(0,O.jsx)(xd,{color:Du[e].color,count:t,title:n,href:r})}function bd({count:e,title:t,href:n}){return(0,O.jsx)(xd,{color:Ou.color,count:e,title:t,href:n,square:!0})}function xd({color:e,count:t,title:n,href:r,square:i}){let a=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`severity-dot-mark${i?` is-square`:``}`,style:{background:e}}),t]});return r?(0,O.jsx)(`a`,{className:`severity-dot is-link`,href:r,style:{color:e},title:n,"aria-label":n,children:a}):(0,O.jsx)(`span`,{className:`severity-dot`,style:{color:e},title:n,children:a})}function Sd({style:e,small:t,title:n}){return(0,O.jsx)(`span`,{className:`pill${t?` pill-small`:``}`,style:{color:e.color,background:e.background},title:n,children:e.label})}function Cd({progress:e,small:t}){return(0,O.jsxs)(`span`,{className:`review-badges`,children:[(0,O.jsx)(Sd,{style:Lu[e.state],small:t}),e.decision&&(0,O.jsx)(Sd,{style:zu[e.decision],small:t}),e.processed&&(0,O.jsx)(Sd,{style:Ru,small:t,title:Gu(e.processed)})]})}function wd({currentId:e}){let t=H(e=>e.analyses),n=H(e=>e.unreadable),[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null);if((0,v.useEffect)(()=>{if(!r)return;let e=e=>{a.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]),!t||t.length===0&&n.length===0)return null;let o=t.find(t=>t.id===e)??null;return(0,O.jsxs)(`div`,{className:`selector`,ref:a,children:[(0,O.jsxs)(`button`,{type:`button`,className:`selector-button`,"aria-haspopup":`listbox`,"aria-expanded":r,title:o?`${o.title} · ${$u(o)}`:`Choisir une analyse`,onClick:()=>i(!r),children:[(0,O.jsx)(U,{name:`git-branch`,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`selector-value`,children:o?o.title:`Choisir une analyse`}),(0,O.jsx)(U,{name:`chevron-down`,size:12,color:`#646b7b`})]}),r&&(0,O.jsxs)(`div`,{className:`selector-menu`,role:`listbox`,children:[ad(t).map(t=>(0,O.jsxs)(`div`,{className:`selector-group`,role:`group`,"aria-label":`Projet ${t.project}`,children:[(0,O.jsxs)(`div`,{className:`selector-group-title`,children:[(0,O.jsx)(U,{name:`folder`,size:12,color:`#646b7b`}),t.project]}),t.analyses.map(t=>(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t.id===e,className:`selector-item${t.id===e?` is-current`:``}`,onClick:()=>{i(!1),T(w.feature(t.id))},children:[(0,O.jsxs)(`span`,{className:`selector-item-head`,children:[(0,O.jsx)(`span`,{className:`selector-item-title`,children:t.title}),(0,O.jsx)(Cd,{progress:t.progress,small:!0})]}),(0,O.jsxs)(`span`,{className:`selector-item-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:$u(t)}),(0,O.jsxs)(`span`,{children:[`· `,Hu(t.updatedAt)]})]})]},t.id))]},t.project)),n.map(e=>(0,O.jsxs)(`div`,{className:`selector-item is-unreadable`,title:e.error,children:[(0,O.jsx)(`span`,{className:`selector-item-title`,children:e.id}),(0,O.jsxs)(`span`,{className:`selector-item-meta`,children:[`Analyse illisible : `,e.error]})]},e.id))]})]})}function Td({currentId:e,action:t}){let n=H(e=>e.current?.analysis??null);return(0,O.jsxs)(`header`,{className:`topbar`,children:[(0,O.jsxs)(`a`,{className:`brand`,href:w.home(),children:[(0,O.jsx)(`span`,{className:`brand-mark`,children:(0,O.jsx)(U,{name:`scan-search`,color:`#8b97ff`})}),`Feature Analyzer`]}),(0,O.jsx)(wd,{currentId:e}),(0,O.jsx)(`div`,{className:`topbar-spacer`}),n!==null&&n.id===e&&(0,O.jsx)(pd,{analysis:n}),t]})}var Ed=`[mcp-feature-analyzer]`,Dd=3e3;function Od(e){let t=H.getState();switch(e.type){case`ANALYSES_UPDATED`:t.loadAnalyses();return;case`ANALYSIS_UPDATED`:t.current?.id===e.data.analysisId&&t.reloadCurrent();return}}function kd(){(0,v.useEffect)(()=>{let e=null,t,n=!1;async function r(){try{let t=await de.getChanges(e);if(n)return;let r=H.getState();if(t.reset)r.loadConfig(),r.loadAnalyses(),r.reloadCurrent();else for(let e of t.events)Od(e);e={epoch:t.epoch,seq:t.seq};let i=await de.getWatchers();if(n)return;r.setWatchedAnalyses(i.analysisIds)}catch(e){console.error(`${Ed} Polling api/changes failed, retrying in ${Dd} ms: ${e.message}`)}n||(t=setTimeout(r,Dd))}return r(),()=>{n=!0,clearTimeout(t)}},[])}function Ad({link:e,direction:t,small:n=!1}){let r=n?12:14;return(0,O.jsxs)(`a`,{className:`analysis-link-button${n?` is-small`:``}`,href:w.feature(e.id),title:`Ouvrir « ${e.title} »`,children:[t===`previous`&&(0,O.jsx)(U,{name:`arrow-left`,size:r,color:`currentColor`}),(0,O.jsx)(`span`,{className:`analysis-link-button-title`,children:e.title}),t===`next`&&(0,O.jsx)(U,{name:`arrow-right`,size:r,color:`currentColor`})]})}function jd({chain:e,currentId:t}){return e.length<2?null:(0,O.jsx)(`nav`,{className:`round-chain`,"aria-label":`Tours de revue`,children:e.map((e,n)=>(0,O.jsxs)(`span`,{className:`round-chain-step`,children:[n>0&&(0,O.jsx)(U,{name:`arrow-right`,size:12,color:`#646b7b`}),e.id===t?(0,O.jsxs)(`span`,{className:`round-chain-item is-current`,title:e.title,"aria-current":`page`,children:[`Tour `,n+1]}):(0,O.jsxs)(`a`,{className:`round-chain-item`,href:w.feature(e.id),title:e.title,children:[`Tour `,n+1]})]},e.id))})}function Md(e){return e.kind===`note`?G(e):e.location?`${Vu(e.location.path).name}:${jl(e.location.startLine,e.location.endLine,`–`)}`:`exigence manquante`}function Nd(e){let t=[];return e.submittedAt&&t.push(`Retour du ${Uu(e.submittedAt)}`),e.decision&&t.push(Iu[e.decision]),e.processed&&t.push(Gu(e.processed)),t.join(` · `)}function Pd({analysisId:e,links:t}){let{previous:n,next:r,chain:i}=t;return!n&&!r?null:(0,O.jsxs)(`section`,{className:`follow-banner`,"aria-label":`Revues de suivi`,children:[r&&(0,O.jsxs)(`div`,{className:`follow-banner-row`,children:[(0,O.jsx)(`span`,{className:`follow-banner-label`,children:`Nouvelle revue disponible :`}),(0,O.jsx)(Ad,{link:r,direction:`next`}),(0,O.jsx)(Cd,{progress:r.progress,small:!0}),(0,O.jsx)(`span`,{className:`spacer`}),!n&&(0,O.jsx)(jd,{chain:i,currentId:e})]}),n&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`follow-banner-row`,children:[(0,O.jsx)(`span`,{className:`follow-banner-label`,children:`Revue faisant suite à :`}),(0,O.jsx)(Ad,{link:n,direction:`previous`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(jd,{chain:i,currentId:e})]}),(0,O.jsx)(`p`,{className:`follow-banner-meta`,children:Nd(n)}),(0,O.jsxs)(`div`,{className:`follow-banner-points`,children:[(0,O.jsxs)(`h2`,{className:`follow-banner-points-title`,children:[`Points du retour précédent à vérifier`,(0,O.jsx)(`span`,{className:`follow-banner-points-count`,children:n.points.length})]}),n.points.length===0?(0,O.jsx)(`p`,{className:`follow-banner-empty`,children:`Le retour précédent ne retenait aucun point : seule sa décision était transmise.`}):(0,O.jsx)(`ul`,{className:`follow-banner-list`,children:n.points.map(e=>(0,O.jsxs)(`li`,{className:`follow-banner-point`,children:[e.kind===`note`?(0,O.jsx)(hd,{}):e.severity?(0,O.jsx)(md,{severity:e.severity}):(0,O.jsx)(`span`,{className:`pill pill-fixed`,children:`Constat`}),(0,O.jsx)(`span`,{className:`follow-banner-point-text`,children:e.kind===`note`?e.text:e.title}),(0,O.jsx)(`span`,{className:`follow-banner-point-location mono`,children:Md(e)})]},`${e.kind}:${e.id}`))})]})]})]})}function Fd(e){let t=e.classification;return t===null?null:t.reviewerLevel??t.level}function Id(e){return e===null?nl.length:nl.indexOf(e)}function Ld(e){return e.map((e,t)=>({file:e,index:t,rank:Id(Fd(e))})).sort((e,t)=>e.rank-t.rank||e.index-t.index).map(({file:e})=>e)}function Rd(e){return e.files.some(e=>e.classification!==null)}var zd=[...nl,`unclassified`];function Bd(e){return Fd(e)??`unclassified`}function Vd(e,t){return e.files.filter(e=>Bd(e)===t)}function Hd(e){return(e.find(e=>!e.reviewed)??e[0])?.path??null}function Ud(e){return Hd(Ld(e.files))}function Wd(e,t){return Hd(Vd(e,t))}function Gd(e){return e.files.filter(t=>Fd(t)===`skim`&&e.findings.some(e=>e.status===`open`&&e.location?.path===t.path))}function Kd(e,t){return t.location?w.review(e.id,t.location.path,t.location.endLine):w.review(e.id,e.files[0]?.path??null)}function qd(e,t){return Gc.flatMap(n=>{let r=e.findings.flatMap(e=>e.status===`open`&&e.severity===n&&e.location?.path===t?[e.location.startLine]:[]);return r.length===0?[]:[{severity:n,count:r.length,firstLine:Math.min(...r)}]})}function Jd(e,t){let n=e.notes.filter(e=>e.location?.path===t);if(n.length===0)return null;let r=n.flatMap(e=>e.location?.line==null?[]:[e.location.line]);return{count:n.length,firstLine:r.length===0?null:Math.min(...r)}}function Yd(e){return kl(e.findings.filter(e=>e.location===null))}function Xd(e,t,n){return e&&t.files.some(e=>e.path===n)}function Zd({analysis:e}){let t=e.files.filter(e=>e.reviewed).length;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsx)(`h2`,{className:`section-title`,children:`Fichiers modifiés`}),(0,O.jsxs)(`span`,{className:`section-meta`,children:[t,` / `,e.files.length,` revus`]})]}),(0,O.jsxs)(`section`,{className:`card list-card`,children:[e.files.length===0&&(0,O.jsx)(`p`,{className:`list-empty`,children:`Le diff ne contient aucun fichier modifié.`}),e.files.map(t=>{let{folder:n,name:r}=Vu(t.path);return(0,O.jsxs)(`a`,{className:`file-row`,href:w.review(e.id,t.path),children:[(0,O.jsx)(U,{name:t.reviewed?`circle-check`:`circle`,color:t.reviewed?`#3fb950`:`#3a4050`}),(0,O.jsxs)(`span`,{className:`file-row-path mono`,title:t.oldPath?`${t.oldPath} → ${t.path}`:t.path,children:[(0,O.jsx)(`span`,{className:`path-folder`,children:n}),(0,O.jsx)(`span`,{className:t.reviewed?`path-name is-reviewed`:`path-name`,children:r})]}),(0,O.jsx)(`span`,{className:`tag tag-file-${t.status}`,children:Mu[t.status]}),t.binary&&(0,O.jsx)(`span`,{className:`tag`,children:`Binaire`}),(0,O.jsx)(`span`,{className:`spacer`}),qd(e,t.path).map(({severity:e,count:t})=>(0,O.jsx)(yd,{severity:e,count:t,title:`${Yu(e,t)} dans ce fichier`},e)),(0,O.jsxs)(`span`,{className:`file-row-counts mono`,children:[(0,O.jsxs)(`span`,{className:`count-add`,children:[`+`,t.additions]}),(0,O.jsxs)(`span`,{className:`count-del`,children:[`−`,t.deletions]})]}),(0,O.jsx)(`span`,{className:`file-row-state${t.reviewed?` is-reviewed`:``}`,children:t.reviewed?`Revu`:`À revoir`})]},t.path)})]})]})}var Qd=1e-6,$d=1;function ef(e,t,n){let r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x);return r>Qd?1:r<-1e-6?-1:0}function tf(e,t,n){return n.x>=Math.min(e.x,t.x)-Qd&&n.x<=Math.max(e.x,t.x)+Qd&&n.y>=Math.min(e.y,t.y)-Qd&&n.y<=Math.max(e.y,t.y)+Qd}function nf(e,t,n,r){return ef(e,t,n)*ef(e,t,r)<0&&ef(n,r,e)*ef(n,r,t)<0}function rf(e,t,n,r){let i=ef(e,t,n),a=ef(e,t,r),o=ef(n,r,e),s=ef(n,r,t);return i*a<0&&o*s<0||i===0&&tf(e,t,n)||a===0&&tf(e,t,r)||o===0&&tf(n,r,e)||s===0&&tf(n,r,t)}function af(e,t,n,r=$d){let i=n.x+r,a=n.x+n.width-r,o=n.y+r,s=n.y+n.height-r;if(i>=a||o>=s)return!1;let c=t.x-e.x,l=t.y-e.y,u=0,d=1;for(let[t,n]of[[-c,e.x-i],[c,a-e.x],[-l,e.y-o],[l,s-e.y]]){if(t===0){if(n<=0)return!1;continue}let e=n/t;if(t<0){if(e>d)return!1;e>u&&(u=e)}else{if(e<u)return!1;e<d&&(d=e)}}return d-u>Qd}function of(e){let t=[];for(let n=1;n<e.length;n++){let[r,i]=[e[n-1],e[n]];(Math.abs(r.x-i.x)>Qd||Math.abs(r.y-i.y)>Qd)&&t.push([r,i])}return t}function sf(e,t){let n=t.map(e=>of(e.points)),r=[];for(let e=0;e<t.length;e++)for(let i=e+1;i<t.length;i++){let a=t[e],o=t[i],s=a.u===o.u||a.u===o.v||a.v===o.u||a.v===o.v?nf:rf;n[e].some(([e,t])=>n[i].some(([n,r])=>s(e,t,n,r)))&&r.push([e,i])}let i=[];return t.forEach((t,r)=>{e.forEach((e,a)=>{a!==t.u&&a!==t.v&&n[r].some(([t,n])=>af(t,n,e))&&i.push({link:r,node:a})})}),{crossings:r,overlaps:i}}function cf(e){return e.crossings.length+e.overlaps.length}function lf(e){let t=e.nodes.map(e=>e.id),n=new Set(t),r=new Map(t.map(e=>[e,[]])),i=new Map(t.map(e=>[e,[]])),a=[];for(let t of e.links)n.has(t.from)&&n.has(t.to)&&(t.from===t.to?a.push({kind:`self_loop`,node:t.from}):(r.get(t.to).push(t.from),i.get(t.from).push(t.to)));let o=t.filter(e=>r.get(e).length===0);o.length===0&&t.length>0&&a.push({kind:`no_root`}),o.length>1&&a.push({kind:`several_roots`,roots:o});for(let e of t){let t=r.get(e);t.length>1&&a.push({kind:`several_parents`,node:e,parents:t})}let s=new Map(t.map(e=>[e,0])),c=[],l=e=>{s.set(e,1),c.push(e);for(let t of i.get(e))s.get(t)===1?a.push({kind:`cycle`,nodes:[...c.slice(c.indexOf(t)),t]}):s.get(t)===0&&l(t);c.pop(),s.set(e,2)};for(let e of[...o,...t])s.get(e)===0&&l(e);if(o.length===1){let e=new Set([o[0]]),n=[o[0]];for(;n.length>0;)for(let t of i.get(n.shift()))e.has(t)||(e.add(t),n.push(t));let r=t.filter(t=>!e.has(t));r.length>0&&a.push({kind:`unreachable`,root:o[0],nodes:r})}return a}var uf=.6,df=.56;function ff(e,t){return[...e].length*t.size*(t.mono?uf:df)}var pf={size:12,weight:400,mono:!0},mf={size:12.5,weight:400,mono:!1},hf={size:12.5,weight:500,mono:!1},gf={size:11.5,weight:500,mono:!1},J={size:11,weight:400,mono:!1},_f={size:10.5,weight:400,mono:!1},vf={size:10.5,weight:600,mono:!1};function yf(e){return e.shape===`decision`?gf:e.status===`missing`?hf:e.location?pf:mf}function bf(e){return e.location!==null&&e.shape!==`decision`}function xf(e){return e.status===`missing`&&e.shape!==`decision`&&e.detail!==null&&e.detail!==``}function Sf(e,t){let n=t(e.label,yf(e));if(e.shape===`decision`){let e=Math.max(84,Math.ceil(n+36));return{width:e,height:e}}let r=xf(e)?t(e.detail,J):0,i=Math.max(n,r),a=(bf(e)?22:0)+(e.location?14:0);return e.shape===`pill`?{width:Math.max(80,Math.ceil(i+48+a)),height:r>0?52:40}:{width:Math.max(140,Math.ceil(i+32+a)),height:r>0?52:44}}var Cf=40,wf=36,Tf=18,Ef=12,Df=36,Of=24,kf=16,Af=14,jf=30,Mf=14,Nf=14,Pf=8,Ff=8,If=60,Lf=40,Rf=14,zf=6,Bf=48,Vf=16,Hf=8,Uf=2e4,Wf=8,Y=6,Gf=12,Kf=1e3,qf=.1,Jf=4,Yf=2;function Xf(e){return{x:e.x+e.width,y:e.y+e.height/2}}function Zf(e){return{x:e.x,y:e.y+e.height/2}}function Qf(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function $f(e){let t=0,n=0;for(let{value:r,weight:i}of e)t+=r*i,n+=i;return n>0?t/n:null}function ep(e,t){let n=[];return e.forEach((e,r)=>{for(n.push({value:e,weight:t[r],count:1});n.length>1&&n[n.length-2].value>n[n.length-1].value;){let e=n.pop(),t=n[n.length-1],r=t.weight+e.weight;t.value=(t.value*t.weight+e.value*e.weight)/r,t.weight=r,t.count+=e.count}}),n.flatMap(e=>Array(e.count).fill(e.value))}function tp(e,t,n,r){let i=[],a=0;return e.forEach((e,n)=>{i.push(a),a+=e+(t[n]??0)}),ep(n.map((t,n)=>t-e[n]/2-i[n]),r).map((t,n)=>t+i[n]+e[n]/2)}function np(e,t){let n=[],r=0;return e.forEach((e,i)=>{n.push(r+e/2),r+=e+(t[i]??0)}),n}function rp(e,t){return e.map((e,n)=>({item:e,index:n,key:t(e)})).sort((e,t)=>e.key-t.key||e.index-t.index).map(({item:e})=>e)}function X(e,t){let n=Xf(e),r=n.x+Nf,i=e.y-Nf,a=e.x+e.width/2;return{from:t,to:t,points:[n,{x:r,y:n.y},{x:r,y:i},{x:a,y:i},{x:a,y:e.y}],labelPosition:{x:(a+r)/2,y:i-Pf},labelAnchor:`middle`,back:!0}}function ip(e){let t=[];for(let n of e){let e=t[t.length-1];if(!(e&&Math.abs(e.x-n.x)<1e-6&&Math.abs(e.y-n.y)<1e-6)){if(t.length>=2){let r=t[t.length-2],i=(e.x-r.x)*(n.y-r.y)-(e.y-r.y)*(n.x-r.x);Math.abs(i)<1e-6&&t.pop()}t.push(n)}}return t}function ap(e){let t=Math.max(0,Math.floor((e.length-1)/2)),n=e[t],r=e[Math.min(t+1,e.length-1)];return{x:(n.x+r.x)/2,y:(n.y+r.y)/2}}function op(e){if(e.nodes.length===0)throw Error(`Le schéma « ${e.title} » ne contient aucun nœud.`);let t=new Map;return e.nodes.forEach((n,r)=>{if(t.has(n.id))throw Error(`Le nœud « ${n.id} » apparaît deux fois dans le schéma « ${e.title} ».`);t.set(n.id,r)}),{index:t,links:e.links.map(n=>{let r=t.get(n.from),i=t.get(n.to);if(r===void 0||i===void 0){let t=r===void 0?n.from:n.to;throw Error(`Le lien ${n.from} → ${n.to} référence le nœud « ${t} », absent du schéma « ${e.title} ».`)}return{u:r,v:i,label:n.label}})}}function sp(e,t){let n=cf(sf(e.boxes,e.links.map((e,n)=>({u:t[n].u,v:t[n].v,points:e.points})))),r=0;for(let t of e.links)for(let e=1;e<t.points.length;e++)r+=Math.abs(t.points[e].y-t.points[e-1].y);return{issues:n,stretch:r}}function cp(e,t){return e.issues<t.issues||e.issues===t.issues&&e.stretch<t.stretch-1e-6}function lp(e,t){let n=e[0],r=t(n);for(let i of e.slice(1)){let e=t(i);cp(e,r)&&(n=i,r=e)}let i=n.map(e=>[...e]);for(let e=0;e<Y&&r.issues>0;e++){let e=!1;for(let n of i)for(let a=0;a+1<n.length&&r.issues>0;a++){[n[a],n[a+1]]=[n[a+1],n[a]];let o=t(i);o.issues<r.issues?(r=o,e=!0):[n[a],n[a+1]]=[n[a+1],n[a]]}if(!e)break}return i}function up(e,t,n,r){let i=e.nodes.length,a=Array.from({length:i},()=>[]),o=Array(i).fill(0);n.forEach((e,t)=>{e.u!==e.v&&(a[e.u].push(t),o[e.v]++)});let s=Array(i).fill(0),c=Array(i).fill(-1),l=Array(n.length).fill(!1),u=0,d=[...e.nodes.keys()].filter(e=>o[e]===0).concat([...e.nodes.keys()]);for(let e of d){if(s[e]!==0)continue;s[e]=1,c[e]=u++;let t=[{node:e,next:0}];for(;t.length>0;){let e=t[t.length-1];if(e.next<a[e.node].length){let r=a[e.node][e.next++],i=n[r].v;s[i]===1?l[r]=!0:s[i]===0&&(s[i]=1,c[i]=u++,t.push({node:i,next:0}))}else s[e.node]=2,t.pop()}}let f=Array.from({length:i},()=>[]),p=Array.from({length:i},()=>[]),m=Array(i).fill(!1);n.forEach((e,t)=>{e.u===e.v||l[t]?(m[e.u]=!0,m[e.v]=!0):(f[e.u].includes(e.v)||f[e.u].push(e.v),p[e.v].includes(e.u)||p[e.v].push(e.u))});let h=e=>{let t=[];for(let n=e;;n=f[n][0]){if(p[n].length!==1||m[n]||f[n].length>1)return null;if(t.push(n),f[n].length===0)return t}},g=Array.from({length:i},()=>[]),_=Array(i).fill(!1);for(let e=0;e<i;e++){let t=f[e],n=null;for(let e=1;e<t.length&&n===null;e++)n=h(t[e]);if(n===null&&t.length===1&&p[e].length>0&&f[t[0]].length===0&&(n=h(t[0])),n!==null){g[e]=n;for(let e of n)_[e]=!0}}for(let e=0;e<i;e++)_[e]&&(g[e]=[]);let v=[...e.nodes.keys()].filter(e=>!_[e]),y=n.map((e,t)=>({...e,k:t})).filter(e=>e.u!==e.v&&!l[e.k]&&!_[e.v]),b=Array.from({length:i},()=>[]),x=Array.from({length:i},()=>[]);for(let e of y)x[e.u].push(e.v),b[e.v].push(e.u);let S=Array(i).fill(0),C=b.map(e=>e.length),w=v.filter(e=>C[e]===0);for(;w.length>0;){w.sort((e,t)=>c[e]-c[t]);let e=w.shift();for(let t of x[e])S[t]=Math.max(S[t],S[e]+1),--C[t]===0&&w.push(t)}for(let e of v)b[e].length===0&&x[e].length>0&&(S[e]=Math.min(...x[e].map(e=>S[e]))-1);let T=Math.max(...v.map(e=>S[e]))+1;g.forEach((e,t)=>e.forEach(e=>S[e]=S[t]));let ee=e=>g[e].reduce((e,n)=>e+Df+t[n].height,t[e].height),E=e.nodes.map((e,n)=>({node:n,rank:S[n],width:t[n].width,height:ee(n),above:t[n].height/2})),te=new Map;for(let e of y){let t=[e.u];for(let n=S[e.u]+1;n<S[e.v];n++)E.push({node:null,rank:n,width:0,height:0,above:0}),t.push(E.length-1);t.push(e.v),te.set(e.k,t)}let D=E.map(()=>[]),O=E.map(()=>[]);for(let e of te.values())for(let t=1;t<e.length;t++)O[e[t-1]].push(e[t]),D[e[t]].push(e[t-1]);let k=Array.from({length:T},()=>[]);rp(v,e=>c[e]).forEach(e=>k[S[e]].push(e));for(let e=i;e<E.length;e++)k[E[e].rank].push(e);let ne=Array(E.length).fill(0),re=()=>k.forEach(e=>e.forEach((e,t)=>ne[e]=t));re();let ie=(e,t)=>{k[e]=rp(k[e],e=>{let n=t[e];return n.length>0?n.reduce((e,t)=>e+ne[t],0)/n.length:ne[e]}),k[e].forEach((e,t)=>ne[e]=t)},ae=[k.map(e=>[...e])];for(let e=0;e<Wf;e++){if(e%2==0)for(let e=1;e<T;e++)ie(e,D);else for(let e=T-2;e>=0;e--)ie(e,O);ae.push(k.map(e=>[...e]))}let oe=a=>{k=a.map(e=>[...e]),re();let o=new Set,s=new Set;for(let e=1;e<T;e++){let t=-1;for(let n of k[e]){let e=[...new Set(D[n])].sort((e,t)=>ne[e]-ne[t]);if(e.length===0)continue;let r=e[Math.floor((e.length-1)/2)];!s.has(r)&&ne[r]>t&&(s.add(r),o.add(`${r}>${n}`),t=ne[r])}}let c=(e,t)=>o.has(`${e}>${t}`)||o.has(`${t}>${e}`)?Kf:1,u=e=>E[e].above,d=e=>E[e].height-E[e].above,f=e=>E[e].height/2-E[e].above,p=e=>e.slice(0,-1).map((t,n)=>E[t].node===null||E[e[n+1]].node===null?Tf:wf),m=Array(E.length).fill(0);for(let e of k)np(e.map(e=>E[e].height),p(e)).forEach((t,n)=>m[e[n]]=t-f(e[n]));for(let e=0;e<Gf;e++){let t=e===11?`both`:e%2==0?`down`:`up`,n=t===`up`?[...k.keys()].reverse():[...k.keys()];for(let e of n){let n=k[e],r=[],i=[];for(let e of n){let n=(t===`down`?D[e]:t===`up`?O[e]:[...D[e],...O[e]]).map(t=>({value:m[t],weight:c(e,t)})),a=$f(n);r.push((a??m[e])+f(e)),i.push(a===null?qf:n.reduce((e,t)=>e+t.weight,0))}tp(n.map(e=>E[e].height),p(n),r,i).forEach((e,t)=>m[n[t]]=e-f(n[t]))}}for(let e=1;e<T;e++){let t=k[e],n=p(t);t.forEach((e,r)=>{let i=D[e].find(t=>o.has(`${t}>${e}`));if(!(i===void 0||Math.abs(m[i]-m[e])>Jf)){m[e]=m[i];for(let e=r+1;e<t.length;e++){let r=m[t[e-1]]+d(t[e-1])+n[e-1]+u(t[e]);m[t[e]]<r&&(m[t[e]]=r)}for(let e=r-1;e>=0;e--){let r=m[t[e+1]]-u(t[e+1])-n[e]-d(t[e]);m[t[e]]>r&&(m[t[e]]=r)}}})}let h=Array(i).fill(0);for(let e of v){h[e]=m[e]-t[e].height/2;let n=h[e]+t[e].height;for(let r of g[e])h[r]=n+Df,n=h[r]+t[r].height}let b=(e,t)=>Math.abs(m[e]-m[t])>=Yf,x=Array.from({length:T},()=>[]),C=new Map;for(let e of te.values())for(let t=1;t<e.length;t++){let[n,r]=[e[t-1],e[t]];if(!b(n,r))continue;x[E[n].rank].includes(n)||x[E[n].rank].push(n);let i=C.get(n)??[];i.includes(r)||i.push(r),C.set(n,i)}let w=e=>{let t=[m[e],...C.get(e).map(e=>m[e])];return[Math.min(...t),Math.max(...t)]},ee=(e,[t,n])=>e>t+Yf&&e<n-Yf,ie=(e,t)=>{let n=C.get(t);return C.get(e).filter(e=>!n.includes(e)&&ee(m[e],w(t))).length+ +!!ee(m[t],w(e))};x.forEach((e,t)=>{let n=[];for(let t of rp(e,e=>m[e])){let e=n.length,r=1/0;for(let i=n.length;i>=0;i--){let a=n.reduce((e,n,r)=>e+(r<i?ie(n,t):ie(t,n)),0);a<r&&(r=a,e=i)}n.splice(e,0,t)}x[t]=n});let ae=(e,t)=>(x[e].indexOf(t)+1)/(x[e].length+1),oe=x.map(e=>Math.max(Cf,(e.length+1)*Ef));for(let e of y){if(!e.label)continue;let t=te.get(e.k),n=t[t.length-2],i=E[n].rank,a=r(e.label,_f),o=b(n,e.v)?(a+Pf+Ff)/(1-ae(i,n)):a+16;oe[i]=Math.max(oe[i],o)}let se=Array.from({length:T+1},()=>[]);for(let e of te.values())for(let t=1;t<e.length;t++){let[n,r]=[e[t-1],e[t]];se[E[n].rank+1].push([Math.min(m[n],m[r]),Math.max(m[n],m[r])])}n.forEach((e,t)=>{e.u===e.v?se[S[e.u]+1].push([h[e.u]-Nf,m[e.u]]):l[t]&&(se[S[e.u]+1].push([m[e.u],1/0]),se[S[e.v]].push([m[e.v],1/0]))});let ce=(e,t,n)=>se[e].some(([e,r])=>e-kf<n&&r+kf>t),le=e.nodes.map((e,i)=>{let a=t[i].width/2;if(!_[i])return{rank:S[i],top:h[i],bottom:h[i]+t[i].height,left:a,right:a,hung:!1};let o=n.filter(e=>e.v===i&&e.label).map(e=>Pf+r(e.label,_f)+Ff);return{rank:S[i],top:h[i]-Df,bottom:h[i]+t[i].height,left:a,right:Math.max(a,...o),hung:!0}}),A=k.map(e=>Math.max(0,...e.map(e=>E[e].width/2))),ue=[...A];for(let e of le)e.hung&&(ce(e.rank,e.top,e.bottom)&&(A[e.rank]=Math.max(A[e.rank],e.left)),ce(e.rank+1,e.top,e.bottom)&&(ue[e.rank]=Math.max(ue[e.rank],e.right)));let de=Array.from({length:T},()=>[]);le.forEach(e=>de[e.rank].push(e));let fe=[];for(let e=0;e<T;e++){let t=e===0?A[0]:fe[e-1]+ue[e-1]+oe[e-1]+A[e];for(let n of de[e])for(let r=0;r<e;r++)for(let e of de[r])(n.hung||e.hung)&&(n.top>=e.bottom+kf||e.top>=n.bottom+kf||(t=Math.max(t,fe[r]+e.right+Of+n.left)));fe.push(t)}let pe=e=>fe[e]-A[e],me=e=>fe[e]+ue[e],he=e.nodes.map((e,n)=>({x:fe[S[n]]-t[n].width/2,y:h[n],width:t[n].width,height:t[n].height})),ge=Math.max(...he.map(e=>e.y+e.height)),_e=0;return{boxes:he,links:n.map((t,n)=>{let r=e.nodes[t.u].id,i=e.nodes[t.v].id;if(t.u===t.v)return X(he[t.u],r);if(l[n]){let e=Xf(he[t.u]),n=Zf(he[t.v]),a=me(S[t.u])+Af,o=pe(S[t.v])-Af,s=ge+jf+Mf*_e++;return{from:r,to:i,points:[e,{x:a,y:e.y},{x:a,y:s},{x:o,y:s},{x:o,y:n.y},n],labelPosition:{x:(a+o)/2,y:s-Pf},labelAnchor:`middle`,back:!0}}if(_[t.v]){let e=fe[S[t.v]],n=he[t.u].y+he[t.u].height,a=he[t.v].y;return{from:r,to:i,points:[{x:e,y:n},{x:e,y:a}],labelPosition:{x:e+Pf,y:(n+a)/2},labelAnchor:`start`,back:!1}}let a=te.get(n),o=[Xf(he[t.u])],s=o[0],c=`middle`;for(let e=1;e<a.length;e++){let t=a[e-1],n=a[e],r=o[o.length-1],i=E[n].node!==null,l=i?Zf(he[n]):{x:pe(E[n].rank),y:m[n]};if(b(t,n)){let e=E[t].rank,n=me(e)+oe[e]*ae(e,t);o.push({x:n,y:r.y},{x:n,y:l.y}),s={x:n+Pf,y:(r.y+l.y)/2},c=`start`}else s={x:(r.x+l.x)/2,y:l.y-Pf},c=`middle`;o.push(l),i||o.push({x:me(E[n].rank),y:m[n]})}return{from:r,to:i,points:ip(o),labelPosition:s,labelAnchor:c,back:!1}}),headers:[],center:null}};return oe(lp(ae,e=>sp(oe(e),n)))}function dp(e,t,n,r){if(e.layers.length===0)throw Error(`Le schéma en couches « ${e.title} » ne déclare aucune couche.`);let i=e.nodes.map(t=>{if(t.layer===null)throw Error(`Le nœud « ${t.id} » n'a pas de couche alors que le schéma « ${e.title} » est en couches.`);let n=e.layers.indexOf(t.layer);if(n===-1)throw Error(`Le nœud « ${t.id} » est dans la couche « ${t.layer} », absente des couches déclarées (${e.layers.join(`, `)}).`);return n}),a=e.layers.length,o=e.layers.map((e,n)=>Math.max(180,Math.ceil(r(e.toUpperCase(),vf)),...t.filter((e,t)=>i[t]===n).map(e=>e.width))),s=e.nodes.map((e,n)=>e.shape===`box`?o[i[n]]:t[n].width),c=t.map(e=>e.height),l=e.nodes.map(()=>[]);for(let e of n){if(e.u===e.v)continue;let t=i[e.u]===i[e.v]?(c[e.u]+c[e.v])/2+wf:0;l[e.u].push({other:e.v,delta:-t}),l[e.v].push({other:e.u,delta:t})}let u=e.layers.map((t,n)=>[...e.nodes.keys()].filter(e=>i[e]===n)),d=e=>e.slice(0,-1).map(()=>wf),f=Array(e.nodes.length).fill(0),p=e=>np(u[e].map(e=>c[e]),d(u[e])).forEach((t,n)=>f[u[e][n]]=t);u.forEach((e,t)=>p(t));let m=e=>{let t=l[e].map(({other:e,delta:t})=>({value:f[e]+t,weight:1}));return{mean:$f(t),weight:t.length}},h=[u.map(e=>[...e])];for(let e=0;e<Wf;e++){let t=e%2==0?[...u.keys()]:[...u.keys()].reverse();for(let e of t)u[e]=rp(u[e],e=>m(e).mean??f[e]),p(e);h.push(u.map(e=>[...e]))}let g=t=>{u=t.map(e=>[...e]),u.forEach((e,t)=>p(t));for(let e=0;e<Gf;e++){let t=e%2==0?[...u.keys()]:[...u.keys()].reverse();for(let e of t){let t=u[e],n=t.map(m);tp(t.map(e=>c[e]),d(t),n.map((e,n)=>e.mean??f[t[n]]),n.map(e=>e.mean===null?qf:e.weight)).forEach((e,n)=>f[t[n]]=e)}}let r=[],l=0;for(let e=0;e<a;e++)r.push(l),l+=o[e]+If;let h=e.nodes.map((e,t)=>({x:r[i[t]]+(o[i[t]]-s[t])/2,y:f[t]-c[t]/2,width:s[t],height:c[t]})),g=Math.min(...h.map(e=>e.y)),_=e.layers.map((e,t)=>({label:e,x:r[t],y:g-Lf,width:o[t]})),v=(e,t)=>{let n=u[e].map(e=>h[e]),r=[n[0].y-wf/2,...n.slice(1).map((e,t)=>(n[t].y+n[t].height+e.y)/2)];return r.push(n[n.length-1].y+n[n.length-1].height+wf/2),rp(r,e=>Math.abs(e-t))[0]};return{boxes:h,links:n.map(t=>{let n=e.nodes[t.u].id,a=e.nodes[t.v].id;if(t.u===t.v)return X(h[t.u],n);let s=h[t.u],c=h[t.v],l;if(i[t.u]===i[t.v]){let e=i[t.u],[n,a]=s.y<=c.y?[t.u,t.v]:[t.v,t.u],d=u[e].indexOf(a)-u[e].indexOf(n)>1,f=h[n],p=h[a];if(d){let t=r[e]+o[e]+Af;l=[Xf(f),{x:t,y:f.y+f.height/2},{x:t,y:p.y+p.height/2},Xf(p)]}else l=[{x:f.x+f.width/2,y:f.y+f.height},{x:p.x+p.width/2,y:p.y}];n!==t.u&&l.reverse()}else{let[e,n]=i[t.u]<i[t.v]?[t.u,t.v]:[t.v,t.u],a=Zf(h[n]);l=[Xf(h[e])];for(let t=i[e]+1;t<i[n];t++){let e=l[l.length-1],n=r[t],i=r[t]+o[t],s=t=>e.y+(a.y-e.y)*(t-e.x)/(a.x-e.x),c=Math.min(s(n),s(i)),d=Math.max(s(n),s(i));if(u[t].some(e=>h[e].y-zf<d&&h[e].y+h[e].height+zf>c)){let e=v(t,s((n+i)/2));l.push({x:n,y:e},{x:i,y:e})}}l.push(a),e!==t.u&&l.reverse()}let d=ap(l);return{from:n,to:a,points:l,labelPosition:{x:d.x,y:d.y-Pf},labelAnchor:`middle`,back:!1}}),headers:_,center:null}};return g(lp(h,e=>sp(g(e),n)))}function fp(e,t,n){let r=Qf(e),i=n.x-r.x,a=n.y-r.y;if(i===0&&a===0)return r;let o=e.width/2,s=e.height/2,c;if(t===`decision`)c=1/(Math.abs(i)/o+Math.abs(a)/s);else if(c=Math.min(i===0?1/0:o/Math.abs(i),a===0?1/0:s/Math.abs(a)),t===`pill`){let e=s,t=o-e;if(Math.abs(c*i)>t){let n=Math.hypot(i,a),r=i/n,o=Math.sign(i)*t,s=o*r;c=(s+Math.sqrt(Math.max(0,s*s-o*o+e*e)))/n}}return{x:r.x+i*c,y:r.y+a*c}}function pp(e,t,n){return e.x<t.x+t.width+n&&t.x<e.x+e.width+n&&e.y<t.y+t.height+n&&t.y<e.y+e.height+n}function mp(e){let t=e=>e.map(e=>`« ${e} »`).join(`, `);switch(e.kind){case`self_loop`:return`le nœud « ${e.node} » est relié à lui-même`;case`no_root`:return`aucun nœud n'est sans lien entrant, il n'y a pas de racine`;case`several_roots`:return`plusieurs nœuds sans lien entrant (${t(e.roots)}) au lieu d'une seule racine`;case`several_parents`:return`le nœud « ${e.node} » a plusieurs parents (${t(e.parents)})`;case`cycle`:return`cycle ${e.nodes.join(` → `)}`;case`unreachable`:return`${t(e.nodes)} inaccessible(s) depuis la racine « ${e.root} »`}}function hp(e,t,n){let r=lf(e);if(r.length>0)throw Error(`La carte mentale « ${e.title} » n'est pas un arbre : ${r.map(mp).join(` ; `)}.`);let i=e.nodes.length,a=Array(i).fill(!1),o=Array.from({length:i},()=>[]);for(let e of n)a[e.v]=!0,o[e.u].push(e.v);let s=a.indexOf(!1),c=o,l=Array(i).fill(0),u=[],d=[s];for(;d.length>0;){let e=d.shift();u.push(e);for(let t of c[e])l[t]=l[e]+1,d.push(t)}let f=Array(i).fill(1);for(let e of[...u].reverse())for(let t of c[e])f[e]+=f[t];let p=Array(i).fill(0),m=(e,t,n)=>{let r=c[e].reduce((e,t)=>e+f[t],0),i=t;for(let a of c[e]){let e=(n-t)*f[a]/r;p[a]=i+e/2,m(a,i,i+e),i+=e}};if(c[s].length>0){let e=2*Math.PI*f[c[s][0]]/(f[s]-1);m(s,-e/2,2*Math.PI-e/2)}let h=(e,n)=>Math.min(Math.abs(Math.cos(n))<1e-9?1/0:t[e].width/2/Math.abs(Math.cos(n)),Math.abs(Math.sin(n))<1e-9?1/0:t[e].height/2/Math.abs(Math.sin(n))),g=Array(i).fill(0);for(let e of u)for(let t of c[e])g[t]=g[e]+h(e,p[t])+h(t,p[t])+Bf;let _=Array(i).fill(0);u.forEach((e,t)=>_[e]=t);let v=e=>{g[e]+=Hf;for(let t of c[e])v(t)},y=()=>e.nodes.map((e,n)=>{let r=g[n]*Math.cos(p[n]),i=g[n]*Math.sin(p[n]);return{x:r-t[n].width/2,y:i-t[n].height/2,width:t[n].width,height:t[n].height}}),b=y();for(let t=0;;t++){let n=null;for(let e=0;e<i&&n===null;e++)for(let t=e+1;t<i;t++)if(pp(b[e],b[t],Vf)){n=l[e]>l[t]||l[e]===l[t]&&_[e]>_[t]?e:t;break}if(n===null)break;if(t>=Uf)throw Error(`La carte mentale « ${e.title} » n'a pas pu être placée sans chevauchement.`);v(n),b=y()}let x=n.map(t=>{let n=e.nodes[t.u].id,r=e.nodes[t.v].id;if(t.u===t.v)return X(b[t.u],n);let i=fp(b[t.u],e.nodes[t.u].shape,Qf(b[t.v])),a=fp(b[t.v],e.nodes[t.v].shape,Qf(b[t.u]));return{from:n,to:r,points:[i,a],labelPosition:{x:(i.x+a.x)/2,y:(i.y+a.y)/2-Pf},labelAnchor:`middle`,back:!1}});return{boxes:b,links:x,headers:[],center:Qf(b[s])}}function gp(e,t){let n=new Map;t.forEach((t,r)=>{if(!e.links[r].label)return;let i=`${t.from}\u0000${t.to}`,a=n.get(i)??0;n.set(i,a+1),t.labelPosition={x:t.labelPosition.x,y:t.labelPosition.y-a*(_f.size+4)}})}function _p(e,t,n){gp(e,t.links);let r=[],i=[];for(let e of t.boxes)r.push(e.x,e.x+e.width),i.push(e.y,e.y+e.height);t.links.forEach((t,a)=>{for(let e of t.points)r.push(e.x),i.push(e.y);let o=e.links[a].label;if(o){let e=n(o,_f),a=_f.size*.7,s=t.labelAnchor===`start`?t.labelPosition.x:t.labelPosition.x-e/2;r.push(s,s+e),i.push(t.labelPosition.y-a,t.labelPosition.y+a)}});for(let e of t.headers)r.push(e.x,e.x+e.width),i.push(e.y,e.y+Rf);let a=Math.min(...r),o=Math.max(...r),s=Math.min(...i),c=Math.max(...i);if(t.center){let e=Math.max(t.center.x-a,o-t.center.x),n=Math.max(t.center.y-s,c-t.center.y);a=t.center.x-e,o=t.center.x+e,s=t.center.y-n,c=t.center.y+n}let l=24-a,u=24-s,d=e=>({x:e.x+l,y:e.y+u});return{nodes:t.boxes.map((t,n)=>({id:e.nodes[n].id,x:t.x+l,y:t.y+u,width:t.width,height:t.height})),links:t.links.map(e=>({...e,points:e.points.map(d),labelPosition:d(e.labelPosition)})),headers:t.headers.map(e=>({...e,x:e.x+l,y:e.y+u})),width:Math.ceil(o-a+48),height:Math.ceil(c-s+48)}}function vp(e,t=ff){let{links:n}=op(e),r=e.nodes.map(e=>Sf(e,t));switch(e.kind){case`flow`:return _p(e,up(e,r,n,t),t);case`layers`:return _p(e,dp(e,r,n,t),t);case`mindmap`:return _p(e,hp(e,r,n),t)}}function yp(e,t=vp(e)){let n=new Map(e.nodes.map((e,t)=>[e.id,t])),r=e.links.map((e,t)=>({index:t,from:e.from,to:e.to})),i=sf(t.nodes,t.links.map(e=>({u:n.get(e.from),v:n.get(e.to),points:e.points})));return{crossings:i.crossings.map(([e,t])=>({a:r[e],b:r[t]})),nodeOverlaps:i.overlaps.map(({link:t,node:n})=>({link:r[t],node:e.nodes[n].id}))}}var bp={layers:`network`,flow:`workflow`,mindmap:`brain-circuit`};function xp(e){return e.location?/\.(spec|test)\./.test(e.location.path)?`flask-conical`:`file-code`:null}function Sp(e){let t=new Map;for(let n of e.findings){if(n.status!==`open`||!n.location)continue;let e=t.get(n.location.path);(!e||Ol(n.severity,e)<0)&&t.set(n.location.path,n.severity)}return t}function Cp(e,t){let n=new Set(e.flatMap(e=>e.location&&t.has(e.location.path)?[t.get(e.location.path)]:[]));return Gc.filter(e=>n.has(e))}function wp(e){return Qc.filter(t=>e.some(e=>e.status===t))}var Tp=6;function Ep(e){if(e.length===0)return``;let t=[`M ${e[0].x} ${e[0].y}`];for(let n=1;n<e.length-1;n++){let r=e[n-1],i=e[n],a=e[n+1],o=Math.hypot(i.x-r.x,i.y-r.y),s=Math.hypot(a.x-i.x,a.y-i.y),c=Math.min(Tp,o/2,s/2);if(c<=0){t.push(`L ${i.x} ${i.y}`);continue}let l={x:i.x-(i.x-r.x)/o*c,y:i.y-(i.y-r.y)/o*c},u={x:i.x+(a.x-i.x)/s*c,y:i.y+(a.y-i.y)/s*c};t.push(`L ${l.x} ${l.y}`,`Q ${i.x} ${i.y} ${u.x} ${u.y}`)}let n=e[e.length-1];return t.push(`L ${n.x} ${n.y}`),t.join(` `)}function Dp(e,t){return`${e/2},0 ${e},${t/2} ${e/2},${t} 0,${t/2}`}var Op=.2,kp=.85,Ap=1.25,jp=320,Mp=620;function Np(e){return Math.min(3,Math.max(Op,e))}var Pp=1.5;function Fp(e,t,n,r=1){return Math.max(kp,Math.min(r,t/e.width,n/e.height))}function Ip(e,t){let n=Fp(e,t,1/0);return Math.round(Math.min(Mp,Math.max(jp,e.height*n)))}function Lp(e,t,n,r=1){let i=Fp(e,t,n,r),a=t/i,o=n/i;return{x:e.width<=a?(e.width-a)/2:0,y:e.height<=o?(e.height-o)/2:0,scale:i}}function Rp(e,t,n,r){return e.width>n/t.scale+.5||e.height>r/t.scale+.5}function zp(e,t,n,r){let i=(e,t,n)=>{let r=Math.min(0,t-n),i=Math.max(0,t-n);return Math.min(i,Math.max(r,e))};return{x:i(e.x,t.width,n/e.scale),y:i(e.y,t.height,r/e.scale),scale:e.scale}}function Bp(e,t,n){let r=Np(e.scale*t),i=e.x+n.x/e.scale,a=e.y+n.y/e.scale;return{x:i-n.x/r,y:a-n.y/r,scale:r}}function Vp(e,t,n){return{x:e.x-t/e.scale,y:e.y-n/e.scale,scale:e.scale}}function Hp(e,t,n){return`${e.x} ${e.y} ${t/e.scale} ${n/e.scale}`}function Up(e){let t;try{t=vp(e)}catch{return null}let n=yp(e,t);return n.crossings.length+n.nodeOverlaps.length}var Wp=`#3a4052`,Gp=3,Kp=1.1;function qp(e){try{return{layout:vp(e),error:null}}catch(e){return{layout:null,error:e.message}}}function Jp({analysis:e}){let[t,n]=(0,v.useState)(null),r=e.diagrams.find(e=>e.id===t)??e.diagrams[0],i=(0,v.useMemo)(()=>new Map(e.diagrams.map(e=>[e.id,Up(e)])),[e.diagrams]);return r?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`diagram-picker`,children:[e.diagrams.map(e=>{let t=e.id===r.id,a=i.get(e.id)??null;return(0,O.jsxs)(`button`,{type:`button`,className:`diagram-pick${t?` is-active`:``}`,"aria-pressed":t,onClick:()=>n(e.id),title:e.title,children:[(0,O.jsx)(U,{name:bp[e.kind],color:t?`#8b97ff`:`#646b7b`}),(0,O.jsx)(`span`,{className:`diagram-pick-title`,children:e.title}),a!==null&&a>0&&(0,O.jsx)(`span`,{className:`diagram-pick-issues`,title:`${a} croisement(s) de liens ou traversée(s) de nœud : l'agent doit revoir ce schéma`,children:`croisements`})]},e.id)}),(0,O.jsxs)(`span`,{className:`diagram-meta`,children:[`Dessiné par l'agent · `,Hu(r.updatedAt)]})]}),(0,O.jsx)(Yp,{analysis:e,diagram:r},r.id)]}):(0,O.jsxs)(`div`,{className:`card diagram-empty`,children:[(0,O.jsx)(`h2`,{className:`empty-title`,children:`Aucun schéma pour cette analyse`}),(0,O.jsxs)(`p`,{children:[`L'agent dessine les schémas avec l'outil `,(0,O.jsx)(`code`,{children:`set_diagram`}),` : périmètre d'impact en couches, flux de process ou carte mentale. Ils apparaîtront ici automatiquement.`]})]})}function Yp({analysis:e,diagram:t}){let n=(0,v.useMemo)(()=>qp(t),[t]);return n.error===null?(0,O.jsx)(Xp,{analysis:e,diagram:t,layout:n.layout}):(0,O.jsxs)(`div`,{className:`card diagram-error`,role:`alert`,children:[(0,O.jsx)(U,{name:`triangle-alert`,color:`#f0625a`,size:16}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`diagram-error-title`,children:`Ce schéma ne peut pas être affiché.`}),(0,O.jsx)(`p`,{className:`diagram-error-text`,children:n.error}),(0,O.jsx)(`p`,{className:`diagram-error-text`,children:`L'agent doit le corriger avec l'outil set_diagram.`})]})]})}function Xp({analysis:e,diagram:t,layout:n}){let r=(0,v.useRef)(null),i=(0,v.useRef)(null),[a,o]=(0,v.useState)({width:0,height:0}),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),d=a.width,f=d===0?0:s?a.height:Ip(n,d),[p,m]=(0,v.useState)(null),h=(0,v.useRef)(null),g=(0,v.useRef)(!1),_=(0,v.useMemo)(()=>Sp(e),[e]),y=(0,v.useMemo)(()=>new Map(n.nodes.map(e=>[e.id,e])),[n]),b=wp(t.nodes),x=Cp(t.nodes,_),S=`arrow-${t.id}`,C=t.kind===`flow`;(0,v.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>o({width:e.clientWidth,height:e.clientHeight}),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]),(0,v.useEffect)(()=>{let e=()=>{c(document.fullscreenElement!==null&&document.fullscreenElement===r.current),m(null)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let ee=async()=>{u(null);try{if(s){await document.exitFullscreen();return}let e=r.current;if(!e)return;if(!document.fullscreenEnabled)throw Error(`le navigateur n'autorise pas le plein écran sur cette page`);await e.requestFullscreen()}catch(e){u(`Plein écran impossible : ${e.message}`)}},E=`${n.width}x${n.height}@${d}x${f}${s?`:plein-ecran`:``}`,te=d>0?Lp(n,d,f,s?Pp:1):null,D=p&&p.key===E?p.viewport:te,k=e=>{D&&m({key:E,viewport:zp(e(D),n,d,f)})},ne=D!==null&&Rp(n,D,d,f),re=(0,v.useEffectEvent)(e=>{let t=i.current;if(!t)return;e.preventDefault();let n=t.getBoundingClientRect(),r=e.deltaY<0?Kp:1/Kp;k(t=>Bp(t,r,{x:e.clientX-n.left,y:e.clientY-n.top}))});(0,v.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>re(e);return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[]);let ie=e=>k(t=>Bp(t,e,{x:d/2,y:f/2})),ae=e=>{e.button===0&&D&&(h.current={x:e.clientX,y:e.clientY,origin:D,moved:!1,pointerId:e.pointerId},g.current=!1)},oe=e=>{let t=h.current;if(!t||t.pointerId!==e.pointerId)return;let r=e.clientX-t.x,i=e.clientY-t.y;if(!t.moved){if(Math.hypot(r,i)<Gp)return;t.moved=!0,e.currentTarget.setPointerCapture(e.pointerId)}m({key:E,viewport:zp(Vp(t.origin,r,i),n,d,f)})},se=e=>{let t=h.current;t&&t.pointerId===e.pointerId&&(g.current=t.moved,h.current=null)},ce=t=>{!g.current&&t.location&&T(w.review(e.id,t.location.path,t.location.line))};return(0,O.jsxs)(`section`,{ref:r,className:`card diagram-card${s?` is-fullscreen`:``}`,children:[(0,O.jsx)(`div`,{ref:i,className:`diagram-area`,style:s?void 0:{height:f||void 0},children:D&&(0,O.jsxs)(`svg`,{className:`diagram-svg`,width:d,height:f,viewBox:Hp(D,d,f),onPointerDown:ae,onPointerMove:oe,onPointerUp:se,onPointerCancel:se,role:`img`,"aria-label":t.title,children:[C&&(0,O.jsx)(`defs`,{children:(0,O.jsx)(`marker`,{id:S,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,O.jsx)(`path`,{d:`M 1 1 L 9 5 L 1 9`,fill:`none`,stroke:Wp,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),n.headers.map(e=>(0,O.jsx)(`text`,{className:`diagram-header`,x:e.x,y:e.y+7,dominantBaseline:`central`,children:e.label.toUpperCase()},e.label)),n.links.map((e,t)=>(0,O.jsx)(`path`,{className:`diagram-link`,d:Ep(e.points),stroke:Wp,markerEnd:C?`url(#${S})`:void 0},`link-${t}`)),n.links.map((e,n)=>{let r=t.links[n].label;return r?(0,O.jsx)(`text`,{className:`diagram-link-label`,x:e.labelPosition.x,y:e.labelPosition.y,textAnchor:e.labelAnchor,dominantBaseline:`central`,children:r},`label-${n}`):null}),t.nodes.map(e=>(0,O.jsx)(Zp,{node:e,box:y.get(e.id),severity:e.location?_.get(e.location.path)??null:null,onOpen:ce},e.id))]})}),(0,O.jsxs)(`div`,{className:`diagram-footer`,children:[(0,O.jsxs)(`div`,{className:`diagram-legend`,children:[b.map(e=>{let t=Bu[e];return(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch`,style:{background:t.fill??`transparent`,borderColor:t.stroke}}),t.label]},e)}),x.length>0&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-dots`,children:x.map(e=>(0,O.jsx)(`span`,{className:`legend-dot`,style:{background:Du[e].color},title:Du[e].label},e))}),x.length===1?`Constat ouvert (${Du[x[0]].label.toLowerCase()})`:`Constat ouvert (couleur de la gravité la plus haute)`]})]}),(0,O.jsx)(`span`,{className:`spacer`}),ne&&(0,O.jsxs)(`span`,{className:`diagram-hint`,children:[(0,O.jsx)(U,{name:`move`,color:`#646b7b`,size:12}),`Glisser pour parcourir le schéma`]}),(0,O.jsxs)(`div`,{className:`icon-button-group diagram-zoom`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Zoom arrière`,"aria-label":`Zoom arrière`,onClick:()=>ie(1/Ap),children:(0,O.jsx)(U,{name:`minus`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Zoom avant`,"aria-label":`Zoom avant`,onClick:()=>ie(Ap),children:(0,O.jsx)(U,{name:`plus`,color:`#9aa1b1`})}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary diagram-control`,title:`Recentrer et adapter le zoom`,onClick:()=>m(null),children:[(0,O.jsx)(U,{name:`focus`,color:`#9aa1b1`}),`Ajuster`]}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary diagram-control`,"aria-pressed":s,onClick:()=>void ee(),children:[(0,O.jsx)(U,{name:s?`minimize`:`maximize`,color:`#9aa1b1`}),s?`Quitter le plein écran`:`Plein écran`]})]})]}),l&&(0,O.jsx)(`p`,{className:`diagram-fullscreen-error`,role:`alert`,children:l})]})}function Zp({node:e,box:t,severity:n,onOpen:r}){let i=Bu[e.status],{width:a,height:o}=t,s=e.location!==null,c=e.status===`missing`,l=bf(e)?xp(e):null,u=xf(e),d=yf(e),f=e.shape===`pill`?20:16,p=l?f+22:a/2,m=u?o/2-8:o/2,h={className:`diagram-shape`,fill:i.fill??`transparent`,stroke:i.stroke,strokeWidth:c?1.5:1},g=[e.detail,e.location?`${e.location.path}${e.location.line?`:${e.location.line}`:``}`:null].filter(Boolean).join(`
67
- `);return(0,O.jsxs)(`g`,{className:`diagram-node${s?` is-clickable`:``}`,transform:`translate(${t.x} ${t.y})`,onClick:s?()=>r(e):void 0,onKeyDown:s?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e))}:void 0,tabIndex:s?0:void 0,role:s?`link`:void 0,children:[g&&(0,O.jsx)(`title`,{children:g}),e.shape===`decision`?(0,O.jsx)(`polygon`,{points:Dp(a,o),strokeLinejoin:`round`,...h}):(0,O.jsx)(`rect`,{width:a,height:o,rx:e.shape===`pill`?o/2:10,...h}),l&&(0,O.jsx)(`g`,{transform:`translate(${f} ${o/2-7})`,children:(0,O.jsx)(U,{name:l,size:14,color:i.accent})}),(0,O.jsx)(`text`,{x:p,y:m,textAnchor:l?`start`:`middle`,dominantBaseline:`central`,fill:i.text,fontSize:d.size,fontWeight:d.weight,className:d.mono?`diagram-label mono`:`diagram-label`,children:e.label}),u&&(0,O.jsx)(`text`,{x:a/2,y:o/2+10,textAnchor:`middle`,dominantBaseline:`central`,fill:i.accent,fontSize:J.size,className:`diagram-label`,children:e.detail}),n&&(0,O.jsx)(`circle`,{cx:e.shape===`decision`?a-22:a-18,cy:o/2,r:3,fill:Du[n].color,children:(0,O.jsx)(`title`,{children:`Constat ${Du[n].label.toLowerCase()} ouvert sur ce fichier`})})]})}function Qp({analysis:e,finding:t}){return(0,O.jsxs)(`a`,{className:`finding-row is-${t.status}`,href:Kd(e,t),children:[(0,O.jsx)(md,{severity:t.severity}),(0,O.jsxs)(`span`,{className:`finding-row-text`,children:[(0,O.jsxs)(`span`,{className:`finding-row-title`,children:[t.title,(0,O.jsx)(vd,{kind:t.kind}),(0,O.jsx)(_d,{status:t.status})]}),(0,O.jsx)(`span`,{className:`finding-row-location mono`,children:ed(t,e.request)})]}),(0,O.jsx)(U,{name:`chevron-right`,color:`#646b7b`})]})}function $p(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function em({analysis:e}){let[t,n]=(0,v.useState)(new Set(Gc)),[r,i]=(0,v.useState)(new Set(qc)),a=kl(e.findings).filter(e=>t.has(e.severity)&&r.has(e.status));return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`filters`,children:[(0,O.jsxs)(`div`,{className:`filter-group`,role:`group`,"aria-label":`Filtrer par gravité`,children:[(0,O.jsx)(`span`,{className:`filter-label`,children:`Gravité`}),Gc.map(r=>{let i=e.findings.filter(e=>e.severity===r).length,a=t.has(r);return(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":a,className:`chip${a?` is-active`:``}`,style:a?{color:Du[r].color,background:Du[r].background}:void 0,title:`${W(i,`constat`)} de gravité « ${Du[r].label} », tous statuts confondus`,onClick:()=>n($p(t,r)),children:[Du[r].label,` `,(0,O.jsx)(`span`,{className:`chip-count`,children:i})]},r)})]}),(0,O.jsxs)(`div`,{className:`filter-group`,role:`group`,"aria-label":`Filtrer par statut`,children:[(0,O.jsx)(`span`,{className:`filter-label`,children:`Statut`}),qc.map(t=>{let n=e.findings.filter(e=>e.status===t).length,a=r.has(t);return(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":a,className:`chip${a?` is-active is-neutral`:``}`,title:`${W(n,`constat`)} au statut « ${Au[t]} »`,onClick:()=>i($p(r,t)),children:[Au[t],` `,(0,O.jsx)(`span`,{className:`chip-count`,children:n})]},t)})]})]}),(0,O.jsx)(`section`,{className:`card list-card`,children:a.length===0?(0,O.jsx)(`p`,{className:`list-empty`,children:e.findings.length===0?`L'agent n'a relevé aucun constat.`:`Aucun constat ne correspond aux filtres.`}):a.map(t=>(0,O.jsx)(Qp,{analysis:e,finding:t},t.id))})]})}var tm={critical:`Critical`,major:`Major`,minor:`Minor`,trivial:`Trivial`},nm={approve:`Decision: Approve. The feature can be merged.`,request_changes:`Decision: Request changes. Rework the feature and address the points below.`,reject:`Decision: Reject. The feature is abandoned.`},rm=` `;function im(e){return e.split(`
68
- `).map(e=>e===``?``:`${rm}${e}`)}function am(e,t){return[`${rm}${e}`,`${rm}\`\`\``,...im(t),`${rm}\`\`\``]}function om(e){return e.mode===`branch`?`branch ${e.base}...${e.head}`:`working tree changes against HEAD`}function sm(e){let t=e.location;return t?`${t.path}:${jl(t.startLine,t.endLine)}`:null}function cm(e,t){let n=sm(t),r=t.kind===`requirement_gap`?`Missing requirement: ${t.title}`:t.title,i=`${e}. [${tm[t.severity]}] ${n?`${n} — `:``}${r}`;if(t.prompt!==null)return[i,...im(t.prompt)];let a=[i];return t.body.trim()!==``&&a.push(...im(t.body)),t.anchorText!==null&&a.push(...am(`Current lines:`,t.anchorText)),t.suggestion!==null&&a.push(...am(`Proposed replacement:`,t.suggestion)),a}function lm(e,t){let n=t.location?`${Ml(t.location)} — `:``,[r,...i]=t.text.split(`
69
- `);return[`${e}. [Reviewer note] ${n}${r}`,...i.map(e=>e===``?``:`${rm}${e}`)]}function um(e,t,n){let r=new Set(e.map(e=>e.id)),i=t.filter(e=>!r.has(e));if(i.length>0)throw Error(`Unknown ${n} id(s): ${i.join(`, `)}.`);let a=new Set(t);return e.filter(e=>a.has(e.id))}function dm(e,t){let n=kl(um(e.findings,t.findingIds,`finding`)),r=um(e.notes,t.noteIds,`note`),i=[`Review feedback on "${e.title}" (${om(e)}).`];if(e.overview!==null&&i.push(`Feature objective: ${e.overview.objective}`),t.decision!==null&&i.push(nm[t.decision]),i.push(``),n.length===0&&r.length===0)return i.push(`No points to address.`),i.join(`
70
- `);i.push(`Address the following points:`);let a=1;for(let e of n)i.push(``,...cm(a++,e));for(let e of r)i.push(``,...lm(a++,e));return i.join(`
71
- `)}function fm(e){return dm(e,{findingIds:e.findings.filter(e=>e.status===`open`).map(e=>e.id),noteIds:[],decision:null})}var pm=5;function mm({analysis:e}){let t=H(e=>e.copy),n=kl(e.findings.filter(e=>e.status===`open`)),r=Gc.map(e=>({severity:e,count:n.filter(t=>t.severity===e).length}));return(0,O.jsxs)(O.Fragment,{children:[e.overview&&(0,O.jsxs)(`section`,{className:`card overview-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`focus`,color:`#8b97ff`}),`Vue d'ensemble`]}),(0,O.jsx)(`h3`,{className:`overview-label`,children:`Objectif`}),(0,O.jsx)(`p`,{className:`overview-text`,children:e.overview.objective}),(0,O.jsx)(`h3`,{className:`overview-label`,children:`Approche`}),(0,O.jsx)(`p`,{className:`overview-text`,children:e.overview.approach}),e.overview.attentionPoints.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`h3`,{className:`overview-label`,children:`Points d'attention`}),(0,O.jsx)(`ul`,{className:`summary-list overview-points`,children:e.overview.attentionPoints.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))})]})]}),(0,O.jsxs)(`section`,{className:`card summary-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`sparkles`,color:`#b18cff`}),`Ce que l'agent a fait`]}),e.summary.length>0?(0,O.jsx)(`ul`,{className:`summary-list`,children:e.summary.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))}):(0,O.jsx)(`p`,{className:`empty-text`,children:`L'agent n'a pas encore rédigé de résumé (outil update_analysis).`})]}),e.request&&(0,O.jsxs)(`section`,{className:`card request-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Demande initiale`,e.request.source&&(0,O.jsx)(`span`,{className:`request-source mono`,children:e.request.source})]}),(0,O.jsx)(`p`,{className:`request-text`,children:e.request.text})]}),(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsx)(`h2`,{className:`section-title`,children:`Constats ouverts`}),(0,O.jsx)(`div`,{className:`pill-row`,title:`Constats ouverts par gravité, exigences manquantes comprises`,children:r.filter(({count:e})=>e>0).map(({severity:e,count:t})=>(0,O.jsx)(`span`,{className:`pill`,style:{color:Du[e].color,background:Du[e].background},children:qu(e,t)},e))}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary button-medium`,disabled:n.length===0,title:n.length===0?`Aucun constat ouvert à transmettre.`:`Tous les constats ouverts, du plus grave au moins grave.`,onClick:()=>void t(fm(e),`Prompt des constats ouverts copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]})]}),(0,O.jsxs)(`section`,{className:`card list-card`,children:[n.length===0?(0,O.jsx)(`p`,{className:`list-empty`,children:e.findings.length===0?`L'agent n'a relevé aucun constat.`:`Aucun constat ouvert : tous sont ignorés ou obsolètes.`}):n.slice(0,pm).map(t=>(0,O.jsx)(Qp,{analysis:e,finding:t},t.id)),e.findings.length>0&&(0,O.jsxs)(`a`,{className:`list-footer-link`,href:w.feature(e.id,`findings`),children:[`Voir les `,e.findings.length,` constats, tous statuts confondus`]})]})]})}var hm={summary:`Résumé`,files:`Fichiers`,findings:`Constats`,diagrams:`Schémas`};function gm(e,t){if(t===`files`)return{count:e.files.length,title:W(e.files.length,`fichier modifié`,`fichiers modifiés`)};if(t===`findings`){let t=e.findings.filter(e=>e.status===`open`).length;return{count:t,title:`${W(t,`constat ouvert`,`constats ouverts`)}, exigences manquantes comprises · ${e.findings.length} au total`}}return t===`diagrams`?{count:e.diagrams.length,title:W(e.diagrams.length,`schéma`)}:null}function _m(e){return e.mode===`branch`?`${Fu.branch} ${Qu(e)} vers ${Zu(e.base)}`:`${Fu.working_tree} par rapport à HEAD`}function vm({analysis:e,links:t,tab:n}){let r=K(e),i=Ud(e);return(0,O.jsxs)(`div`,{className:`page`,children:[(0,O.jsxs)(`div`,{className:`page-head`,children:[(0,O.jsxs)(`div`,{className:`page-head-text`,children:[(0,O.jsx)(`h1`,{className:`page-title`,children:e.title}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[(0,O.jsxs)(`span`,{children:[_m(e),` · produite `,Hu(e.snapshotAt),` · `,W(e.files.length,`fichier`)]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,r.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,r.deletions]})]})]}),(0,O.jsx)(`button`,{type:`button`,className:`button button-primary button-large`,disabled:i===null,title:i===null?`L'analyse ne contient aucun fichier modifié.`:void 0,onClick:()=>i&&T(w.review(e.id,i)),children:`Commencer la revue`})]}),t&&(0,O.jsx)(Pd,{analysisId:e.id,links:t}),(0,O.jsx)(`nav`,{className:`tabs`,"aria-label":`Sections de l'analyse`,children:b.map(t=>{let r=gm(e,t);return(0,O.jsxs)(`a`,{href:w.feature(e.id,t),className:`tab${t===n?` is-active`:``}`,title:r?.title,children:[hm[t],r!==null&&(0,O.jsx)(`span`,{className:`tab-count`,children:r.count})]},t)})}),(0,O.jsxs)(`div`,{className:`tab-panel`,children:[n===`summary`&&(0,O.jsx)(mm,{analysis:e}),n===`files`&&(0,O.jsx)(Zd,{analysis:e}),n===`findings`&&(0,O.jsx)(em,{analysis:e}),n===`diagrams`&&(0,O.jsx)(Jp,{analysis:e})]})]})}var ym={approve:{icon:`circle-check`,color:`#3fb950`,description:`La feature peut être fusionnée`},request_changes:{icon:`pencil`,color:`#e3a33b`,description:`L'agent reprend son travail`},reject:{icon:`circle-x`,color:`#f0625a`,description:`La feature est abandonnée`}};function bm(e){let t=kl(e.findings.filter(e=>e.status===`open`)).map(e=>({key:`f:${e.id}`,finding:e})),n=e.notes.filter(e=>e.question===null).map(e=>({key:`n:${e.id}`,note:e}));return[...t,...n]}function xm(e){let t=e.review;if(t.state===`submitted`){let n=new Set([...t.selectedFindingIds.map(e=>`f:${e}`),...t.selectedNoteIds.map(e=>`n:${e}`)]);return new Set(bm(e).map(e=>e.key).filter(e=>!n.has(e)))}let n=t.previousSubmission;return n?new Set([...n.excludedFindingIds.map(e=>`f:${e}`),...n.excludedNoteIds.map(e=>`n:${e}`)]):new Set}function Sm({analysis:e}){let t=H(e=>e.copy),n=H(e=>e.submitReview),r=H(e=>e.notify),i=H(e=>e.saving),a=H(t=>vu(t,e.id)===!0),o=bm(e),[s,c]=(0,v.useState)(()=>e.review.decision??e.review.previousSubmission?.decision??(o.length>0?`request_changes`:`approve`)),[l,u]=(0,v.useState)(()=>xm(e)),d=o.filter(e=>!l.has(e.key)),f=d.flatMap(e=>e.finding?[e.finding.id]:[]),p=d.flatMap(e=>e.note?[e.note.id]:[]),m=dm(e,{findingIds:f,noteIds:p,decision:s}),h=e.files.filter(e=>e.reviewed).length,g=e.review,_=e=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)},y=async()=>{await n(s,f,p)&&r(`info`,a?`Retour enregistré : l'agent à l'écoute vient d'en être notifié.`:`Retour enregistré : l'agent le lit avec l'outil get_review_feedback.`)},b=Ud(e);return(0,O.jsxs)(`div`,{className:`page page-narrow`,children:[(0,O.jsx)(`h1`,{className:`page-title page-title-small`,children:`Terminer la revue`}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[h,` / `,W(e.files.length,`fichier revu`,`fichiers revus`),` · `,W(f.length,`constat ouvert`,`constats ouverts`),` et`,` `,W(p.length,`remarque`),` à transmettre`]}),g.state===`submitted`&&g.submittedAt&&g.decision&&(0,O.jsxs)(`div`,{className:`submitted-banner`,children:[(0,O.jsx)(U,{name:`circle-check`,color:`#3fb950`,size:16}),(0,O.jsxs)(`span`,{children:[`Retour enregistré le `,Uu(g.submittedAt),` · décision « `,Iu[g.decision],` ».`,` `,g.processed?`${Gu(g.processed)}.`:g.decision===`approve`?`Approuvée : rien à traiter pour l'agent.`:`L'agent le lit avec l'outil get_review_feedback ; il n'est pas encore traité.`,` `,`Un nouvel enregistrement le remplace.`]})]}),g.state===`pending`&&g.previousSubmission&&(0,O.jsxs)(`div`,{className:`submitted-banner is-reopened`,children:[(0,O.jsx)(U,{name:`pencil`,color:`#e3a33b`,size:16}),(0,O.jsxs)(`span`,{children:[`Revue modifiée depuis le retour du `,Uu(g.previousSubmission.submittedAt),` : l'agent ne le traite plus. Enregistrez-la à nouveau pour qu'il traite la nouvelle version ; il verra ce qui a changé.`]})]}),(0,O.jsx)(`h2`,{className:`field-label`,children:`Décision`}),(0,O.jsx)(`div`,{className:`decisions`,role:`radiogroup`,"aria-label":`Décision`,children:el.map(e=>(0,O.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":s===e,className:`decision${s===e?` is-selected`:``}`,onClick:()=>c(e),children:[(0,O.jsx)(U,{name:ym[e].icon,color:ym[e].color,size:16}),(0,O.jsxs)(`span`,{className:`decision-text`,children:[(0,O.jsx)(`span`,{className:`decision-title`,children:Iu[e]}),(0,O.jsx)(`span`,{className:`decision-description`,children:ym[e].description})]})]},e))}),(0,O.jsxs)(`div`,{className:`field-head`,children:[(0,O.jsx)(`h2`,{className:`field-label`,children:`Points à transmettre`}),(0,O.jsxs)(`span`,{className:`field-meta`,children:[d.length,` sur `,o.length,` sélectionnés`]})]}),(0,O.jsxs)(`div`,{className:`card points`,children:[o.length===0&&(0,O.jsx)(`p`,{className:`list-empty`,children:`Aucun constat ouvert ni remarque : le retour ne contiendra que la décision.`}),o.map(t=>{let n=!l.has(t.key);return(0,O.jsxs)(`label`,{className:`point${n?``:` is-excluded`}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:n,onChange:()=>_(t.key)}),(0,O.jsx)(U,{name:n?`square-check`:`square`,color:n?`#8b97ff`:`#646b7b`,size:16}),t.finding?(0,O.jsx)(md,{severity:t.finding.severity}):(0,O.jsx)(hd,{}),(0,O.jsx)(`span`,{className:`point-title`,children:t.finding?t.finding.title:t.note.text}),(0,O.jsx)(`span`,{className:`point-location mono`,children:t.finding?ed(t.finding,e.request):G(t.note)})]},t.key)})]}),(0,O.jsx)(`h2`,{className:`field-label`,children:`Prompt pour l'agent`}),(0,O.jsxs)(`div`,{className:`prompt-box`,children:[(0,O.jsx)(`pre`,{className:`prompt-text`,children:m}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button prompt-copy`,title:`Copier le prompt`,"aria-label":`Copier le prompt`,onClick:()=>void t(m,`Prompt copié dans le presse-papiers.`),children:(0,O.jsx)(U,{name:`copy`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`footer`,{className:`finish-footer`,children:[(0,O.jsx)(U,{name:`info`,color:`#646b7b`}),(0,O.jsx)(`span`,{className:`finish-hint`,children:`L'agent récupère ce retour avec l'outil get_review_feedback.`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-secondary button-medium`,onClick:()=>T(b?w.review(e.id,b):w.feature(e.id)),children:`Retour à la revue`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-primary button-medium`,disabled:i,onClick:()=>void y(),children:[(0,O.jsx)(U,{name:`save`,color:`#ffffff`}),`Enregistrer le retour`]})]})]})}var Cm={to_review:{label:`À relire`,icon:`eye`,empty:`Aucune revue à faire : toutes les analyses sont soumises.`},to_process:{label:`À traiter par l'agent`,icon:`hourglass`,empty:`Aucun retour n'attend l'agent.`},processed:{label:`Traitées par l'agent`,icon:`clipboard-check`,empty:`Aucun retour traité par l'agent à vérifier.`},approved:{label:`Approuvées`,icon:`circle-check`,empty:`Aucune analyse approuvée.`},all:{label:`Toutes`,icon:`list`,empty:`Aucune analyse.`}};function wm({counts:e}){let t=H(e=>e.homeFilter),n=H(e=>e.setHomeFilter);return(0,O.jsx)(`nav`,{className:`home-filters`,"aria-label":`Filtrer les analyses`,children:q.map(r=>{let i=r===t;return(0,O.jsxs)(`button`,{type:`button`,className:`home-filter${i?` is-active`:``}${r===`all`?` is-all`:``}`,"aria-pressed":i,onClick:()=>n(r),children:[(0,O.jsx)(U,{name:Cm[r].icon,size:16,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`home-filter-label`,children:Cm[r].label}),(0,O.jsx)(`span`,{className:`home-filter-count`,children:e[r]})]},r)})})}function Tm({analysis:e}){let t=e.progress.processed;if(!t)return null;let n=t.by===`user`?`du relecteur`:`de l'agent`;return(0,O.jsxs)(`span`,{className:`home-row-processing`,children:[(0,O.jsx)(U,{name:`corner-down-right`,size:12,color:Ru.color}),t.note===null?Wu(t):`Note ${n} : ${t.note}`,` · le `,Uu(t.at)]})}function Em({analysis:e}){let{followedBy:t,followUpOf:n}=e;return(0,O.jsxs)(O.Fragment,{children:[t&&(0,O.jsxs)(`span`,{className:`home-row-follow`,children:[(0,O.jsx)(`span`,{children:`Nouvelle revue disponible :`}),(0,O.jsx)(Ad,{link:t,direction:`next`,small:!0}),(0,O.jsx)(Cd,{progress:t.progress,small:!0})]}),n&&(0,O.jsxs)(`span`,{className:`home-row-follow`,children:[(0,O.jsx)(`span`,{children:`Revue faisant suite à :`}),(0,O.jsx)(Ad,{link:n,direction:`previous`,small:!0}),(0,O.jsxs)(`span`,{className:`home-row-follow-round`,children:[`tour `,e.round]})]})]})}function Dm({analysis:e}){let t=H(e=>e.markProcessed),n=H(e=>e.saving),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null),c=(0,v.useId)();(0,v.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let l=async()=>{let n=a.trim();await t(e,n===``?null:n)&&(i(!1),o(``))};return(0,O.jsxs)(`div`,{className:`mark-processed${r?` is-open`:``}`,ref:s,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary mark-processed-button`,"aria-expanded":r,"aria-haspopup":`dialog`,onClick:()=>i(!r),children:[(0,O.jsx)(U,{name:`check`,size:14,color:Ru.color}),`Marquer comme traité`]}),r&&(0,O.jsxs)(`div`,{className:`mark-processed-panel`,role:`dialog`,"aria-label":`Marquer le retour comme traité`,children:[(0,O.jsx)(`p`,{className:`mark-processed-title`,children:`Marquer le retour comme traité`}),(0,O.jsx)(`label`,{className:`mark-processed-label`,htmlFor:c,children:`Note pour l'historique (facultative)`}),(0,O.jsx)(`input`,{id:c,className:`mark-processed-input`,autoFocus:!0,value:a,placeholder:`ex. corrigé par 12785d6e3 et 1ff5baaad`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l()}}),(0,O.jsxs)(`div`,{className:`mark-processed-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,onClick:()=>i(!1),children:`Annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button mark-processed-confirm`,disabled:n,onClick:()=>void l(),children:`Marquer comme traité`})]})]})]})}function Om({analysis:e,markable:t}){let{reviewedFiles:n,totalFiles:r}=e.progress,i=od(e);return(0,O.jsxs)(`div`,{className:`home-row`,children:[(0,O.jsxs)(`span`,{className:`home-row-body`,children:[(0,O.jsxs)(`span`,{className:`home-row-head`,children:[(0,O.jsx)(`a`,{className:`home-row-title home-row-link`,href:w.feature(e.id),children:e.title}),t&&(0,O.jsx)(Dm,{analysis:e})]}),(0,O.jsxs)(`span`,{className:`home-row-details`,children:[(0,O.jsxs)(`span`,{className:`home-row-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:$u(e)}),(0,O.jsxs)(`span`,{children:[`· `,Hu(e.updatedAt)]})]}),(0,O.jsxs)(`span`,{className:`home-row-progress`,title:`${n} fichier(s) revu(s) sur ${r}`,children:[(0,O.jsx)(`span`,{className:`home-row-progress-bar`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":n,children:(0,O.jsx)(`span`,{className:`progress-fill`,style:{width:`${sd(e)}%`}})}),(0,O.jsxs)(`span`,{className:`home-row-progress-label mono`,children:[n,`/`,r]})]}),(0,O.jsx)(`span`,{className:`home-row-findings`,children:i.length===0?(0,O.jsx)(`span`,{className:`home-row-none`,children:`Aucun constat ouvert`}):i.map(({severity:e,count:t})=>(0,O.jsx)(yd,{severity:e,count:t,title:`${Yu(e,t)}, exigences manquantes comprises`},e))}),(0,O.jsx)(`span`,{className:`home-row-state`,children:(0,O.jsx)(Cd,{progress:e.progress})})]}),(0,O.jsx)(Tm,{analysis:e}),(0,O.jsx)(Em,{analysis:e})]}),(0,O.jsx)(U,{name:`chevron-right`,color:`#646b7b`})]})}function km({group:e}){let t=H(e=>e.homeFilter),n=H(t=>t.collapsedProjects.has(e.project)),r=H(e=>e.toggleProject);return(0,O.jsxs)(`section`,{className:`home-project`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`home-project-head`,"aria-expanded":!n,onClick:()=>r(e.project),children:[(0,O.jsx)(U,{name:n?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`folder`,color:`#8b97ff`}),(0,O.jsx)(`span`,{className:`home-project-name`,children:e.project}),(0,O.jsx)(`span`,{className:`home-project-total`,children:W(e.analyses.length,`analyse`)}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(`span`,{className:`home-project-counts`,children:e.counts.map(({state:e,count:t})=>(0,O.jsxs)(`span`,{className:`pill pill-small`,style:{color:Lu[e].color,background:Lu[e].background},children:[Lu[e].label,` · `,t]},e))})]}),!n&&(0,O.jsx)(`div`,{className:`home-project-list`,children:e.analyses.map(e=>(0,O.jsx)(Om,{analysis:e,markable:t===`to_process`&&e.progress.toProcess},e.id))})]})}function Am(){let e=H(e=>e.analyses),t=H(e=>e.unreadable),n=H(e=>e.listError),r=H(e=>e.homeFilter),i=H(e=>e.setHomeFilter);if(n)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:(0,O.jsx)(`p`,{className:`error-text`,children:n})})});if(e===null)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:(0,O.jsx)(`p`,{children:`Chargement des analyses…`})})});if(e.length===0&&t.length===0)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsxs)(`div`,{className:`empty-card`,children:[(0,O.jsx)(`h1`,{className:`empty-title`,children:`Aucune analyse à revoir`}),(0,O.jsxs)(`p`,{children:[`L'agent crée une analyse avec l'outil `,(0,O.jsx)(`code`,{children:`create_analysis`}),` une fois la feature développée. Elle apparaîtra ici automatiquement.`]})]})});let a=ad(rd(e,r)),o=new Set(e.map(e=>e.project)).size,s=id(e);return(0,O.jsxs)(`div`,{className:`page page-home`,children:[(0,O.jsx)(`div`,{className:`home-head`,children:(0,O.jsxs)(`div`,{className:`page-head-text`,children:[(0,O.jsx)(`h1`,{className:`page-title`,children:`Analyses`}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[W(e.length,`analyse`),` · `,W(o,`projet`),` · `,s.to_review,` à relire`]})]})}),(0,O.jsxs)(`div`,{className:`home-layout`,children:[(0,O.jsx)(wm,{counts:s}),(0,O.jsxs)(`div`,{className:`home-projects`,children:[a.length===0&&e.length>0&&(0,O.jsxs)(`div`,{className:`card home-empty`,children:[(0,O.jsx)(`p`,{children:Cm[r].empty}),(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:()=>i(`all`),children:`Afficher toutes les analyses`})]}),a.map(e=>(0,O.jsx)(km,{group:e},e.project)),t.length>0&&(0,O.jsxs)(`section`,{className:`home-project`,children:[(0,O.jsxs)(`h2`,{className:`home-project-head is-static`,children:[(0,O.jsx)(U,{name:`triangle-alert`,color:`#f0625a`}),(0,O.jsx)(`span`,{className:`home-project-name`,children:`Analyses illisibles`})]}),(0,O.jsx)(`div`,{className:`home-project-list`,children:t.map(e=>(0,O.jsx)(`div`,{className:`home-row is-unreadable`,children:(0,O.jsxs)(`span`,{className:`home-row-body`,children:[(0,O.jsx)(`span`,{className:`home-row-title mono`,children:e.id}),(0,O.jsx)(`span`,{className:`home-row-meta error-text`,children:e.error})]})},e.id))})]})]})]})]})}function jm(e,t){return t===1?`${e}`:`${e},${t}`}function Mm(e,t,n,r){let i=r.filter(e=>e.type!==`add`).length,a=r.filter(e=>e.type!==`del`).length,o=e.header.replace(/^@@[^@]*@@/,``);return{header:`@@ -${jm(t,i)} +${jm(n,a)} @@${o}`,oldStart:t,oldLines:i,newStart:n,newLines:a,lines:r}}function Nm(e){let t=e.lines.findIndex(e=>e.type!==`context`);return t===-1?e.lines.length:t}function Pm(e,t){if(e.newContent===null)return null;let n=Al(e.newContent),r=new Set,i=[],a=0,o=0;e.hunks.forEach((s,c)=>{let l=s.newLines===0?s.newStart+1:s.newStart,u=l+s.newLines-1,d=e.hunks[c+1],f=d===void 0?n.length+1:d.newLines===0?d.newStart+1:d.newStart,p=Math.max(0,t[c]??0),m=l-1-o,h=f-1-u,g=Math.min(p,m),_=Math.min(p,h),v=a+s.oldLines-s.newLines,y=(e,t)=>(r.add(e),{type:`context`,oldNo:e+t,newNo:e,text:n[e-1]}),b=g===0&&_===0?s:Mm(s,(s.oldLines===0?s.oldStart+1:s.oldStart)-g,l-g,[...Array.from({length:g},(e,t)=>y(l-g+t,a)),...s.lines,...Array.from({length:_},(e,t)=>y(u+1+t,v))]);i.push({hunk:b,above:g,below:_,canGrow:g<m||_<h,joinsPrevious:c>0&&g===m}),a=v,o=u+_});let s=[];i.forEach((e,t)=>{e.joinsPrevious?s[s.length-1].push(t):s.push([t])});let c=s.map(e=>{if(e.length===1)return i[e[0]].hunk;let t=i[e[0]].hunk;return Mm(t,t.oldLines===0?t.oldStart+1:t.oldStart,t.newLines===0?t.newStart+1:t.newStart,e.flatMap(e=>i[e].hunk.lines))}),l=s.map(t=>({context:Nm(e.hunks[t[0]])+i[t[0]].above,members:t,canShrink:t.some(e=>i[e].above>0||i[e].below>0),canGrow:t.some(e=>i[e].canGrow)}));return{fileDiff:{...e,hunks:c},hunks:l,extras:i.map(e=>Math.max(e.above,e.below)),added:r}}function Fm(e,t,n){let r=[...e.extras];for(let i of e.hunks[t].members)r[i]=Math.max(0,r[i]+n*5);return r}var Im={context:` `,add:`+`,del:`-`};function Lm(e){return e.mode===`branch`?`branch ${e.base}...${e.head}`:`working tree changes against HEAD`}function Rm(e,t){return t===0?null:jl(e,e+t-1)}function zm(e){let t=1;for(let n of e.lines)t=Math.max(t,String(n.oldNo??``).length,String(n.newNo??``).length);let n=e=>String(e??``).padStart(t);return[e.header,...e.lines.map(e=>`${n(e.oldNo)} | ${n(e.newNo)} ${Im[e.type]} ${e.text}`)]}function Bm(e,t,n){let r=Rm(n.newStart,n.newLines),i=Rm(n.oldStart,n.oldLines),a=[`- File: ${t.path}${t.oldPath===null?``:` (renamed from ${t.oldPath})`}`,r===null?`- New side: no line (the section only removes code).`:`- New side (code after the feature): lines ${r}`,i===null?`- Old side: no line (the section only adds code).`:`- Old side (code before the feature): lines ${i}`];return[`Explain a section of code in the feature analysis "${e.title}" (analysis_id: "${e.id}", project "${e.project}").`,`Repository: ${e.repoPath} — ${Lm(e)}.`,``,`Section to explain:`,...a,``,`Code of the section, as frozen in the analysis (columns: old line | new line, then + added, - removed, or a space for context):`,"```",...zm(n),"```",``,`What to do:`,`1. Read this code and what surrounds it (get_diff with analysis_id "${e.id}" and path "${t.path}", and the repository) until you understand what it does and how it works.`,`2. Record your explanations in the feature analyzer with add_explanations (analysis_id "${e.id}", path "${t.path}"): one explanation per meaningful block of the section, covering it from its first to its last line. Use "side": "new" with new-side line numbers for added or kept code, and "side": "old" with old-side line numbers for removed code.`,`3. In each explanation, say what the code does (inputs, outputs, effects), then how it works, step by step in the order of the code; name the key variables and the edge cases it handles. For removed code, say what it did and what replaces it. Describe, do not judge.`,`4. If an explanation of the analysis already covers these lines (see get_analysis), rewrite it with update_explanation instead of adding a duplicate.`,`5. Then tell me in a few lines which explanations you recorded.`].join(`
72
- `)}function Vm(e){return`${e===0?0:1},${e}`}function Hm(e){if(e.newContent===null)return null;let t=Al(e.newContent),n=[],r=1,i=0,a=e=>{for(;r<=e;r++)n.push({type:`context`,oldNo:r+i,newNo:r,text:t[r-1]})};for(let t of e.hunks)a(t.newLines===0?t.newStart:t.newStart-1),n.push(...t.lines),r+=t.newLines,i+=t.oldLines-t.newLines;a(t.length);let o=t.length+i,s={header:`@@ -${Vm(o)} +${Vm(t.length)} @@`,oldStart:o===0?0:1,oldLines:o,newStart:t.length===0?0:1,newLines:t.length,lines:n};return{path:e.path,hunks:[s],newContent:e.newContent}}function Um({anchorText:e,suggestion:t}){let n=Al(e),r=Al(t);return(0,O.jsxs)(`div`,{className:`fix`,children:[n.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-del`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`−`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`del-${t}`)),r.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-add`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`+`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`add-${t}`)),r.length===0&&(0,O.jsx)(`div`,{className:`fix-empty`,children:`Les lignes visées sont supprimées.`})]})}function Wm({analysis:e,finding:t,onAddNote:n}){let r=H(e=>e.setFindingStatus),i=H(e=>e.copy),a=H(e=>e.saving),o=t.location;return(0,O.jsxs)(`article`,{className:`finding-card is-${t.status}`,id:`finding-${t.id}`,children:[(0,O.jsxs)(`header`,{className:`finding-head`,children:[(0,O.jsx)(md,{severity:t.severity}),(0,O.jsx)(`h3`,{className:`finding-title`,children:t.title}),(0,O.jsx)(vd,{kind:t.kind}),(0,O.jsx)(_d,{status:t.status}),o&&(0,O.jsx)(`span`,{className:`finding-lines mono`,children:td(o.startLine,o.endLine)})]}),t.body.trim()!==``&&(0,O.jsx)(`p`,{className:`finding-body`,children:t.body}),t.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),t.suggestion!==null&&t.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`finding-section-title`,children:`Correctif proposé`}),(0,O.jsx)(Um,{anchorText:t.anchorText,suggestion:t.suggestion})]}),(0,O.jsxs)(`footer`,{className:`finding-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary`,onClick:()=>void i(dm(e,{findingIds:[t.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]}),t.status===`open`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`ignored`),children:`Ignorer`}),t.status===`ignored`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`open`),children:`Rouvrir`}),(0,O.jsx)(`span`,{className:`spacer`}),n&&(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:n,children:`Ajouter une remarque`})]})]})}function Gm({note:e}){return e.question===null?(0,O.jsx)(qm,{note:e}):(0,O.jsx)(Ym,{note:e,question:e.question})}function Km(e){return e.location?.line?`ligne ${e.location.line}`:`fichier entier`}function qm({note:e}){let t=H(e=>e.updateNote),n=H(e=>e.deleteNote),r=H(e=>e.saving),[i,a]=(0,v.useState)(!1),o=Km(e);return i?(0,O.jsx)(Zm,{id:`note-edit-${e.id}`,label:`Modifier la remarque (${o})`,initialText:e.text,submitLabel:`Enregistrer la modification`,onSubmit:n=>n===e.text?Promise.resolve(!0):t(e.id,n),onClose:()=>a(!1)}):(0,O.jsxs)(`div`,{className:`note-card`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(hd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${o} · ${Uu(e.createdAt)}`,children:[o,` · `,Ku(e.createdAt)]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>a(!0),children:[(0,O.jsx)(U,{name:`pencil`,size:13}),`Modifier`]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>void n(e.id),children:[(0,O.jsx)(U,{name:`trash`,size:13}),`Supprimer`]})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text})]})}function Jm({question:e}){return e.answer===null?(0,O.jsxs)(`span`,{className:`question-status is-waiting`,title:`Envoyée le ${Uu(e.askedAt)}`,children:[(0,O.jsx)(U,{name:`loader-circle`,size:13}),`Agent notifié`]}):(0,O.jsxs)(`span`,{className:`question-status is-answered`,title:`Réponse reçue le ${Uu(e.answer.at)}`,children:[(0,O.jsx)(`span`,{className:`question-status-dot`,"aria-hidden":`true`}),`Réponse reçue`]})}function Ym({note:e,question:t}){let n=H(e=>e.markAnswerSeen),r=H(e=>e.deleteNote),i=H(e=>e.saving),[a,o]=(0,v.useState)(!1),s=Km(e),c=t.answer;return(0,O.jsxs)(`div`,{className:`note-card is-question${a?` is-open`:``}`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(gd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${s} · ${Uu(t.askedAt)}`,children:[s,` · `,Ku(t.askedAt)]}),(0,O.jsx)(Jm,{question:t}),(0,O.jsx)(`button`,{type:`button`,className:`link-button muted question-delete`,disabled:i,title:`Supprimer la question et sa réponse`,"aria-label":`Supprimer la question et sa réponse`,onClick:()=>void r(e.id),children:(0,O.jsx)(U,{name:`trash`,size:13})})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text}),c!==null&&!a&&(0,O.jsxs)(`button`,{type:`button`,className:`answer-toggle`,onClick:()=>{o(!0),t.answerSeenAt===null&&n(e.id)},children:[(0,O.jsx)(U,{name:`messages-square`,size:14}),`Voir la réponse`]}),c!==null&&a&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`answer-block`,children:[(0,O.jsxs)(`div`,{className:`answer-head`,children:[(0,O.jsx)(U,{name:`bot`,size:14,color:`#b18cff`}),`Agent · `,Ku(c.at)]}),(0,O.jsx)(`p`,{className:`answer-text`,children:c.text})]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button accent answer-hide`,onClick:()=>o(!1),children:[(0,O.jsx)(U,{name:`chevron-up`,size:14}),`Masquer la réponse`]})]})]})}function Xm({path:e,line:t,findingId:n,onClose:r}){let i=H(e=>e.addNote);return(0,O.jsx)(Zm,{id:`note-${t??`file`}`,label:t===null?`Remarque sur le fichier`:`Remarque sur la ligne ${t}`,initialText:``,submitLabel:`Enregistrer`,onSubmit:r=>i(e,t,r,n,!1),onAsk:r=>i(e,t,r,n,!0),onClose:r})}function Zm({id:e,label:t,initialText:n,submitLabel:r,onSubmit:i,onAsk:a,onClose:o}){let s=H(e=>e.saving),[c,l]=(0,v.useState)(n),u=(0,v.useRef)(null);(0,v.useEffect)(()=>u.current?.focus(),[]);let d=async e=>{c.trim()!==``&&await e(c.trim())&&o()},f=c.trim()===``;return(0,O.jsxs)(`form`,{className:`note-composer`,onSubmit:e=>{e.preventDefault(),d(i)},children:[(0,O.jsx)(`label`,{className:`note-composer-label`,htmlFor:e,children:t}),(0,O.jsx)(`textarea`,{id:e,ref:u,rows:3,value:c,placeholder:`Ce que l'agent doit revoir…`,onChange:e=>l(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),onKeyDown:e=>{e.key===`Escape`&&o(),e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),d(e.shiftKey&&a?a:i))}}),a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée : enregistrer · Ctrl + Maj + Entrée : envoyer`}),(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-ask button-small`,disabled:s||f,title:`La question part tout de suite à l'agent et reste dans la revue avec sa réponse.`,onClick:()=>void d(a),children:[(0,O.jsx)(U,{name:`send`,size:13}),`Envoyer à l'agent`]}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]}):(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée pour enregistrer · Échap pour annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]})}var Qm=4;function $m(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=Qm-t%Qm;else break;return t}function eh(e){let t=[],n=[],r=-1,i=e=>{r>e.start&&t.push({start:e.start,end:r})};for(e.forEach((e,t)=>{if(e===null||e.trim()===``)return;let a=$m(e);for(;n.length>0&&n[n.length-1].indent>=a;)i(n.pop());n.push({start:t,indent:a}),r=t});n.length>0;)i(n.pop());t.sort((e,t)=>e.start-t.start);let a=[],o=[];for(let e of t){for(;o.length>0&&a[o[o.length-1]].end<e.start;)o.pop();let t=o.length>0?o[o.length-1]:null;a.push({...e,parent:t,depth:t===null?0:a[t].depth+1}),o.push(a.length-1)}return a}function th(e,t){let n=new Set;for(let r of t){let t=e[r];for(let e=t.start+1;e<=t.end;e++)n.add(e)}return n}function nh(e,t,n){for(let r=e[t].parent;r!==null;r=e[r].parent)if(r===n)return!0;return!1}function rh(e,t,n,r){for(let i=e[t].parent;i!==null&&i!==n;i=e[i].parent)if(r.has(i))return!0;return!1}function ih(e,t,n){let r=new Set(n),i=e.map((e,t)=>t).filter(n=>nh(e,n,t));if(n.has(t)){r.delete(t);for(let e of i)r.delete(e);return r}let a=i.filter(r=>!n.has(r)&&!rh(e,r,t,n));if(a.length===0)return r.add(t),r;let o=Math.max(...a.map(t=>e[t].depth));for(let t of a)e[t].depth===o&&r.add(t);return r}function ah({entry:e,small:t}){let n=Du[e.finding.severity];return(0,O.jsx)(`span`,{className:`finding-number${t?` is-small`:``}`,style:{color:n.color,background:n.background,borderColor:n.color},"aria-label":`Constat ${e.number}`,children:e.number})}function oh(e,t){return e===`applied`?t?`Correctif appliqué dans le code`:`Appliquer le correctif dans le code`:t?`Correctif affiché dans le code`:`Afficher le correctif dans le code`}function sh({analysis:e,entry:t,fix:n,mode:r,onToggleFix:i,onAddNote:a,highlighted:o}){let s=H(e=>e.setFindingStatus),c=H(e=>e.copy),l=H(e=>e.saving),{finding:u}=t,d=Du[u.severity],f=n.state===`shown`,p=r===`off`||n.state===`blocked`;return(0,O.jsxs)(`article`,{className:`margin-card is-${u.status}${f?` is-fix-shown`:``}${o?` is-target`:``}`,id:`finding-${u.id}`,"data-finding-card":u.id,style:{"--severity":d.color},children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(ah,{entry:t}),(0,O.jsx)(`span`,{className:`pill pill-small margin-card-severity`,style:{color:d.color,background:d.background},children:d.label}),(0,O.jsx)(vd,{kind:u.kind}),(0,O.jsx)(_d,{status:u.status}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,children:[`l. `,jl(t.startLine,t.endLine,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:u.title}),u.body.trim()!==``&&(0,O.jsx)(`p`,{className:`margin-card-body`,children:u.body}),u.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),(n.state===`shown`||n.state===`hidden`||n.state===`blocked`)&&(0,O.jsxs)(`label`,{className:`fix-toggle${f?` is-on`:``}${p?` is-disabled`:``}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:f,disabled:p,onChange:e=>i(e.target.checked)}),(0,O.jsx)(`span`,{className:`switch`,"aria-hidden":`true`}),oh(r,f)]}),r===`off`&&n.state===`hidden`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Choisissez « Avant / après » ou « Code corrigé » pour afficher le correctif.`}),n.state===`blocked`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:r===`applied`?`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : retirez-le pour appliquer celui-ci dans le code.`:`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : masquez-le pour afficher celui-ci dans le code.`}),n.state===`outside`&&u.suggestion!==null&&u.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Les lignes visées ne sont pas toutes affichées dans le diff : voici le correctif proposé.`}),(0,O.jsx)(Um,{anchorText:u.anchorText,suggestion:u.suggestion})]}),(0,O.jsxs)(`footer`,{className:`margin-card-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:()=>void c(dm(e,{findingIds:[u.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt`]}),u.status===`open`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`ignored`),children:[(0,O.jsx)(U,{name:`eye-off`,color:`#9aa1b1`}),`Ignorer`]}),u.status===`ignored`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`open`),children:[(0,O.jsx)(U,{name:`rotate-ccw`,color:`#9aa1b1`}),`Rouvrir`]}),a&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:a,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Remarque`]})]})]})}function ch({label:e,options:t,value:n,onChange:r,disabled:i,trigger:a}){let[o,s]=(0,v.useState)(null),c=o!==null,l=(0,v.useRef)(null),u=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!c)return;let e=()=>s(null),t=t=>{l.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),document.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n),document.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[c]);let d=()=>{let e=u.current?.getBoundingClientRect();s(c||!e?null:{top:e.bottom+6,right:window.innerWidth-e.right})},f=a??t[n];return(0,O.jsxs)(`div`,{className:`option-menu`,ref:l,children:[(0,O.jsxs)(`button`,{ref:u,type:`button`,className:`option-menu-button${c?` is-open`:``}`,"aria-haspopup":`listbox`,"aria-expanded":c,title:e,onClick:d,children:[(0,O.jsx)(U,{name:f.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`option-menu-value`,children:f.label}),(0,O.jsx)(U,{name:c?`chevron-up`:`chevron-down`,size:12,color:c?`#9aa1b1`:`#646b7b`})]}),o&&(0,O.jsxs)(`div`,{className:`option-menu-list`,role:`listbox`,"aria-label":e,style:o,children:[(0,O.jsx)(`div`,{className:`option-menu-title`,children:e}),Object.keys(t).map(e=>{let a=t[e],o=i?.[e],c=e===n;return(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":c,className:`option-menu-item${c?` is-selected`:``}`,disabled:o!==void 0,onClick:()=>{s(null),r(e)},children:[(0,O.jsx)(U,{name:a.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsxs)(`span`,{className:`option-menu-item-text`,children:[(0,O.jsx)(`span`,{className:`option-menu-item-label`,children:a.label}),(0,O.jsx)(`span`,{className:`option-menu-item-description`,children:o??a.description})]}),c&&(0,O.jsx)(U,{name:`check`,color:`#c3caff`})]},e)})]})]})}var lh=4,uh=6;function dh(e,t){let n=e.getBoundingClientRect();return{top:n.top+t,bottom:n.bottom}}function fh(e){if(e.kind===`note`)return{color:Ou.color,title:`Remarque · ligne ${e.line}`,detail:null};let{finding:t,number:n}=e.entry;return{color:Du[t.severity].color,title:`Constat ${n} · ${Du[t.severity].label}`,detail:t.title}}function ph({model:e,rowsRef:t,scrollRef:n,toolbarHeight:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(!1),[o,s]=(0,v.useState)(0),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null);(0,v.useLayoutEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{let t=e.offsetHeight,n=e.querySelectorAll(`:scope > .hunk > :not(.hunk-header)`);if(t===0||n.length===0)return p(null);let r=Array.from(n,e=>e.offsetTop/t),i=n[n.length-1];p([...r,(i.offsetTop+i.offsetHeight)/t])};n();let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e]),(0,v.useEffect)(()=>{let e=n.current,i=t.current;if(!e||!i)return;let a=()=>{let t=dh(e,r),n=i.getBoundingClientRect();if(s(Math.max(Math.min(t.bottom-t.top,n.height),0)),n.height===0)return l(null);let a=Math.max(t.top,n.top),o=Math.min(t.bottom,n.bottom);l({top:(a-n.top)/n.height,height:Math.max(o-a,0)/n.height})};a(),e.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(e),o.observe(i),()=>{e.removeEventListener(`scroll`,a),o.disconnect()}},[n,t,r]);let m=e=>{let a=n.current,o=t.current,s=i.current;if(!a||!o||!s)return;let c=s.getBoundingClientRect(),l=Math.min(Math.max((e-c.top)/c.height,0),1),u=dh(a,r),d=o.getBoundingClientRect();a.scrollTop+=d.top+l*d.height-(u.top+u.bottom)/2},h=e=>{e.button===0&&(a.current=!0,e.currentTarget.setPointerCapture(e.pointerId),d(null),m(e.clientY))},g=e=>{a.current&&m(e.clientY)},_=()=>{a.current=!1},y=(e,t)=>{a.current||d({top:lh+e*(o-8),...t})},b=e=>f?.[e]??0;return(0,O.jsx)(`div`,{className:`diff-minimap`,children:(0,O.jsxs)(`div`,{className:`diff-minimap-track`,style:{top:r,height:o},children:[(0,O.jsxs)(`div`,{ref:i,className:`diff-minimap-inner`,"aria-hidden":`true`,onPointerDown:h,onPointerMove:g,onPointerUp:_,onPointerCancel:_,onPointerLeave:()=>d(null),children:[(0,O.jsx)(`div`,{className:`minimap-lane is-changes`,children:f&&e.changes.map((e,t)=>(0,O.jsx)(`span`,{className:`minimap-change is-${e.kind}`,style:{top:`${b(e.start)*100}%`,height:`${(b(e.end)-b(e.start))*100}%`},onPointerEnter:()=>y(b(e.start),{color:mh(e.kind),title:e.label,detail:null})},t))}),(0,O.jsx)(`div`,{className:`minimap-lane is-dots`,children:f&&e.dots.map(e=>(0,O.jsx)(`span`,{className:`minimap-dot is-${e.kind}${e.kind===`finding`&&e.entry.finding.status!==`open`?` is-muted`:``}`,style:{top:`${b(e.row)*100}%`,"--dot":fh(e).color},onPointerEnter:()=>y(b(e.row),fh(e))},e.kind===`note`?`note-${e.line}`:e.entry.finding.id))}),c&&(0,O.jsx)(`div`,{className:`minimap-view`,style:{top:`${c.top*100}%`,height:`${c.height*100}%`}})]}),u&&(0,O.jsxs)(`div`,{className:`minimap-tooltip`,style:u.top>o/2?{bottom:o-u.top-uh}:{top:u.top-uh},children:[(0,O.jsxs)(`span`,{className:`minimap-tooltip-title`,children:[(0,O.jsx)(`span`,{className:`minimap-tooltip-swatch`,style:{background:u.color}}),u.title]}),u.detail&&(0,O.jsx)(`span`,{className:`minimap-tooltip-detail`,children:u.detail})]})]})})}function mh(e){switch(e){case`add`:return`var(--add)`;case`del`:return`var(--del)`;case`mod`:return`linear-gradient(90deg, var(--del) 50%, var(--add) 50%)`;case`reindent`:return`var(--accent-soft)`}}var hh=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function gh(e){return _h(e)}function _h(e){return Array.isArray(e)?vh(e):e instanceof RegExp?e:typeof e==`object`?yh(e):e}function vh(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=_h(e[n]);return t}function yh(e){let t={};for(let n in e)t[n]=_h(e[n]);return t}function bh(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function xh(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?xh(e.substring(0,e.length-1)):e.substr(~t+1)}var Sh=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ch=class{static hasCaptures(e){return e!==null&&(Sh.lastIndex=0,Sh.test(e))}static replaceCaptures(e,t,n){return e.replace(Sh,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function wh(e,t){return e<t?-1:+(e>t)}function Th(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=wh(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Eh(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 Dh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Oh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},kh=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ph(e),t)}static createFromParsedTheme(e,t){return Lh(e,t)}_cachedMatchRoot=new Oh(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>jh(e.parent,t.parentScopes));return n?new Nh(n.fontStyle,n.foreground,n.background):null}},Ah=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function jh(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Mh(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Mh(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Nh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ph(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Eh(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Eh(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Fh(l,u,e,o,s,c)}}return n}var Fh=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Ih=(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))(Ih||{});function Lh(e,t){e.sort((e,t)=>{let n=wh(e.scope,t.scope);return n!==0||(n=Th(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Rh(t),o=new Nh(n,a.getId(r),a.getId(i)),s=new Vh(new Bh(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new kh(a,o,s)}var Rh=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},zh=Object.freeze([]),Bh=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||zh,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Vh=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Bh.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Th(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Bh(e,t,n,r,i))}}},Hh=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Wh(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Uh(e){return e}function Wh(e){return e}function Gh(e,t){let n=[],r=qh(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Kh(i)){let e=[];do e.push(i),i=r.next();while(Kh(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Kh(e){return!!e&&!!e.match(/[\w\.:]+/)}function qh(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Jh(e){typeof e.dispose==`function`&&e.dispose()}var Yh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Xh=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Zh=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Qh=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Yh(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Zh;for(let n of e)$h(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Yh){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function $h(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Yh?tg({baseGrammar:a,selfGrammar:i},r):eg(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Yh(e))}function eg(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ng([r],t,n)}}function tg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ng(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ng(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ng(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?bh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ng(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=cg(i);switch(a.kind){case 0:tg({...t,selfGrammar:t.baseGrammar},n);break;case 1:tg(t,n);break;case 2:eg(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?eg(a.ruleName,i,n):tg(i,n)}else a.kind===4?n.add(new Xh(a.scopeName,a.ruleName)):n.add(new Yh(a.scopeName))}}}var rg=class{kind=0},ig=class{kind=1},ag=class{constructor(e){this.ruleName=e}kind=2},og=class{constructor(e){this.scopeName=e}kind=3},sg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cg(e){if(e===`$base`)return new rg;if(e===`$self`)return new ig;let t=e.indexOf(`#`);return t===-1?new og(e):t===0?new ag(e.substring(1)):new sg(e.substring(0,t),e.substring(t+1))}var lg=/\\(\d+)/,ug=/\\(\d+)/g,dg=-1,fg=-2;function pg(e){return e}function mg(e){return e}var hg=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ch.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ch.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${xh(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ch.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ch.replaceCaptures(this._contentName,e,t)}},gg=class extends hg{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},_g=class extends hg{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Sg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},vg=class extends hg{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yg=class extends hg{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Sg(i,this.id),this.beginCaptures=a,this._end=new Sg(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},bg=class extends hg{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Sg(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Sg(o,fg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Cg,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},xg=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new gg(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new _g(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=bh({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new vg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new bg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new yg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=cg(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof vg||e instanceof yg||e instanceof bg)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Sg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&lg.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return ug.lastIndex=0,this.source.replace(ug,(e,t)=>Dh(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Cg=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new wg(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new wg(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},wg=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
73
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Tg=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Eg=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Tg(e,8),this._embeddedLanguagesMatcher=new Dg(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Tg(0,0);_getBasicScopeAttributes=new Oh(e=>new Tg(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Dg=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Dh(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Og=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function kg(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Ag(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Og(i,!0);f()}return new Og(i,!1);function f(){let o=jg(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===dg){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ig(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof yg){let r=o;Ig(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof bg){let r=o;Ig(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Ig(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Ag(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof bg&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Fg(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==fg){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Ig(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function jg(e,t,n,r,i,a){let o=Mg(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Ng(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Mg(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Pg(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ng(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Pg(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Pg(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Fg(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ig(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));kg(e,p,n&&d.start===0,d.start,f,i,!1,0),Jh(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Lg(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Lg=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Rg(e,t,n,r,i,a,o,s){return new Hg(e,t,n,r,i,a,o,s)}function zg(e,t,n,r,i){let a=Gh(t,Bg),o=xg.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Bg(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Vg(t[r],e))return n=r+1,!0;return!1})}function Vg(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Hg=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Eg(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ug(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Gh(e,Bg);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)zg(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&zg(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(pg(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[mg(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Ug(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=xg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Gg.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Hh.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Wg.createRootAndLookUpScopeName(a,r,this):Wg.createRoot(`unknown`,r),t=new Gg(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
74
- `;let a=this.createOnigString(e),o=a.content.length,s=new qg(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=kg(this,a,i,0,t,s,!0,r);return Jh(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ug(e,t){return e=gh(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Wg=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ah.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ah(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ah(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Hh.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Gg=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Wg.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:mg(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Wg.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,pg(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Wg.fromExtension(r,n.contentNameScopesList))}},Kg=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Gh(e,Bg).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Gh(e,Bg).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},qg=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Hh.set(n,0,Uh(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Hh.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Jg=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Rg(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Yg=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Jg(kh.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(kh.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Kg(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Qh(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Xg=Gg.NULL;function Zg(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Qg(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function $g(e){return Array.isArray(e)?e:[e]}async function e_(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function t_(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function n_(e){return e===`ansi`||t_(e)}function r_(e){return e===`none`}function i_(e){return r_(e)}var a_=/(\r?\n)/g;function o_(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(a_),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var s_={light:`#333333`,dark:`#bbbbbb`},c_={light:`#fffffe`,dark:`#1e1e1e`},l_=`__shiki_resolved`;function u_(e){if(e?.[l_])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?s_.light:s_.dark,n||=t.type===`light`?c_.light:c_.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,l_,{enumerable:!1,writable:!1,value:!0}),t}async function d_(e){return[...new Set((await Promise.all(e.filter(e=>!n_(e)).map(async e=>await e_(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function f_(e){return(await Promise.all(e.map(async e=>i_(e)?null:u_(await e_(e))))).filter(e=>!!e)}function p_(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new hh(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var m_=class extends Yg{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=u_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=kh.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=p_(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new hh(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},h_=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},g_=0;function __(e){g_+=1,e.warnings!==!1&&g_>=10&&g_%10==0&&console.warn(`[Shiki] ${g_} 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 hh("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(u_),i=new m_(new h_(e.engine,n),r,n,e.langAlias),a;function o(t){return p_(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new hh(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new hh(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await d_(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await f_(e))}function g(){if(t)throw new hh(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--g_)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function v_(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([f_(e.themes||[]),d_(e.langs||[]),e.engine]);return __({...e,themes:t,langs:n,engine:r})}var y_=new WeakMap;function b_(e,t){y_.set(e,t)}function x_(e){return y_.get(e)}var S_=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries($g(n).map(e=>[e,Xg])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return C_(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function C_(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function w_(e,t){if(!(e instanceof S_))throw new hh(`Invalid grammar state`);return e.getInternalStack(t)}var T_=/,/,E_=/ /;function D_(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(t_(e.resolveLangAlias(n.lang||`text`))||r_(r))return o_(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new hh(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new hh(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return k_(t,o,i,a,n)}function O_(...e){if(e.length===2)return x_(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(t_(i)||r_(a))throw new hh(`Plain language does not have grammar state`);if(i===`ansi`)throw new hh(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new S_(A_(n,c,o,s,r).stateStack,c.name,o.name)}function k_(e,t,n,r,i){let a=A_(e,t,n,r,i),o=new S_(a.stateStack,t.name,n.name);return b_(a.tokens,o),a.tokens}function A_(e,t,n,r,i){let a=Zg(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=o_(e),u=i.grammarState?w_(i.grammarState,n.name)??Xg:i.grammarContextCode==null?Xg:A_(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Qg(r[Hh.getForeground(s)],a),u=Hh.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Hh.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(T_).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(E_))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?j_(t.scopes):M_(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function j_(e){return e.map(e=>({scopeName:e}))}function M_(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:F_(e,i,t.slice(0,r))}}return n}function N_(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function P_(e,t,n){if(!N_(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)N_(e[r],n[i])&&--r,--i;return r===-1}function F_(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(P_(e,t,n)){r.push(a);break}return r}function I_(e,t,n,r=D_){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:x_(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=L_(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new S_(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&b_(s,c),s}function L_(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var R_=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],z_=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};z_.prototype.normal={},z_.prototype.property={},z_.prototype.space=void 0;function B_(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new z_(n,r,t)}function V_(e){return e.toLowerCase()}var H_=class{constructor(e,t){this.attribute=t,this.property=e}};H_.prototype.attribute=``,H_.prototype.booleanish=!1,H_.prototype.boolean=!1,H_.prototype.commaOrSpaceSeparated=!1,H_.prototype.commaSeparated=!1,H_.prototype.defined=!1,H_.prototype.mustUseProperty=!1,H_.prototype.number=!1,H_.prototype.overloadedBoolean=!1,H_.prototype.property=``,H_.prototype.spaceSeparated=!1,H_.prototype.space=void 0;var U_=s({boolean:()=>Z,booleanish:()=>G_,commaOrSpaceSeparated:()=>Y_,commaSeparated:()=>J_,number:()=>Q,overloadedBoolean:()=>K_,spaceSeparated:()=>q_}),W_=0,Z=X_(),G_=X_(),K_=X_(),Q=X_(),q_=X_(),J_=X_(),Y_=X_();function X_(){return 2**++W_}var Z_=Object.keys(U_),Q_=class extends H_{constructor(e,t,n,r){let i=-1;if(super(e,t),$_(this,`space`,r),typeof n==`number`)for(;++i<Z_.length;){let e=Z_[i];$_(this,Z_[i],(n&U_[e])===U_[e])}}};Q_.prototype.defined=!0;function $_(e,t,n){n&&(e[t]=n)}function ev(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Q_(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[V_(r)]=r,n[V_(a.attribute)]=r}return new z_(t,n,e.space)}var tv=ev({properties:{ariaActiveDescendant:null,ariaAtomic:G_,ariaAutoComplete:null,ariaBusy:G_,ariaChecked:G_,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:q_,ariaCurrent:null,ariaDescribedBy:q_,ariaDetails:null,ariaDisabled:G_,ariaDropEffect:q_,ariaErrorMessage:null,ariaExpanded:G_,ariaFlowTo:q_,ariaGrabbed:G_,ariaHasPopup:null,ariaHidden:G_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:q_,ariaLevel:Q,ariaLive:null,ariaModal:G_,ariaMultiLine:G_,ariaMultiSelectable:G_,ariaOrientation:null,ariaOwns:q_,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:G_,ariaReadOnly:G_,ariaRelevant:null,ariaRequired:G_,ariaRoleDescription:q_,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:G_,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function nv(e,t){return t in e?e[t]:t}function rv(e,t){return nv(e,t.toLowerCase())}var iv=ev({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:J_,acceptCharset:q_,accessKey:q_,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:q_,autoFocus:Z,autoPlay:Z,blocking:q_,capture:null,charSet:null,checked:Z,cite:null,className:q_,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:G_,controls:Z,controlsList:q_,coords:Q|J_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:K_,draggable:G_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:q_,height:Q,hidden:K_,high:Q,href:null,hrefLang:null,htmlFor:q_,httpEquiv:q_,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:q_,itemRef:q_,itemScope:Z,itemType:q_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:Q,pattern:null,ping:q_,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:q_,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:q_,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:G_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:G_,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:q_,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:G_,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:J_,part:q_,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:rv}),av=ev({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:Y_,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:q_,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:J_,g2:J_,glyphName:J_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Y_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:q_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Y_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Y_,rev:Y_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Y_,requiredFeatures:Y_,requiredFonts:Y_,requiredFormats:Y_,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Y_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Y_,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Y_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:nv}),ov=ev({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),sv=ev({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:rv}),cv=ev({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),lv=/[A-Z]/g,uv=/-[a-z]/g,dv=/^data[-\w.:]+$/i;function fv(e,t){let n=V_(t),r=t,i=H_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&dv.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(uv,mv);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!uv.test(e)){let n=e.replace(lv,pv);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Q_}return new i(r,t)}function pv(e){return`-`+e.toLowerCase()}function mv(e){return e.charAt(1).toUpperCase()}var hv=B_([tv,iv,ov,sv,cv],`html`),gv=B_([tv,av,ov,sv,cv],`svg`),_v={}.hasOwnProperty;function vv(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&_v.call(t,e)){let n=String(t[e]);i=_v.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var yv=/["&'<>`]/g,bv=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xv=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Sv=/[|\\{}()[\]^$+*?.]/g,Cv=new WeakMap;function wv(e,t){return e=e.replace(t.subset?Tv(t.subset):yv,r),t.subset||t.escapeOnly?e:e.replace(bv,n).replace(xv,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Tv(e){let t=Cv.get(e);return t||(t=Ev(e),Cv.set(e,t)),t}function Ev(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Sv,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Dv=/[\dA-Fa-f]/;function Ov(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Dv.test(String.fromCharCode(t))?r:r+`;`}var kv=/\d/;function Av(e,t,n){let r=`&#`+String(e);return n&&t&&!kv.test(String.fromCharCode(t))?r:r+`;`}var jv=`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`.split(`.`),Mv={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Nv=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Pv={}.hasOwnProperty,Fv={},Iv;for(Iv in Mv)Pv.call(Mv,Iv)&&(Fv[Mv[Iv]]=Iv);var Lv=/[^\dA-Za-z]/;function Rv(e,t,n,r){let i=String.fromCharCode(e);if(Pv.call(Fv,i)){let e=Fv[i],a=`&`+e;return n&&jv.includes(e)&&!Nv.includes(e)&&(!r||t&&t!==61&&Lv.test(String.fromCharCode(t)))?a:a+`;`}return``}function zv(e,t,n){let r=Ov(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Rv(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Av(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Bv(e,t){return wv(e,Object.assign({format:zv},t))}var Vv=/^>|^->|<!--|-->|--!>|<!-$/g,Hv=[`>`],Uv=[`<`,`>`];function Wv(e,t,n,r){return r.settings.bogusComments?`<?`+Bv(e.value,Object.assign({},r.settings.characterReferences,{subset:Hv}))+`>`:`<!--`+e.value.replace(Vv,i)+`-->`;function i(e){return Bv(e,Object.assign({},r.settings.characterReferences,{subset:Uv}))}}function Gv(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Kv(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qv(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Jv(e){return e.join(` `).trim()}var Yv=/[ \t\n\f\r]/g;function Xv(e){return typeof e==`object`?e.type===`text`&&Zv(e.value):Zv(e)}function Zv(e){return e.replace(Yv,``)===``}var Qv=ty(1),$v=ty(-1),ey=[];function ty(e){return t;function t(t,n,r){let i=t?t.children:ey,a=(n||0)+e,o=i[a];if(!r)for(;o&&Xv(o);)a+=e,o=i[a];return o}}var ny={}.hasOwnProperty;function ry(e){return t;function t(t,n,r){return ny.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var iy=ry({body:sy,caption:ay,colgroup:ay,dd:dy,dt:uy,head:ay,html:oy,li:ly,optgroup:py,option:my,p:cy,rp:fy,rt:fy,tbody:gy,td:yy,tfoot:_y,th:yy,thead:hy,tr:vy});function ay(e,t,n){let r=Qv(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Xv(r.value.charAt(0)))}function oy(e,t,n){let r=Qv(n,t);return!r||r.type!==`comment`}function sy(e,t,n){let r=Qv(n,t);return!r||r.type!==`comment`}function cy(e,t,n){let r=Qv(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function ly(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&r.tagName===`li`}function uy(e,t,n){let r=Qv(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function dy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function fy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function py(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function my(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function hy(e,t,n){let r=Qv(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function gy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function _y(e,t,n){return!Qv(n,t)}function vy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function yy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var by=ry({body:Cy,colgroup:wy,head:Sy,html:xy,tbody:Ty});function xy(e){let t=Qv(e,-1);return!t||t.type!==`comment`}function Sy(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Cy(e){let t=Qv(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Xv(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function wy(e,t,n){let r=$v(n,t),i=Qv(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&iy(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Ty(e,t,n){let r=$v(n,t),i=Qv(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&iy(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ey={name:[[`
66
+ `)&&t.pop(),t}function Nl(e,t,n=`-`){return e===t?`${e}`:`${e}${n}${t}`}function Pl(e){return e.line===null?e.path:`${e.path}:${e.line}`}function Fl(e,t){let n=e.findings.flatMap(e=>e.location?.path===t?[{finding:e,startLine:e.location.startLine,endLine:e.location.endLine}]:[]);return n.sort((e,t)=>e.startLine-t.startLine||e.endLine-t.endLine),n.map((e,t)=>({...e,number:t+1}))}function Il(e){let t=new Set;for(let n of e.hunks)for(let e of n.lines)e.newNo!==null&&t.add(e.newNo);return t}function Ll(e,t,n){for(let r=t;r<=n;r++)if(e.has(r))return r;return null}var Rl={off:{icon:`eye-off`,label:`Sans correctif`,description:`Le diff seul`},"before-after":{icon:`git-compare`,label:`Avant / après`,description:`Lignes visées barrées, correctif dessous`},applied:{icon:`wand-sparkles`,label:`Code corrigé`,description:`Correctif à la place des lignes visées`}},zl={diff:{icon:`diff`,label:`Unifié`,description:`Lignes supprimées au-dessus des lignes ajoutées`},split:{icon:`columns-2`,label:`Côte à côte`,description:`Ancien code à gauche, nouveau à droite`},new:{icon:`file-code`,label:`Nouveau code`,description:`Le nouveau code seul, ajouts marqués d'un filet`}},Bl={changes:{icon:`fold-vertical`,label:`Modifications`,description:`Les blocs du diff et leurs lignes de contexte`},file:{icon:`unfold-vertical`,label:`Fichier entier`,description:`Tout le fichier, lignes inchangées comprises`}};function Vl(e,t,n){return e.hunks.some(e=>{let r=e.lines.flatMap(e=>e.newNo===null?[]:[e.newNo]);return r.includes(t)&&r.includes(n)})}function Hl(e,t,n,r){let i=new Map,a=[];for(let o of e){let{finding:e}=o;if(e.suggestion===null)i.set(e.id,{state:`none`});else if(!Vl(t,o.startLine,o.endLine))i.set(e.id,{state:`outside`});else if(r===`off`||!n(e))i.set(e.id,{state:`hidden`});else{let t=a.find(e=>e.startLine<=o.endLine&&o.startLine<=e.endLine);t?i.set(e.id,{state:`blocked`,blockedBy:t.number}):(a.push(o),i.set(e.id,{state:`shown`}))}}return i}function Ul(e){return e.kind===`line`?ou(e.line):cu(e.entry.finding.id)}function Wl(e){return e.kind===`line`?e.line:e.entry.startLine-.5}function Gl(e,t){return e===null||t===null?!1:e.kind===`line`?t.kind===`line`&&e.line===t.line:t.kind===`fix`&&e.entry.finding.id===t.entry.finding.id}function Kl(e,t,n){let r=new Map;if(n!==`applied`)return r;for(let n of e)if(t.get(n.finding.id)?.state===`shown`)for(let e=n.startLine;e<=n.endLine;e++)r.set(e,n);return r}function ql(e,t){let n=t.get(e);return n?{kind:`fix`,entry:n}:{kind:`line`,line:e}}function Jl(e,t,n,r){if(t.get(e.finding.id)?.state===`shown`)return{kind:`fix`,entry:e};for(let t=e.startLine;t<=e.endLine;t++)if(n.has(t)&&!r.has(t))return{kind:`line`,line:t};let i=Ll(n,e.startLine,e.endLine);return i===null?null:ql(i,r)}function Yl(e){return{severity:e.severity,muted:e.status!==`open`}}function Xl(e,t){let n=null;for(let{finding:r,startLine:i,endLine:a}of e)t<i||t>a||(n===null||r.status===`open`&&n.status!==`open`||r.status===`open`==(n.status===`open`)&&Al(r.severity,n.severity)<0)&&(n=r);return n?Yl(n):null}function Zl(e){return Ml(e.finding.suggestion??``).map((t,n)=>({kind:`fix-line`,text:t,index:n,entry:e,bar:Yl(e.finding)}))}function Ql(e,t){return e.explanations.filter(e=>e.location.path===t).sort((e,t)=>e.location.startLine-t.location.startLine||(e.location.side===t.location.side?0:e.location.side===`old`?-1:1)||e.location.endLine-t.location.endLine)}function $l(e,t){let{side:n,startLine:r,endLine:i}=e.location,a=n===`new`?t.newNo:t.type===`add`?null:t.oldNo;return a!==null&&a>=r&&a<=i}function eu(e,t,n,r){for(let i of e.hunks){let e=i.lines.findIndex(e=>$l(t,e));if(e===-1)continue;let a=i.lines[e];if(a.newNo!==null){let e=ql(a.newNo,n);return{selector:Ul(e),order:Wl(e)}}let o=i.lines.slice(e).find(e=>e.newNo!==null),s=i.lines.slice(0,e).findLast(e=>e.newNo!==null);if(r===`new`){let e=o??s;if(!e)continue;let t=ql(e.newNo,n);return{selector:Ul(t),order:Wl(t)+(o?-.25:.25)}}let c=o?o.newNo-.25:s?s.newNo+.25:i.newStart;return{selector:su(a.oldNo),order:c}}return null}function tu(e,t,n,r,i,a){let o=Il(e),s=Kl(t,n,r),c=t.filter(e=>n.get(e.finding.id)?.state===`shown`),l=new Map,u=new Map;for(let e of t){if(n.get(e.finding.id)?.state===`shown`)continue;let t=Jl(e,n,o,s);if(t?.kind===`line`&&l.set(t.line,[...l.get(t.line)??[],e]),t?.kind===`fix`){let n=t.entry.finding.id;u.set(n,[...u.get(n)??[],e])}}let d=e=>({kind:`fix-strip`,entry:e,bar:Yl(e.finding),pills:u.get(e.finding.id)??[]});return e.hunks.map(e=>{let n=[],o=Se(e.lines),s=j(o);for(let{line:e,oldLine:u}of o){if(a===`new`&&e.type===`del`)continue;let o=e.newNo,f=o===null?void 0:c.find(e=>o>=e.startLine&&o<=e.endLine);r===`applied`&&f?f.startLine===o&&n.push(d(f),...Zl(f)):(f&&f.startLine===o&&n.push(d(f)),n.push({kind:`line`,line:e,oldLine:u,inline:s.get(e)??null,replaced:f!==void 0&&e.type!==`del`,explained:i.some(t=>$l(t,e)||u!==null&&$l(t,u)),bar:f?Yl(f.finding):o===null?null:Xl(t,o),pills:o===null?[]:l.get(o)??[]}),f&&f.endLine===o&&n.push(...Zl(f)))}return{hunk:e,rows:n}})}function nu(e){switch(e.kind){case`line`:return e.line.newNo===null?`o${e.line.oldNo}`:`n${e.line.newNo}`;case`fix-strip`:return`s${e.entry.finding.id}`;case`fix-line`:return`f${e.entry.finding.id}:${e.index}`}}function ru(e){switch(e.kind){case`line`:return e.line.text;case`fix-strip`:return null;case`fix-line`:return e.text}}function iu(e,t){return e?.kind===`line`&&e.oldLine===null&&e.line.type===t}function au(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r.kind===`fix-strip`)t.push({kind:`full`,row:r}),n++;else if(r.kind===`line`&&r.oldLine!==null)t.push({kind:`pair`,left:r,right:r}),n++;else if(r.kind===`fix-line`||iu(r,`add`))t.push({kind:`pair`,left:null,right:r}),n++;else if(iu(r,`context`))t.push({kind:`pair`,left:r,right:r}),n++;else{let r=[],i=[];for(let t=e[n];iu(t,`del`);t=e[++n])r.push(t);for(let t=e[n];iu(t,`add`);t=e[++n])i.push(t);for(let e=0;e<Math.max(r.length,i.length);e++)t.push({kind:`pair`,left:r[e]??null,right:i[e]??null})}}return t}function ou(e){return`[data-line="${e}"]`}function su(e){return`[data-old-line="${e}"]`}function cu(e){return`[data-fix="${e}"]`}function V(e,t){return e.notes.filter(e=>e.location?.path===t&&e.location.line!==null).sort((e,t)=>e.location.line-t.location.line)}function lu(e){if(e.kind===`fix-line`)return{kind:null,added:[],deleted:[],newNo:null,strip:null};let{line:t}=e,n=e.oldLine===null?t.type===`context`?null:t.type:`reindent`;return{kind:n,added:n===`add`||n===`reindent`?[t.newNo]:[],deleted:n===`del`?[t.oldNo]:[],newNo:t.newNo,strip:null}}function uu(e){return{kind:null,added:[],deleted:[],newNo:null,strip:e}}function du(e,t){return e.flatMap(e=>t===`split`?au(e.rows).map(e=>{if(e.kind===`full`)return uu(e.row.entry);let t=e.left?lu(e.left):null,n=e.right?lu(e.right):null;if(n?.kind===`reindent`)return n;let r=n?.kind===`add`?n.added:[],i=t?.kind===`del`?t.deleted:[];return{kind:r.length>0?i.length>0?`mod`:`add`:i.length>0?`del`:null,added:r,deleted:i,newNo:n?.newNo??null,strip:null}}):e.rows.map(e=>e.kind===`fix-strip`?uu(e.entry):lu(e)))}function fu(e,t){return`${e} ligne${e>1?`s`:``} ${t}${e>1?`s`:``}`}function pu(e){let t=Math.min(...e),n=Math.max(...e);return t===n?`ligne ${t}`:`lignes ${t} à ${n}`}function mu(e,t,n){switch(e){case`add`:return`${fu(t.length,`ajoutée`)} · ${pu(t)}`;case`del`:return`${fu(n.length,`supprimée`)} · ancienne ${pu(n)}`;case`mod`:return`${fu(n.length,`supprimée`)}, ${t.length} ajoutée${t.length>1?`s`:``} · ${pu(t)}`;case`reindent`:return`Indentation modifiée · ${pu(t)}`}}function hu(e,t,n,r){let i=du(e,t),a=[];for(let e=0;e<i.length;){let t=i[e].kind,n=e+1;for(;n<i.length&&i[n].kind===t;)n++;if(t!==null){let r=i.slice(e,n);a.push({kind:t,start:e,end:n,label:mu(t,r.flatMap(e=>e.added),r.flatMap(e=>e.deleted))})}e=n}let o=[];for(let e of n){let t=i.findIndex(t=>t.strip?.finding.id===e.finding.id||t.newNo!==null&&t.newNo>=e.startLine&&t.newNo<=e.endLine);t!==-1&&o.push({kind:`finding`,entry:e,row:t})}for(let e of r){let t=i.findIndex(t=>t.newNo===e);t!==-1&&o.push({kind:`note`,line:e,row:t})}return{changes:a,dots:o}}function gu(e,t){return e===t?`la ligne ${e}`:`les lignes ${e} à ${t}`}var _u=`feature-analyzer.`;function vu(e,t,n){try{let r=window.localStorage.getItem(_u+e);return r!==null&&Object.hasOwn(t,r)?r:n}catch{return n}}function yu(e,t){try{window.localStorage.setItem(_u+e,t)}catch{}}function bu(e,t){if(e.watchedAnalyses===null)return null;let n=new Map((e.analyses??[]).map(e=>[e.id,e])),r=new Set,i=t;for(;i!==void 0&&!r.has(i);){if(e.watchedAnalyses.has(i))return!0;r.add(i),i=n.get(i)?.followUpOf?.id}return!1}var xu=5e3,Su=0,Cu,wu=null,Tu=`L'analyse a été modifiée entre-temps (par l'agent ou un autre onglet) : elle vient d'être rechargée. Vérifiez l'état affiché puis refaites votre action.`,H=se((e,t)=>{async function n(n,r){let i=t().current?.analysis;if(!i)return!1;e({saving:!0});try{let n=await r(i);return t().current?.id===n.analysis.id&&e({current:{id:n.analysis.id,analysis:n.analysis,links:t().current?.links??null,error:null}}),!0}catch(e){return e instanceof ce&&e.status===409?(await t().reloadCurrent(),t().notify(`info`,Tu)):t().notify(`error`,`${n} : ${e.message}`),!1}finally{e({saving:!1})}}return{config:null,analyses:null,unreadable:[],listError:null,current:null,diff:null,diffError:null,saving:!1,notice:null,homeFilter:`to_review`,collapsedProjects:new Set,fixMode:vu(`fix-mode`,Rl,`before-after`),codeView:vu(`code-view`,zl,`diff`),diffScope:vu(`diff-scope`,Bl,`changes`),gapsCollapsed:!1,filesPanelCollapsed:!1,zenMode:!1,findingsShown:!0,explanationsShown:!0,watchedAnalyses:null,setHomeFilter:t=>e({homeFilter:t}),toggleProject:n=>{let r=new Set(t().collapsedProjects);r.has(n)?r.delete(n):r.add(n),e({collapsedProjects:r})},setFixMode:t=>{yu(`fix-mode`,t),e({fixMode:t})},setCodeView:t=>{yu(`code-view`,t),e({codeView:t})},setDiffScope:t=>{yu(`diff-scope`,t),e({diffScope:t})},setGapsCollapsed:t=>e({gapsCollapsed:t}),setFilesPanelCollapsed:t=>e({filesPanelCollapsed:t}),setZenMode:t=>e({zenMode:t}),setFindingsShown:t=>e({findingsShown:t}),setExplanationsShown:t=>e({explanationsShown:t}),loadConfig:async()=>{try{e({config:await de.getConfig()})}catch(e){t().notify(`error`,`Configuration illisible : ${e.message}`)}},setListing:t=>e({analyses:t.analyses,unreadable:t.unreadable,listError:null}),loadAnalyses:async()=>{try{t().setListing(await de.listAnalyses())}catch(t){e({listError:`Liste des analyses illisible : ${t.message}`})}},openAnalysis:n=>{t().current?.id!==n&&(e({current:{id:n,analysis:null,links:null,error:null}}),t().reloadCurrent())},reloadCurrent:async()=>{let n=t().current?.id;if(n)try{let{analysis:r,links:i}=await de.getAnalysis(n);if(t().current?.id!==n)return;e({current:{id:n,analysis:r,links:i,error:null}}),await t().ensureDiff()}catch(r){if(t().current?.id!==n)return;e({current:{id:n,analysis:null,links:null,error:r.message}})}},ensureDiff:async()=>{let n=t().current?.analysis;if(!n)return;let r=t().diff;if(r&&r.id===n.id&&r.snapshotAt===n.snapshotAt)return;let i=`${n.id}@${n.snapshotAt}`;if(wu?.key===i)return wu.promise;let a=(async()=>{try{let{diff:r}=await de.getDiff(n.id);if(t().current?.analysis?.id!==n.id)return;e({diff:{id:n.id,snapshotAt:n.snapshotAt,snapshot:r},diffError:null})}catch(t){e({diffError:`Diff illisible : ${t.message}`})}finally{wu?.key===i&&(wu=null)}})();return wu={key:i,promise:a},a},setFileReviewed:(e,t)=>n(`Marquage du fichier impossible`,n=>de.setFileReviewed(n.id,{path:e,reviewed:t,baseRevision:n.revision})),setFileLevel:(e,t)=>n(`Reclassement impossible`,n=>de.setFileLevel(n.id,{path:e,level:t,baseRevision:n.revision})),setFindingStatus:(e,t)=>n(`Changement de statut impossible`,n=>de.setFindingStatus(n.id,e,{status:t,baseRevision:n.revision})),addNote:(e,t,r,i,a)=>n(a?`Question non envoyée`:`Remarque non enregistrée`,n=>de.addNote(n.id,{path:e,line:t,findingId:i,text:r,askAgent:a,baseRevision:n.revision})),markAnswerSeen:e=>n(`Lecture de la réponse non enregistrée`,t=>de.markAnswerSeen(t.id,e,{baseRevision:t.revision})),replyToQuestion:(e,t)=>n(`Relance non envoyée`,n=>de.replyToQuestion(n.id,e,{text:t,baseRevision:n.revision})),setWatchedAnalyses:t=>e({watchedAnalyses:new Set(t)}),updateNote:(e,t)=>n(`Remarque non modifiée`,n=>de.updateNote(n.id,e,{text:t,baseRevision:n.revision})),deleteNote:e=>n(`Suppression impossible`,t=>de.deleteNote(t.id,e,{baseRevision:t.revision})),submitReview:(e,t,r)=>n(`Retour non enregistré`,n=>de.submitReview(n.id,{decision:e,findingIds:t,noteIds:r,baseRevision:n.revision})),markProcessed:async(n,r)=>{e({saving:!0});try{return await de.markProcessed(n.id,{note:r,baseRevision:n.revision}),await t().loadAnalyses(),t().current?.id===n.id&&await t().reloadCurrent(),t().notify(`info`,`« ${n.title} » est marquée traitée.`),!0}catch(e){return e instanceof ce&&e.status===409?(await t().loadAnalyses(),t().notify(`info`,Tu)):t().notify(`error`,`Marquage impossible : ${e.message}`),!1}finally{e({saving:!1})}},copy:async(e,n)=>{try{await fe(e),t().notify(`info`,n)}catch(e){t().notify(`error`,`Copie impossible : ${e.message}`)}},notify:(t,n)=>{clearTimeout(Cu),e({notice:{id:++Su,kind:t,text:n}}),Cu=setTimeout(()=>e({notice:null}),xu)},dismissNotice:()=>{clearTimeout(Cu),e({notice:null})}}}),Eu={"scan-search":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}),(0,O.jsx)(`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}),(0,O.jsx)(`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}),(0,O.jsx)(`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,O.jsx)(`path`,{d:`m16 16-1.9-1.9`})]}),"git-branch":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`}),(0,O.jsx)(`circle`,{cx:`18`,cy:`6`,r:`3`}),(0,O.jsx)(`circle`,{cx:`6`,cy:`18`,r:`3`}),(0,O.jsx)(`path`,{d:`M18 9a9 9 0 0 1-9 9`})]}),"chevron-down":(0,O.jsx)(`path`,{d:`m6 9 6 6 6-6`}),"chevron-right":(0,O.jsx)(`path`,{d:`m9 18 6-6-6-6`}),"arrow-left":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m12 19-7-7 7-7`}),(0,O.jsx)(`path`,{d:`M19 12H5`})]}),"arrow-right":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M5 12h14`}),(0,O.jsx)(`path`,{d:`m12 5 7 7-7 7`})]}),sparkles:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`}),(0,O.jsx)(`path`,{d:`M20 3v4`}),(0,O.jsx)(`path`,{d:`M22 5h-4`}),(0,O.jsx)(`path`,{d:`M4 17v2`}),(0,O.jsx)(`path`,{d:`M5 18H3`})]}),bot:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 8V4H8`}),(0,O.jsx)(`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}),(0,O.jsx)(`path`,{d:`M2 14h2`}),(0,O.jsx)(`path`,{d:`M20 14h2`}),(0,O.jsx)(`path`,{d:`M15 13v2`}),(0,O.jsx)(`path`,{d:`M9 13v2`})]}),user:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`7`,r:`4`})]}),circle:(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),"circle-check":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),"circle-dot":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1`})]}),"circle-x":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`m15 9-6 6`}),(0,O.jsx)(`path`,{d:`m9 9 6 6`})]}),square:(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),"square-check":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),check:(0,O.jsx)(`path`,{d:`M20 6 9 17l-5-5`}),pencil:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}),(0,O.jsx)(`path`,{d:`m15 5 4 4`})]}),copy:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,O.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]}),info:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`M12 16v-4`}),(0,O.jsx)(`path`,{d:`M12 8h.01`})]}),save:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}),(0,O.jsx)(`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}),(0,O.jsx)(`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`})]}),"message-square":(0,O.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`}),"messages-square":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z`}),(0,O.jsx)(`path`,{d:`M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1`})]}),send:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`}),(0,O.jsx)(`path`,{d:`m21.854 2.147-10.94 10.939`})]}),"loader-circle":(0,O.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}),bell:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}),(0,O.jsx)(`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`})]}),trash:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 6h18`}),(0,O.jsx)(`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`}),(0,O.jsx)(`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2`})]}),"triangle-alert":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,O.jsx)(`path`,{d:`M12 9v4`}),(0,O.jsx)(`path`,{d:`M12 17h.01`})]}),network:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,O.jsx)(`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}),(0,O.jsx)(`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}),(0,O.jsx)(`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}),(0,O.jsx)(`path`,{d:`M12 12V8`})]}),workflow:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}),(0,O.jsx)(`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`})]}),"brain-circuit":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`}),(0,O.jsx)(`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`}),(0,O.jsx)(`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`}),(0,O.jsx)(`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`}),(0,O.jsx)(`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`}),(0,O.jsx)(`path`,{d:`M12 13h4`}),(0,O.jsx)(`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`}),(0,O.jsx)(`path`,{d:`M12 8h8`}),(0,O.jsx)(`path`,{d:`M16 8V5a2 2 0 0 1 2-2`}),(0,O.jsx)(`circle`,{cx:`16`,cy:`13`,r:`.5`}),(0,O.jsx)(`circle`,{cx:`18`,cy:`3`,r:`.5`}),(0,O.jsx)(`circle`,{cx:`20`,cy:`21`,r:`.5`}),(0,O.jsx)(`circle`,{cx:`20`,cy:`8`,r:`.5`})]}),"file-code":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,O.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}),(0,O.jsx)(`path`,{d:`M10 12.5 8 15l2 2.5`}),(0,O.jsx)(`path`,{d:`m14 12.5 2 2.5-2 2.5`})]}),"flask-conical":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`}),(0,O.jsx)(`path`,{d:`M6.453 15h11.094`}),(0,O.jsx)(`path`,{d:`M8.5 2h7`})]}),minus:(0,O.jsx)(`path`,{d:`M5 12h14`}),plus:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M5 12h14`}),(0,O.jsx)(`path`,{d:`M12 5v14`})]}),maximize:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`}),(0,O.jsx)(`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`}),(0,O.jsx)(`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`}),(0,O.jsx)(`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`})]}),minimize:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`}),(0,O.jsx)(`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`}),(0,O.jsx)(`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`}),(0,O.jsx)(`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`})]}),focus:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,O.jsx)(`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}),(0,O.jsx)(`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}),(0,O.jsx)(`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}),(0,O.jsx)(`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`})]}),"eye-off":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}),(0,O.jsx)(`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}),(0,O.jsx)(`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}),(0,O.jsx)(`path`,{d:`m2 2 20 20`})]}),"rotate-ccw":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,O.jsx)(`path`,{d:`M3 3v5h5`})]}),"panel-left-close":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M9 3v18`}),(0,O.jsx)(`path`,{d:`m16 15-3-3 3-3`})]}),"panel-left-open":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M9 3v18`}),(0,O.jsx)(`path`,{d:`m14 9 3 3-3 3`})]}),folder:(0,O.jsx)(`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}),eye:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),"clipboard-check":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`}),(0,O.jsx)(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}),(0,O.jsx)(`path`,{d:`m9 14 2 2 4-4`})]}),hourglass:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M5 22h14`}),(0,O.jsx)(`path`,{d:`M5 2h14`}),(0,O.jsx)(`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}),(0,O.jsx)(`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`})]}),list:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M3 12h.01`}),(0,O.jsx)(`path`,{d:`M3 18h.01`}),(0,O.jsx)(`path`,{d:`M3 6h.01`}),(0,O.jsx)(`path`,{d:`M8 12h13`}),(0,O.jsx)(`path`,{d:`M8 18h13`}),(0,O.jsx)(`path`,{d:`M8 6h13`})]}),"corner-up-left":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`}),(0,O.jsx)(`path`,{d:`M9 14 4 9l5-5`})]}),"corner-down-right":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m15 10 5 5-5 5`}),(0,O.jsx)(`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`})]}),move:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 2v20`}),(0,O.jsx)(`path`,{d:`m15 19-3 3-3-3`}),(0,O.jsx)(`path`,{d:`m19 9 3 3-3 3`}),(0,O.jsx)(`path`,{d:`M2 12h20`}),(0,O.jsx)(`path`,{d:`m5 9-3 3 3 3`}),(0,O.jsx)(`path`,{d:`m9 5 3-3 3 3`})]}),"chevron-up":(0,O.jsx)(`path`,{d:`m18 15-6-6-6 6`}),"fold-vertical":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 22v-6`}),(0,O.jsx)(`path`,{d:`M12 8V2`}),(0,O.jsx)(`path`,{d:`M4 12H2`}),(0,O.jsx)(`path`,{d:`M10 12H8`}),(0,O.jsx)(`path`,{d:`M16 12h-2`}),(0,O.jsx)(`path`,{d:`M22 12h-2`}),(0,O.jsx)(`path`,{d:`m15 19-3-3-3 3`}),(0,O.jsx)(`path`,{d:`m15 5-3 3-3-3`})]}),"unfold-vertical":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 22v-6`}),(0,O.jsx)(`path`,{d:`M12 8V2`}),(0,O.jsx)(`path`,{d:`M4 12H2`}),(0,O.jsx)(`path`,{d:`M10 12H8`}),(0,O.jsx)(`path`,{d:`M16 12h-2`}),(0,O.jsx)(`path`,{d:`M22 12h-2`}),(0,O.jsx)(`path`,{d:`m15 19-3 3-3-3`}),(0,O.jsx)(`path`,{d:`m15 5-3-3-3 3`})]}),diff:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`M12 3v14`}),(0,O.jsx)(`path`,{d:`M5 10h14`}),(0,O.jsx)(`path`,{d:`M5 21h14`})]}),"columns-2":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}),(0,O.jsx)(`path`,{d:`M12 3v18`})]}),"git-compare":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`18`,cy:`18`,r:`3`}),(0,O.jsx)(`circle`,{cx:`6`,cy:`6`,r:`3`}),(0,O.jsx)(`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}),(0,O.jsx)(`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`})]}),"wand-sparkles":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`}),(0,O.jsx)(`path`,{d:`m14 7 3 3`}),(0,O.jsx)(`path`,{d:`M5 6v4`}),(0,O.jsx)(`path`,{d:`M19 14v4`}),(0,O.jsx)(`path`,{d:`M10 2v2`}),(0,O.jsx)(`path`,{d:`M7 8H3`}),(0,O.jsx)(`path`,{d:`M21 16h-4`}),(0,O.jsx)(`path`,{d:`M11 3H9`})]}),target:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`6`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`})]}),"chevrons-right":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m6 17 5-5-5-5`}),(0,O.jsx)(`path`,{d:`m13 17 5-5-5-5`})]}),"arrow-up-down":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`path`,{d:`m21 16-4 4-4-4`}),(0,O.jsx)(`path`,{d:`M17 20V4`}),(0,O.jsx)(`path`,{d:`m3 8 4-4 4 4`}),(0,O.jsx)(`path`,{d:`M7 4v16`})]}),"circle-alert":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}),(0,O.jsx)(`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`})]}),"circle-help":(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,O.jsx)(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),(0,O.jsx)(`path`,{d:`M12 17h.01`})]})};function U({name:e,size:t=14,color:n,className:r}){return(0,O.jsx)(`svg`,{className:r,width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:n??`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:Eu[e]})}function Du(){let e=H(e=>e.notice),t=H(e=>e.dismissNotice);return e?(0,O.jsxs)(`div`,{className:`notice notice-${e.kind}`,role:e.kind===`error`?`alert`:`status`,children:[(0,O.jsx)(U,{name:e.kind===`error`?`triangle-alert`:`info`}),(0,O.jsx)(`span`,{className:`notice-text`,children:e.text}),(0,O.jsx)(`button`,{type:`button`,className:`notice-close`,onClick:t,"aria-label":`Fermer le message`,children:(0,O.jsx)(U,{name:`circle-x`})})]},e.id):null}function Ou({analysis:e}){let t=e.files.length,n=e.files.filter(e=>e.reviewed).length,r=t===0?0:n/t*100;return(0,O.jsxs)(`div`,{className:`topbar-progress`,title:`${n} fichier(s) revu(s) sur ${t}`,children:[(0,O.jsxs)(`span`,{className:`topbar-progress-label mono`,children:[n,`/`,t,` revus`]}),(0,O.jsx)(`div`,{className:`topbar-progress-bar`,role:`progressbar`,"aria-label":`Fichiers revus`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":n,children:(0,O.jsx)(`div`,{className:`progress-fill`,style:{width:`${r}%`}})})]})}var ku={critical:{label:`Critique`,color:`#f0625a`,background:`#34191c`},major:{label:`Majeur`,color:`#e3a33b`,background:`#33270f`},minor:{label:`Mineur`,color:`#6fb3ff`,background:`#13243a`},trivial:{label:`Détail`,color:`#9aa1b1`,background:`#1c2029`}},Au={label:`Remarque`,color:`#c4a8ff`,background:`#241d3a`},ju={label:`Question`,color:`#8b97ff`,background:`#1f2540`},Mu={open:`Ouvert`,ignored:`Ignoré`,outdated:`Obsolète`},Nu={issue:`Problème`,requirement_gap:`Exigence manquante`},Pu={added:`Ajouté`,modified:`Modifié`,deleted:`Supprimé`,renamed:`Renommé`,untracked:`Non suivi`},Fu={added:`A`,modified:`M`,deleted:`D`,renamed:`R`,untracked:`U`},Iu={central:{label:`Central`,description:`Règle métier ou calcul`},check:{label:`À vérifier`,description:`Appelant ou écran qui branche une règle`},skim:{label:`Survol`,description:`Tests, suppressions, imports, routes`}},Lu={branch:`Branche`,working_tree:`Copie de travail`},Ru={approve:`Approuver`,request_changes:`Demander des corrections`,reject:`Rejeter`},zu={not_started:{label:`Non commencée`,color:`#9aa1b1`,background:`#1c2029`},in_progress:{label:`En cours`,color:`#6fb3ff`,background:`#13243a`},files_reviewed:{label:`Fichiers revus`,color:`#8b97ff`,background:`#1b1f3d`},submitted:{label:`Soumise`,color:`#3fb950`,background:`#11201a`}},Bu={label:`Traitée`,color:`#5fd4c4`,background:`#10272a`},Vu={approve:{label:`Approuvée`,color:`#3fb950`,background:`#11201a`},request_changes:{label:`Corrections demandées`,color:`#e3a33b`,background:`#33270f`},reject:{label:`Rejetée`,color:`#f0625a`,background:`#34191c`}},Hu={new:{label:`Nouveau`,fill:`#11201a`,stroke:`#2c6b3a`,text:`#bfeccd`,accent:`#3fb950`},modified:{label:`Modifié`,fill:`#151a2b`,stroke:`#36407a`,text:`#d5daff`,accent:`#8b97ff`},impacted:{label:`Impacté, non modifié`,fill:`#13161f`,stroke:`#2a2f3d`,text:`#7b8396`,accent:`#646b7b`},existing:{label:`Existant`,fill:`#13161f`,stroke:`#2a2f3d`,text:`#9aa1b1`,accent:`#646b7b`},finding:{label:`Constat`,fill:`#221416`,stroke:`#6b2a2d`,text:`#f0a09a`,accent:`#f0625a`},missing:{label:`Attendu, absent`,fill:null,stroke:`#6b2a2d`,text:`#f0776f`,accent:`#b0605b`}};function Uu(e){let t=e.lastIndexOf(`/`);return t===-1?{folder:``,name:e}:{folder:e.slice(0,t+1),name:e.slice(t+1)}}function Wu(e,t=Date.now()){let n=Math.max(0,Math.round((t-Date.parse(e))/1e3));if(n<60)return`à l'instant`;let r=Math.round(n/60);if(r<60)return`il y a ${r} min`;let i=Math.round(r/60);return i<24?`il y a ${i} h`:`il y a ${Math.round(i/24)} j`}function Gu(e){let t=new Date(e);return`${t.toLocaleDateString(`fr-FR`)} à ${t.toLocaleTimeString(`fr-FR`,{hour:`2-digit`,minute:`2-digit`})}`}function Ku(e){return e.by===`user`?`Marquée traitée par le relecteur`:`Traitée par l'agent`}function qu(e){return`${Ku(e)} le ${Gu(e.at)}${e.note===null?``:` — ${e.note}`}`}function Ju(e,t=new Date){let n=new Date(e),r=n.toLocaleTimeString(`fr-FR`,{hour:`2-digit`,minute:`2-digit`});return n.toDateString()===t.toDateString()?r:n.getFullYear()===t.getFullYear()?`${n.toLocaleDateString(`fr-FR`,{day:`2-digit`,month:`2-digit`})} ${r}`:n.toLocaleDateString(`fr-FR`)}function Yu(e,t,n=`${t}s`){return`${e} ${e>1?n:t}`}function Xu(e,t){return Yu(t,ku[e].label.toLowerCase())}var Zu={critical:[`critique`,`critiques`],major:[`majeur`,`majeurs`],minor:[`mineur`,`mineurs`],trivial:[`de détail`,`de détail`]};function Qu(e,t){let[n,r]=Zu[e];return t>1?`${t} constats ${r} ouverts`:`${t} constat ${n} ouvert`}function $u(e,t=4){let n=e.lastIndexOf(`.`),r=n>0?e.length-n:0,i=Math.max(0,e.length-r-t);return{head:e.slice(0,i),tail:e.slice(i)}}function ed(e){return/^[0-9a-f]{40}$/.test(e)?e.slice(0,7):e}function td(e){if(e.mode===`working_tree`)return Lu.working_tree;if(e.head===null)throw Error(`L'analyse ${e.id} est en mode branche sans ref de tête.`);return ed(e.head)}function W(e){return e.mode===`working_tree`?Lu.working_tree:`${td(e)} → ${ed(e.base)}`}function nd(e,t){let n=e.location;return n?`${Uu(n.path).name}:${Nl(n.startLine,n.endLine,`–`)}`:t?.source?`demande ${t.source}`:`exigence manquante`}function G(e){if(!e.location)return`analyse entière`;let t=Uu(e.location.path).name;return e.location.line===null?t:`${t}:${e.location.line}`}function K(e,t){return e===t?`ligne ${e}`:`lignes ${e}–${t}`}function q(e){return e.files.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0})}var rd=[`to_review`,`to_process`,`processed`,`approved`,`all`];function id(e,t){let{state:n,decision:r,processed:i,toProcess:a}=e.progress;if(t!==`all`&&e.followedBy!==null)return!1;switch(t){case`to_review`:return n!==`submitted`;case`processed`:return n===`submitted`&&i!==null;case`to_process`:return a;case`approved`:return n===`submitted`&&r===`approve`&&i===null;case`all`:return!0}}function ad(e,t){return e.filter(e=>id(e,t))}function od(e){return Object.fromEntries(rd.map(t=>[t,ad(e,t).length]))}function sd(e){let t=new Map;for(let n of e){let e=t.get(n.project);e?e.push(n):t.set(n.project,[n])}return[...t].map(([e,t])=>({project:e,analyses:t,counts:Ol.map(e=>({state:e,count:t.filter(t=>t.progress.state===e).length})).filter(({count:e})=>e>0)}))}function cd(e){return Gc.map(t=>({severity:t,count:e.openFindings[t]})).filter(({count:e})=>e>0)}function ld(e){let{reviewedFiles:t,totalFiles:n}=e.progress;return n===0?0:t/n*100}function ud(e){let{question:t}=e;return[{text:e.text,askedAt:t.askedAt,answer:t.answer,answerSeenAt:t.answerSeenAt},...t.followUps]}function dd(e){let t=ud(e);return t[t.length-1]}function fd(e){return dd(e).answer===null}function pd(e){let t=dd(e);return t.answer!==null&&t.answerSeenAt===null}function md(e){return fd(e)?1:pd(e)?0:2}function hd(e){return e.notes.filter(e=>e.question!==null).sort((e,t)=>md(e)-md(t)||dd(t).askedAt.localeCompare(dd(e).askedAt))}function gd(e){if(!e.location)return`Revue entière`;let t=e.location.path.split(`/`).pop()??e.location.path;return e.location.line===null?t:`${t} · l. ${e.location.line}`}function _d({note:e}){return fd(e)?(0,O.jsx)(`span`,{className:`questions-row-status is-waiting`,children:`Agent notifié`}):pd(e)?(0,O.jsx)(`span`,{className:`questions-row-status is-answered`,children:`Réponse reçue`}):(0,O.jsx)(`span`,{className:`questions-row-status is-read`,children:`Lue`})}function vd({listened:e}){return(0,O.jsxs)(`span`,{className:`agent-presence${e?` is-live`:``}`,title:e?`Un agent a activé les notifications de cette revue : il reçoit vos questions et la fin de revue dès qu'elles sont envoyées.`:`Aucun agent n'a activé les notifications de cette revue : vos questions l'attendront jusqu'à ce qu'il le fasse.`,children:[(0,O.jsx)(`span`,{className:`agent-presence-dot`,"aria-hidden":`true`}),e?`Agent à l'écoute`:`Aucun agent à l'écoute`]})}function yd({analysis:e}){let t=H(t=>bu(t,e.id)),[n,r]=(0,v.useState)(!1),i=(0,v.useRef)(null);if((0,v.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]),t===null)return null;let a=t,o=hd(e),s=o.filter(pd).length;return(0,O.jsxs)(`div`,{className:`agent-questions`,ref:i,children:[(0,O.jsx)(vd,{listened:a}),o.length>0&&(0,O.jsxs)(`button`,{type:`button`,className:`questions-button${n?` is-open`:``}`,"aria-haspopup":`menu`,"aria-expanded":n,onClick:()=>r(!n),children:[(0,O.jsx)(U,{name:`messages-square`}),`Questions`,s>0&&(0,O.jsx)(`span`,{className:`questions-badge`,title:Yu(s,`nouvelle réponse`,`nouvelles réponses`),children:s})]}),n&&o.length>0&&(0,O.jsxs)(`div`,{className:`questions-menu`,role:`menu`,children:[(0,O.jsxs)(`div`,{className:`questions-menu-head`,children:[(0,O.jsx)(`span`,{className:`questions-menu-title`,children:`Questions de la revue`}),s>0&&(0,O.jsx)(`span`,{className:`questions-menu-unread`,children:Yu(s,`nouvelle réponse`,`nouvelles réponses`)})]}),o.map(t=>(0,O.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`questions-row${pd(t)?` is-unread`:``}`,onClick:()=>{r(!1),T(w.review(e.id,t.location?.path??null,t.location?.line??null))},children:[(0,O.jsx)(`span`,{className:`questions-row-text`,children:t.text}),(0,O.jsxs)(`span`,{className:`questions-row-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:gd(t)}),(0,O.jsx)(_d,{note:t})]})]},t.id)),(0,O.jsxs)(`div`,{className:`questions-menu-foot`,children:[(0,O.jsx)(U,{name:`bell`,size:13}),a?`L'agent est notifié de chaque question et de la fin de revue.`:`Aucun agent à l'écoute : vos questions lui parviendront dès qu'il activera les notifications.`]})]})]})}function bd({severity:e,fixed:t=!0}){let n=ku[e];return(0,O.jsx)(`span`,{className:`pill${t?` pill-fixed`:``}`,style:{color:n.color,background:n.background},children:n.label})}function xd({fixed:e=!0}){return(0,O.jsx)(`span`,{className:`pill${e?` pill-fixed`:``}`,style:{color:Au.color,background:Au.background},children:Au.label})}function Sd({fixed:e=!0}){return(0,O.jsxs)(`span`,{className:`pill pill-question${e?` pill-fixed`:``}`,style:{color:ju.color,background:ju.background},children:[(0,O.jsx)(U,{name:`send`,size:11}),ju.label]})}function Cd({status:e}){return e===`open`?null:(0,O.jsx)(`span`,{className:`tag tag-${e}`,children:Mu[e]})}function wd({kind:e}){return e===`requirement_gap`?(0,O.jsx)(`span`,{className:`tag tag-gap`,children:Nu[e]}):null}function Td({severity:e,count:t,title:n,href:r}){return(0,O.jsx)(Dd,{color:ku[e].color,count:t,title:n,href:r})}function Ed({count:e,title:t,href:n}){return(0,O.jsx)(Dd,{color:Au.color,count:e,title:t,href:n,square:!0})}function Dd({color:e,count:t,title:n,href:r,square:i}){let a=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`severity-dot-mark${i?` is-square`:``}`,style:{background:e}}),t]});return r?(0,O.jsx)(`a`,{className:`severity-dot is-link`,href:r,style:{color:e},title:n,"aria-label":n,children:a}):(0,O.jsx)(`span`,{className:`severity-dot`,style:{color:e},title:n,children:a})}function Od({style:e,small:t,title:n}){return(0,O.jsx)(`span`,{className:`pill${t?` pill-small`:``}`,style:{color:e.color,background:e.background},title:n,children:e.label})}function kd({progress:e,small:t}){return(0,O.jsxs)(`span`,{className:`review-badges`,children:[(0,O.jsx)(Od,{style:zu[e.state],small:t}),e.decision&&(0,O.jsx)(Od,{style:Vu[e.decision],small:t}),e.processed&&(0,O.jsx)(Od,{style:Bu,small:t,title:qu(e.processed)})]})}function Ad({currentId:e}){let t=H(e=>e.analyses),n=H(e=>e.unreadable),[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null);if((0,v.useEffect)(()=>{if(!r)return;let e=e=>{a.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]),!t||t.length===0&&n.length===0)return null;let o=t.find(t=>t.id===e)??null;return(0,O.jsxs)(`div`,{className:`selector`,ref:a,children:[(0,O.jsxs)(`button`,{type:`button`,className:`selector-button`,"aria-haspopup":`listbox`,"aria-expanded":r,title:o?`${o.title} · ${W(o)}`:`Choisir une analyse`,onClick:()=>i(!r),children:[(0,O.jsx)(U,{name:`git-branch`,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`selector-value`,children:o?o.title:`Choisir une analyse`}),(0,O.jsx)(U,{name:`chevron-down`,size:12,color:`#646b7b`})]}),r&&(0,O.jsxs)(`div`,{className:`selector-menu`,role:`listbox`,children:[sd(t).map(t=>(0,O.jsxs)(`div`,{className:`selector-group`,role:`group`,"aria-label":`Projet ${t.project}`,children:[(0,O.jsxs)(`div`,{className:`selector-group-title`,children:[(0,O.jsx)(U,{name:`folder`,size:12,color:`#646b7b`}),t.project]}),t.analyses.map(t=>(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t.id===e,className:`selector-item${t.id===e?` is-current`:``}`,onClick:()=>{i(!1),T(w.feature(t.id))},children:[(0,O.jsxs)(`span`,{className:`selector-item-head`,children:[(0,O.jsx)(`span`,{className:`selector-item-title`,children:t.title}),(0,O.jsx)(kd,{progress:t.progress,small:!0})]}),(0,O.jsxs)(`span`,{className:`selector-item-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:W(t)}),(0,O.jsxs)(`span`,{children:[`· `,Wu(t.updatedAt)]})]})]},t.id))]},t.project)),n.map(e=>(0,O.jsxs)(`div`,{className:`selector-item is-unreadable`,title:e.error,children:[(0,O.jsx)(`span`,{className:`selector-item-title`,children:e.id}),(0,O.jsxs)(`span`,{className:`selector-item-meta`,children:[`Analyse illisible : `,e.error]})]},e.id))]})]})}function jd({currentId:e,action:t}){let n=H(e=>e.current?.analysis??null);return(0,O.jsxs)(`header`,{className:`topbar`,children:[(0,O.jsxs)(`a`,{className:`brand`,href:w.home(),children:[(0,O.jsx)(`span`,{className:`brand-mark`,children:(0,O.jsx)(U,{name:`scan-search`,color:`#8b97ff`})}),`Feature Analyzer`]}),(0,O.jsx)(Ad,{currentId:e}),(0,O.jsx)(`div`,{className:`topbar-spacer`}),n!==null&&n.id===e&&(0,O.jsx)(yd,{analysis:n}),t]})}var Md=`[mcp-feature-analyzer]`,Nd=3e3;function Pd(e){let t=H.getState();switch(e.type){case`ANALYSES_UPDATED`:t.loadAnalyses();return;case`ANALYSIS_UPDATED`:t.current?.id===e.data.analysisId&&t.reloadCurrent();return}}function Fd(){(0,v.useEffect)(()=>{let e=null,t,n=!1;async function r(){try{let t=await de.getChanges(e);if(n)return;let r=H.getState();if(t.reset)r.loadConfig(),r.loadAnalyses(),r.reloadCurrent();else for(let e of t.events)Pd(e);e={epoch:t.epoch,seq:t.seq};let i=await de.getWatchers();if(n)return;r.setWatchedAnalyses(i.analysisIds)}catch(e){console.error(`${Md} Polling api/changes failed, retrying in ${Nd} ms: ${e.message}`)}n||(t=setTimeout(r,Nd))}return r(),()=>{n=!0,clearTimeout(t)}},[])}function Id({link:e,direction:t,small:n=!1}){let r=n?12:14;return(0,O.jsxs)(`a`,{className:`analysis-link-button${n?` is-small`:``}`,href:w.feature(e.id),title:`Ouvrir « ${e.title} »`,children:[t===`previous`&&(0,O.jsx)(U,{name:`arrow-left`,size:r,color:`currentColor`}),(0,O.jsx)(`span`,{className:`analysis-link-button-title`,children:e.title}),t===`next`&&(0,O.jsx)(U,{name:`arrow-right`,size:r,color:`currentColor`})]})}function Ld({chain:e,currentId:t}){return e.length<2?null:(0,O.jsx)(`nav`,{className:`round-chain`,"aria-label":`Tours de revue`,children:e.map((e,n)=>(0,O.jsxs)(`span`,{className:`round-chain-step`,children:[n>0&&(0,O.jsx)(U,{name:`arrow-right`,size:12,color:`#646b7b`}),e.id===t?(0,O.jsxs)(`span`,{className:`round-chain-item is-current`,title:e.title,"aria-current":`page`,children:[`Tour `,n+1]}):(0,O.jsxs)(`a`,{className:`round-chain-item`,href:w.feature(e.id),title:e.title,children:[`Tour `,n+1]})]},e.id))})}function Rd(e){return e.kind===`note`?G(e):e.location?`${Uu(e.location.path).name}:${Nl(e.location.startLine,e.location.endLine,`–`)}`:`exigence manquante`}function zd(e){let t=[];return e.submittedAt&&t.push(`Retour du ${Gu(e.submittedAt)}`),e.decision&&t.push(Ru[e.decision]),e.processed&&t.push(qu(e.processed)),t.join(` · `)}function Bd({analysisId:e,links:t}){let{previous:n,next:r,chain:i}=t;return!n&&!r?null:(0,O.jsxs)(`section`,{className:`follow-banner`,"aria-label":`Revues de suivi`,children:[r&&(0,O.jsxs)(`div`,{className:`follow-banner-row`,children:[(0,O.jsx)(`span`,{className:`follow-banner-label`,children:`Nouvelle revue disponible :`}),(0,O.jsx)(Id,{link:r,direction:`next`}),(0,O.jsx)(kd,{progress:r.progress,small:!0}),(0,O.jsx)(`span`,{className:`spacer`}),!n&&(0,O.jsx)(Ld,{chain:i,currentId:e})]}),n&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`follow-banner-row`,children:[(0,O.jsx)(`span`,{className:`follow-banner-label`,children:`Revue faisant suite à :`}),(0,O.jsx)(Id,{link:n,direction:`previous`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(Ld,{chain:i,currentId:e})]}),(0,O.jsx)(`p`,{className:`follow-banner-meta`,children:zd(n)}),(0,O.jsxs)(`div`,{className:`follow-banner-points`,children:[(0,O.jsxs)(`h2`,{className:`follow-banner-points-title`,children:[`Points du retour précédent à vérifier`,(0,O.jsx)(`span`,{className:`follow-banner-points-count`,children:n.points.length})]}),n.points.length===0?(0,O.jsx)(`p`,{className:`follow-banner-empty`,children:`Le retour précédent ne retenait aucun point : seule sa décision était transmise.`}):(0,O.jsx)(`ul`,{className:`follow-banner-list`,children:n.points.map(e=>(0,O.jsxs)(`li`,{className:`follow-banner-point`,children:[e.kind===`note`?(0,O.jsx)(xd,{}):e.severity?(0,O.jsx)(bd,{severity:e.severity}):(0,O.jsx)(`span`,{className:`pill pill-fixed`,children:`Constat`}),(0,O.jsx)(`span`,{className:`follow-banner-point-text`,children:e.kind===`note`?e.text:e.title}),(0,O.jsx)(`span`,{className:`follow-banner-point-location mono`,children:Rd(e)})]},`${e.kind}:${e.id}`))})]})]})]})}function Vd(e){let t=e.classification;return t===null?null:t.reviewerLevel??t.level}function Hd(e){return e===null?nl.length:nl.indexOf(e)}function Ud(e){return e.map((e,t)=>({file:e,index:t,rank:Hd(Vd(e))})).sort((e,t)=>e.rank-t.rank||e.index-t.index).map(({file:e})=>e)}function Wd(e){return e.files.some(e=>e.classification!==null)}var Gd=[...nl,`unclassified`];function Kd(e){return Vd(e)??`unclassified`}function qd(e,t){return e.files.filter(e=>Kd(e)===t)}function Jd(e){return(e.find(e=>!e.reviewed)??e[0])?.path??null}function Yd(e){return Jd(Ud(e.files))}function Xd(e,t){return Jd(qd(e,t))}function Zd(e){return e.files.filter(t=>Vd(t)===`skim`&&e.findings.some(e=>e.status===`open`&&e.location?.path===t.path))}function Qd(e,t){return t.location?w.review(e.id,t.location.path,t.location.endLine):w.review(e.id,e.files[0]?.path??null)}function $d(e,t){return Gc.flatMap(n=>{let r=e.findings.flatMap(e=>e.status===`open`&&e.severity===n&&e.location?.path===t?[e.location.startLine]:[]);return r.length===0?[]:[{severity:n,count:r.length,firstLine:Math.min(...r)}]})}function ef(e,t){let n=e.notes.filter(e=>e.location?.path===t);if(n.length===0)return null;let r=n.flatMap(e=>e.location?.line==null?[]:[e.location.line]);return{count:n.length,firstLine:r.length===0?null:Math.min(...r)}}function tf(e){return jl(e.findings.filter(e=>e.location===null))}function nf(e,t,n){return e&&t.files.some(e=>e.path===n)}function rf({analysis:e}){let t=e.files.filter(e=>e.reviewed).length;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsx)(`h2`,{className:`section-title`,children:`Fichiers modifiés`}),(0,O.jsxs)(`span`,{className:`section-meta`,children:[t,` / `,e.files.length,` revus`]})]}),(0,O.jsxs)(`section`,{className:`card list-card`,children:[e.files.length===0&&(0,O.jsx)(`p`,{className:`list-empty`,children:`Le diff ne contient aucun fichier modifié.`}),e.files.map(t=>{let{folder:n,name:r}=Uu(t.path);return(0,O.jsxs)(`a`,{className:`file-row`,href:w.review(e.id,t.path),children:[(0,O.jsx)(U,{name:t.reviewed?`circle-check`:`circle`,color:t.reviewed?`#3fb950`:`#3a4050`}),(0,O.jsxs)(`span`,{className:`file-row-path mono`,title:t.oldPath?`${t.oldPath} → ${t.path}`:t.path,children:[(0,O.jsx)(`span`,{className:`path-folder`,children:n}),(0,O.jsx)(`span`,{className:t.reviewed?`path-name is-reviewed`:`path-name`,children:r})]}),(0,O.jsx)(`span`,{className:`tag tag-file-${t.status}`,children:Pu[t.status]}),t.binary&&(0,O.jsx)(`span`,{className:`tag`,children:`Binaire`}),(0,O.jsx)(`span`,{className:`spacer`}),$d(e,t.path).map(({severity:e,count:t})=>(0,O.jsx)(Td,{severity:e,count:t,title:`${Qu(e,t)} dans ce fichier`},e)),(0,O.jsxs)(`span`,{className:`file-row-counts mono`,children:[(0,O.jsxs)(`span`,{className:`count-add`,children:[`+`,t.additions]}),(0,O.jsxs)(`span`,{className:`count-del`,children:[`−`,t.deletions]})]}),(0,O.jsx)(`span`,{className:`file-row-state${t.reviewed?` is-reviewed`:``}`,children:t.reviewed?`Revu`:`À revoir`})]},t.path)})]})]})}var af=1e-6,of=1;function sf(e,t,n){let r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x);return r>af?1:r<-1e-6?-1:0}function cf(e,t,n){return n.x>=Math.min(e.x,t.x)-af&&n.x<=Math.max(e.x,t.x)+af&&n.y>=Math.min(e.y,t.y)-af&&n.y<=Math.max(e.y,t.y)+af}function lf(e,t,n,r){return sf(e,t,n)*sf(e,t,r)<0&&sf(n,r,e)*sf(n,r,t)<0}function uf(e,t,n,r){let i=sf(e,t,n),a=sf(e,t,r),o=sf(n,r,e),s=sf(n,r,t);return i*a<0&&o*s<0||i===0&&cf(e,t,n)||a===0&&cf(e,t,r)||o===0&&cf(n,r,e)||s===0&&cf(n,r,t)}function df(e,t,n,r=of){let i=n.x+r,a=n.x+n.width-r,o=n.y+r,s=n.y+n.height-r;if(i>=a||o>=s)return!1;let c=t.x-e.x,l=t.y-e.y,u=0,d=1;for(let[t,n]of[[-c,e.x-i],[c,a-e.x],[-l,e.y-o],[l,s-e.y]]){if(t===0){if(n<=0)return!1;continue}let e=n/t;if(t<0){if(e>d)return!1;e>u&&(u=e)}else{if(e<u)return!1;e<d&&(d=e)}}return d-u>af}function ff(e){let t=[];for(let n=1;n<e.length;n++){let[r,i]=[e[n-1],e[n]];(Math.abs(r.x-i.x)>af||Math.abs(r.y-i.y)>af)&&t.push([r,i])}return t}function pf(e,t){let n=t.map(e=>ff(e.points)),r=[];for(let e=0;e<t.length;e++)for(let i=e+1;i<t.length;i++){let a=t[e],o=t[i],s=a.u===o.u||a.u===o.v||a.v===o.u||a.v===o.v?lf:uf;n[e].some(([e,t])=>n[i].some(([n,r])=>s(e,t,n,r)))&&r.push([e,i])}let i=[];return t.forEach((t,r)=>{e.forEach((e,a)=>{a!==t.u&&a!==t.v&&n[r].some(([t,n])=>df(t,n,e))&&i.push({link:r,node:a})})}),{crossings:r,overlaps:i}}function mf(e){return e.crossings.length+e.overlaps.length}function hf(e){let t=e.nodes.map(e=>e.id),n=new Set(t),r=new Map(t.map(e=>[e,[]])),i=new Map(t.map(e=>[e,[]])),a=[];for(let t of e.links)n.has(t.from)&&n.has(t.to)&&(t.from===t.to?a.push({kind:`self_loop`,node:t.from}):(r.get(t.to).push(t.from),i.get(t.from).push(t.to)));let o=t.filter(e=>r.get(e).length===0);o.length===0&&t.length>0&&a.push({kind:`no_root`}),o.length>1&&a.push({kind:`several_roots`,roots:o});for(let e of t){let t=r.get(e);t.length>1&&a.push({kind:`several_parents`,node:e,parents:t})}let s=new Map(t.map(e=>[e,0])),c=[],l=e=>{s.set(e,1),c.push(e);for(let t of i.get(e))s.get(t)===1?a.push({kind:`cycle`,nodes:[...c.slice(c.indexOf(t)),t]}):s.get(t)===0&&l(t);c.pop(),s.set(e,2)};for(let e of[...o,...t])s.get(e)===0&&l(e);if(o.length===1){let e=new Set([o[0]]),n=[o[0]];for(;n.length>0;)for(let t of i.get(n.shift()))e.has(t)||(e.add(t),n.push(t));let r=t.filter(t=>!e.has(t));r.length>0&&a.push({kind:`unreachable`,root:o[0],nodes:r})}return a}var gf=.6,J=.56;function _f(e,t){return[...e].length*t.size*(t.mono?gf:J)}var vf={size:12,weight:400,mono:!0},yf={size:12.5,weight:400,mono:!1},bf={size:12.5,weight:500,mono:!1},xf={size:11.5,weight:500,mono:!1},Sf={size:11,weight:400,mono:!1},Cf={size:10.5,weight:400,mono:!1},wf={size:10.5,weight:600,mono:!1};function Tf(e){return e.shape===`decision`?xf:e.status===`missing`?bf:e.location?vf:yf}function Ef(e){return e.location!==null&&e.shape!==`decision`}function Df(e){return e.status===`missing`&&e.shape!==`decision`&&e.detail!==null&&e.detail!==``}function Of(e,t){let n=t(e.label,Tf(e));if(e.shape===`decision`){let e=Math.max(84,Math.ceil(n+36));return{width:e,height:e}}let r=Df(e)?t(e.detail,Sf):0,i=Math.max(n,r),a=(Ef(e)?22:0)+(e.location?14:0);return e.shape===`pill`?{width:Math.max(80,Math.ceil(i+48+a)),height:r>0?52:40}:{width:Math.max(140,Math.ceil(i+32+a)),height:r>0?52:44}}var kf=40,Af=36,jf=18,Mf=12,Nf=36,Pf=24,Ff=16,If=14,Lf=30,Rf=14,zf=14,Bf=8,Vf=8,Hf=60,Uf=40,Wf=14,Y=6,Gf=48,Kf=16,qf=8,Jf=2e4,Yf=8,Xf=6,Zf=12,Qf=1e3,$f=.1,ep=4,tp=2;function np(e){return{x:e.x+e.width,y:e.y+e.height/2}}function rp(e){return{x:e.x,y:e.y+e.height/2}}function X(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function ip(e){let t=0,n=0;for(let{value:r,weight:i}of e)t+=r*i,n+=i;return n>0?t/n:null}function ap(e,t){let n=[];return e.forEach((e,r)=>{for(n.push({value:e,weight:t[r],count:1});n.length>1&&n[n.length-2].value>n[n.length-1].value;){let e=n.pop(),t=n[n.length-1],r=t.weight+e.weight;t.value=(t.value*t.weight+e.value*e.weight)/r,t.weight=r,t.count+=e.count}}),n.flatMap(e=>Array(e.count).fill(e.value))}function op(e,t,n,r){let i=[],a=0;return e.forEach((e,n)=>{i.push(a),a+=e+(t[n]??0)}),ap(n.map((t,n)=>t-e[n]/2-i[n]),r).map((t,n)=>t+i[n]+e[n]/2)}function sp(e,t){let n=[],r=0;return e.forEach((e,i)=>{n.push(r+e/2),r+=e+(t[i]??0)}),n}function cp(e,t){return e.map((e,n)=>({item:e,index:n,key:t(e)})).sort((e,t)=>e.key-t.key||e.index-t.index).map(({item:e})=>e)}function lp(e,t){let n=np(e),r=n.x+zf,i=e.y-zf,a=e.x+e.width/2;return{from:t,to:t,points:[n,{x:r,y:n.y},{x:r,y:i},{x:a,y:i},{x:a,y:e.y}],labelPosition:{x:(a+r)/2,y:i-Bf},labelAnchor:`middle`,back:!0}}function up(e){let t=[];for(let n of e){let e=t[t.length-1];if(!(e&&Math.abs(e.x-n.x)<1e-6&&Math.abs(e.y-n.y)<1e-6)){if(t.length>=2){let r=t[t.length-2],i=(e.x-r.x)*(n.y-r.y)-(e.y-r.y)*(n.x-r.x);Math.abs(i)<1e-6&&t.pop()}t.push(n)}}return t}function dp(e){let t=Math.max(0,Math.floor((e.length-1)/2)),n=e[t],r=e[Math.min(t+1,e.length-1)];return{x:(n.x+r.x)/2,y:(n.y+r.y)/2}}function fp(e){if(e.nodes.length===0)throw Error(`Le schéma « ${e.title} » ne contient aucun nœud.`);let t=new Map;return e.nodes.forEach((n,r)=>{if(t.has(n.id))throw Error(`Le nœud « ${n.id} » apparaît deux fois dans le schéma « ${e.title} ».`);t.set(n.id,r)}),{index:t,links:e.links.map(n=>{let r=t.get(n.from),i=t.get(n.to);if(r===void 0||i===void 0){let t=r===void 0?n.from:n.to;throw Error(`Le lien ${n.from} → ${n.to} référence le nœud « ${t} », absent du schéma « ${e.title} ».`)}return{u:r,v:i,label:n.label}})}}function pp(e,t){let n=mf(pf(e.boxes,e.links.map((e,n)=>({u:t[n].u,v:t[n].v,points:e.points})))),r=0;for(let t of e.links)for(let e=1;e<t.points.length;e++)r+=Math.abs(t.points[e].y-t.points[e-1].y);return{issues:n,stretch:r}}function mp(e,t){return e.issues<t.issues||e.issues===t.issues&&e.stretch<t.stretch-1e-6}function hp(e,t){let n=e[0],r=t(n);for(let i of e.slice(1)){let e=t(i);mp(e,r)&&(n=i,r=e)}let i=n.map(e=>[...e]);for(let e=0;e<Xf&&r.issues>0;e++){let e=!1;for(let n of i)for(let a=0;a+1<n.length&&r.issues>0;a++){[n[a],n[a+1]]=[n[a+1],n[a]];let o=t(i);o.issues<r.issues?(r=o,e=!0):[n[a],n[a+1]]=[n[a+1],n[a]]}if(!e)break}return i}function gp(e,t,n,r){let i=e.nodes.length,a=Array.from({length:i},()=>[]),o=Array(i).fill(0);n.forEach((e,t)=>{e.u!==e.v&&(a[e.u].push(t),o[e.v]++)});let s=Array(i).fill(0),c=Array(i).fill(-1),l=Array(n.length).fill(!1),u=0,d=[...e.nodes.keys()].filter(e=>o[e]===0).concat([...e.nodes.keys()]);for(let e of d){if(s[e]!==0)continue;s[e]=1,c[e]=u++;let t=[{node:e,next:0}];for(;t.length>0;){let e=t[t.length-1];if(e.next<a[e.node].length){let r=a[e.node][e.next++],i=n[r].v;s[i]===1?l[r]=!0:s[i]===0&&(s[i]=1,c[i]=u++,t.push({node:i,next:0}))}else s[e.node]=2,t.pop()}}let f=Array.from({length:i},()=>[]),p=Array.from({length:i},()=>[]),m=Array(i).fill(!1);n.forEach((e,t)=>{e.u===e.v||l[t]?(m[e.u]=!0,m[e.v]=!0):(f[e.u].includes(e.v)||f[e.u].push(e.v),p[e.v].includes(e.u)||p[e.v].push(e.u))});let h=e=>{let t=[];for(let n=e;;n=f[n][0]){if(p[n].length!==1||m[n]||f[n].length>1)return null;if(t.push(n),f[n].length===0)return t}},g=Array.from({length:i},()=>[]),_=Array(i).fill(!1);for(let e=0;e<i;e++){let t=f[e],n=null;for(let e=1;e<t.length&&n===null;e++)n=h(t[e]);if(n===null&&t.length===1&&p[e].length>0&&f[t[0]].length===0&&(n=h(t[0])),n!==null){g[e]=n;for(let e of n)_[e]=!0}}for(let e=0;e<i;e++)_[e]&&(g[e]=[]);let v=[...e.nodes.keys()].filter(e=>!_[e]),y=n.map((e,t)=>({...e,k:t})).filter(e=>e.u!==e.v&&!l[e.k]&&!_[e.v]),b=Array.from({length:i},()=>[]),x=Array.from({length:i},()=>[]);for(let e of y)x[e.u].push(e.v),b[e.v].push(e.u);let S=Array(i).fill(0),C=b.map(e=>e.length),w=v.filter(e=>C[e]===0);for(;w.length>0;){w.sort((e,t)=>c[e]-c[t]);let e=w.shift();for(let t of x[e])S[t]=Math.max(S[t],S[e]+1),--C[t]===0&&w.push(t)}for(let e of v)b[e].length===0&&x[e].length>0&&(S[e]=Math.min(...x[e].map(e=>S[e]))-1);let T=Math.max(...v.map(e=>S[e]))+1;g.forEach((e,t)=>e.forEach(e=>S[e]=S[t]));let ee=e=>g[e].reduce((e,n)=>e+Nf+t[n].height,t[e].height),E=e.nodes.map((e,n)=>({node:n,rank:S[n],width:t[n].width,height:ee(n),above:t[n].height/2})),te=new Map;for(let e of y){let t=[e.u];for(let n=S[e.u]+1;n<S[e.v];n++)E.push({node:null,rank:n,width:0,height:0,above:0}),t.push(E.length-1);t.push(e.v),te.set(e.k,t)}let D=E.map(()=>[]),O=E.map(()=>[]);for(let e of te.values())for(let t=1;t<e.length;t++)O[e[t-1]].push(e[t]),D[e[t]].push(e[t-1]);let k=Array.from({length:T},()=>[]);cp(v,e=>c[e]).forEach(e=>k[S[e]].push(e));for(let e=i;e<E.length;e++)k[E[e].rank].push(e);let ne=Array(E.length).fill(0),re=()=>k.forEach(e=>e.forEach((e,t)=>ne[e]=t));re();let ie=(e,t)=>{k[e]=cp(k[e],e=>{let n=t[e];return n.length>0?n.reduce((e,t)=>e+ne[t],0)/n.length:ne[e]}),k[e].forEach((e,t)=>ne[e]=t)},ae=[k.map(e=>[...e])];for(let e=0;e<Yf;e++){if(e%2==0)for(let e=1;e<T;e++)ie(e,D);else for(let e=T-2;e>=0;e--)ie(e,O);ae.push(k.map(e=>[...e]))}let oe=a=>{k=a.map(e=>[...e]),re();let o=new Set,s=new Set;for(let e=1;e<T;e++){let t=-1;for(let n of k[e]){let e=[...new Set(D[n])].sort((e,t)=>ne[e]-ne[t]);if(e.length===0)continue;let r=e[Math.floor((e.length-1)/2)];!s.has(r)&&ne[r]>t&&(s.add(r),o.add(`${r}>${n}`),t=ne[r])}}let c=(e,t)=>o.has(`${e}>${t}`)||o.has(`${t}>${e}`)?Qf:1,u=e=>E[e].above,d=e=>E[e].height-E[e].above,f=e=>E[e].height/2-E[e].above,p=e=>e.slice(0,-1).map((t,n)=>E[t].node===null||E[e[n+1]].node===null?jf:Af),m=Array(E.length).fill(0);for(let e of k)sp(e.map(e=>E[e].height),p(e)).forEach((t,n)=>m[e[n]]=t-f(e[n]));for(let e=0;e<Zf;e++){let t=e===11?`both`:e%2==0?`down`:`up`,n=t===`up`?[...k.keys()].reverse():[...k.keys()];for(let e of n){let n=k[e],r=[],i=[];for(let e of n){let n=(t===`down`?D[e]:t===`up`?O[e]:[...D[e],...O[e]]).map(t=>({value:m[t],weight:c(e,t)})),a=ip(n);r.push((a??m[e])+f(e)),i.push(a===null?$f:n.reduce((e,t)=>e+t.weight,0))}op(n.map(e=>E[e].height),p(n),r,i).forEach((e,t)=>m[n[t]]=e-f(n[t]))}}for(let e=1;e<T;e++){let t=k[e],n=p(t);t.forEach((e,r)=>{let i=D[e].find(t=>o.has(`${t}>${e}`));if(!(i===void 0||Math.abs(m[i]-m[e])>ep)){m[e]=m[i];for(let e=r+1;e<t.length;e++){let r=m[t[e-1]]+d(t[e-1])+n[e-1]+u(t[e]);m[t[e]]<r&&(m[t[e]]=r)}for(let e=r-1;e>=0;e--){let r=m[t[e+1]]-u(t[e+1])-n[e]-d(t[e]);m[t[e]]>r&&(m[t[e]]=r)}}})}let h=Array(i).fill(0);for(let e of v){h[e]=m[e]-t[e].height/2;let n=h[e]+t[e].height;for(let r of g[e])h[r]=n+Nf,n=h[r]+t[r].height}let b=(e,t)=>Math.abs(m[e]-m[t])>=tp,x=Array.from({length:T},()=>[]),C=new Map;for(let e of te.values())for(let t=1;t<e.length;t++){let[n,r]=[e[t-1],e[t]];if(!b(n,r))continue;x[E[n].rank].includes(n)||x[E[n].rank].push(n);let i=C.get(n)??[];i.includes(r)||i.push(r),C.set(n,i)}let w=e=>{let t=[m[e],...C.get(e).map(e=>m[e])];return[Math.min(...t),Math.max(...t)]},ee=(e,[t,n])=>e>t+tp&&e<n-tp,ie=(e,t)=>{let n=C.get(t);return C.get(e).filter(e=>!n.includes(e)&&ee(m[e],w(t))).length+ +!!ee(m[t],w(e))};x.forEach((e,t)=>{let n=[];for(let t of cp(e,e=>m[e])){let e=n.length,r=1/0;for(let i=n.length;i>=0;i--){let a=n.reduce((e,n,r)=>e+(r<i?ie(n,t):ie(t,n)),0);a<r&&(r=a,e=i)}n.splice(e,0,t)}x[t]=n});let ae=(e,t)=>(x[e].indexOf(t)+1)/(x[e].length+1),oe=x.map(e=>Math.max(kf,(e.length+1)*Mf));for(let e of y){if(!e.label)continue;let t=te.get(e.k),n=t[t.length-2],i=E[n].rank,a=r(e.label,Cf),o=b(n,e.v)?(a+Bf+Vf)/(1-ae(i,n)):a+16;oe[i]=Math.max(oe[i],o)}let se=Array.from({length:T+1},()=>[]);for(let e of te.values())for(let t=1;t<e.length;t++){let[n,r]=[e[t-1],e[t]];se[E[n].rank+1].push([Math.min(m[n],m[r]),Math.max(m[n],m[r])])}n.forEach((e,t)=>{e.u===e.v?se[S[e.u]+1].push([h[e.u]-zf,m[e.u]]):l[t]&&(se[S[e.u]+1].push([m[e.u],1/0]),se[S[e.v]].push([m[e.v],1/0]))});let ce=(e,t,n)=>se[e].some(([e,r])=>e-Ff<n&&r+Ff>t),le=e.nodes.map((e,i)=>{let a=t[i].width/2;if(!_[i])return{rank:S[i],top:h[i],bottom:h[i]+t[i].height,left:a,right:a,hung:!1};let o=n.filter(e=>e.v===i&&e.label).map(e=>Bf+r(e.label,Cf)+Vf);return{rank:S[i],top:h[i]-Nf,bottom:h[i]+t[i].height,left:a,right:Math.max(a,...o),hung:!0}}),A=k.map(e=>Math.max(0,...e.map(e=>E[e].width/2))),ue=[...A];for(let e of le)e.hung&&(ce(e.rank,e.top,e.bottom)&&(A[e.rank]=Math.max(A[e.rank],e.left)),ce(e.rank+1,e.top,e.bottom)&&(ue[e.rank]=Math.max(ue[e.rank],e.right)));let de=Array.from({length:T},()=>[]);le.forEach(e=>de[e.rank].push(e));let fe=[];for(let e=0;e<T;e++){let t=e===0?A[0]:fe[e-1]+ue[e-1]+oe[e-1]+A[e];for(let n of de[e])for(let r=0;r<e;r++)for(let e of de[r])(n.hung||e.hung)&&(n.top>=e.bottom+Ff||e.top>=n.bottom+Ff||(t=Math.max(t,fe[r]+e.right+Pf+n.left)));fe.push(t)}let pe=e=>fe[e]-A[e],me=e=>fe[e]+ue[e],he=e.nodes.map((e,n)=>({x:fe[S[n]]-t[n].width/2,y:h[n],width:t[n].width,height:t[n].height})),ge=Math.max(...he.map(e=>e.y+e.height)),_e=0;return{boxes:he,links:n.map((t,n)=>{let r=e.nodes[t.u].id,i=e.nodes[t.v].id;if(t.u===t.v)return lp(he[t.u],r);if(l[n]){let e=np(he[t.u]),n=rp(he[t.v]),a=me(S[t.u])+If,o=pe(S[t.v])-If,s=ge+Lf+Rf*_e++;return{from:r,to:i,points:[e,{x:a,y:e.y},{x:a,y:s},{x:o,y:s},{x:o,y:n.y},n],labelPosition:{x:(a+o)/2,y:s-Bf},labelAnchor:`middle`,back:!0}}if(_[t.v]){let e=fe[S[t.v]],n=he[t.u].y+he[t.u].height,a=he[t.v].y;return{from:r,to:i,points:[{x:e,y:n},{x:e,y:a}],labelPosition:{x:e+Bf,y:(n+a)/2},labelAnchor:`start`,back:!1}}let a=te.get(n),o=[np(he[t.u])],s=o[0],c=`middle`;for(let e=1;e<a.length;e++){let t=a[e-1],n=a[e],r=o[o.length-1],i=E[n].node!==null,l=i?rp(he[n]):{x:pe(E[n].rank),y:m[n]};if(b(t,n)){let e=E[t].rank,n=me(e)+oe[e]*ae(e,t);o.push({x:n,y:r.y},{x:n,y:l.y}),s={x:n+Bf,y:(r.y+l.y)/2},c=`start`}else s={x:(r.x+l.x)/2,y:l.y-Bf},c=`middle`;o.push(l),i||o.push({x:me(E[n].rank),y:m[n]})}return{from:r,to:i,points:up(o),labelPosition:s,labelAnchor:c,back:!1}}),headers:[],center:null}};return oe(hp(ae,e=>pp(oe(e),n)))}function _p(e,t,n,r){if(e.layers.length===0)throw Error(`Le schéma en couches « ${e.title} » ne déclare aucune couche.`);let i=e.nodes.map(t=>{if(t.layer===null)throw Error(`Le nœud « ${t.id} » n'a pas de couche alors que le schéma « ${e.title} » est en couches.`);let n=e.layers.indexOf(t.layer);if(n===-1)throw Error(`Le nœud « ${t.id} » est dans la couche « ${t.layer} », absente des couches déclarées (${e.layers.join(`, `)}).`);return n}),a=e.layers.length,o=e.layers.map((e,n)=>Math.max(180,Math.ceil(r(e.toUpperCase(),wf)),...t.filter((e,t)=>i[t]===n).map(e=>e.width))),s=e.nodes.map((e,n)=>e.shape===`box`?o[i[n]]:t[n].width),c=t.map(e=>e.height),l=e.nodes.map(()=>[]);for(let e of n){if(e.u===e.v)continue;let t=i[e.u]===i[e.v]?(c[e.u]+c[e.v])/2+Af:0;l[e.u].push({other:e.v,delta:-t}),l[e.v].push({other:e.u,delta:t})}let u=e.layers.map((t,n)=>[...e.nodes.keys()].filter(e=>i[e]===n)),d=e=>e.slice(0,-1).map(()=>Af),f=Array(e.nodes.length).fill(0),p=e=>sp(u[e].map(e=>c[e]),d(u[e])).forEach((t,n)=>f[u[e][n]]=t);u.forEach((e,t)=>p(t));let m=e=>{let t=l[e].map(({other:e,delta:t})=>({value:f[e]+t,weight:1}));return{mean:ip(t),weight:t.length}},h=[u.map(e=>[...e])];for(let e=0;e<Yf;e++){let t=e%2==0?[...u.keys()]:[...u.keys()].reverse();for(let e of t)u[e]=cp(u[e],e=>m(e).mean??f[e]),p(e);h.push(u.map(e=>[...e]))}let g=t=>{u=t.map(e=>[...e]),u.forEach((e,t)=>p(t));for(let e=0;e<Zf;e++){let t=e%2==0?[...u.keys()]:[...u.keys()].reverse();for(let e of t){let t=u[e],n=t.map(m);op(t.map(e=>c[e]),d(t),n.map((e,n)=>e.mean??f[t[n]]),n.map(e=>e.mean===null?$f:e.weight)).forEach((e,n)=>f[t[n]]=e)}}let r=[],l=0;for(let e=0;e<a;e++)r.push(l),l+=o[e]+Hf;let h=e.nodes.map((e,t)=>({x:r[i[t]]+(o[i[t]]-s[t])/2,y:f[t]-c[t]/2,width:s[t],height:c[t]})),g=Math.min(...h.map(e=>e.y)),_=e.layers.map((e,t)=>({label:e,x:r[t],y:g-Uf,width:o[t]})),v=(e,t)=>{let n=u[e].map(e=>h[e]),r=[n[0].y-Af/2,...n.slice(1).map((e,t)=>(n[t].y+n[t].height+e.y)/2)];return r.push(n[n.length-1].y+n[n.length-1].height+Af/2),cp(r,e=>Math.abs(e-t))[0]};return{boxes:h,links:n.map(t=>{let n=e.nodes[t.u].id,a=e.nodes[t.v].id;if(t.u===t.v)return lp(h[t.u],n);let s=h[t.u],c=h[t.v],l;if(i[t.u]===i[t.v]){let e=i[t.u],[n,a]=s.y<=c.y?[t.u,t.v]:[t.v,t.u],d=u[e].indexOf(a)-u[e].indexOf(n)>1,f=h[n],p=h[a];if(d){let t=r[e]+o[e]+If;l=[np(f),{x:t,y:f.y+f.height/2},{x:t,y:p.y+p.height/2},np(p)]}else l=[{x:f.x+f.width/2,y:f.y+f.height},{x:p.x+p.width/2,y:p.y}];n!==t.u&&l.reverse()}else{let[e,n]=i[t.u]<i[t.v]?[t.u,t.v]:[t.v,t.u],a=rp(h[n]);l=[np(h[e])];for(let t=i[e]+1;t<i[n];t++){let e=l[l.length-1],n=r[t],i=r[t]+o[t],s=t=>e.y+(a.y-e.y)*(t-e.x)/(a.x-e.x),c=Math.min(s(n),s(i)),d=Math.max(s(n),s(i));if(u[t].some(e=>h[e].y-Y<d&&h[e].y+h[e].height+Y>c)){let e=v(t,s((n+i)/2));l.push({x:n,y:e},{x:i,y:e})}}l.push(a),e!==t.u&&l.reverse()}let d=dp(l);return{from:n,to:a,points:l,labelPosition:{x:d.x,y:d.y-Bf},labelAnchor:`middle`,back:!1}}),headers:_,center:null}};return g(hp(h,e=>pp(g(e),n)))}function vp(e,t,n){let r=X(e),i=n.x-r.x,a=n.y-r.y;if(i===0&&a===0)return r;let o=e.width/2,s=e.height/2,c;if(t===`decision`)c=1/(Math.abs(i)/o+Math.abs(a)/s);else if(c=Math.min(i===0?1/0:o/Math.abs(i),a===0?1/0:s/Math.abs(a)),t===`pill`){let e=s,t=o-e;if(Math.abs(c*i)>t){let n=Math.hypot(i,a),r=i/n,o=Math.sign(i)*t,s=o*r;c=(s+Math.sqrt(Math.max(0,s*s-o*o+e*e)))/n}}return{x:r.x+i*c,y:r.y+a*c}}function yp(e,t,n){return e.x<t.x+t.width+n&&t.x<e.x+e.width+n&&e.y<t.y+t.height+n&&t.y<e.y+e.height+n}function bp(e){let t=e=>e.map(e=>`« ${e} »`).join(`, `);switch(e.kind){case`self_loop`:return`le nœud « ${e.node} » est relié à lui-même`;case`no_root`:return`aucun nœud n'est sans lien entrant, il n'y a pas de racine`;case`several_roots`:return`plusieurs nœuds sans lien entrant (${t(e.roots)}) au lieu d'une seule racine`;case`several_parents`:return`le nœud « ${e.node} » a plusieurs parents (${t(e.parents)})`;case`cycle`:return`cycle ${e.nodes.join(` → `)}`;case`unreachable`:return`${t(e.nodes)} inaccessible(s) depuis la racine « ${e.root} »`}}function xp(e,t,n){let r=hf(e);if(r.length>0)throw Error(`La carte mentale « ${e.title} » n'est pas un arbre : ${r.map(bp).join(` ; `)}.`);let i=e.nodes.length,a=Array(i).fill(!1),o=Array.from({length:i},()=>[]);for(let e of n)a[e.v]=!0,o[e.u].push(e.v);let s=a.indexOf(!1),c=o,l=Array(i).fill(0),u=[],d=[s];for(;d.length>0;){let e=d.shift();u.push(e);for(let t of c[e])l[t]=l[e]+1,d.push(t)}let f=Array(i).fill(1);for(let e of[...u].reverse())for(let t of c[e])f[e]+=f[t];let p=Array(i).fill(0),m=(e,t,n)=>{let r=c[e].reduce((e,t)=>e+f[t],0),i=t;for(let a of c[e]){let e=(n-t)*f[a]/r;p[a]=i+e/2,m(a,i,i+e),i+=e}};if(c[s].length>0){let e=2*Math.PI*f[c[s][0]]/(f[s]-1);m(s,-e/2,2*Math.PI-e/2)}let h=(e,n)=>Math.min(Math.abs(Math.cos(n))<1e-9?1/0:t[e].width/2/Math.abs(Math.cos(n)),Math.abs(Math.sin(n))<1e-9?1/0:t[e].height/2/Math.abs(Math.sin(n))),g=Array(i).fill(0);for(let e of u)for(let t of c[e])g[t]=g[e]+h(e,p[t])+h(t,p[t])+Gf;let _=Array(i).fill(0);u.forEach((e,t)=>_[e]=t);let v=e=>{g[e]+=qf;for(let t of c[e])v(t)},y=()=>e.nodes.map((e,n)=>{let r=g[n]*Math.cos(p[n]),i=g[n]*Math.sin(p[n]);return{x:r-t[n].width/2,y:i-t[n].height/2,width:t[n].width,height:t[n].height}}),b=y();for(let t=0;;t++){let n=null;for(let e=0;e<i&&n===null;e++)for(let t=e+1;t<i;t++)if(yp(b[e],b[t],Kf)){n=l[e]>l[t]||l[e]===l[t]&&_[e]>_[t]?e:t;break}if(n===null)break;if(t>=Jf)throw Error(`La carte mentale « ${e.title} » n'a pas pu être placée sans chevauchement.`);v(n),b=y()}let x=n.map(t=>{let n=e.nodes[t.u].id,r=e.nodes[t.v].id;if(t.u===t.v)return lp(b[t.u],n);let i=vp(b[t.u],e.nodes[t.u].shape,X(b[t.v])),a=vp(b[t.v],e.nodes[t.v].shape,X(b[t.u]));return{from:n,to:r,points:[i,a],labelPosition:{x:(i.x+a.x)/2,y:(i.y+a.y)/2-Bf},labelAnchor:`middle`,back:!1}});return{boxes:b,links:x,headers:[],center:X(b[s])}}function Sp(e,t){let n=new Map;t.forEach((t,r)=>{if(!e.links[r].label)return;let i=`${t.from}\u0000${t.to}`,a=n.get(i)??0;n.set(i,a+1),t.labelPosition={x:t.labelPosition.x,y:t.labelPosition.y-a*(Cf.size+4)}})}function Cp(e,t,n){Sp(e,t.links);let r=[],i=[];for(let e of t.boxes)r.push(e.x,e.x+e.width),i.push(e.y,e.y+e.height);t.links.forEach((t,a)=>{for(let e of t.points)r.push(e.x),i.push(e.y);let o=e.links[a].label;if(o){let e=n(o,Cf),a=Cf.size*.7,s=t.labelAnchor===`start`?t.labelPosition.x:t.labelPosition.x-e/2;r.push(s,s+e),i.push(t.labelPosition.y-a,t.labelPosition.y+a)}});for(let e of t.headers)r.push(e.x,e.x+e.width),i.push(e.y,e.y+Wf);let a=Math.min(...r),o=Math.max(...r),s=Math.min(...i),c=Math.max(...i);if(t.center){let e=Math.max(t.center.x-a,o-t.center.x),n=Math.max(t.center.y-s,c-t.center.y);a=t.center.x-e,o=t.center.x+e,s=t.center.y-n,c=t.center.y+n}let l=24-a,u=24-s,d=e=>({x:e.x+l,y:e.y+u});return{nodes:t.boxes.map((t,n)=>({id:e.nodes[n].id,x:t.x+l,y:t.y+u,width:t.width,height:t.height})),links:t.links.map(e=>({...e,points:e.points.map(d),labelPosition:d(e.labelPosition)})),headers:t.headers.map(e=>({...e,x:e.x+l,y:e.y+u})),width:Math.ceil(o-a+48),height:Math.ceil(c-s+48)}}function wp(e,t=_f){let{links:n}=fp(e),r=e.nodes.map(e=>Of(e,t));switch(e.kind){case`flow`:return Cp(e,gp(e,r,n,t),t);case`layers`:return Cp(e,_p(e,r,n,t),t);case`mindmap`:return Cp(e,xp(e,r,n),t)}}function Tp(e,t=wp(e)){let n=new Map(e.nodes.map((e,t)=>[e.id,t])),r=e.links.map((e,t)=>({index:t,from:e.from,to:e.to})),i=pf(t.nodes,t.links.map(e=>({u:n.get(e.from),v:n.get(e.to),points:e.points})));return{crossings:i.crossings.map(([e,t])=>({a:r[e],b:r[t]})),nodeOverlaps:i.overlaps.map(({link:t,node:n})=>({link:r[t],node:e.nodes[n].id}))}}var Ep={layers:`network`,flow:`workflow`,mindmap:`brain-circuit`};function Dp(e){return e.location?/\.(spec|test)\./.test(e.location.path)?`flask-conical`:`file-code`:null}function Op(e){let t=new Map;for(let n of e.findings){if(n.status!==`open`||!n.location)continue;let e=t.get(n.location.path);(!e||Al(n.severity,e)<0)&&t.set(n.location.path,n.severity)}return t}function kp(e,t){let n=new Set(e.flatMap(e=>e.location&&t.has(e.location.path)?[t.get(e.location.path)]:[]));return Gc.filter(e=>n.has(e))}function Ap(e){return Qc.filter(t=>e.some(e=>e.status===t))}var jp=6;function Mp(e){if(e.length===0)return``;let t=[`M ${e[0].x} ${e[0].y}`];for(let n=1;n<e.length-1;n++){let r=e[n-1],i=e[n],a=e[n+1],o=Math.hypot(i.x-r.x,i.y-r.y),s=Math.hypot(a.x-i.x,a.y-i.y),c=Math.min(jp,o/2,s/2);if(c<=0){t.push(`L ${i.x} ${i.y}`);continue}let l={x:i.x-(i.x-r.x)/o*c,y:i.y-(i.y-r.y)/o*c},u={x:i.x+(a.x-i.x)/s*c,y:i.y+(a.y-i.y)/s*c};t.push(`L ${l.x} ${l.y}`,`Q ${i.x} ${i.y} ${u.x} ${u.y}`)}let n=e[e.length-1];return t.push(`L ${n.x} ${n.y}`),t.join(` `)}function Np(e,t){return`${e/2},0 ${e},${t/2} ${e/2},${t} 0,${t/2}`}var Pp=.2,Fp=.85,Ip=1.25,Lp=320,Rp=620;function zp(e){return Math.min(3,Math.max(Pp,e))}var Bp=1.5;function Vp(e,t,n,r=1){return Math.max(Fp,Math.min(r,t/e.width,n/e.height))}function Hp(e,t){let n=Vp(e,t,1/0);return Math.round(Math.min(Rp,Math.max(Lp,e.height*n)))}function Up(e,t,n,r=1){let i=Vp(e,t,n,r),a=t/i,o=n/i;return{x:e.width<=a?(e.width-a)/2:0,y:e.height<=o?(e.height-o)/2:0,scale:i}}function Wp(e,t,n,r){return e.width>n/t.scale+.5||e.height>r/t.scale+.5}function Gp(e,t,n,r){let i=(e,t,n)=>{let r=Math.min(0,t-n),i=Math.max(0,t-n);return Math.min(i,Math.max(r,e))};return{x:i(e.x,t.width,n/e.scale),y:i(e.y,t.height,r/e.scale),scale:e.scale}}function Kp(e,t,n){let r=zp(e.scale*t),i=e.x+n.x/e.scale,a=e.y+n.y/e.scale;return{x:i-n.x/r,y:a-n.y/r,scale:r}}function qp(e,t,n){return{x:e.x-t/e.scale,y:e.y-n/e.scale,scale:e.scale}}function Jp(e,t,n){return`${e.x} ${e.y} ${t/e.scale} ${n/e.scale}`}function Yp(e){let t;try{t=wp(e)}catch{return null}let n=Tp(e,t);return n.crossings.length+n.nodeOverlaps.length}var Xp=`#3a4052`,Zp=3,Qp=1.1;function $p(e){try{return{layout:wp(e),error:null}}catch(e){return{layout:null,error:e.message}}}function em({analysis:e}){let[t,n]=(0,v.useState)(null),r=e.diagrams.find(e=>e.id===t)??e.diagrams[0],i=(0,v.useMemo)(()=>new Map(e.diagrams.map(e=>[e.id,Yp(e)])),[e.diagrams]);return r?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`diagram-picker`,children:[e.diagrams.map(e=>{let t=e.id===r.id,a=i.get(e.id)??null;return(0,O.jsxs)(`button`,{type:`button`,className:`diagram-pick${t?` is-active`:``}`,"aria-pressed":t,onClick:()=>n(e.id),title:e.title,children:[(0,O.jsx)(U,{name:Ep[e.kind],color:t?`#8b97ff`:`#646b7b`}),(0,O.jsx)(`span`,{className:`diagram-pick-title`,children:e.title}),a!==null&&a>0&&(0,O.jsx)(`span`,{className:`diagram-pick-issues`,title:`${a} croisement(s) de liens ou traversée(s) de nœud : l'agent doit revoir ce schéma`,children:`croisements`})]},e.id)}),(0,O.jsxs)(`span`,{className:`diagram-meta`,children:[`Dessiné par l'agent · `,Wu(r.updatedAt)]})]}),(0,O.jsx)(tm,{analysis:e,diagram:r},r.id)]}):(0,O.jsxs)(`div`,{className:`card diagram-empty`,children:[(0,O.jsx)(`h2`,{className:`empty-title`,children:`Aucun schéma pour cette analyse`}),(0,O.jsxs)(`p`,{children:[`L'agent dessine les schémas avec l'outil `,(0,O.jsx)(`code`,{children:`set_diagram`}),` : périmètre d'impact en couches, flux de process ou carte mentale. Ils apparaîtront ici automatiquement.`]})]})}function tm({analysis:e,diagram:t}){let n=(0,v.useMemo)(()=>$p(t),[t]);return n.error===null?(0,O.jsx)(nm,{analysis:e,diagram:t,layout:n.layout}):(0,O.jsxs)(`div`,{className:`card diagram-error`,role:`alert`,children:[(0,O.jsx)(U,{name:`triangle-alert`,color:`#f0625a`,size:16}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`diagram-error-title`,children:`Ce schéma ne peut pas être affiché.`}),(0,O.jsx)(`p`,{className:`diagram-error-text`,children:n.error}),(0,O.jsx)(`p`,{className:`diagram-error-text`,children:`L'agent doit le corriger avec l'outil set_diagram.`})]})]})}function nm({analysis:e,diagram:t,layout:n}){let r=(0,v.useRef)(null),i=(0,v.useRef)(null),[a,o]=(0,v.useState)({width:0,height:0}),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),d=a.width,f=d===0?0:s?a.height:Hp(n,d),[p,m]=(0,v.useState)(null),h=(0,v.useRef)(null),g=(0,v.useRef)(!1),_=(0,v.useMemo)(()=>Op(e),[e]),y=(0,v.useMemo)(()=>new Map(n.nodes.map(e=>[e.id,e])),[n]),b=Ap(t.nodes),x=kp(t.nodes,_),S=`arrow-${t.id}`,C=t.kind===`flow`;(0,v.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>o({width:e.clientWidth,height:e.clientHeight}),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]),(0,v.useEffect)(()=>{let e=()=>{c(document.fullscreenElement!==null&&document.fullscreenElement===r.current),m(null)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let ee=async()=>{u(null);try{if(s){await document.exitFullscreen();return}let e=r.current;if(!e)return;if(!document.fullscreenEnabled)throw Error(`le navigateur n'autorise pas le plein écran sur cette page`);await e.requestFullscreen()}catch(e){u(`Plein écran impossible : ${e.message}`)}},E=`${n.width}x${n.height}@${d}x${f}${s?`:plein-ecran`:``}`,te=d>0?Up(n,d,f,s?Bp:1):null,D=p&&p.key===E?p.viewport:te,k=e=>{D&&m({key:E,viewport:Gp(e(D),n,d,f)})},ne=D!==null&&Wp(n,D,d,f),re=(0,v.useEffectEvent)(e=>{let t=i.current;if(!t)return;e.preventDefault();let n=t.getBoundingClientRect(),r=e.deltaY<0?Qp:1/Qp;k(t=>Kp(t,r,{x:e.clientX-n.left,y:e.clientY-n.top}))});(0,v.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>re(e);return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[]);let ie=e=>k(t=>Kp(t,e,{x:d/2,y:f/2})),ae=e=>{e.button===0&&D&&(h.current={x:e.clientX,y:e.clientY,origin:D,moved:!1,pointerId:e.pointerId},g.current=!1)},oe=e=>{let t=h.current;if(!t||t.pointerId!==e.pointerId)return;let r=e.clientX-t.x,i=e.clientY-t.y;if(!t.moved){if(Math.hypot(r,i)<Zp)return;t.moved=!0,e.currentTarget.setPointerCapture(e.pointerId)}m({key:E,viewport:Gp(qp(t.origin,r,i),n,d,f)})},se=e=>{let t=h.current;t&&t.pointerId===e.pointerId&&(g.current=t.moved,h.current=null)},ce=t=>{!g.current&&t.location&&T(w.review(e.id,t.location.path,t.location.line))};return(0,O.jsxs)(`section`,{ref:r,className:`card diagram-card${s?` is-fullscreen`:``}`,children:[(0,O.jsx)(`div`,{ref:i,className:`diagram-area`,style:s?void 0:{height:f||void 0},children:D&&(0,O.jsxs)(`svg`,{className:`diagram-svg`,width:d,height:f,viewBox:Jp(D,d,f),onPointerDown:ae,onPointerMove:oe,onPointerUp:se,onPointerCancel:se,role:`img`,"aria-label":t.title,children:[C&&(0,O.jsx)(`defs`,{children:(0,O.jsx)(`marker`,{id:S,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,O.jsx)(`path`,{d:`M 1 1 L 9 5 L 1 9`,fill:`none`,stroke:Xp,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),n.headers.map(e=>(0,O.jsx)(`text`,{className:`diagram-header`,x:e.x,y:e.y+7,dominantBaseline:`central`,children:e.label.toUpperCase()},e.label)),n.links.map((e,t)=>(0,O.jsx)(`path`,{className:`diagram-link`,d:Mp(e.points),stroke:Xp,markerEnd:C?`url(#${S})`:void 0},`link-${t}`)),n.links.map((e,n)=>{let r=t.links[n].label;return r?(0,O.jsx)(`text`,{className:`diagram-link-label`,x:e.labelPosition.x,y:e.labelPosition.y,textAnchor:e.labelAnchor,dominantBaseline:`central`,children:r},`label-${n}`):null}),t.nodes.map(e=>(0,O.jsx)(rm,{node:e,box:y.get(e.id),severity:e.location?_.get(e.location.path)??null:null,onOpen:ce},e.id))]})}),(0,O.jsxs)(`div`,{className:`diagram-footer`,children:[(0,O.jsxs)(`div`,{className:`diagram-legend`,children:[b.map(e=>{let t=Hu[e];return(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch`,style:{background:t.fill??`transparent`,borderColor:t.stroke}}),t.label]},e)}),x.length>0&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-dots`,children:x.map(e=>(0,O.jsx)(`span`,{className:`legend-dot`,style:{background:ku[e].color},title:ku[e].label},e))}),x.length===1?`Constat ouvert (${ku[x[0]].label.toLowerCase()})`:`Constat ouvert (couleur de la gravité la plus haute)`]})]}),(0,O.jsx)(`span`,{className:`spacer`}),ne&&(0,O.jsxs)(`span`,{className:`diagram-hint`,children:[(0,O.jsx)(U,{name:`move`,color:`#646b7b`,size:12}),`Glisser pour parcourir le schéma`]}),(0,O.jsxs)(`div`,{className:`icon-button-group diagram-zoom`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Zoom arrière`,"aria-label":`Zoom arrière`,onClick:()=>ie(1/Ip),children:(0,O.jsx)(U,{name:`minus`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Zoom avant`,"aria-label":`Zoom avant`,onClick:()=>ie(Ip),children:(0,O.jsx)(U,{name:`plus`,color:`#9aa1b1`})}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary diagram-control`,title:`Recentrer et adapter le zoom`,onClick:()=>m(null),children:[(0,O.jsx)(U,{name:`focus`,color:`#9aa1b1`}),`Ajuster`]}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary diagram-control`,"aria-pressed":s,onClick:()=>void ee(),children:[(0,O.jsx)(U,{name:s?`minimize`:`maximize`,color:`#9aa1b1`}),s?`Quitter le plein écran`:`Plein écran`]})]})]}),l&&(0,O.jsx)(`p`,{className:`diagram-fullscreen-error`,role:`alert`,children:l})]})}function rm({node:e,box:t,severity:n,onOpen:r}){let i=Hu[e.status],{width:a,height:o}=t,s=e.location!==null,c=e.status===`missing`,l=Ef(e)?Dp(e):null,u=Df(e),d=Tf(e),f=e.shape===`pill`?20:16,p=l?f+22:a/2,m=u?o/2-8:o/2,h={className:`diagram-shape`,fill:i.fill??`transparent`,stroke:i.stroke,strokeWidth:c?1.5:1},g=[e.detail,e.location?`${e.location.path}${e.location.line?`:${e.location.line}`:``}`:null].filter(Boolean).join(`
67
+ `);return(0,O.jsxs)(`g`,{className:`diagram-node${s?` is-clickable`:``}`,transform:`translate(${t.x} ${t.y})`,onClick:s?()=>r(e):void 0,onKeyDown:s?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e))}:void 0,tabIndex:s?0:void 0,role:s?`link`:void 0,children:[g&&(0,O.jsx)(`title`,{children:g}),e.shape===`decision`?(0,O.jsx)(`polygon`,{points:Np(a,o),strokeLinejoin:`round`,...h}):(0,O.jsx)(`rect`,{width:a,height:o,rx:e.shape===`pill`?o/2:10,...h}),l&&(0,O.jsx)(`g`,{transform:`translate(${f} ${o/2-7})`,children:(0,O.jsx)(U,{name:l,size:14,color:i.accent})}),(0,O.jsx)(`text`,{x:p,y:m,textAnchor:l?`start`:`middle`,dominantBaseline:`central`,fill:i.text,fontSize:d.size,fontWeight:d.weight,className:d.mono?`diagram-label mono`:`diagram-label`,children:e.label}),u&&(0,O.jsx)(`text`,{x:a/2,y:o/2+10,textAnchor:`middle`,dominantBaseline:`central`,fill:i.accent,fontSize:Sf.size,className:`diagram-label`,children:e.detail}),n&&(0,O.jsx)(`circle`,{cx:e.shape===`decision`?a-22:a-18,cy:o/2,r:3,fill:ku[n].color,children:(0,O.jsx)(`title`,{children:`Constat ${ku[n].label.toLowerCase()} ouvert sur ce fichier`})})]})}function im({analysis:e,finding:t}){return(0,O.jsxs)(`a`,{className:`finding-row is-${t.status}`,href:Qd(e,t),children:[(0,O.jsx)(bd,{severity:t.severity}),(0,O.jsxs)(`span`,{className:`finding-row-text`,children:[(0,O.jsxs)(`span`,{className:`finding-row-title`,children:[t.title,(0,O.jsx)(wd,{kind:t.kind}),(0,O.jsx)(Cd,{status:t.status})]}),(0,O.jsx)(`span`,{className:`finding-row-location mono`,children:nd(t,e.request)})]}),(0,O.jsx)(U,{name:`chevron-right`,color:`#646b7b`})]})}function am(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function om({analysis:e}){let[t,n]=(0,v.useState)(new Set(Gc)),[r,i]=(0,v.useState)(new Set(qc)),a=jl(e.findings).filter(e=>t.has(e.severity)&&r.has(e.status));return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`filters`,children:[(0,O.jsxs)(`div`,{className:`filter-group`,role:`group`,"aria-label":`Filtrer par gravité`,children:[(0,O.jsx)(`span`,{className:`filter-label`,children:`Gravité`}),Gc.map(r=>{let i=e.findings.filter(e=>e.severity===r).length,a=t.has(r);return(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":a,className:`chip${a?` is-active`:``}`,style:a?{color:ku[r].color,background:ku[r].background}:void 0,title:`${Yu(i,`constat`)} de gravité « ${ku[r].label} », tous statuts confondus`,onClick:()=>n(am(t,r)),children:[ku[r].label,` `,(0,O.jsx)(`span`,{className:`chip-count`,children:i})]},r)})]}),(0,O.jsxs)(`div`,{className:`filter-group`,role:`group`,"aria-label":`Filtrer par statut`,children:[(0,O.jsx)(`span`,{className:`filter-label`,children:`Statut`}),qc.map(t=>{let n=e.findings.filter(e=>e.status===t).length,a=r.has(t);return(0,O.jsxs)(`button`,{type:`button`,"aria-pressed":a,className:`chip${a?` is-active is-neutral`:``}`,title:`${Yu(n,`constat`)} au statut « ${Mu[t]} »`,onClick:()=>i(am(r,t)),children:[Mu[t],` `,(0,O.jsx)(`span`,{className:`chip-count`,children:n})]},t)})]})]}),(0,O.jsx)(`section`,{className:`card list-card`,children:a.length===0?(0,O.jsx)(`p`,{className:`list-empty`,children:e.findings.length===0?`L'agent n'a relevé aucun constat.`:`Aucun constat ne correspond aux filtres.`}):a.map(t=>(0,O.jsx)(im,{analysis:e,finding:t},t.id))})]})}var sm={critical:`Critical`,major:`Major`,minor:`Minor`,trivial:`Trivial`},cm={approve:`Decision: Approve. The feature can be merged.`,request_changes:`Decision: Request changes. Rework the feature and address the points below.`,reject:`Decision: Reject. The feature is abandoned.`},lm=` `;function um(e){return e.split(`
68
+ `).map(e=>e===``?``:`${lm}${e}`)}function dm(e,t){return[`${lm}${e}`,`${lm}\`\`\``,...um(t),`${lm}\`\`\``]}function fm(e){return e.mode===`branch`?`branch ${e.base}...${e.head}`:`working tree changes against HEAD`}function pm(e){let t=e.location;return t?`${t.path}:${Nl(t.startLine,t.endLine)}`:null}function mm(e,t){let n=pm(t),r=t.kind===`requirement_gap`?`Missing requirement: ${t.title}`:t.title,i=`${e}. [${sm[t.severity]}] ${n?`${n} — `:``}${r}`;if(t.prompt!==null)return[i,...um(t.prompt)];let a=[i];return t.body.trim()!==``&&a.push(...um(t.body)),t.anchorText!==null&&a.push(...dm(`Current lines:`,t.anchorText)),t.suggestion!==null&&a.push(...dm(`Proposed replacement:`,t.suggestion)),a}function hm(e,t){let n=t.location?`${Pl(t.location)} — `:``,[r,...i]=t.text.split(`
69
+ `);return[`${e}. [Reviewer note] ${n}${r}`,...i.map(e=>e===``?``:`${lm}${e}`)]}function gm(e,t,n){let r=new Set(e.map(e=>e.id)),i=t.filter(e=>!r.has(e));if(i.length>0)throw Error(`Unknown ${n} id(s): ${i.join(`, `)}.`);let a=new Set(t);return e.filter(e=>a.has(e.id))}function _m(e,t){let n=jl(gm(e.findings,t.findingIds,`finding`)),r=gm(e.notes,t.noteIds,`note`),i=[`Review feedback on "${e.title}" (${fm(e)}).`];if(e.overview!==null&&i.push(`Feature objective: ${e.overview.objective}`),t.decision!==null&&i.push(cm[t.decision]),i.push(``),n.length===0&&r.length===0)return i.push(`No points to address.`),i.join(`
70
+ `);i.push(`Address the following points:`);let a=1;for(let e of n)i.push(``,...mm(a++,e));for(let e of r)i.push(``,...hm(a++,e));return i.join(`
71
+ `)}function vm(e){return _m(e,{findingIds:e.findings.filter(e=>e.status===`open`).map(e=>e.id),noteIds:[],decision:null})}var ym=5;function bm({analysis:e}){let t=H(e=>e.copy),n=jl(e.findings.filter(e=>e.status===`open`)),r=Gc.map(e=>({severity:e,count:n.filter(t=>t.severity===e).length}));return(0,O.jsxs)(O.Fragment,{children:[e.overview&&(0,O.jsxs)(`section`,{className:`card overview-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`focus`,color:`#8b97ff`}),`Vue d'ensemble`]}),(0,O.jsx)(`h3`,{className:`overview-label`,children:`Objectif`}),(0,O.jsx)(`p`,{className:`overview-text`,children:e.overview.objective}),(0,O.jsx)(`h3`,{className:`overview-label`,children:`Approche`}),(0,O.jsx)(`p`,{className:`overview-text`,children:e.overview.approach}),e.overview.attentionPoints.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`h3`,{className:`overview-label`,children:`Points d'attention`}),(0,O.jsx)(`ul`,{className:`summary-list overview-points`,children:e.overview.attentionPoints.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))})]})]}),(0,O.jsxs)(`section`,{className:`card summary-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`sparkles`,color:`#b18cff`}),`Ce que l'agent a fait`]}),e.summary.length>0?(0,O.jsx)(`ul`,{className:`summary-list`,children:e.summary.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))}):(0,O.jsx)(`p`,{className:`empty-text`,children:`L'agent n'a pas encore rédigé de résumé (outil update_analysis).`})]}),e.request&&(0,O.jsxs)(`section`,{className:`card request-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Demande initiale`,e.request.source&&(0,O.jsx)(`span`,{className:`request-source mono`,children:e.request.source})]}),(0,O.jsx)(`p`,{className:`request-text`,children:e.request.text})]}),(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsx)(`h2`,{className:`section-title`,children:`Constats ouverts`}),(0,O.jsx)(`div`,{className:`pill-row`,title:`Constats ouverts par gravité, exigences manquantes comprises`,children:r.filter(({count:e})=>e>0).map(({severity:e,count:t})=>(0,O.jsx)(`span`,{className:`pill`,style:{color:ku[e].color,background:ku[e].background},children:Xu(e,t)},e))}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary button-medium`,disabled:n.length===0,title:n.length===0?`Aucun constat ouvert à transmettre.`:`Tous les constats ouverts, du plus grave au moins grave.`,onClick:()=>void t(vm(e),`Prompt des constats ouverts copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]})]}),(0,O.jsxs)(`section`,{className:`card list-card`,children:[n.length===0?(0,O.jsx)(`p`,{className:`list-empty`,children:e.findings.length===0?`L'agent n'a relevé aucun constat.`:`Aucun constat ouvert : tous sont ignorés ou obsolètes.`}):n.slice(0,ym).map(t=>(0,O.jsx)(im,{analysis:e,finding:t},t.id)),e.findings.length>0&&(0,O.jsxs)(`a`,{className:`list-footer-link`,href:w.feature(e.id,`findings`),children:[`Voir les `,e.findings.length,` constats, tous statuts confondus`]})]})]})}var xm={summary:`Résumé`,files:`Fichiers`,findings:`Constats`,diagrams:`Schémas`};function Sm(e,t){if(t===`files`)return{count:e.files.length,title:Yu(e.files.length,`fichier modifié`,`fichiers modifiés`)};if(t===`findings`){let t=e.findings.filter(e=>e.status===`open`).length;return{count:t,title:`${Yu(t,`constat ouvert`,`constats ouverts`)}, exigences manquantes comprises · ${e.findings.length} au total`}}return t===`diagrams`?{count:e.diagrams.length,title:Yu(e.diagrams.length,`schéma`)}:null}function Cm(e){return e.mode===`branch`?`${Lu.branch} ${td(e)} vers ${ed(e.base)}`:`${Lu.working_tree} par rapport à HEAD`}function wm({analysis:e,links:t,tab:n}){let r=q(e),i=Yd(e);return(0,O.jsxs)(`div`,{className:`page`,children:[(0,O.jsxs)(`div`,{className:`page-head`,children:[(0,O.jsxs)(`div`,{className:`page-head-text`,children:[(0,O.jsx)(`h1`,{className:`page-title`,children:e.title}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[(0,O.jsxs)(`span`,{children:[Cm(e),` · produite `,Wu(e.snapshotAt),` · `,Yu(e.files.length,`fichier`)]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,r.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,r.deletions]})]})]}),(0,O.jsx)(`button`,{type:`button`,className:`button button-primary button-large`,disabled:i===null,title:i===null?`L'analyse ne contient aucun fichier modifié.`:void 0,onClick:()=>i&&T(w.review(e.id,i)),children:`Commencer la revue`})]}),t&&(0,O.jsx)(Bd,{analysisId:e.id,links:t}),(0,O.jsx)(`nav`,{className:`tabs`,"aria-label":`Sections de l'analyse`,children:b.map(t=>{let r=Sm(e,t);return(0,O.jsxs)(`a`,{href:w.feature(e.id,t),className:`tab${t===n?` is-active`:``}`,title:r?.title,children:[xm[t],r!==null&&(0,O.jsx)(`span`,{className:`tab-count`,children:r.count})]},t)})}),(0,O.jsxs)(`div`,{className:`tab-panel`,children:[n===`summary`&&(0,O.jsx)(bm,{analysis:e}),n===`files`&&(0,O.jsx)(rf,{analysis:e}),n===`findings`&&(0,O.jsx)(om,{analysis:e}),n===`diagrams`&&(0,O.jsx)(em,{analysis:e})]})]})}var Tm={approve:{icon:`circle-check`,color:`#3fb950`,description:`La feature peut être fusionnée`},request_changes:{icon:`pencil`,color:`#e3a33b`,description:`L'agent reprend son travail`},reject:{icon:`circle-x`,color:`#f0625a`,description:`La feature est abandonnée`}};function Em(e){let t=jl(e.findings.filter(e=>e.status===`open`)).map(e=>({key:`f:${e.id}`,finding:e})),n=e.notes.filter(e=>e.question===null).map(e=>({key:`n:${e.id}`,note:e}));return[...t,...n]}function Dm(e){let t=e.review;if(t.state===`submitted`){let n=new Set([...t.selectedFindingIds.map(e=>`f:${e}`),...t.selectedNoteIds.map(e=>`n:${e}`)]);return new Set(Em(e).map(e=>e.key).filter(e=>!n.has(e)))}let n=t.previousSubmission;return n?new Set([...n.excludedFindingIds.map(e=>`f:${e}`),...n.excludedNoteIds.map(e=>`n:${e}`)]):new Set}function Om({analysis:e}){let t=H(e=>e.copy),n=H(e=>e.submitReview),r=H(e=>e.notify),i=H(e=>e.saving),a=H(t=>bu(t,e.id)===!0),o=Em(e),[s,c]=(0,v.useState)(()=>e.review.decision??e.review.previousSubmission?.decision??(o.length>0?`request_changes`:`approve`)),[l,u]=(0,v.useState)(()=>Dm(e)),d=o.filter(e=>!l.has(e.key)),f=d.flatMap(e=>e.finding?[e.finding.id]:[]),p=d.flatMap(e=>e.note?[e.note.id]:[]),m=_m(e,{findingIds:f,noteIds:p,decision:s}),h=e.files.filter(e=>e.reviewed).length,g=e.review,_=e=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)},y=async()=>{await n(s,f,p)&&r(`info`,a?`Retour enregistré : l'agent à l'écoute vient d'en être notifié.`:`Retour enregistré : l'agent le lit avec l'outil get_review_feedback.`)},b=Yd(e);return(0,O.jsxs)(`div`,{className:`page page-narrow`,children:[(0,O.jsx)(`h1`,{className:`page-title page-title-small`,children:`Terminer la revue`}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[h,` / `,Yu(e.files.length,`fichier revu`,`fichiers revus`),` · `,Yu(f.length,`constat ouvert`,`constats ouverts`),` et`,` `,Yu(p.length,`remarque`),` à transmettre`]}),g.state===`submitted`&&g.submittedAt&&g.decision&&(0,O.jsxs)(`div`,{className:`submitted-banner`,children:[(0,O.jsx)(U,{name:`circle-check`,color:`#3fb950`,size:16}),(0,O.jsxs)(`span`,{children:[`Retour enregistré le `,Gu(g.submittedAt),` · décision « `,Ru[g.decision],` ».`,` `,g.processed?`${qu(g.processed)}.`:g.decision===`approve`?`Approuvée : rien à traiter pour l'agent.`:`L'agent le lit avec l'outil get_review_feedback ; il n'est pas encore traité.`,` `,`Un nouvel enregistrement le remplace.`]})]}),g.state===`pending`&&g.previousSubmission&&(0,O.jsxs)(`div`,{className:`submitted-banner is-reopened`,children:[(0,O.jsx)(U,{name:`pencil`,color:`#e3a33b`,size:16}),(0,O.jsxs)(`span`,{children:[`Revue modifiée depuis le retour du `,Gu(g.previousSubmission.submittedAt),` : l'agent ne le traite plus. Enregistrez-la à nouveau pour qu'il traite la nouvelle version ; il verra ce qui a changé.`]})]}),(0,O.jsx)(`h2`,{className:`field-label`,children:`Décision`}),(0,O.jsx)(`div`,{className:`decisions`,role:`radiogroup`,"aria-label":`Décision`,children:el.map(e=>(0,O.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":s===e,className:`decision${s===e?` is-selected`:``}`,onClick:()=>c(e),children:[(0,O.jsx)(U,{name:Tm[e].icon,color:Tm[e].color,size:16}),(0,O.jsxs)(`span`,{className:`decision-text`,children:[(0,O.jsx)(`span`,{className:`decision-title`,children:Ru[e]}),(0,O.jsx)(`span`,{className:`decision-description`,children:Tm[e].description})]})]},e))}),(0,O.jsxs)(`div`,{className:`field-head`,children:[(0,O.jsx)(`h2`,{className:`field-label`,children:`Points à transmettre`}),(0,O.jsxs)(`span`,{className:`field-meta`,children:[d.length,` sur `,o.length,` sélectionnés`]})]}),(0,O.jsxs)(`div`,{className:`card points`,children:[o.length===0&&(0,O.jsx)(`p`,{className:`list-empty`,children:`Aucun constat ouvert ni remarque : le retour ne contiendra que la décision.`}),o.map(t=>{let n=!l.has(t.key);return(0,O.jsxs)(`label`,{className:`point${n?``:` is-excluded`}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:n,onChange:()=>_(t.key)}),(0,O.jsx)(U,{name:n?`square-check`:`square`,color:n?`#8b97ff`:`#646b7b`,size:16}),t.finding?(0,O.jsx)(bd,{severity:t.finding.severity}):(0,O.jsx)(xd,{}),(0,O.jsx)(`span`,{className:`point-title`,children:t.finding?t.finding.title:t.note.text}),(0,O.jsx)(`span`,{className:`point-location mono`,children:t.finding?nd(t.finding,e.request):G(t.note)})]},t.key)})]}),(0,O.jsx)(`h2`,{className:`field-label`,children:`Prompt pour l'agent`}),(0,O.jsxs)(`div`,{className:`prompt-box`,children:[(0,O.jsx)(`pre`,{className:`prompt-text`,children:m}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button prompt-copy`,title:`Copier le prompt`,"aria-label":`Copier le prompt`,onClick:()=>void t(m,`Prompt copié dans le presse-papiers.`),children:(0,O.jsx)(U,{name:`copy`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`footer`,{className:`finish-footer`,children:[(0,O.jsx)(U,{name:`info`,color:`#646b7b`}),(0,O.jsx)(`span`,{className:`finish-hint`,children:`L'agent récupère ce retour avec l'outil get_review_feedback.`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-secondary button-medium`,onClick:()=>T(b?w.review(e.id,b):w.feature(e.id)),children:`Retour à la revue`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-primary button-medium`,disabled:i,onClick:()=>void y(),children:[(0,O.jsx)(U,{name:`save`,color:`#ffffff`}),`Enregistrer le retour`]})]})]})}var km={to_review:{label:`À relire`,icon:`eye`,empty:`Aucune revue à faire : toutes les analyses sont soumises.`},to_process:{label:`À traiter par l'agent`,icon:`hourglass`,empty:`Aucun retour n'attend l'agent.`},processed:{label:`Traitées par l'agent`,icon:`clipboard-check`,empty:`Aucun retour traité par l'agent à vérifier.`},approved:{label:`Approuvées`,icon:`circle-check`,empty:`Aucune analyse approuvée.`},all:{label:`Toutes`,icon:`list`,empty:`Aucune analyse.`}};function Am({counts:e}){let t=H(e=>e.homeFilter),n=H(e=>e.setHomeFilter);return(0,O.jsx)(`nav`,{className:`home-filters`,"aria-label":`Filtrer les analyses`,children:rd.map(r=>{let i=r===t;return(0,O.jsxs)(`button`,{type:`button`,className:`home-filter${i?` is-active`:``}${r===`all`?` is-all`:``}`,"aria-pressed":i,onClick:()=>n(r),children:[(0,O.jsx)(U,{name:km[r].icon,size:16,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`home-filter-label`,children:km[r].label}),(0,O.jsx)(`span`,{className:`home-filter-count`,children:e[r]})]},r)})})}function jm({analysis:e}){let t=e.progress.processed;if(!t)return null;let n=t.by===`user`?`du relecteur`:`de l'agent`;return(0,O.jsxs)(`span`,{className:`home-row-processing`,children:[(0,O.jsx)(U,{name:`corner-down-right`,size:12,color:Bu.color}),t.note===null?Ku(t):`Note ${n} : ${t.note}`,` · le `,Gu(t.at)]})}function Mm({analysis:e}){let{followedBy:t,followUpOf:n}=e;return(0,O.jsxs)(O.Fragment,{children:[t&&(0,O.jsxs)(`span`,{className:`home-row-follow`,children:[(0,O.jsx)(`span`,{children:`Nouvelle revue disponible :`}),(0,O.jsx)(Id,{link:t,direction:`next`,small:!0}),(0,O.jsx)(kd,{progress:t.progress,small:!0})]}),n&&(0,O.jsxs)(`span`,{className:`home-row-follow`,children:[(0,O.jsx)(`span`,{children:`Revue faisant suite à :`}),(0,O.jsx)(Id,{link:n,direction:`previous`,small:!0}),(0,O.jsxs)(`span`,{className:`home-row-follow-round`,children:[`tour `,e.round]})]})]})}function Nm({analysis:e}){let t=H(e=>e.markProcessed),n=H(e=>e.saving),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null),c=(0,v.useId)();(0,v.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let l=async()=>{let n=a.trim();await t(e,n===``?null:n)&&(i(!1),o(``))};return(0,O.jsxs)(`div`,{className:`mark-processed${r?` is-open`:``}`,ref:s,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary mark-processed-button`,"aria-expanded":r,"aria-haspopup":`dialog`,onClick:()=>i(!r),children:[(0,O.jsx)(U,{name:`check`,size:14,color:Bu.color}),`Marquer comme traité`]}),r&&(0,O.jsxs)(`div`,{className:`mark-processed-panel`,role:`dialog`,"aria-label":`Marquer le retour comme traité`,children:[(0,O.jsx)(`p`,{className:`mark-processed-title`,children:`Marquer le retour comme traité`}),(0,O.jsx)(`label`,{className:`mark-processed-label`,htmlFor:c,children:`Note pour l'historique (facultative)`}),(0,O.jsx)(`input`,{id:c,className:`mark-processed-input`,autoFocus:!0,value:a,placeholder:`ex. corrigé par 12785d6e3 et 1ff5baaad`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l()}}),(0,O.jsxs)(`div`,{className:`mark-processed-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,onClick:()=>i(!1),children:`Annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button mark-processed-confirm`,disabled:n,onClick:()=>void l(),children:`Marquer comme traité`})]})]})]})}function Pm({analysis:e,markable:t}){let{reviewedFiles:n,totalFiles:r}=e.progress,i=cd(e);return(0,O.jsxs)(`div`,{className:`home-row`,children:[(0,O.jsxs)(`span`,{className:`home-row-body`,children:[(0,O.jsxs)(`span`,{className:`home-row-head`,children:[(0,O.jsx)(`a`,{className:`home-row-title home-row-link`,href:w.feature(e.id),children:e.title}),t&&(0,O.jsx)(Nm,{analysis:e})]}),(0,O.jsxs)(`span`,{className:`home-row-details`,children:[(0,O.jsxs)(`span`,{className:`home-row-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:W(e)}),(0,O.jsxs)(`span`,{children:[`· `,Wu(e.updatedAt)]})]}),(0,O.jsxs)(`span`,{className:`home-row-progress`,title:`${n} fichier(s) revu(s) sur ${r}`,children:[(0,O.jsx)(`span`,{className:`home-row-progress-bar`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":n,children:(0,O.jsx)(`span`,{className:`progress-fill`,style:{width:`${ld(e)}%`}})}),(0,O.jsxs)(`span`,{className:`home-row-progress-label mono`,children:[n,`/`,r]})]}),(0,O.jsx)(`span`,{className:`home-row-findings`,children:i.length===0?(0,O.jsx)(`span`,{className:`home-row-none`,children:`Aucun constat ouvert`}):i.map(({severity:e,count:t})=>(0,O.jsx)(Td,{severity:e,count:t,title:`${Qu(e,t)}, exigences manquantes comprises`},e))}),(0,O.jsx)(`span`,{className:`home-row-state`,children:(0,O.jsx)(kd,{progress:e.progress})})]}),(0,O.jsx)(jm,{analysis:e}),(0,O.jsx)(Mm,{analysis:e})]}),(0,O.jsx)(U,{name:`chevron-right`,color:`#646b7b`})]})}function Fm({group:e}){let t=H(e=>e.homeFilter),n=H(t=>t.collapsedProjects.has(e.project)),r=H(e=>e.toggleProject);return(0,O.jsxs)(`section`,{className:`home-project`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`home-project-head`,"aria-expanded":!n,onClick:()=>r(e.project),children:[(0,O.jsx)(U,{name:n?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`folder`,color:`#8b97ff`}),(0,O.jsx)(`span`,{className:`home-project-name`,children:e.project}),(0,O.jsx)(`span`,{className:`home-project-total`,children:Yu(e.analyses.length,`analyse`)}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(`span`,{className:`home-project-counts`,children:e.counts.map(({state:e,count:t})=>(0,O.jsxs)(`span`,{className:`pill pill-small`,style:{color:zu[e].color,background:zu[e].background},children:[zu[e].label,` · `,t]},e))})]}),!n&&(0,O.jsx)(`div`,{className:`home-project-list`,children:e.analyses.map(e=>(0,O.jsx)(Pm,{analysis:e,markable:t===`to_process`&&e.progress.toProcess},e.id))})]})}function Im(){let e=H(e=>e.analyses),t=H(e=>e.unreadable),n=H(e=>e.listError),r=H(e=>e.homeFilter),i=H(e=>e.setHomeFilter);if(n)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:(0,O.jsx)(`p`,{className:`error-text`,children:n})})});if(e===null)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:(0,O.jsx)(`p`,{children:`Chargement des analyses…`})})});if(e.length===0&&t.length===0)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsxs)(`div`,{className:`empty-card`,children:[(0,O.jsx)(`h1`,{className:`empty-title`,children:`Aucune analyse à revoir`}),(0,O.jsxs)(`p`,{children:[`L'agent crée une analyse avec l'outil `,(0,O.jsx)(`code`,{children:`create_analysis`}),` une fois la feature développée. Elle apparaîtra ici automatiquement.`]})]})});let a=sd(ad(e,r)),o=new Set(e.map(e=>e.project)).size,s=od(e);return(0,O.jsxs)(`div`,{className:`page page-home`,children:[(0,O.jsx)(`div`,{className:`home-head`,children:(0,O.jsxs)(`div`,{className:`page-head-text`,children:[(0,O.jsx)(`h1`,{className:`page-title`,children:`Analyses`}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[Yu(e.length,`analyse`),` · `,Yu(o,`projet`),` · `,s.to_review,` à relire`]})]})}),(0,O.jsxs)(`div`,{className:`home-layout`,children:[(0,O.jsx)(Am,{counts:s}),(0,O.jsxs)(`div`,{className:`home-projects`,children:[a.length===0&&e.length>0&&(0,O.jsxs)(`div`,{className:`card home-empty`,children:[(0,O.jsx)(`p`,{children:km[r].empty}),(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:()=>i(`all`),children:`Afficher toutes les analyses`})]}),a.map(e=>(0,O.jsx)(Fm,{group:e},e.project)),t.length>0&&(0,O.jsxs)(`section`,{className:`home-project`,children:[(0,O.jsxs)(`h2`,{className:`home-project-head is-static`,children:[(0,O.jsx)(U,{name:`triangle-alert`,color:`#f0625a`}),(0,O.jsx)(`span`,{className:`home-project-name`,children:`Analyses illisibles`})]}),(0,O.jsx)(`div`,{className:`home-project-list`,children:t.map(e=>(0,O.jsx)(`div`,{className:`home-row is-unreadable`,children:(0,O.jsxs)(`span`,{className:`home-row-body`,children:[(0,O.jsx)(`span`,{className:`home-row-title mono`,children:e.id}),(0,O.jsx)(`span`,{className:`home-row-meta error-text`,children:e.error})]})},e.id))})]})]})]})]})}function Lm(e,t){return t===1?`${e}`:`${e},${t}`}function Rm(e,t,n,r){let i=r.filter(e=>e.type!==`add`).length,a=r.filter(e=>e.type!==`del`).length,o=e.header.replace(/^@@[^@]*@@/,``);return{header:`@@ -${Lm(t,i)} +${Lm(n,a)} @@${o}`,oldStart:t,oldLines:i,newStart:n,newLines:a,lines:r}}function zm(e){let t=e.lines.findIndex(e=>e.type!==`context`);return t===-1?e.lines.length:t}function Bm(e,t){if(e.newContent===null)return null;let n=Ml(e.newContent),r=new Set,i=[],a=0,o=0;e.hunks.forEach((s,c)=>{let l=s.newLines===0?s.newStart+1:s.newStart,u=l+s.newLines-1,d=e.hunks[c+1],f=d===void 0?n.length+1:d.newLines===0?d.newStart+1:d.newStart,p=Math.max(0,t[c]??0),m=l-1-o,h=f-1-u,g=Math.min(p,m),_=Math.min(p,h),v=a+s.oldLines-s.newLines,y=(e,t)=>(r.add(e),{type:`context`,oldNo:e+t,newNo:e,text:n[e-1]}),b=g===0&&_===0?s:Rm(s,(s.oldLines===0?s.oldStart+1:s.oldStart)-g,l-g,[...Array.from({length:g},(e,t)=>y(l-g+t,a)),...s.lines,...Array.from({length:_},(e,t)=>y(u+1+t,v))]);i.push({hunk:b,above:g,below:_,canGrow:g<m||_<h,joinsPrevious:c>0&&g===m}),a=v,o=u+_});let s=[];i.forEach((e,t)=>{e.joinsPrevious?s[s.length-1].push(t):s.push([t])});let c=s.map(e=>{if(e.length===1)return i[e[0]].hunk;let t=i[e[0]].hunk;return Rm(t,t.oldLines===0?t.oldStart+1:t.oldStart,t.newLines===0?t.newStart+1:t.newStart,e.flatMap(e=>i[e].hunk.lines))}),l=s.map(t=>({context:zm(e.hunks[t[0]])+i[t[0]].above,members:t,canShrink:t.some(e=>i[e].above>0||i[e].below>0),canGrow:t.some(e=>i[e].canGrow)}));return{fileDiff:{...e,hunks:c},hunks:l,extras:i.map(e=>Math.max(e.above,e.below)),added:r}}function Vm(e,t,n){let r=[...e.extras];for(let i of e.hunks[t].members)r[i]=Math.max(0,r[i]+n*5);return r}var Hm={context:` `,add:`+`,del:`-`};function Um(e){return e.mode===`branch`?`branch ${e.base}...${e.head}`:`working tree changes against HEAD`}function Wm(e,t){return t===0?null:Nl(e,e+t-1)}function Gm(e){let t=1;for(let n of e.lines)t=Math.max(t,String(n.oldNo??``).length,String(n.newNo??``).length);let n=e=>String(e??``).padStart(t);return[e.header,...e.lines.map(e=>`${n(e.oldNo)} | ${n(e.newNo)} ${Hm[e.type]} ${e.text}`)]}function Km(e,t,n){let r=Wm(n.newStart,n.newLines),i=Wm(n.oldStart,n.oldLines),a=[`- File: ${t.path}${t.oldPath===null?``:` (renamed from ${t.oldPath})`}`,r===null?`- New side: no line (the section only removes code).`:`- New side (code after the feature): lines ${r}`,i===null?`- Old side: no line (the section only adds code).`:`- Old side (code before the feature): lines ${i}`];return[`Explain a section of code in the feature analysis "${e.title}" (analysis_id: "${e.id}", project "${e.project}").`,`Repository: ${e.repoPath} — ${Um(e)}.`,``,`Section to explain:`,...a,``,`Code of the section, as frozen in the analysis (columns: old line | new line, then + added, - removed, or a space for context):`,"```",...Gm(n),"```",``,`What to do:`,`1. Read this code and what surrounds it (get_diff with analysis_id "${e.id}" and path "${t.path}", and the repository) until you understand what it does and how it works.`,`2. Record your explanations in the feature analyzer with add_explanations (analysis_id "${e.id}", path "${t.path}"): one explanation per meaningful block of the section, covering it from its first to its last line. Use "side": "new" with new-side line numbers for added or kept code, and "side": "old" with old-side line numbers for removed code.`,`3. In each explanation, say what the code does (inputs, outputs, effects), then how it works, step by step in the order of the code; name the key variables and the edge cases it handles. For removed code, say what it did and what replaces it. Describe, do not judge.`,`4. If an explanation of the analysis already covers these lines (see get_analysis), rewrite it with update_explanation instead of adding a duplicate.`,`5. Then tell me in a few lines which explanations you recorded.`].join(`
72
+ `)}function qm(e){return`${e===0?0:1},${e}`}function Jm(e){if(e.newContent===null)return null;let t=Ml(e.newContent),n=[],r=1,i=0,a=e=>{for(;r<=e;r++)n.push({type:`context`,oldNo:r+i,newNo:r,text:t[r-1]})};for(let t of e.hunks)a(t.newLines===0?t.newStart:t.newStart-1),n.push(...t.lines),r+=t.newLines,i+=t.oldLines-t.newLines;a(t.length);let o=t.length+i,s={header:`@@ -${qm(o)} +${qm(t.length)} @@`,oldStart:o===0?0:1,oldLines:o,newStart:t.length===0?0:1,newLines:t.length,lines:n};return{path:e.path,hunks:[s],newContent:e.newContent}}function Ym({anchorText:e,suggestion:t}){let n=Ml(e),r=Ml(t);return(0,O.jsxs)(`div`,{className:`fix`,children:[n.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-del`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`−`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`del-${t}`)),r.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-add`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`+`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`add-${t}`)),r.length===0&&(0,O.jsx)(`div`,{className:`fix-empty`,children:`Les lignes visées sont supprimées.`})]})}function Xm({analysis:e,finding:t,onAddNote:n}){let r=H(e=>e.setFindingStatus),i=H(e=>e.copy),a=H(e=>e.saving),o=t.location;return(0,O.jsxs)(`article`,{className:`finding-card is-${t.status}`,id:`finding-${t.id}`,children:[(0,O.jsxs)(`header`,{className:`finding-head`,children:[(0,O.jsx)(bd,{severity:t.severity}),(0,O.jsx)(`h3`,{className:`finding-title`,children:t.title}),(0,O.jsx)(wd,{kind:t.kind}),(0,O.jsx)(Cd,{status:t.status}),o&&(0,O.jsx)(`span`,{className:`finding-lines mono`,children:K(o.startLine,o.endLine)})]}),t.body.trim()!==``&&(0,O.jsx)(`p`,{className:`finding-body`,children:t.body}),t.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),t.suggestion!==null&&t.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`finding-section-title`,children:`Correctif proposé`}),(0,O.jsx)(Ym,{anchorText:t.anchorText,suggestion:t.suggestion})]}),(0,O.jsxs)(`footer`,{className:`finding-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary`,onClick:()=>void i(_m(e,{findingIds:[t.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]}),t.status===`open`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`ignored`),children:`Ignorer`}),t.status===`ignored`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`open`),children:`Rouvrir`}),(0,O.jsx)(`span`,{className:`spacer`}),n&&(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:n,children:`Ajouter une remarque`})]})]})}function Zm({note:e}){return e.question===null?(0,O.jsx)($m,{note:e}):(0,O.jsx)(rh,{note:e,question:e.question})}function Qm(e){return e.location?.line?`ligne ${e.location.line}`:`fichier entier`}function $m({note:e}){let t=H(e=>e.updateNote),n=H(e=>e.deleteNote),r=H(e=>e.saving),[i,a]=(0,v.useState)(!1),o=Qm(e);return i?(0,O.jsx)(ah,{id:`note-edit-${e.id}`,label:`Modifier la remarque (${o})`,initialText:e.text,submitLabel:`Enregistrer la modification`,onSubmit:n=>n===e.text?Promise.resolve(!0):t(e.id,n),onClose:()=>a(!1)}):(0,O.jsxs)(`div`,{className:`note-card`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(xd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${o} · ${Gu(e.createdAt)}`,children:[o,` · `,Ju(e.createdAt)]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>a(!0),children:[(0,O.jsx)(U,{name:`pencil`,size:13}),`Modifier`]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>void n(e.id),children:[(0,O.jsx)(U,{name:`trash`,size:13}),`Supprimer`]})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text})]})}function eh({last:e}){return e.answer===null?(0,O.jsxs)(`span`,{className:`question-status is-waiting`,title:`Envoyée le ${Gu(e.askedAt)}`,children:[(0,O.jsx)(U,{name:`loader-circle`,size:13}),`Agent notifié`]}):(0,O.jsxs)(`span`,{className:`question-status is-answered`,title:`Réponse reçue le ${Gu(e.answer.at)}`,children:[(0,O.jsx)(`span`,{className:`question-status-dot`,"aria-hidden":`true`}),`Réponse reçue`]})}function th({author:e,at:t,text:n}){return(0,O.jsxs)(`div`,{className:`answer-block${e===`reviewer`?` is-reviewer`:``}`,children:[(0,O.jsxs)(`div`,{className:`answer-head`,title:Gu(t),children:[e===`agent`?(0,O.jsx)(U,{name:`bot`,size:14,color:`#b18cff`}):(0,O.jsx)(U,{name:`user`,size:14,color:`#8b97ff`}),e===`agent`?`Agent`:`Vous`,` · `,Ju(t)]}),(0,O.jsx)(`p`,{className:`answer-text`,children:n})]})}function nh({noteId:e}){let t=H(e=>e.replyToQuestion),n=H(e=>e.saving),[r,i]=(0,v.useState)(``),a=r.trim()===``,o=async()=>{a||await t(e,r.trim())&&i(``)};return(0,O.jsxs)(`form`,{className:`reply-form`,onSubmit:e=>{e.preventDefault(),o()},children:[(0,O.jsx)(`textarea`,{rows:2,value:r,placeholder:`Répondre à l'agent…`,"aria-label":`Répondre à l'agent`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),o())}}),(0,O.jsxs)(`div`,{className:`reply-form-actions`,children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée : envoyer`}),(0,O.jsxs)(`button`,{type:`submit`,className:`button button-ask button-small`,disabled:n||a,children:[(0,O.jsx)(U,{name:`send`,size:13}),`Envoyer`]})]})]})}function rh({note:e,question:t}){let n=H(e=>e.markAnswerSeen),r=H(e=>e.deleteNote),i=H(e=>e.saving),[a,o]=(0,v.useState)(!1),s=Qm(e),c={...e,question:t},l=ud(c),u=l[l.length-1],d=t.answer!==null,f=pd(c),p=l.length+l.filter(e=>e.answer!==null).length,m=l.length===1,h=(0,v.useRef)(null),g=u.answer?.at??null;return(0,v.useEffect)(()=>{a&&f&&g!==null&&h.current!==g&&(h.current=g,n(e.id))},[a,f,g,n,e.id]),(0,O.jsxs)(`div`,{className:`note-card is-question${a?` is-open`:``}`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(Sd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${s} · ${Gu(t.askedAt)}`,children:[s,` · `,Ju(t.askedAt)]}),(0,O.jsx)(eh,{last:u}),(0,O.jsx)(`button`,{type:`button`,className:`link-button muted question-delete`,disabled:i,title:`Supprimer la question et la discussion`,"aria-label":`Supprimer la question et la discussion`,onClick:()=>void r(e.id),children:(0,O.jsx)(U,{name:`trash`,size:13})})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text}),d&&!a&&(0,O.jsxs)(`button`,{type:`button`,className:`answer-toggle`,onClick:()=>o(!0),children:[(0,O.jsx)(U,{name:`messages-square`,size:14}),m?`Voir la réponse`:`Voir la discussion · ${p} messages`]}),d&&a&&(0,O.jsxs)(O.Fragment,{children:[l.map((e,t)=>(0,O.jsxs)(v.Fragment,{children:[t>0&&(0,O.jsx)(th,{author:`reviewer`,at:e.askedAt,text:e.text}),e.answer!==null&&(0,O.jsx)(th,{author:`agent`,at:e.answer.at,text:e.answer.text})]},e.askedAt)),u.answer!==null&&(0,O.jsx)(nh,{noteId:e.id}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button accent answer-hide`,onClick:()=>o(!1),children:[(0,O.jsx)(U,{name:`chevron-up`,size:14}),m?`Masquer la réponse`:`Masquer la discussion`]})]})]})}function ih({path:e,line:t,findingId:n,onClose:r}){let i=H(e=>e.addNote);return(0,O.jsx)(ah,{id:`note-${t??`file`}`,label:t===null?`Remarque sur le fichier`:`Remarque sur la ligne ${t}`,initialText:``,submitLabel:`Enregistrer`,onSubmit:r=>i(e,t,r,n,!1),onAsk:r=>i(e,t,r,n,!0),onClose:r})}function ah({id:e,label:t,initialText:n,submitLabel:r,onSubmit:i,onAsk:a,onClose:o}){let s=H(e=>e.saving),[c,l]=(0,v.useState)(n),u=(0,v.useRef)(null);(0,v.useEffect)(()=>u.current?.focus(),[]);let d=async e=>{c.trim()!==``&&await e(c.trim())&&o()},f=c.trim()===``;return(0,O.jsxs)(`form`,{className:`note-composer`,onSubmit:e=>{e.preventDefault(),d(i)},children:[(0,O.jsx)(`label`,{className:`note-composer-label`,htmlFor:e,children:t}),(0,O.jsx)(`textarea`,{id:e,ref:u,rows:3,value:c,placeholder:`Ce que l'agent doit revoir…`,onChange:e=>l(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),onKeyDown:e=>{e.key===`Escape`&&o(),e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),d(e.shiftKey&&a?a:i))}}),a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée : enregistrer · Ctrl + Maj + Entrée : envoyer`}),(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-ask button-small`,disabled:s||f,title:`La question part tout de suite à l'agent et reste dans la revue avec sa réponse.`,onClick:()=>void d(a),children:[(0,O.jsx)(U,{name:`send`,size:13}),`Envoyer à l'agent`]}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]}):(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée pour enregistrer · Échap pour annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]})}var oh=4;function sh(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=oh-t%oh;else break;return t}function ch(e){let t=[],n=[],r=-1,i=e=>{r>e.start&&t.push({start:e.start,end:r})};for(e.forEach((e,t)=>{if(e===null||e.trim()===``)return;let a=sh(e);for(;n.length>0&&n[n.length-1].indent>=a;)i(n.pop());n.push({start:t,indent:a}),r=t});n.length>0;)i(n.pop());t.sort((e,t)=>e.start-t.start);let a=[],o=[];for(let e of t){for(;o.length>0&&a[o[o.length-1]].end<e.start;)o.pop();let t=o.length>0?o[o.length-1]:null;a.push({...e,parent:t,depth:t===null?0:a[t].depth+1}),o.push(a.length-1)}return a}function lh(e,t){let n=new Set;for(let r of t){let t=e[r];for(let e=t.start+1;e<=t.end;e++)n.add(e)}return n}function uh(e,t,n){for(let r=e[t].parent;r!==null;r=e[r].parent)if(r===n)return!0;return!1}function dh(e,t,n,r){for(let i=e[t].parent;i!==null&&i!==n;i=e[i].parent)if(r.has(i))return!0;return!1}function fh(e,t,n){let r=new Set(n),i=e.map((e,t)=>t).filter(n=>uh(e,n,t));if(n.has(t)){r.delete(t);for(let e of i)r.delete(e);return r}let a=i.filter(r=>!n.has(r)&&!dh(e,r,t,n));if(a.length===0)return r.add(t),r;let o=Math.max(...a.map(t=>e[t].depth));for(let t of a)e[t].depth===o&&r.add(t);return r}function ph({entry:e,small:t}){let n=ku[e.finding.severity];return(0,O.jsx)(`span`,{className:`finding-number${t?` is-small`:``}`,style:{color:n.color,background:n.background,borderColor:n.color},"aria-label":`Constat ${e.number}`,children:e.number})}function mh(e,t){return e===`applied`?t?`Correctif appliqué dans le code`:`Appliquer le correctif dans le code`:t?`Correctif affiché dans le code`:`Afficher le correctif dans le code`}function hh({analysis:e,entry:t,fix:n,mode:r,onToggleFix:i,onAddNote:a,highlighted:o}){let s=H(e=>e.setFindingStatus),c=H(e=>e.copy),l=H(e=>e.saving),{finding:u}=t,d=ku[u.severity],f=n.state===`shown`,p=r===`off`||n.state===`blocked`;return(0,O.jsxs)(`article`,{className:`margin-card is-${u.status}${f?` is-fix-shown`:``}${o?` is-target`:``}`,id:`finding-${u.id}`,"data-finding-card":u.id,style:{"--severity":d.color},children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(ph,{entry:t}),(0,O.jsx)(`span`,{className:`pill pill-small margin-card-severity`,style:{color:d.color,background:d.background},children:d.label}),(0,O.jsx)(wd,{kind:u.kind}),(0,O.jsx)(Cd,{status:u.status}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,children:[`l. `,Nl(t.startLine,t.endLine,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:u.title}),u.body.trim()!==``&&(0,O.jsx)(`p`,{className:`margin-card-body`,children:u.body}),u.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),(n.state===`shown`||n.state===`hidden`||n.state===`blocked`)&&(0,O.jsxs)(`label`,{className:`fix-toggle${f?` is-on`:``}${p?` is-disabled`:``}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:f,disabled:p,onChange:e=>i(e.target.checked)}),(0,O.jsx)(`span`,{className:`switch`,"aria-hidden":`true`}),mh(r,f)]}),r===`off`&&n.state===`hidden`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Choisissez « Avant / après » ou « Code corrigé » pour afficher le correctif.`}),n.state===`blocked`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:r===`applied`?`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : retirez-le pour appliquer celui-ci dans le code.`:`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : masquez-le pour afficher celui-ci dans le code.`}),n.state===`outside`&&u.suggestion!==null&&u.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Les lignes visées ne sont pas toutes affichées dans le diff : voici le correctif proposé.`}),(0,O.jsx)(Ym,{anchorText:u.anchorText,suggestion:u.suggestion})]}),(0,O.jsxs)(`footer`,{className:`margin-card-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:()=>void c(_m(e,{findingIds:[u.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt`]}),u.status===`open`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`ignored`),children:[(0,O.jsx)(U,{name:`eye-off`,color:`#9aa1b1`}),`Ignorer`]}),u.status===`ignored`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`open`),children:[(0,O.jsx)(U,{name:`rotate-ccw`,color:`#9aa1b1`}),`Rouvrir`]}),a&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:a,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Remarque`]})]})]})}function gh({label:e,options:t,value:n,onChange:r,disabled:i,trigger:a}){let[o,s]=(0,v.useState)(null),c=o!==null,l=(0,v.useRef)(null),u=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!c)return;let e=()=>s(null),t=t=>{l.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),document.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n),document.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[c]);let d=()=>{let e=u.current?.getBoundingClientRect();s(c||!e?null:{top:e.bottom+6,right:window.innerWidth-e.right})},f=a??t[n];return(0,O.jsxs)(`div`,{className:`option-menu`,ref:l,children:[(0,O.jsxs)(`button`,{ref:u,type:`button`,className:`option-menu-button${c?` is-open`:``}`,"aria-haspopup":`listbox`,"aria-expanded":c,title:e,onClick:d,children:[(0,O.jsx)(U,{name:f.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`option-menu-value`,children:f.label}),(0,O.jsx)(U,{name:c?`chevron-up`:`chevron-down`,size:12,color:c?`#9aa1b1`:`#646b7b`})]}),o&&(0,O.jsxs)(`div`,{className:`option-menu-list`,role:`listbox`,"aria-label":e,style:o,children:[(0,O.jsx)(`div`,{className:`option-menu-title`,children:e}),Object.keys(t).map(e=>{let a=t[e],o=i?.[e],c=e===n;return(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":c,className:`option-menu-item${c?` is-selected`:``}`,disabled:o!==void 0,onClick:()=>{s(null),r(e)},children:[(0,O.jsx)(U,{name:a.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsxs)(`span`,{className:`option-menu-item-text`,children:[(0,O.jsx)(`span`,{className:`option-menu-item-label`,children:a.label}),(0,O.jsx)(`span`,{className:`option-menu-item-description`,children:o??a.description})]}),c&&(0,O.jsx)(U,{name:`check`,color:`#c3caff`})]},e)})]})]})}var _h=4,vh=6;function yh(e,t){let n=e.getBoundingClientRect();return{top:n.top+t,bottom:n.bottom}}function bh(e){if(e.kind===`note`)return{color:Au.color,title:`Remarque · ligne ${e.line}`,detail:null};let{finding:t,number:n}=e.entry;return{color:ku[t.severity].color,title:`Constat ${n} · ${ku[t.severity].label}`,detail:t.title}}function xh({model:e,rowsRef:t,scrollRef:n,toolbarHeight:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(!1),[o,s]=(0,v.useState)(0),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null);(0,v.useLayoutEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{let t=e.offsetHeight,n=e.querySelectorAll(`:scope > .hunk > :not(.hunk-header)`);if(t===0||n.length===0)return p(null);let r=Array.from(n,e=>e.offsetTop/t),i=n[n.length-1];p([...r,(i.offsetTop+i.offsetHeight)/t])};n();let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e]),(0,v.useEffect)(()=>{let e=n.current,i=t.current;if(!e||!i)return;let a=()=>{let t=yh(e,r),n=i.getBoundingClientRect();if(s(Math.max(Math.min(t.bottom-t.top,n.height),0)),n.height===0)return l(null);let a=Math.max(t.top,n.top),o=Math.min(t.bottom,n.bottom);l({top:(a-n.top)/n.height,height:Math.max(o-a,0)/n.height})};a(),e.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(e),o.observe(i),()=>{e.removeEventListener(`scroll`,a),o.disconnect()}},[n,t,r]);let m=e=>{let a=n.current,o=t.current,s=i.current;if(!a||!o||!s)return;let c=s.getBoundingClientRect(),l=Math.min(Math.max((e-c.top)/c.height,0),1),u=yh(a,r),d=o.getBoundingClientRect();a.scrollTop+=d.top+l*d.height-(u.top+u.bottom)/2},h=e=>{e.button===0&&(a.current=!0,e.currentTarget.setPointerCapture(e.pointerId),d(null),m(e.clientY))},g=e=>{a.current&&m(e.clientY)},_=()=>{a.current=!1},y=(e,t)=>{a.current||d({top:_h+e*(o-8),...t})},b=e=>f?.[e]??0;return(0,O.jsx)(`div`,{className:`diff-minimap`,children:(0,O.jsxs)(`div`,{className:`diff-minimap-track`,style:{top:r,height:o},children:[(0,O.jsxs)(`div`,{ref:i,className:`diff-minimap-inner`,"aria-hidden":`true`,onPointerDown:h,onPointerMove:g,onPointerUp:_,onPointerCancel:_,onPointerLeave:()=>d(null),children:[(0,O.jsx)(`div`,{className:`minimap-lane is-changes`,children:f&&e.changes.map((e,t)=>(0,O.jsx)(`span`,{className:`minimap-change is-${e.kind}`,style:{top:`${b(e.start)*100}%`,height:`${(b(e.end)-b(e.start))*100}%`},onPointerEnter:()=>y(b(e.start),{color:Sh(e.kind),title:e.label,detail:null})},t))}),(0,O.jsx)(`div`,{className:`minimap-lane is-dots`,children:f&&e.dots.map(e=>(0,O.jsx)(`span`,{className:`minimap-dot is-${e.kind}${e.kind===`finding`&&e.entry.finding.status!==`open`?` is-muted`:``}`,style:{top:`${b(e.row)*100}%`,"--dot":bh(e).color},onPointerEnter:()=>y(b(e.row),bh(e))},e.kind===`note`?`note-${e.line}`:e.entry.finding.id))}),c&&(0,O.jsx)(`div`,{className:`minimap-view`,style:{top:`${c.top*100}%`,height:`${c.height*100}%`}})]}),u&&(0,O.jsxs)(`div`,{className:`minimap-tooltip`,style:u.top>o/2?{bottom:o-u.top-vh}:{top:u.top-vh},children:[(0,O.jsxs)(`span`,{className:`minimap-tooltip-title`,children:[(0,O.jsx)(`span`,{className:`minimap-tooltip-swatch`,style:{background:u.color}}),u.title]}),u.detail&&(0,O.jsx)(`span`,{className:`minimap-tooltip-detail`,children:u.detail})]})]})})}function Sh(e){switch(e){case`add`:return`var(--add)`;case`del`:return`var(--del)`;case`mod`:return`linear-gradient(90deg, var(--del) 50%, var(--add) 50%)`;case`reindent`:return`var(--accent-soft)`}}var Ch=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function wh(e){return Th(e)}function Th(e){return Array.isArray(e)?Eh(e):e instanceof RegExp?e:typeof e==`object`?Dh(e):e}function Eh(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Th(e[n]);return t}function Dh(e){let t={};for(let n in e)t[n]=Th(e[n]);return t}function Oh(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function kh(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?kh(e.substring(0,e.length-1)):e.substr(~t+1)}var Ah=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,jh=class{static hasCaptures(e){return e!==null&&(Ah.lastIndex=0,Ah.test(e))}static replaceCaptures(e,t,n){return e.replace(Ah,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Mh(e,t){return e<t?-1:+(e>t)}function Nh(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Mh(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Ph(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 Fh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ih=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Lh=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Hh(e),t)}static createFromParsedTheme(e,t){return Gh(e,t)}_cachedMatchRoot=new Ih(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>zh(e.parent,t.parentScopes));return n?new Vh(n.fontStyle,n.foreground,n.background):null}},Rh=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function zh(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Bh(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Bh(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Vh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Hh(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Ph(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Ph(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Uh(l,u,e,o,s,c)}}return n}var Uh=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Wh=(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))(Wh||{});function Gh(e,t){e.sort((e,t)=>{let n=Mh(e.scope,t.scope);return n!==0||(n=Nh(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Kh(t),o=new Vh(n,a.getId(r),a.getId(i)),s=new Yh(new Jh(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Lh(a,o,s)}var Kh=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},qh=Object.freeze([]),Jh=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||qh,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Yh=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Jh.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Nh(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Jh(e,t,n,r,i))}}},Xh=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Qh(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Zh(e){return e}function Qh(e){return e}function $h(e,t){let n=[],r=tg(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(eg(i)){let e=[];do e.push(i),i=r.next();while(eg(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function eg(e){return!!e&&!!e.match(/[\w\.:]+/)}function tg(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function ng(e){typeof e.dispose==`function`&&e.dispose()}var rg=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ig=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ag=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},og=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new rg(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ag;for(let n of e)sg(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof rg){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function sg(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof rg?lg({baseGrammar:a,selfGrammar:i},r):cg(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new rg(e))}function cg(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ug([r],t,n)}}function lg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ug(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ug(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ug(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Oh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ug(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=gg(i);switch(a.kind){case 0:lg({...t,selfGrammar:t.baseGrammar},n);break;case 1:lg(t,n);break;case 2:cg(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?cg(a.ruleName,i,n):lg(i,n)}else a.kind===4?n.add(new ig(a.scopeName,a.ruleName)):n.add(new rg(a.scopeName))}}}var dg=class{kind=0},fg=class{kind=1},pg=class{constructor(e){this.ruleName=e}kind=2},mg=class{constructor(e){this.scopeName=e}kind=3},hg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function gg(e){if(e===`$base`)return new dg;if(e===`$self`)return new fg;let t=e.indexOf(`#`);return t===-1?new mg(e):t===0?new pg(e.substring(1)):new hg(e.substring(0,t),e.substring(t+1))}var _g=/\\(\d+)/,vg=/\\(\d+)/g,yg=-1,bg=-2;function xg(e){return e}function Sg(e){return e}var Cg=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=jh.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=jh.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${kh(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:jh.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:jh.replaceCaptures(this._contentName,e,t)}},wg=class extends Cg{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Tg=class extends Cg{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Ag(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Eg=class extends Cg{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Dg=class extends Cg{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Ag(i,this.id),this.beginCaptures=a,this._end=new Ag(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Og=class extends Cg{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Ag(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Ag(o,bg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new jg,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},kg=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new wg(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Tg(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Oh({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Eg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Og(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Dg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=gg(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Eg||e instanceof Dg||e instanceof Og)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Ag=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&_g.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return vg.lastIndex=0,this.source.replace(vg,(e,t)=>Fh(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},jg=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Mg(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Mg(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Mg=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
73
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ng=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Pg=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ng(e,8),this._embeddedLanguagesMatcher=new Fg(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ng(0,0);_getBasicScopeAttributes=new Ih(e=>new Ng(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Fg=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Fh(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Ig=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Lg(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Rg(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Ig(i,!0);f()}return new Ig(i,!1);function f(){let o=zg(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===yg){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Wg(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Dg){let r=o;Wg(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Og){let r=o;Wg(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Wg(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Rg(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Og&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Ug(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==bg){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Wg(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function zg(e,t,n,r,i,a){let o=Bg(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Vg(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Bg(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Hg(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Vg(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Hg(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Hg(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Ug(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Wg(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Lg(e,p,n&&d.start===0,d.start,f,i,!1,0),ng(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Gg(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Gg=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Kg(e,t,n,r,i,a,o,s){return new Xg(e,t,n,r,i,a,o,s)}function qg(e,t,n,r,i){let a=$h(t,Jg),o=kg.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Jg(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Yg(t[r],e))return n=r+1,!0;return!1})}function Yg(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Xg=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Pg(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Zg(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=$h(e,Jg);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)qg(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&qg(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(xg(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Sg(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Zg(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=kg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===$g.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Xh.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Qg.createRootAndLookUpScopeName(a,r,this):Qg.createRoot(`unknown`,r),t=new $g(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
74
+ `;let a=this.createOnigString(e),o=a.content.length,s=new t_(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Lg(this,a,i,0,t,s,!0,r);return ng(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Zg(e,t){return e=wh(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Qg=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Rh.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Rh(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Rh(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Xh.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},$g=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Qg.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Sg(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Qg.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,xg(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Qg.fromExtension(r,n.contentNameScopesList))}},e_=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):$h(e,Jg).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>$h(e,Jg).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},t_=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Xh.set(n,0,Zh(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Xh.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},n_=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Kg(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},r_=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new n_(Lh.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Lh.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new e_(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new og(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},i_=$g.NULL;function a_(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function o_(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function s_(e){return Array.isArray(e)?e:[e]}async function c_(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function l_(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function u_(e){return e===`ansi`||l_(e)}function d_(e){return e===`none`}function f_(e){return d_(e)}var p_=/(\r?\n)/g;function m_(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(p_),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var h_={light:`#333333`,dark:`#bbbbbb`},g_={light:`#fffffe`,dark:`#1e1e1e`},__=`__shiki_resolved`;function v_(e){if(e?.[__])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?h_.light:h_.dark,n||=t.type===`light`?g_.light:g_.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,__,{enumerable:!1,writable:!1,value:!0}),t}async function y_(e){return[...new Set((await Promise.all(e.filter(e=>!u_(e)).map(async e=>await c_(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function b_(e){return(await Promise.all(e.map(async e=>f_(e)?null:v_(await c_(e))))).filter(e=>!!e)}function x_(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Ch(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var S_=class extends r_{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=v_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Lh.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=x_(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Ch(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},C_=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},w_=0;function T_(e){w_+=1,e.warnings!==!1&&w_>=10&&w_%10==0&&console.warn(`[Shiki] ${w_} 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 Ch("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(v_),i=new S_(new C_(e.engine,n),r,n,e.langAlias),a;function o(t){return x_(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Ch(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Ch(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await y_(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await b_(e))}function g(){if(t)throw new Ch(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--w_)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function E_(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([b_(e.themes||[]),y_(e.langs||[]),e.engine]);return T_({...e,themes:t,langs:n,engine:r})}var D_=new WeakMap;function O_(e,t){D_.set(e,t)}function k_(e){return D_.get(e)}var A_=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(s_(n).map(e=>[e,i_])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return j_(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function j_(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function M_(e,t){if(!(e instanceof A_))throw new Ch(`Invalid grammar state`);return e.getInternalStack(t)}var N_=/,/,P_=/ /;function F_(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(l_(e.resolveLangAlias(n.lang||`text`))||d_(r))return m_(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Ch(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Ch(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return L_(t,o,i,a,n)}function I_(...e){if(e.length===2)return k_(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(l_(i)||d_(a))throw new Ch(`Plain language does not have grammar state`);if(i===`ansi`)throw new Ch(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new A_(R_(n,c,o,s,r).stateStack,c.name,o.name)}function L_(e,t,n,r,i){let a=R_(e,t,n,r,i),o=new A_(a.stateStack,t.name,n.name);return O_(a.tokens,o),a.tokens}function R_(e,t,n,r,i){let a=a_(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=m_(e),u=i.grammarState?M_(i.grammarState,n.name)??i_:i.grammarContextCode==null?i_:R_(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=o_(r[Xh.getForeground(s)],a),u=Xh.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Xh.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(N_).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(P_))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?z_(t.scopes):B_(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function z_(e){return e.map(e=>({scopeName:e}))}function B_(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:U_(e,i,t.slice(0,r))}}return n}function V_(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function H_(e,t,n){if(!V_(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)V_(e[r],n[i])&&--r,--i;return r===-1}function U_(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(H_(e,t,n)){r.push(a);break}return r}function W_(e,t,n,r=F_){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:k_(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=G_(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new A_(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&O_(s,c),s}function G_(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var K_=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],q_=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};q_.prototype.normal={},q_.prototype.property={},q_.prototype.space=void 0;function J_(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new q_(n,r,t)}function Y_(e){return e.toLowerCase()}var X_=class{constructor(e,t){this.attribute=t,this.property=e}};X_.prototype.attribute=``,X_.prototype.booleanish=!1,X_.prototype.boolean=!1,X_.prototype.commaOrSpaceSeparated=!1,X_.prototype.commaSeparated=!1,X_.prototype.defined=!1,X_.prototype.mustUseProperty=!1,X_.prototype.number=!1,X_.prototype.overloadedBoolean=!1,X_.prototype.property=``,X_.prototype.spaceSeparated=!1,X_.prototype.space=void 0;var Z_=s({boolean:()=>Z,booleanish:()=>$_,commaOrSpaceSeparated:()=>rv,commaSeparated:()=>nv,number:()=>Q,overloadedBoolean:()=>ev,spaceSeparated:()=>tv}),Q_=0,Z=iv(),$_=iv(),ev=iv(),Q=iv(),tv=iv(),nv=iv(),rv=iv();function iv(){return 2**++Q_}var av=Object.keys(Z_),ov=class extends X_{constructor(e,t,n,r){let i=-1;if(super(e,t),sv(this,`space`,r),typeof n==`number`)for(;++i<av.length;){let e=av[i];sv(this,av[i],(n&Z_[e])===Z_[e])}}};ov.prototype.defined=!0;function sv(e,t,n){n&&(e[t]=n)}function cv(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ov(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Y_(r)]=r,n[Y_(a.attribute)]=r}return new q_(t,n,e.space)}var lv=cv({properties:{ariaActiveDescendant:null,ariaAtomic:$_,ariaAutoComplete:null,ariaBusy:$_,ariaChecked:$_,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:tv,ariaCurrent:null,ariaDescribedBy:tv,ariaDetails:null,ariaDisabled:$_,ariaDropEffect:tv,ariaErrorMessage:null,ariaExpanded:$_,ariaFlowTo:tv,ariaGrabbed:$_,ariaHasPopup:null,ariaHidden:$_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tv,ariaLevel:Q,ariaLive:null,ariaModal:$_,ariaMultiLine:$_,ariaMultiSelectable:$_,ariaOrientation:null,ariaOwns:tv,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:$_,ariaReadOnly:$_,ariaRelevant:null,ariaRequired:$_,ariaRoleDescription:tv,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:$_,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function uv(e,t){return t in e?e[t]:t}function dv(e,t){return uv(e,t.toLowerCase())}var fv=cv({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:nv,acceptCharset:tv,accessKey:tv,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:tv,autoFocus:Z,autoPlay:Z,blocking:tv,capture:null,charSet:null,checked:Z,cite:null,className:tv,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:$_,controls:Z,controlsList:tv,coords:Q|nv,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:ev,draggable:$_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:tv,height:Q,hidden:ev,high:Q,href:null,hrefLang:null,htmlFor:tv,httpEquiv:tv,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:tv,itemRef:tv,itemScope:Z,itemType:tv,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:Q,pattern:null,ping:tv,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:tv,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:tv,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:$_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:$_,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tv,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:$_,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:nv,part:tv,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:dv}),pv=cv({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:rv,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:tv,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:nv,g2:nv,glyphName:nv,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:rv,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tv,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rv,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rv,rev:rv,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rv,requiredFeatures:rv,requiredFonts:rv,requiredFormats:rv,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:rv,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rv,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rv,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:uv}),mv=cv({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),hv=cv({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:dv}),gv=cv({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),_v=/[A-Z]/g,vv=/-[a-z]/g,yv=/^data[-\w.:]+$/i;function bv(e,t){let n=Y_(t),r=t,i=X_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&yv.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(vv,Sv);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!vv.test(e)){let n=e.replace(_v,xv);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ov}return new i(r,t)}function xv(e){return`-`+e.toLowerCase()}function Sv(e){return e.charAt(1).toUpperCase()}var Cv=J_([lv,fv,mv,hv,gv],`html`),wv=J_([lv,pv,mv,hv,gv],`svg`),Tv={}.hasOwnProperty;function Ev(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Tv.call(t,e)){let n=String(t[e]);i=Tv.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Dv=/["&'<>`]/g,Ov=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kv=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Av=/[|\\{}()[\]^$+*?.]/g,jv=new WeakMap;function Mv(e,t){return e=e.replace(t.subset?Nv(t.subset):Dv,r),t.subset||t.escapeOnly?e:e.replace(Ov,n).replace(kv,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Nv(e){let t=jv.get(e);return t||(t=Pv(e),jv.set(e,t)),t}function Pv(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Av,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Fv=/[\dA-Fa-f]/;function Iv(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Fv.test(String.fromCharCode(t))?r:r+`;`}var Lv=/\d/;function Rv(e,t,n){let r=`&#`+String(e);return n&&t&&!Lv.test(String.fromCharCode(t))?r:r+`;`}var zv=`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`.split(`.`),Bv={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Vv=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Hv={}.hasOwnProperty,Uv={},Wv;for(Wv in Bv)Hv.call(Bv,Wv)&&(Uv[Bv[Wv]]=Wv);var Gv=/[^\dA-Za-z]/;function Kv(e,t,n,r){let i=String.fromCharCode(e);if(Hv.call(Uv,i)){let e=Uv[i],a=`&`+e;return n&&zv.includes(e)&&!Vv.includes(e)&&(!r||t&&t!==61&&Gv.test(String.fromCharCode(t)))?a:a+`;`}return``}function qv(e,t,n){let r=Iv(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Kv(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Rv(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Jv(e,t){return Mv(e,Object.assign({format:qv},t))}var Yv=/^>|^->|<!--|-->|--!>|<!-$/g,Xv=[`>`],Zv=[`<`,`>`];function Qv(e,t,n,r){return r.settings.bogusComments?`<?`+Jv(e.value,Object.assign({},r.settings.characterReferences,{subset:Xv}))+`>`:`<!--`+e.value.replace(Yv,i)+`-->`;function i(e){return Jv(e,Object.assign({},r.settings.characterReferences,{subset:Zv}))}}function $v(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function ey(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ty(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function ny(e){return e.join(` `).trim()}var ry=/[ \t\n\f\r]/g;function iy(e){return typeof e==`object`?e.type===`text`&&ay(e.value):ay(e)}function ay(e){return e.replace(ry,``)===``}var oy=ly(1),sy=ly(-1),cy=[];function ly(e){return t;function t(t,n,r){let i=t?t.children:cy,a=(n||0)+e,o=i[a];if(!r)for(;o&&iy(o);)a+=e,o=i[a];return o}}var uy={}.hasOwnProperty;function dy(e){return t;function t(t,n,r){return uy.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var fy=dy({body:hy,caption:py,colgroup:py,dd:yy,dt:vy,head:py,html:my,li:_y,optgroup:xy,option:Sy,p:gy,rp:by,rt:by,tbody:wy,td:Dy,tfoot:Ty,th:Dy,thead:Cy,tr:Ey});function py(e,t,n){let r=oy(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&iy(r.value.charAt(0)))}function my(e,t,n){let r=oy(n,t);return!r||r.type!==`comment`}function hy(e,t,n){let r=oy(n,t);return!r||r.type!==`comment`}function gy(e,t,n){let r=oy(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function _y(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&r.tagName===`li`}function vy(e,t,n){let r=oy(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function yy(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function by(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function xy(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Sy(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Cy(e,t,n){let r=oy(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function wy(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Ty(e,t,n){return!oy(n,t)}function Ey(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Dy(e,t,n){let r=oy(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Oy=dy({body:jy,colgroup:My,head:Ay,html:ky,tbody:Ny});function ky(e){let t=oy(e,-1);return!t||t.type!==`comment`}function Ay(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function jy(e){let t=oy(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&iy(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function My(e,t,n){let r=sy(n,t),i=oy(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&fy(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Ny(e,t,n){let r=sy(n,t),i=oy(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&fy(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Py={name:[[`
75
75
  \f\r &/=>`.split(``),`
76
76
  \f\r "&'/=>\``.split(``)],[`\0
77
77
  \f\r "&'/<=>`.split(``),`\0
@@ -79,9 +79,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
79
79
  \f\r &>`.split(``),`\0
80
80
  \f\r "&'<=>\``.split(``)],[`\0
81
81
  \f\r "&'<=>\``.split(``),`\0
82
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Dy(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=gv);let l=Oy(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),!l&&a&&by(e,t,n)||(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),o||a&&iy(e,t,n)||s.push(`</`+e.tagName+`>`),s.join(``)}function Oy(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=ky(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function ky(e,t,n){let r=fv(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Bv(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Ey.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?qv:Jv)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Bv(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ey.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Kv(n,o)>Kv(n,e.alternative)&&(o=e.alternative),s=o+Bv(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Ey.single:Ey.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Ay=[`<`,`&`];function jy(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Bv(e.value,Object.assign({},r.settings.characterReferences,{subset:Ay}))}function My(e,t,n,r){return r.settings.allowDangerousHtml?e.value:jy(e,t,n,r)}function Ny(e,t,n,r){return r.all(e)}var Py=vv(`type`,{invalid:Fy,unknown:Iy,handlers:{comment:Wv,doctype:Gv,element:Dy,raw:My,root:Ny,text:jy}});function Fy(e){throw Error("Expected node, not `"+e+"`")}function Iy(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Ly={},Ry={},zy=[];function By(e,t){let n=t||Ly,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Vy,all:Hy,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||R_,characterReferences:n.characterReferences||Ry,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?gv:hv,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Vy(e,t,n){return Py(e,t,n,this)}function Hy(e){let t=[],n=e&&e.children||zy,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Uy=/\s+/g;function Wy(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(Uy)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(Uy);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function Gy(e){let t=o_(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var Ky=[`color`,`background-color`];function qy(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Jy(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function Yy(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=Jy(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return qy(e,a)})):e}function Xy(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Zy(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Ky.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new hh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Zy(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Ih.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Ih.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Ih.Underline&&n.push(`underline`),e.fontStyle&Ih.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Qy(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function $y(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Gy(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new hh(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new hh(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new hh(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));eb(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Yy(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new hh(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=tb(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new hh(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new hh(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Wy(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function eb(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new hh(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new hh(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function tb(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(tb).join(``):``}var nb=[$y()];function rb(e){let t=ib(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nb]}function ib(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var ab=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],ob={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function sb(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function cb(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function lb(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)ob[r]&&t.push({type:`setDecoration`,value:ob[r]});else if(r<=29){let e=ob[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:ab[r-30]}});else if(r===38){let n=cb(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:ab[r-40]}});else if(r===48){let n=cb(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:ab[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:ab[r-100+8]}})}}return t}function ub(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=sb(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=lb(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var db={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 fb(e=db){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<ab.length;e++)r.push(t(ab[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var pb=/#([0-9a-f]{3,8})/i,mb=/var\((--[\w-]+-ansi-[\w-]+)\)/,hb={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 gb(e,t,n){let r=Zg(e,n),i=o_(t),a=fb(Object.fromEntries(ab.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||hb[t]]}))),o=ub();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Qg(i,r),o=Qg(o,r),n.decorations.has(`dim`)&&(i=_b(i));let s=Ih.None;return n.decorations.has(`bold`)&&(s|=Ih.Bold),n.decorations.has(`italic`)&&(s|=Ih.Italic),n.decorations.has(`underline`)&&(s|=Ih.Underline),n.decorations.has(`strikethrough`)&&(s|=Ih.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function _b(e){let t=e.match(pb);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(mb);return n?`var(${n[1]}-dim)`:e}function vb(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!t_(r)&&!r_(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return gb(r,t,n)}return D_(e,t,n)}function yb(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new hh("`themes` option must not be empty");let p=I_(e,t,n,vb);if(c=x_(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new hh(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Xy(e,h,u,l,d))),c&&b_(a,c);let g=f.map(e=>Zg(e.theme,n));i=bb(f,m,g,u,l,`fg`,d),r=bb(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Zg(n.theme,n);a=vb(e,t,n);let l=e.getTheme(n.theme);r=Qg(l.bg,s),i=Qg(l.fg,s),o=l.name,c=x_(a)}else throw new hh("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function bb(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Qg(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new hh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Qg(t[r][a],n[r])||`inherit`}, ${Qg(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var xb=/^\s+$/,Sb=/^(\s*)(.*?)(\s*)$/;function Cb(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Cb(e,t,n),codeToTokens:(t,n)=>yb(e,t,n)}){let i=t;for(let e of rb(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=yb(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Tb(a):d===`never`&&(a=Eb(a)),f&&(a=Db(a));let p={...r,get source(){return i}};for(let e of rb(n))a=e.tokens?.call(p,a)||a;return wb(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function wb(e,t,n,r=x_(e)){let i=rb(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Wy,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
83
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Qy(a.htmlStyle||Zy(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&b_(m,r),m}function Tb(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Ih.Underline||i.fontStyle&Ih.Strikethrough));o&&xb.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Eb(e){return e.map(e=>e.flatMap(e=>{if(xb.test(e.content))return e;let t=e.content.match(Sb);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Db(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Qy(e.htmlStyle||Zy(e)),i=Qy(n.htmlStyle||Zy(n)),a=e.fontStyle&&(e.fontStyle&Ih.Underline||e.fontStyle&Ih.Strikethrough),o=n.fontStyle&&(n.fontStyle&Ih.Underline||n.fontStyle&Ih.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Ob=By;function kb(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Cb(e,t,n),codeToTokens:(t,n)=>yb(e,t,n)},i=Ob(Cb(e,t,n,r));for(let e of rb(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Ab(e){let t=await v_(e);return{getLastGrammarState:(...e)=>O_(t,...e),codeToTokensBase:(e,n)=>vb(t,e,n),codeToTokensWithThemes:(e,n)=>I_(t,e,n),codeToTokens:(e,n)=>yb(t,e,n),codeToHast:(e,n)=>Cb(t,e,n),codeToHtml:(e,n)=>kb(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var jb=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Mb(){return 2147483648}function Nb(){return typeof performance<`u`?performance.now():Date.now()}var Pb=(e,t)=>e+(t-e%t)%t;async function Fb(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Mb();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Pb(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Nb,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Ib=Object.defineProperty,Lb=(e,t,n)=>t in e?Ib(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rb=(e,t,n)=>Lb(e,typeof t==`symbol`?t:t+``,n),zb=null;function Bb(e){throw new jb(e.UTF8ToString(e.getLastOnigError()))}var Vb=class e{constructor(t){Rb(this,`utf16Length`),Rb(this,`utf8Length`),Rb(this,`utf16Value`),Rb(this,`utf8Value`),Rb(this,`utf16OffsetToUtf8`),Rb(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Hb=class e{constructor(t){if(Rb(this,`id`,++e.LAST_ID),Rb(this,`_onigBinding`),Rb(this,`content`),Rb(this,`utf16Length`),Rb(this,`utf8Length`),Rb(this,`utf16OffsetToUtf8`),Rb(this,`utf8OffsetToUtf16`),Rb(this,`ptr`),!zb)throw new jb(`Must invoke loadWasm first.`);this._onigBinding=zb,this.content=t;let n=new Vb(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=zb.omalloc(1e4),e._sharedPtrInUse=!0,zb.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(zb)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Rb(Hb,`LAST_ID`,0),Rb(Hb,`_sharedPtr`,0),Rb(Hb,`_sharedPtrInUse`,!1);var Ub=Hb,Wb=class{constructor(e){if(Rb(this,`_onigBinding`),Rb(this,`_ptr`),!zb)throw new jb(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Vb(e[r]);t[r]=i.createString(zb),n[r]=i.utf8Length}let r=zb.omalloc(4*e.length);zb.HEAPU32.set(t,r/4);let i=zb.omalloc(4*e.length);zb.HEAPU32.set(n,i/4);let a=zb.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)zb.ofree(t[n]);zb.ofree(i),zb.ofree(r),a===0&&Bb(zb),this._onigBinding=zb,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ub(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Gb(e){return typeof e.instantiator==`function`}function Kb(e){return typeof e.default==`function`}function qb(e){return e.data!==void 0}function Jb(e){return typeof Response<`u`&&e instanceof Response}function Yb(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Xb;function Zb(e){if(Xb)return Xb;async function t(){zb=await Fb(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Gb(n)?n=await n.instantiator(t):Kb(n)?n=await n.default(t):(qb(n)&&(n=n.data),Jb(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await $b(n)(t):await ex(n)(t):Yb(n)||n instanceof WebAssembly.Module?n=await Qb(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Qb(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Xb=t(),Xb}function Qb(e){return t=>WebAssembly.instantiate(e,t)}function $b(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ex(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function tx(e){return e&&await Zb(e),{createScanner(e){return new Wb(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ub(e)}}}var nx=`modulepreload`,rx=function(e,t){return new URL(e,t).href},ix={},ax=function(e){return e.pathname.endsWith(`.css`)},ox=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=rx(t,n);let r=s(t),i=ax(r);return ox(ix,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:nx,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},sx=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>$(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-X3Y2mlq2.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>$(()=>import(`./ahk-DwADkxyd.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>$(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-C_Umbo_o.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-BS5NFEKQ.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-BXNp6RaU.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-1di0oIiS.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>$(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-C2IN4Vk8.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-bFPOELdA.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-BLZ_xWbb.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>$(()=>import(`./chapel-C_HSM6Pq.js`),__vite__mapDeps([21,22]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-DXoz67hJ.js`),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-DlhFbGsO.js`),__vite__mapDeps([24,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>$(()=>import(`./coq-CGaSfhwR.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-BaCMyKr2.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-CJURYNNT.js`),__vite__mapDeps([28,2,3,1,16,22,29]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-dmMxLVLW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-CX_LiCz_.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-CHZY9Xhz.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-CuH5my32.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-CTUGxEgV.js`),__vite__mapDeps([30,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-CQwEci3v.js`),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-BkLKshkr.js`),__vite__mapDeps([32,27,22]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-DR2vtWaj.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-1YN1e0vJ.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-BKS3kIrK.js`),__vite__mapDeps([50,29]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-CcF_d66k.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-CY0XDie9.js`),__vite__mapDeps([52,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-DccBV_n0.js`).then(e=>e.n),__vite__mapDeps([27,22]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-CAXYAgV-.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-C2PFH9th.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-BCI4tEad.js`),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-QnmUImKG.js`).then(e=>e.n),__vite__mapDeps([35,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-CPd4ATQH.js`),__vite__mapDeps([54,2,3,1,39]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-BgGOZsTs.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-DtSxVTSr.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-VJ1JqsCP.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-Byqf3Q4J.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-B_nJOiTG.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-DffeUEnj.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-M0zKdCfa.js`),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-BT0-M0gS.js`),__vite__mapDeps([61,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-DmyuI1nx.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-rE32VeXB.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-DjyTg-6t.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>$(()=>import(`./just-CK65S3r8.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-94zewxls.js`),__vite__mapDeps([66,67,63]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-Dl0qLBwx.js`),__vite__mapDeps([68,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-CjD63HfG.js`).then(e=>e.n),__vite__mapDeps([38,22]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-VGWVLoqX.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-CBzovuJ1.js`),__vite__mapDeps([69,3,5,11,70]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-B89wcoMe.js`),__vite__mapDeps([71,15,1,2,3,39,41]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-D9W784E_.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-CSgcYZcx.js`),__vite__mapDeps([72,73]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D7IRt6Pp.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-BtCSV7rr.js`),__vite__mapDeps([74,38,22]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-BT2sttEd.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>$(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell--0fT3PI1.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>$(()=>import(`./org-DyhV0u0R.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-B0H1z4iL.js`),__vite__mapDeps([65,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-BPT4W6n1.js`),__vite__mapDeps([87,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>$(()=>import(`./powershell-QtSnmXcu.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-BoCt7RDl.js`),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-Cb4Cd08W.js`),__vite__mapDeps([95,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-fe_4bIGN.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-dDhRcZ_O.js`),__vite__mapDeps([96,1,2,3,78]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>$(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-B7rcDdRa.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-DjeWGJRw.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-Dx3POAAI.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-DpiIf5JO.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-CZOq7qCQ.js`),__vite__mapDeps([99,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-DhFtC8D4.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-Djdriz3m.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-Dkak5s2P.js`),__vite__mapDeps([102,29]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>$(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>$(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-CqlitY2w.js`),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-BrLHRKP1.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-CZpBofQo.js`),__vite__mapDeps([106,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-DI5AQTqZ.js`),__vite__mapDeps([107,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-U4k0rBt4.js`),__vite__mapDeps([108,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-jjK4_r-Y.js`),__vite__mapDeps([109,2,3,81]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-BwNS-MeE.js`).then(e=>e.n),__vite__mapDeps([67,63]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-CJ1vUXbL.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-BwmOEMnR.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-hj02oBmU.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-BnHEhDG5.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-BGhR2SqG.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-9zNH6XOp.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120]),import.meta.url))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>$(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-wqTzy8u9.js`),__vite__mapDeps([121,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-unwCMN4c.js`),__vite__mapDeps([122,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-C-RiGvWN.js`),__vite__mapDeps([123,2,3,5,12,70,124]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-2pQenJRT.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-B_MbLqZj.js`),__vite__mapDeps([93,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-COm5VSZw.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],cx=Object.fromEntries(sx.map(e=>[e.id,e.import])),lx=Object.fromEntries(sx.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ux={...cx,...lx},dx=`github-dark-default`,fx={h:`c`,hh:`cpp`,hpp:`cpp`,hxx:`cpp`,cc:`cpp`,cxx:`cpp`,htm:`html`,svg:`xml`,pl:`perl`,ex:`elixir`,exs:`elixir`,makefile:`make`,dockerfile:`dockerfile`},px=new Map;for(let e of sx)for(let t of[e.id,...e.aliases??[]])px.set(t.toLowerCase(),e.id);for(let[e,t]of Object.entries(fx))px.set(e,t);function mx(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(n+1);return px.get(r)??px.get(t)??null}var hx=null;function gx(){return hx??=Ab({themes:[$(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url)],langs:[],engine:tx($(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),hx}async function _x(e){let t=await gx();return t.getLoadedLanguages().includes(e)||await t.loadLanguage(ux[e]),n=>n.length===0?[]:t.codeToTokensBase(n.join(`
84
- `),{lang:e,theme:dx})}function vx(e,t){let n=new Map,r=new Map;if(e.newContent!==null){let r=Math.max(0,...e.hunks.flatMap(e=>e.lines.map(e=>e.newNo??0)));t(Al(e.newContent).slice(0,r)).forEach((e,t)=>n.set(t+1,e))}for(let i of e.hunks){let a=i.lines.filter(e=>e.type!==`add`);if(t(a.map(e=>e.text)).forEach((e,t)=>r.set(a[t].oldNo,e)),e.newContent===null){let e=i.lines.filter(e=>e.type!==`del`);t(e.map(e=>e.text)).forEach((t,r)=>n.set(e[r].newNo,t))}}return{newSide:n,oldSide:r}}function yx(e){let t=mx(e.path),[n,r]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(t===null)return;let e=!1;return _x(t).then(n=>!e&&r({lang:t,tokenizer:n}),n=>!e&&r({lang:t,error:n instanceof Error?n.message:String(n)})),()=>{e=!0}},[t]);let i=n!==null&&n.lang===t?n:null,a=i!==null&&`tokenizer`in i?i.tokenizer:null;return(0,v.useMemo)(()=>{if(i!==null&&`error`in i)return{status:`error`,message:i.error};if(a===null)return{status:`none`};let t=new Map;return{status:`ready`,file:vx(e,a),suggestion:e=>{let n=t.get(e);return n||(n=a(Al(e)),t.set(e,n)),n}}},[i,a,e])}function bx({scope:e,onScopeChange:t,wholeFileAvailable:n,codeView:r,onCodeViewChange:i,mode:a,onModeChange:o}){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ch,{label:`Afficher`,options:Rl,value:e,onChange:t,disabled:n?void 0:{file:`Contenu du fichier non conservé dans l'analyse`}}),(0,O.jsx)(ch,{label:`Code`,options:Ll,value:r,onChange:i}),(0,O.jsx)(ch,{label:`Correctifs`,options:Il,value:a,onChange:o})]})}var xx={context:` `,add:`+`,del:`−`};function Sx(e,t){return t===`new`&&e===`add`?`is-new`:`is-${e}`}function Cx(e,t){let n=[],r=0;for(let{text:i,style:a}of e){let e=t.flatMap(e=>[e.start,e.end]).map(e=>Math.min(Math.max(e-r,0),i.length)),o=[...new Set([0,...e,i.length])].sort((e,t)=>e-t);for(let e=0;e<o.length-1;e++){let s=r+o[e],c=t.find(e=>s>=e.start&&s<e.end);n.push({text:i.slice(o[e],o[e+1]),style:a,className:c?.className})}r+=i.length}return n}function wx({text:e,tokens:t,marks:n=[],suffix:r}){let i=t?t.map(e=>({text:e.content,style:jx(e)})):[{text:e}];return(0,O.jsxs)(`span`,{className:`diff-code${t?` is-highlighted`:``}`,children:[Cx(i,n).map((e,t)=>(0,O.jsx)(`span`,{style:e.style,className:e.className,children:e.text},t)),r]})}function Tx({fold:e}){return e?(0,O.jsx)(`button`,{type:`button`,className:`diff-fold${e.folded?` is-folded`:``}`,"aria-expanded":!e.folded,title:e.folded?`Déplier le bloc · Ctrl+clic : tout déplier`:`Replier le bloc · Ctrl+clic : replier niveau par niveau, des blocs les plus imbriqués vers celui-ci`,onClick:e.onToggle,children:(0,O.jsx)(U,{name:e.folded?`chevron-right`:`chevron-down`,size:14})}):(0,O.jsx)(`span`,{className:`diff-fold`})}function Ex({fold:e}){return e?.folded?(0,O.jsxs)(`button`,{type:`button`,className:`diff-fold-ellipsis`,title:`Déplier le bloc`,onClick:e.onToggle,children:[`⋯ `,W(e.lines,`ligne`)]}):null}function Dx(e,t){let n=eh(e.rows.map(tu)),r=n.map(t=>eu(e.rows[t.start])),i=new Set(n.flatMap((e,n)=>t.has(r[n])?[n]:[]));return{regions:n,keys:r,folded:i,regionAt:new Map(n.map((e,t)=>[e.start,t])),hidden:th(n,i),rowIndex:new Map(e.rows.map((e,t)=>[e,t]))}}var Ox=new Set;function kx(e,t,n){if(e.replaced&&!n)return[];if(e.oldLine){let t=be(e.oldLine.text,e.line.text);return n?[{start:t.start,end:t.oldEnd,className:`diff-indent is-del`}]:[{start:t.start,end:t.newEnd,className:`diff-indent is-add`}]}return!e.inline||t.type===`context`?[]:e.inline.map(e=>({...e,className:`diff-inline is-${t.type}`}))}function Ax(e,t){let{oldEnd:n,newEnd:r}=be(e,t);return r>n?`→`:r<n?`←`:`↔`}function jx(e){let t=e.fontStyle??0;return{color:e.color,fontStyle:t&1?`italic`:void 0,fontWeight:t&2?600:void 0}}function Mx(e){return e?{"--mark":Du[e.severity].color}:void 0}function Nx(e){return e?e.muted?` has-bar is-bar-muted`:` has-bar`:``}function Px({entries:e}){return(0,O.jsx)(`span`,{className:`diff-pills`,children:e.map(e=>(0,O.jsx)(`span`,{className:e.finding.status===`open`?void 0:`is-muted`,title:e.finding.title,children:(0,O.jsx)(ah,{entry:e,small:!0})},e.finding.id))})}function Fx({entry:e,bar:t,pills:n,applied:r,isTarget:i,foldHidden:a,onHide:o}){let s=Al(e.finding.suggestion??``).length===0,c=mu(e.startLine,e.endLine),l=s?`supprime ${c}`:`remplace ${c}`;return(0,O.jsxs)(`div`,{className:`fix-strip${r?` is-applied`:``}${Nx(t)}${i?` is-target`:``}${a?` is-fold-hidden`:``}`,style:Mx(t),"data-fix":e.finding.id,children:[(0,O.jsx)(ah,{entry:e,small:!0}),(0,O.jsx)(U,{name:`sparkles`,color:`#8b97ff`}),(0,O.jsx)(`span`,{className:`fix-strip-text`,children:r?`Correctif ${e.number} appliqué — ${l}`:`Correctif proposé par l'agent — ${l}`}),n.length>0&&(0,O.jsx)(Px,{entries:n}),(0,O.jsx)(`button`,{type:`button`,className:`fix-strip-hide`,onClick:o,children:r?`Retirer le correctif`:`Masquer le correctif`})]})}function Ix({context:e,onChange:t}){return(0,O.jsxs)(`div`,{className:`context-stepper`,role:`group`,"aria-label":`Contexte du bloc`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`context-stepper-button`,disabled:!e.canShrink,title:`Retirer 5 lignes de contexte au-dessus et en dessous`,onClick:()=>t(-1),children:[(0,O.jsx)(U,{name:`fold-vertical`,size:12}),`−`,5]}),(0,O.jsx)(`span`,{className:`context-stepper-count`,children:W(e.context,`ligne`)}),(0,O.jsxs)(`button`,{type:`button`,className:`context-stepper-button`,disabled:!e.canGrow,title:`Ajouter 5 lignes de contexte au-dessus et en dessous`,onClick:()=>t(1),children:[(0,O.jsx)(U,{name:`unfold-vertical`,size:12}),`+`,5]})]})}function Lx({mode:e,codeView:t,explained:n,reindented:r,inlined:i,expanded:a}){return(0,O.jsxs)(`div`,{className:`diff-legend`,children:[t===`new`?(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-new`}),`Ajouté par la feature`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-add`}),`Ajouté par la feature`]}),(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-del`}),`Supprimé par la feature`]})]}),i&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch ${t===`new`?`is-inline-add`:`is-inline`}`}),`Partie modifiée de la ligne`]}),r&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-reindent`}),`Indentation modifiée`]}),e===`before-after`&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-replaced`}),`Lignes remplacées par le correctif`]}),e!==`off`&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-proposed`}),e===`applied`?`Correctif appliqué`:`Correctif proposé`]}),n&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-explained`}),`Code décrit par une explication`]}),a&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-expanded`}),`Contexte ajouté`]})]})}function Rx({file:e,fileDiff:t,hunks:n,hunkContexts:r,addedContext:i,onContextChange:a,findings:o,notedLines:s,scrollRef:c,mode:l,onModeChange:u,codeView:d,onCodeViewChange:f,scope:p,onScopeChange:m,wholeFileAvailable:h,explained:g,target:_,onLineNote:y,onHideFix:b,onRequestExplanation:x,zen:S}){let C=e.contentAvailable,w=yx(t),T=(0,v.useRef)(null),ee=(0,v.useRef)(null),[E,te]=(0,v.useState)(0),[D,k]=(0,v.useState)({path:e.path,keys:Ox}),ne=D.path===e.path?D.keys:Ox,re=n.map(e=>Dx(e,ne)),ie=!S||w.status===`error`,ae=p===`file`&&!S,oe=(0,v.useMemo)(()=>ae?pu(n,d,o,s):null,[ae,n,d,o,s]);(0,v.useEffect)(()=>{let e=T.current;if(!e){te(0);return}let t=new ResizeObserver(()=>te(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[ie]);let se=(t,n,r)=>{let{regions:i,keys:a,folded:o}=re[t],s;r.ctrlKey||r.metaKey?s=ih(i,n,o):(s=new Set(o),s.delete(n)||s.add(n));let c=new Set(a),l=[...ne].filter(e=>!c.has(e));k({path:e.path,keys:new Set([...l,...[...s].map(e=>a[e])])})},ce=(e,t)=>{let{regions:n,folded:r,regionAt:i}=re[e],a=i.get(t);if(a===void 0)return null;let o=n[a];return{folded:r.has(a),lines:o.end-o.start,onToggle:t=>se(e,a,t)}},le=(e,t,n)=>(0,O.jsx)(Fx,{entry:e.entry,bar:e.bar,pills:e.pills,applied:l===`applied`,isTarget:Ul(_,{kind:`fix`,entry:e.entry}),foldHidden:n,onHide:()=>b(e.entry.finding.id)},t),A=(e,t,n,r,a)=>{if(e.kind===`fix-line`)return(0,O.jsxs)(`div`,{className:`diff-line is-proposed${Nx(e.bar)}${r?` is-fold-hidden`:``}`,style:Mx(e.bar),children:[(0,O.jsx)(`span`,{className:`diff-num`}),(0,O.jsx)(Tx,{fold:n}),(0,O.jsx)(`span`,{className:`diff-marker`,children:`›`}),(0,O.jsx)(wx,{text:e.text,tokens:w.status===`ready`?w.suggestion(e.entry.finding.suggestion??``)[e.index]:void 0,suffix:(0,O.jsx)(Ex,{fold:n})})]},a);let{oldLine:o}=e,c=t===`old`,l=c&&o?o:e.line,u=o??(l.type===`del`?l:null),f=e.replaced&&!c,p=c?null:e.bar,m=c?null:l.newNo,h=w.status!==`ready`||f?void 0:l.type===`del`?w.file.oldSide.get(l.oldNo):w.file.newSide.get(l.newNo),g=kx(e,l,c),v=[`diff-line`,o?`is-reindent`:Sx(l.type,d),!o&&!f&&e.inline?`has-inline`:``,f?`is-replaced`:``,l.type===`context`&&l.newNo!==null&&i?.has(l.newNo)?`is-expanded`:``,e.explained?`is-explained`:``,Nx(p).trim(),m!==null&&Ul(_,{kind:`line`,line:m})?`is-target`:``,r?`is-fold-hidden`:``];return(0,O.jsxs)(`div`,{className:v.filter(Boolean).join(` `),style:Mx(p),"data-line":m??void 0,"data-old-line":t===`new`?void 0:u?.oldNo??void 0,children:[m!==null&&s.has(m)&&(0,O.jsx)(`span`,{className:`diff-note-dot`,title:`Remarque sur cette ligne`}),m!==null&&C?(0,O.jsx)(`button`,{type:`button`,className:`diff-num`,title:`Ajouter une remarque sur la ligne ${m}`,onClick:()=>y(m),children:m}):(0,O.jsx)(`span`,{className:`diff-num`,children:(c?l.oldNo:m)??``}),(0,O.jsx)(Tx,{fold:n}),o?(0,O.jsx)(`span`,{className:`diff-marker`,title:`Seule l'indentation de cette ligne change (ligne ${o.oldNo} avant)`,children:Ax(o.text,e.line.text)}):(0,O.jsx)(`span`,{className:`diff-marker`,children:d===`new`?``:xx[l.type]}),(0,O.jsx)(wx,{text:l.text,tokens:h,marks:g,suffix:(0,O.jsx)(Ex,{fold:n})}),!c&&e.pills.length>0&&(0,O.jsx)(Px,{entries:e.pills})]},a)};return(0,O.jsxs)(`div`,{className:`diff`,children:[ie&&(0,O.jsxs)(`div`,{className:`diff-toolbar`,ref:T,children:[w.status===`error`&&(0,O.jsxs)(`span`,{className:`diff-toolbar-error`,children:[`Coloration syntaxique indisponible : `,w.message]}),!S&&(0,O.jsx)(bx,{scope:p,onScopeChange:m,wholeFileAvailable:h,codeView:d,onCodeViewChange:f,mode:l,onModeChange:u})]}),(0,O.jsxs)(`div`,{className:`diff-body${ae?` has-minimap`:``}`,children:[(0,O.jsx)(`div`,{className:`diff-rows`,ref:ee,children:n.map((e,t)=>(0,O.jsxs)(`div`,{className:`hunk`,children:[(0,O.jsxs)(`div`,{className:`hunk-header`,children:[(0,O.jsx)(`span`,{className:`hunk-header-text mono`,children:e.hunk.header}),r?.[t]&&(0,O.jsx)(Ix,{context:r[t],onChange:e=>a(t,e)}),(0,O.jsx)(`button`,{type:`button`,className:`hunk-explain`,title:`Copier un prompt qui demande à l'agent d'expliquer ce bloc et d'ajouter ses explications à l'analyse`,"aria-label":`Copier une demande d'explication`,onClick:()=>x(e.hunk),children:(0,O.jsx)(U,{name:`bot`,color:`#3cc4b4`})})]}),d===`split`?ru(e.rows).map((e,n)=>{let{hidden:r,rowIndex:i}=re[t];if(e.kind===`full`)return le(e.row,n,r.has(i.get(e.row)));let a=e.left?i.get(e.left):null,o=e.right?i.get(e.right):null,s=[a,o].every(e=>e===null||r.has(e)),c=e.left&&a!==null&&e.left!==e.right&&e.left.line.type===`del`?ce(t,a):null;return(0,O.jsxs)(`div`,{className:`diff-split-row${s?` is-fold-hidden`:``}`,children:[e.left?A(e.left,`old`,c,!1):(0,O.jsx)(`div`,{className:`diff-line is-empty`}),e.right&&o!==null?A(e.right,`new`,ce(t,o),!1):(0,O.jsx)(`div`,{className:`diff-line is-empty`})]},n)}):e.rows.map((e,n)=>{let r=re[t].hidden.has(n);return e.kind===`fix-strip`?le(e,n,r):A(e,`both`,ce(t,n),r,n)})]},t))}),oe&&(0,O.jsx)(ph,{model:oe,rowsRef:ee,scrollRef:c,toolbarHeight:E})]}),(0,O.jsx)(Lx,{mode:l,codeView:d,explained:g,reindented:n.some(e=>e.rows.some(e=>e.kind===`line`&&e.oldLine!==null)),inlined:n.some(e=>e.rows.some(e=>e.kind===`line`&&e.inline!==null&&!e.replaced)),expanded:i!==null&&i.size>0})]})}var zx=8,Bx=600;function Vx({explanation:e}){let[t,n]=(0,v.useState)(!1),{side:r,startLine:i,endLine:a}=e.location,o=e.body.split(`
85
- `).length>zx||e.body.length>Bx;return(0,O.jsxs)(`article`,{className:`margin-card margin-explanation is-${e.status}`,"data-explanation-card":e.id,children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(U,{name:`info`,color:`#3cc4b4`}),(0,O.jsx)(`span`,{className:`margin-explanation-kind`,children:`Explication`}),r===`old`&&(0,O.jsx)(`span`,{className:`tag explanation-side`,children:`Code supprimé`}),e.status===`outdated`&&(0,O.jsx)(`span`,{className:`tag explanation-outdated-tag`,children:`Obsolète`}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,title:r===`old`?`Numéros de ligne avant la feature`:void 0,children:[`l. `,jl(i,a,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:e.title}),e.status===`outdated`&&(0,O.jsx)(`p`,{className:`explanation-outdated`,children:`Le code décrit a changé depuis la rédaction de cette explication : elle peut ne plus correspondre.`}),(0,O.jsx)(`p`,{className:`margin-explanation-body${o&&!t?` is-folded`:``}`,children:e.body}),o&&(0,O.jsx)(`button`,{type:`button`,className:`margin-explanation-more`,"aria-expanded":t,onClick:()=>n(!t),children:t?`Réduire`:`Lire la suite`})]})}function Hx(e,t){return e.notes.filter(e=>e.location?.path===t.path&&e.location.line===null)}function Ux({analysis:e,file:t,numbered:n,explanations:r,fileDiff:i,fixes:a,mode:o,codeView:s,removed:c,lineNotes:l,shown:u,setComposer:d,onToggleFix:f,revealedId:p}){let m=t.contentAvailable,h=[];for(let t of n){let{finding:n}=t,r=Kl(t,a,u,c),i=Fl(u,t.startLine,t.endLine),s=r!==null&&i!==null;h.push({key:`finding-${n.id}`,kind:`finding`,anchor:s?Vl(r):null,line:s?Hl(r):t.startLine,rank:t.number,color:n.status===`open`?Du[n.severity].color:`#3a4050`,label:`Constat ${t.number} · ${Du[n.severity].label} · ${n.title}`,content:(0,O.jsx)(sh,{analysis:e,entry:t,fix:a.get(n.id),mode:o,onToggleFix:e=>f(n.id,e),onAddNote:m?()=>d({line:i??t.startLine,findingId:n.id}):void 0,highlighted:n.id===p})})}for(let e of r){let t=i===null?null:Ql(i,e,c,s);h.push({key:`explanation-${e.id}`,kind:`explanation`,anchor:t?.selector??null,line:t?.order??e.location.startLine,rank:0,color:e.status===`current`?`#3cc4b4`:`#3a4050`,label:`Explication · ${e.title}`,content:(0,O.jsx)(Vx,{explanation:e})})}for(let e of l){let t=u.has(e.location.line),n=Gl(e.location.line,c);h.push({key:`note-${e.id}`,kind:`note`,anchor:t?Vl(n):null,line:t?Hl(n):e.location.line,rank:1e3,color:e.question===null?Ou.color:ku.color,label:`${e.question===null?`Remarque`:`Question`} · ligne ${e.location.line}`,content:(0,O.jsx)(Gm,{note:e})})}return h}var Wx=40;function Gx(e,t){let[n,r]=(0,v.useState)([]),i=(0,v.useRef)(()=>{});return(0,v.useLayoutEffect)(()=>{i.current=()=>{let n=e.current,i=t.current;if(!n||!i)return;let a=n.getBoundingClientRect().bottom-Wx,o=[...i.querySelectorAll(`[data-finding-card]`)].map(e=>({id:e.dataset.findingCard,top:e.getBoundingClientRect().top})).filter(e=>e.top>a).sort((e,t)=>e.top-t.top).map(e=>e.id);r(e=>e.join(`
82
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Fy(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=wv);let l=Iy(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),!l&&a&&Oy(e,t,n)||(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),o||a&&fy(e,t,n)||s.push(`</`+e.tagName+`>`),s.join(``)}function Iy(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Ly(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Ly(e,t,n){let r=bv(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Jv(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Py.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?ty:ny)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Jv(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Py.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&ey(n,o)>ey(n,e.alternative)&&(o=e.alternative),s=o+Jv(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Py.single:Py.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Ry=[`<`,`&`];function zy(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Jv(e.value,Object.assign({},r.settings.characterReferences,{subset:Ry}))}function By(e,t,n,r){return r.settings.allowDangerousHtml?e.value:zy(e,t,n,r)}function Vy(e,t,n,r){return r.all(e)}var Hy=Ev(`type`,{invalid:Uy,unknown:Wy,handlers:{comment:Qv,doctype:$v,element:Fy,raw:By,root:Vy,text:zy}});function Uy(e){throw Error("Expected node, not `"+e+"`")}function Wy(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Gy={},Ky={},qy=[];function Jy(e,t){let n=t||Gy,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Yy,all:Xy,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||K_,characterReferences:n.characterReferences||Ky,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?wv:Cv,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Yy(e,t,n){return Hy(e,t,n,this)}function Xy(e){let t=[],n=e&&e.children||qy,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Zy=/\s+/g;function Qy(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(Zy)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(Zy);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function $y(e){let t=m_(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var eb=[`color`,`background-color`];function tb(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nb(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function rb(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=nb(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return tb(e,a)})):e}function ib(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ab(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&eb.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Ch('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function ab(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Wh.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Wh.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Wh.Underline&&n.push(`underline`),e.fontStyle&Wh.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function ob(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function sb(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=$y(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Ch(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new Ch(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new Ch(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));cb(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return rb(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Ch(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=lb(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Ch(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Ch(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Qy(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function cb(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Ch(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new Ch(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function lb(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(lb).join(``):``}var ub=[sb()];function db(e){let t=fb(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...ub]}function fb(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var pb=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],mb={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function hb(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function gb(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function _b(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)mb[r]&&t.push({type:`setDecoration`,value:mb[r]});else if(r<=29){let e=mb[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:pb[r-30]}});else if(r===38){let n=gb(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:pb[r-40]}});else if(r===48){let n=gb(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:pb[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:pb[r-100+8]}})}}return t}function vb(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=hb(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=_b(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var yb={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 bb(e=yb){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<pb.length;e++)r.push(t(pb[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var xb=/#([0-9a-f]{3,8})/i,Sb=/var\((--[\w-]+-ansi-[\w-]+)\)/,Cb={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 wb(e,t,n){let r=a_(e,n),i=m_(t),a=bb(Object.fromEntries(pb.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Cb[t]]}))),o=vb();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=o_(i,r),o=o_(o,r),n.decorations.has(`dim`)&&(i=Tb(i));let s=Wh.None;return n.decorations.has(`bold`)&&(s|=Wh.Bold),n.decorations.has(`italic`)&&(s|=Wh.Italic),n.decorations.has(`underline`)&&(s|=Wh.Underline),n.decorations.has(`strikethrough`)&&(s|=Wh.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Tb(e){let t=e.match(xb);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(Sb);return n?`var(${n[1]}-dim)`:e}function Eb(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!l_(r)&&!d_(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return wb(r,t,n)}return F_(e,t,n)}function Db(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new Ch("`themes` option must not be empty");let p=W_(e,t,n,Eb);if(c=k_(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new Ch(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>ib(e,h,u,l,d))),c&&O_(a,c);let g=f.map(e=>a_(e.theme,n));i=Ob(f,m,g,u,l,`fg`,d),r=Ob(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=a_(n.theme,n);a=Eb(e,t,n);let l=e.getTheme(n.theme);r=o_(l.bg,s),i=o_(l.fg,s),o=l.name,c=k_(a)}else throw new Ch("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Ob(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=o_(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new Ch('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${o_(t[r][a],n[r])||`inherit`}, ${o_(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var kb=/^\s+$/,Ab=/^(\s*)(.*?)(\s*)$/;function jb(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>jb(e,t,n),codeToTokens:(t,n)=>Db(e,t,n)}){let i=t;for(let e of db(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Db(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Nb(a):d===`never`&&(a=Pb(a)),f&&(a=Fb(a));let p={...r,get source(){return i}};for(let e of db(n))a=e.tokens?.call(p,a)||a;return Mb(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Mb(e,t,n,r=k_(e)){let i=db(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Qy,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
83
+ `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=ob(a.htmlStyle||ab(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&O_(m,r),m}function Nb(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Wh.Underline||i.fontStyle&Wh.Strikethrough));o&&kb.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Pb(e){return e.map(e=>e.flatMap(e=>{if(kb.test(e.content))return e;let t=e.content.match(Ab);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Fb(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=ob(e.htmlStyle||ab(e)),i=ob(n.htmlStyle||ab(n)),a=e.fontStyle&&(e.fontStyle&Wh.Underline||e.fontStyle&Wh.Strikethrough),o=n.fontStyle&&(n.fontStyle&Wh.Underline||n.fontStyle&Wh.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Ib=Jy;function Lb(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>jb(e,t,n),codeToTokens:(t,n)=>Db(e,t,n)},i=Ib(jb(e,t,n,r));for(let e of db(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Rb(e){let t=await E_(e);return{getLastGrammarState:(...e)=>I_(t,...e),codeToTokensBase:(e,n)=>Eb(t,e,n),codeToTokensWithThemes:(e,n)=>W_(t,e,n),codeToTokens:(e,n)=>Db(t,e,n),codeToHast:(e,n)=>jb(t,e,n),codeToHtml:(e,n)=>Lb(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var zb=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Bb(){return 2147483648}function Vb(){return typeof performance<`u`?performance.now():Date.now()}var Hb=(e,t)=>e+(t-e%t)%t;async function Ub(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Bb();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Hb(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Vb,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Wb=Object.defineProperty,Gb=(e,t,n)=>t in e?Wb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kb=(e,t,n)=>Gb(e,typeof t==`symbol`?t:t+``,n),qb=null;function Jb(e){throw new zb(e.UTF8ToString(e.getLastOnigError()))}var Yb=class e{constructor(t){Kb(this,`utf16Length`),Kb(this,`utf8Length`),Kb(this,`utf16Value`),Kb(this,`utf8Value`),Kb(this,`utf16OffsetToUtf8`),Kb(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Xb=class e{constructor(t){if(Kb(this,`id`,++e.LAST_ID),Kb(this,`_onigBinding`),Kb(this,`content`),Kb(this,`utf16Length`),Kb(this,`utf8Length`),Kb(this,`utf16OffsetToUtf8`),Kb(this,`utf8OffsetToUtf16`),Kb(this,`ptr`),!qb)throw new zb(`Must invoke loadWasm first.`);this._onigBinding=qb,this.content=t;let n=new Yb(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=qb.omalloc(1e4),e._sharedPtrInUse=!0,qb.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(qb)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Kb(Xb,`LAST_ID`,0),Kb(Xb,`_sharedPtr`,0),Kb(Xb,`_sharedPtrInUse`,!1);var Zb=Xb,Qb=class{constructor(e){if(Kb(this,`_onigBinding`),Kb(this,`_ptr`),!qb)throw new zb(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Yb(e[r]);t[r]=i.createString(qb),n[r]=i.utf8Length}let r=qb.omalloc(4*e.length);qb.HEAPU32.set(t,r/4);let i=qb.omalloc(4*e.length);qb.HEAPU32.set(n,i/4);let a=qb.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)qb.ofree(t[n]);qb.ofree(i),qb.ofree(r),a===0&&Jb(qb),this._onigBinding=qb,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Zb(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function $b(e){return typeof e.instantiator==`function`}function ex(e){return typeof e.default==`function`}function tx(e){return e.data!==void 0}function nx(e){return typeof Response<`u`&&e instanceof Response}function rx(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var ix;function ax(e){if(ix)return ix;async function t(){qb=await Ub(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),$b(n)?n=await n.instantiator(t):ex(n)?n=await n.default(t):(tx(n)&&(n=n.data),nx(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await sx(n)(t):await cx(n)(t):rx(n)||n instanceof WebAssembly.Module?n=await ox(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await ox(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return ix=t(),ix}function ox(e){return t=>WebAssembly.instantiate(e,t)}function sx(e){return t=>WebAssembly.instantiateStreaming(e,t)}function cx(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function lx(e){return e&&await ax(e),{createScanner(e){return new Qb(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Zb(e)}}}var ux=`modulepreload`,dx=function(e,t){return new URL(e,t).href},fx={},px=function(e){return e.pathname.endsWith(`.css`)},mx=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=dx(t,n);let r=s(t),i=px(r);return mx(fx,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ux,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},hx=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>$(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-X3Y2mlq2.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>$(()=>import(`./ahk-DwADkxyd.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>$(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-D6ybriip.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-CZyN0KhI.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-Dl58kWHo.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-DtlnFSUO.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>$(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-C2IN4Vk8.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-DmJ0_rHH.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-mC1a3Brk.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>$(()=>import(`./chapel-BzC5d5Li.js`),__vite__mapDeps([21,22]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-BbiEwu_G.js`),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-DE8QSbI2.js`),__vite__mapDeps([24,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>$(()=>import(`./coq-CGaSfhwR.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-Bb3xCuxM.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-Dh_G4EEb.js`),__vite__mapDeps([28,2,3,1,16,22,29]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-dmMxLVLW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-CMxAsymy.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-CHZY9Xhz.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-CuH5my32.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-CniFTb1m.js`),__vite__mapDeps([30,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-ZmJWOMj1.js`),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-DJRxZUyP.js`),__vite__mapDeps([32,27,22]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-DR2vtWaj.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-BMzBpztO.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-CA-NBf_5.js`),__vite__mapDeps([50,29]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-BhxckZg7.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-p7xbN2k1.js`),__vite__mapDeps([52,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-CL99TffA.js`).then(e=>e.n),__vite__mapDeps([27,22]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-CAXYAgV-.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-D7Xxg-E7.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-CUAoLdpX.js`),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-BXkO6kY5.js`).then(e=>e.n),__vite__mapDeps([35,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-exD0x3TF.js`),__vite__mapDeps([54,2,3,1,39]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-DHD04EW_.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-Bml0cGZy.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-DMmIRhh5.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-DjxNKi3W.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-D8DlwLKl.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-DbeJguaR.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-DZkHuHjU.js`),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-CKOOVBcn.js`),__vite__mapDeps([61,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-C_pcKqnE.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-CCems14W.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-B67yrJEc.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>$(()=>import(`./just-0ieSYSY9.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-CL5phIW-.js`),__vite__mapDeps([66,67,63]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-CLwqJshL.js`),__vite__mapDeps([68,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-BpN0_IRI.js`).then(e=>e.n),__vite__mapDeps([38,22]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-VGWVLoqX.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-CSJfqvxX.js`),__vite__mapDeps([69,3,5,11,70]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-DiIWpMwC.js`),__vite__mapDeps([71,15,1,2,3,39,41]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-D9W784E_.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-CSgcYZcx.js`),__vite__mapDeps([72,73]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D7IRt6Pp.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-CjkEKhVl.js`),__vite__mapDeps([74,38,22]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-BWOltqk2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>$(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell--0fT3PI1.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>$(()=>import(`./org-D6h3yJk4.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-Qm7miafA.js`),__vite__mapDeps([65,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-CtR6lR9E.js`),__vite__mapDeps([87,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>$(()=>import(`./powershell-QtSnmXcu.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-xYcJQRn0.js`),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-Bf-2A8LG.js`),__vite__mapDeps([95,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-DjTBoq9t.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-jwcmZNf0.js`),__vite__mapDeps([96,1,2,3,78]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>$(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-CTtG2g8b.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-F-HSIpRG.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-DyI3kCSP.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-DpiIf5JO.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-CX6vfJC8.js`),__vite__mapDeps([99,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-pSu9IXx-.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-BLPw4gsk.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-CqcUPQe7.js`),__vite__mapDeps([102,29]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>$(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>$(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-7ilJpWXu.js`),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-DLj5IRs-.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-DZAwA8QB.js`),__vite__mapDeps([106,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-DjH0RD4_.js`),__vite__mapDeps([107,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-CwMYMY9c.js`),__vite__mapDeps([108,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-Yp0HSBmI.js`),__vite__mapDeps([109,2,3,81]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-2lbf_Uq9.js`).then(e=>e.n),__vite__mapDeps([67,63]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-B3HKcZ-U.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-BoZ28JHl.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-BTqVjw0Y.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-H8La8DxN.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-BGhR2SqG.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-LpLhjBbD.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120]),import.meta.url))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>$(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-BK8HizoK.js`),__vite__mapDeps([121,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-yvbIAfmy.js`),__vite__mapDeps([122,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-M85qnu2-.js`),__vite__mapDeps([123,2,3,5,12,70,124]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-Bt1Y75of.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-di2-gHQj.js`),__vite__mapDeps([93,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-43tUHb7f.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],gx=Object.fromEntries(hx.map(e=>[e.id,e.import])),_x=Object.fromEntries(hx.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),vx={...gx,..._x},yx=`github-dark-default`,bx={h:`c`,hh:`cpp`,hpp:`cpp`,hxx:`cpp`,cc:`cpp`,cxx:`cpp`,htm:`html`,svg:`xml`,pl:`perl`,ex:`elixir`,exs:`elixir`,makefile:`make`,dockerfile:`dockerfile`},xx=new Map;for(let e of hx)for(let t of[e.id,...e.aliases??[]])xx.set(t.toLowerCase(),e.id);for(let[e,t]of Object.entries(bx))xx.set(e,t);function Sx(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(n+1);return xx.get(r)??xx.get(t)??null}var Cx=null;function wx(){return Cx??=Rb({themes:[$(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url)],langs:[],engine:lx($(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),Cx}async function Tx(e){let t=await wx();return t.getLoadedLanguages().includes(e)||await t.loadLanguage(vx[e]),n=>n.length===0?[]:t.codeToTokensBase(n.join(`
84
+ `),{lang:e,theme:yx})}function Ex(e,t){let n=new Map,r=new Map;if(e.newContent!==null){let r=Math.max(0,...e.hunks.flatMap(e=>e.lines.map(e=>e.newNo??0)));t(Ml(e.newContent).slice(0,r)).forEach((e,t)=>n.set(t+1,e))}for(let i of e.hunks){let a=i.lines.filter(e=>e.type!==`add`);if(t(a.map(e=>e.text)).forEach((e,t)=>r.set(a[t].oldNo,e)),e.newContent===null){let e=i.lines.filter(e=>e.type!==`del`);t(e.map(e=>e.text)).forEach((t,r)=>n.set(e[r].newNo,t))}}return{newSide:n,oldSide:r}}function Dx(e){let t=Sx(e.path),[n,r]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(t===null)return;let e=!1;return Tx(t).then(n=>!e&&r({lang:t,tokenizer:n}),n=>!e&&r({lang:t,error:n instanceof Error?n.message:String(n)})),()=>{e=!0}},[t]);let i=n!==null&&n.lang===t?n:null,a=i!==null&&`tokenizer`in i?i.tokenizer:null;return(0,v.useMemo)(()=>{if(i!==null&&`error`in i)return{status:`error`,message:i.error};if(a===null)return{status:`none`};let t=new Map;return{status:`ready`,file:Ex(e,a),suggestion:e=>{let n=t.get(e);return n||(n=a(Ml(e)),t.set(e,n)),n}}},[i,a,e])}function Ox({scope:e,onScopeChange:t,wholeFileAvailable:n,codeView:r,onCodeViewChange:i,mode:a,onModeChange:o}){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(gh,{label:`Afficher`,options:Bl,value:e,onChange:t,disabled:n?void 0:{file:`Contenu du fichier non conservé dans l'analyse`}}),(0,O.jsx)(gh,{label:`Code`,options:zl,value:r,onChange:i}),(0,O.jsx)(gh,{label:`Correctifs`,options:Rl,value:a,onChange:o})]})}var kx={context:` `,add:`+`,del:`−`};function Ax(e,t){return t===`new`&&e===`add`?`is-new`:`is-${e}`}function jx(e,t){let n=[],r=0;for(let{text:i,style:a}of e){let e=t.flatMap(e=>[e.start,e.end]).map(e=>Math.min(Math.max(e-r,0),i.length)),o=[...new Set([0,...e,i.length])].sort((e,t)=>e-t);for(let e=0;e<o.length-1;e++){let s=r+o[e],c=t.find(e=>s>=e.start&&s<e.end);n.push({text:i.slice(o[e],o[e+1]),style:a,className:c?.className})}r+=i.length}return n}function Mx({text:e,tokens:t,marks:n=[],suffix:r}){let i=t?t.map(e=>({text:e.content,style:zx(e)})):[{text:e}];return(0,O.jsxs)(`span`,{className:`diff-code${t?` is-highlighted`:``}`,children:[jx(i,n).map((e,t)=>(0,O.jsx)(`span`,{style:e.style,className:e.className,children:e.text},t)),r]})}function Nx({fold:e}){return e?(0,O.jsx)(`button`,{type:`button`,className:`diff-fold${e.folded?` is-folded`:``}`,"aria-expanded":!e.folded,title:e.folded?`Déplier le bloc · Ctrl+clic : tout déplier`:`Replier le bloc · Ctrl+clic : replier niveau par niveau, des blocs les plus imbriqués vers celui-ci`,onClick:e.onToggle,children:(0,O.jsx)(U,{name:e.folded?`chevron-right`:`chevron-down`,size:14})}):(0,O.jsx)(`span`,{className:`diff-fold`})}function Px({fold:e}){return e?.folded?(0,O.jsxs)(`button`,{type:`button`,className:`diff-fold-ellipsis`,title:`Déplier le bloc`,onClick:e.onToggle,children:[`⋯ `,Yu(e.lines,`ligne`)]}):null}function Fx(e,t){let n=ch(e.rows.map(ru)),r=n.map(t=>nu(e.rows[t.start])),i=new Set(n.flatMap((e,n)=>t.has(r[n])?[n]:[]));return{regions:n,keys:r,folded:i,regionAt:new Map(n.map((e,t)=>[e.start,t])),hidden:lh(n,i),rowIndex:new Map(e.rows.map((e,t)=>[e,t]))}}var Ix=new Set;function Lx(e,t,n){if(e.replaced&&!n)return[];if(e.oldLine){let t=be(e.oldLine.text,e.line.text);return n?[{start:t.start,end:t.oldEnd,className:`diff-indent is-del`}]:[{start:t.start,end:t.newEnd,className:`diff-indent is-add`}]}return!e.inline||t.type===`context`?[]:e.inline.map(e=>({...e,className:`diff-inline is-${t.type}`}))}function Rx(e,t){let{oldEnd:n,newEnd:r}=be(e,t);return r>n?`→`:r<n?`←`:`↔`}function zx(e){let t=e.fontStyle??0;return{color:e.color,fontStyle:t&1?`italic`:void 0,fontWeight:t&2?600:void 0}}function Bx(e){return e?{"--mark":ku[e.severity].color}:void 0}function Vx(e){return e?e.muted?` has-bar is-bar-muted`:` has-bar`:``}function Hx({entries:e}){return(0,O.jsx)(`span`,{className:`diff-pills`,children:e.map(e=>(0,O.jsx)(`span`,{className:e.finding.status===`open`?void 0:`is-muted`,title:e.finding.title,children:(0,O.jsx)(ph,{entry:e,small:!0})},e.finding.id))})}function Ux({entry:e,bar:t,pills:n,applied:r,isTarget:i,foldHidden:a,onHide:o}){let s=Ml(e.finding.suggestion??``).length===0,c=gu(e.startLine,e.endLine),l=s?`supprime ${c}`:`remplace ${c}`;return(0,O.jsxs)(`div`,{className:`fix-strip${r?` is-applied`:``}${Vx(t)}${i?` is-target`:``}${a?` is-fold-hidden`:``}`,style:Bx(t),"data-fix":e.finding.id,children:[(0,O.jsx)(ph,{entry:e,small:!0}),(0,O.jsx)(U,{name:`sparkles`,color:`#8b97ff`}),(0,O.jsx)(`span`,{className:`fix-strip-text`,children:r?`Correctif ${e.number} appliqué — ${l}`:`Correctif proposé par l'agent — ${l}`}),n.length>0&&(0,O.jsx)(Hx,{entries:n}),(0,O.jsx)(`button`,{type:`button`,className:`fix-strip-hide`,onClick:o,children:r?`Retirer le correctif`:`Masquer le correctif`})]})}function Wx({context:e,onChange:t}){return(0,O.jsxs)(`div`,{className:`context-stepper`,role:`group`,"aria-label":`Contexte du bloc`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`context-stepper-button`,disabled:!e.canShrink,title:`Retirer 5 lignes de contexte au-dessus et en dessous`,onClick:()=>t(-1),children:[(0,O.jsx)(U,{name:`fold-vertical`,size:12}),`−`,5]}),(0,O.jsx)(`span`,{className:`context-stepper-count`,children:Yu(e.context,`ligne`)}),(0,O.jsxs)(`button`,{type:`button`,className:`context-stepper-button`,disabled:!e.canGrow,title:`Ajouter 5 lignes de contexte au-dessus et en dessous`,onClick:()=>t(1),children:[(0,O.jsx)(U,{name:`unfold-vertical`,size:12}),`+`,5]})]})}function Gx({mode:e,codeView:t,explained:n,reindented:r,inlined:i,expanded:a}){return(0,O.jsxs)(`div`,{className:`diff-legend`,children:[t===`new`?(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-new`}),`Ajouté par la feature`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-add`}),`Ajouté par la feature`]}),(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-del`}),`Supprimé par la feature`]})]}),i&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch ${t===`new`?`is-inline-add`:`is-inline`}`}),`Partie modifiée de la ligne`]}),r&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-reindent`}),`Indentation modifiée`]}),e===`before-after`&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-replaced`}),`Lignes remplacées par le correctif`]}),e!==`off`&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-proposed`}),e===`applied`?`Correctif appliqué`:`Correctif proposé`]}),n&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-explained`}),`Code décrit par une explication`]}),a&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-expanded`}),`Contexte ajouté`]})]})}function Kx({file:e,fileDiff:t,hunks:n,hunkContexts:r,addedContext:i,onContextChange:a,findings:o,notedLines:s,scrollRef:c,mode:l,onModeChange:u,codeView:d,onCodeViewChange:f,scope:p,onScopeChange:m,wholeFileAvailable:h,explained:g,target:_,onLineNote:y,onHideFix:b,onRequestExplanation:x,zen:S}){let C=e.contentAvailable,w=Dx(t),T=(0,v.useRef)(null),ee=(0,v.useRef)(null),[E,te]=(0,v.useState)(0),[D,k]=(0,v.useState)({path:e.path,keys:Ix}),ne=D.path===e.path?D.keys:Ix,re=n.map(e=>Fx(e,ne)),ie=!S||w.status===`error`,ae=p===`file`&&!S,oe=(0,v.useMemo)(()=>ae?hu(n,d,o,s):null,[ae,n,d,o,s]);(0,v.useEffect)(()=>{let e=T.current;if(!e){te(0);return}let t=new ResizeObserver(()=>te(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[ie]);let se=(t,n,r)=>{let{regions:i,keys:a,folded:o}=re[t],s;r.ctrlKey||r.metaKey?s=fh(i,n,o):(s=new Set(o),s.delete(n)||s.add(n));let c=new Set(a),l=[...ne].filter(e=>!c.has(e));k({path:e.path,keys:new Set([...l,...[...s].map(e=>a[e])])})},ce=(e,t)=>{let{regions:n,folded:r,regionAt:i}=re[e],a=i.get(t);if(a===void 0)return null;let o=n[a];return{folded:r.has(a),lines:o.end-o.start,onToggle:t=>se(e,a,t)}},le=(e,t,n)=>(0,O.jsx)(Ux,{entry:e.entry,bar:e.bar,pills:e.pills,applied:l===`applied`,isTarget:Gl(_,{kind:`fix`,entry:e.entry}),foldHidden:n,onHide:()=>b(e.entry.finding.id)},t),A=(e,t,n,r,a)=>{if(e.kind===`fix-line`)return(0,O.jsxs)(`div`,{className:`diff-line is-proposed${Vx(e.bar)}${r?` is-fold-hidden`:``}`,style:Bx(e.bar),children:[(0,O.jsx)(`span`,{className:`diff-num`}),(0,O.jsx)(Nx,{fold:n}),(0,O.jsx)(`span`,{className:`diff-marker`,children:`›`}),(0,O.jsx)(Mx,{text:e.text,tokens:w.status===`ready`?w.suggestion(e.entry.finding.suggestion??``)[e.index]:void 0,suffix:(0,O.jsx)(Px,{fold:n})})]},a);let{oldLine:o}=e,c=t===`old`,l=c&&o?o:e.line,u=o??(l.type===`del`?l:null),f=e.replaced&&!c,p=c?null:e.bar,m=c?null:l.newNo,h=w.status!==`ready`||f?void 0:l.type===`del`?w.file.oldSide.get(l.oldNo):w.file.newSide.get(l.newNo),g=Lx(e,l,c),v=[`diff-line`,o?`is-reindent`:Ax(l.type,d),!o&&!f&&e.inline?`has-inline`:``,f?`is-replaced`:``,l.type===`context`&&l.newNo!==null&&i?.has(l.newNo)?`is-expanded`:``,e.explained?`is-explained`:``,Vx(p).trim(),m!==null&&Gl(_,{kind:`line`,line:m})?`is-target`:``,r?`is-fold-hidden`:``];return(0,O.jsxs)(`div`,{className:v.filter(Boolean).join(` `),style:Bx(p),"data-line":m??void 0,"data-old-line":t===`new`?void 0:u?.oldNo??void 0,children:[m!==null&&s.has(m)&&(0,O.jsx)(`span`,{className:`diff-note-dot`,title:`Remarque sur cette ligne`}),m!==null&&C?(0,O.jsx)(`button`,{type:`button`,className:`diff-num`,title:`Ajouter une remarque sur la ligne ${m}`,onClick:()=>y(m),children:m}):(0,O.jsx)(`span`,{className:`diff-num`,children:(c?l.oldNo:m)??``}),(0,O.jsx)(Nx,{fold:n}),o?(0,O.jsx)(`span`,{className:`diff-marker`,title:`Seule l'indentation de cette ligne change (ligne ${o.oldNo} avant)`,children:Rx(o.text,e.line.text)}):(0,O.jsx)(`span`,{className:`diff-marker`,children:d===`new`?``:kx[l.type]}),(0,O.jsx)(Mx,{text:l.text,tokens:h,marks:g,suffix:(0,O.jsx)(Px,{fold:n})}),!c&&e.pills.length>0&&(0,O.jsx)(Hx,{entries:e.pills})]},a)};return(0,O.jsxs)(`div`,{className:`diff`,children:[ie&&(0,O.jsxs)(`div`,{className:`diff-toolbar`,ref:T,children:[w.status===`error`&&(0,O.jsxs)(`span`,{className:`diff-toolbar-error`,children:[`Coloration syntaxique indisponible : `,w.message]}),!S&&(0,O.jsx)(Ox,{scope:p,onScopeChange:m,wholeFileAvailable:h,codeView:d,onCodeViewChange:f,mode:l,onModeChange:u})]}),(0,O.jsxs)(`div`,{className:`diff-body${ae?` has-minimap`:``}`,children:[(0,O.jsx)(`div`,{className:`diff-rows`,ref:ee,children:n.map((e,t)=>(0,O.jsxs)(`div`,{className:`hunk`,children:[(0,O.jsxs)(`div`,{className:`hunk-header`,children:[(0,O.jsx)(`span`,{className:`hunk-header-text mono`,children:e.hunk.header}),r?.[t]&&(0,O.jsx)(Wx,{context:r[t],onChange:e=>a(t,e)}),(0,O.jsx)(`button`,{type:`button`,className:`hunk-explain`,title:`Copier un prompt qui demande à l'agent d'expliquer ce bloc et d'ajouter ses explications à l'analyse`,"aria-label":`Copier une demande d'explication`,onClick:()=>x(e.hunk),children:(0,O.jsx)(U,{name:`bot`,color:`#3cc4b4`})})]}),d===`split`?au(e.rows).map((e,n)=>{let{hidden:r,rowIndex:i}=re[t];if(e.kind===`full`)return le(e.row,n,r.has(i.get(e.row)));let a=e.left?i.get(e.left):null,o=e.right?i.get(e.right):null,s=[a,o].every(e=>e===null||r.has(e)),c=e.left&&a!==null&&e.left!==e.right&&e.left.line.type===`del`?ce(t,a):null;return(0,O.jsxs)(`div`,{className:`diff-split-row${s?` is-fold-hidden`:``}`,children:[e.left?A(e.left,`old`,c,!1):(0,O.jsx)(`div`,{className:`diff-line is-empty`}),e.right&&o!==null?A(e.right,`new`,ce(t,o),!1):(0,O.jsx)(`div`,{className:`diff-line is-empty`})]},n)}):e.rows.map((e,n)=>{let r=re[t].hidden.has(n);return e.kind===`fix-strip`?le(e,n,r):A(e,`both`,ce(t,n),r,n)})]},t))}),oe&&(0,O.jsx)(xh,{model:oe,rowsRef:ee,scrollRef:c,toolbarHeight:E})]}),(0,O.jsx)(Gx,{mode:l,codeView:d,explained:g,reindented:n.some(e=>e.rows.some(e=>e.kind===`line`&&e.oldLine!==null)),inlined:n.some(e=>e.rows.some(e=>e.kind===`line`&&e.inline!==null&&!e.replaced)),expanded:i!==null&&i.size>0})]})}var qx=8,Jx=600;function Yx({explanation:e}){let[t,n]=(0,v.useState)(!1),{side:r,startLine:i,endLine:a}=e.location,o=e.body.split(`
85
+ `).length>qx||e.body.length>Jx;return(0,O.jsxs)(`article`,{className:`margin-card margin-explanation is-${e.status}`,"data-explanation-card":e.id,children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(U,{name:`info`,color:`#3cc4b4`}),(0,O.jsx)(`span`,{className:`margin-explanation-kind`,children:`Explication`}),r===`old`&&(0,O.jsx)(`span`,{className:`tag explanation-side`,children:`Code supprimé`}),e.status===`outdated`&&(0,O.jsx)(`span`,{className:`tag explanation-outdated-tag`,children:`Obsolète`}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,title:r===`old`?`Numéros de ligne avant la feature`:void 0,children:[`l. `,Nl(i,a,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:e.title}),e.status===`outdated`&&(0,O.jsx)(`p`,{className:`explanation-outdated`,children:`Le code décrit a changé depuis la rédaction de cette explication : elle peut ne plus correspondre.`}),(0,O.jsx)(`p`,{className:`margin-explanation-body${o&&!t?` is-folded`:``}`,children:e.body}),o&&(0,O.jsx)(`button`,{type:`button`,className:`margin-explanation-more`,"aria-expanded":t,onClick:()=>n(!t),children:t?`Réduire`:`Lire la suite`})]})}function Xx(e,t){return e.notes.filter(e=>e.location?.path===t.path&&e.location.line===null)}function Zx({analysis:e,file:t,numbered:n,explanations:r,fileDiff:i,fixes:a,mode:o,codeView:s,removed:c,lineNotes:l,shown:u,setComposer:d,onToggleFix:f,revealedId:p}){let m=t.contentAvailable,h=[];for(let t of n){let{finding:n}=t,r=Jl(t,a,u,c),i=Ll(u,t.startLine,t.endLine),s=r!==null&&i!==null;h.push({key:`finding-${n.id}`,kind:`finding`,anchor:s?Ul(r):null,line:s?Wl(r):t.startLine,rank:t.number,color:n.status===`open`?ku[n.severity].color:`#3a4050`,label:`Constat ${t.number} · ${ku[n.severity].label} · ${n.title}`,content:(0,O.jsx)(hh,{analysis:e,entry:t,fix:a.get(n.id),mode:o,onToggleFix:e=>f(n.id,e),onAddNote:m?()=>d({line:i??t.startLine,findingId:n.id}):void 0,highlighted:n.id===p})})}for(let e of r){let t=i===null?null:eu(i,e,c,s);h.push({key:`explanation-${e.id}`,kind:`explanation`,anchor:t?.selector??null,line:t?.order??e.location.startLine,rank:0,color:e.status===`current`?`#3cc4b4`:`#3a4050`,label:`Explication · ${e.title}`,content:(0,O.jsx)(Yx,{explanation:e})})}for(let e of l){let t=u.has(e.location.line),n=ql(e.location.line,c);h.push({key:`note-${e.id}`,kind:`note`,anchor:t?Ul(n):null,line:t?Wl(n):e.location.line,rank:1e3,color:e.question===null?Au.color:ju.color,label:`${e.question===null?`Remarque`:`Question`} · ligne ${e.location.line}`,content:(0,O.jsx)(Zm,{note:e})})}return h}var Qx=40;function $x(e,t){let[n,r]=(0,v.useState)([]),i=(0,v.useRef)(()=>{});return(0,v.useLayoutEffect)(()=>{i.current=()=>{let n=e.current,i=t.current;if(!n||!i)return;let a=n.getBoundingClientRect().bottom-Qx,o=[...i.querySelectorAll(`[data-finding-card]`)].map(e=>({id:e.dataset.findingCard,top:e.getBoundingClientRect().top})).filter(e=>e.top>a).sort((e,t)=>e.top-t.top).map(e=>e.id);r(e=>e.join(`
86
86
  `)===o.join(`
87
- `)?e:o)},i.current()}),(0,v.useEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=()=>i.current();n.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(n),o.observe(r),()=>{n.removeEventListener(`scroll`,a),o.disconnect()}},[e,t]),n}var Kx=12;function qx(e){let t=[],n=-12;for(let r of e){let e=Math.max(r.anchorTop,n+Kx,0);t.push(e),n=e+r.height}return t}function Jx(e,t){(0,v.useLayoutEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let i=[...n.querySelectorAll(`:scope > [data-anchor]`)],a=()=>{let e=n.getBoundingClientRect().top,t=i.map(t=>{let n=r.querySelector(t.dataset.anchor);if(!n)throw Error(`Ancre introuvable dans le diff : ${t.dataset.anchor}`);return{anchorTop:n.getBoundingClientRect().top-e,height:t.offsetHeight}}),a=qx(t);i.forEach((e,n)=>{e.style.top=`${a[n]}px`,e.style.setProperty(`--shift`,`${a[n]-t[n].anchorTop}px`)});let o=i.length-1;n.style.minHeight=o<0?``:`${a[o]+t[o].height}px`};a();let o=new ResizeObserver(a);o.observe(r);for(let e of i)o.observe(e);return()=>o.disconnect()})}function Yx({filters:e}){let t=[{key:`findings`,label:`Constats`,count:e.findingCount,shown:e.findingsShown,color:`#e3a33b`,onChange:e.onFindingsShownChange},{key:`explanations`,label:`Explications`,count:e.explanationCount,shown:e.explanationsShown,color:`#3cc4b4`,onChange:e.onExplanationsShownChange}];return(0,O.jsx)(`div`,{className:`margin-filters`,role:`group`,"aria-label":`Éléments affichés`,children:t.map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`margin-filter${e.shown?` is-on`:``}`,style:{"--filter":e.color},"aria-pressed":e.shown,title:e.shown?`Masquer les ${e.label.toLowerCase()}`:`Afficher les ${e.label.toLowerCase()}`,onClick:()=>e.onChange(!e.shown),children:[(0,O.jsx)(`span`,{className:`margin-filter-dot`,"aria-hidden":`true`}),e.label,(0,O.jsx)(`span`,{className:`margin-filter-count`,children:e.count})]},e.key))})}function Xx({numbered:e,onReveal:t}){return(0,O.jsx)(`nav`,{className:`margin-index`,"aria-label":`Index des constats du fichier`,children:e.map(e=>{let{finding:n}=e,r=n.status===`open`?``:` · ${Au[n.status].toLowerCase()}`;return(0,O.jsxs)(`button`,{type:`button`,className:`margin-index-item${n.status===`open`?``:` is-muted`}`,style:{color:Du[n.severity].color},title:`${n.title} · ${td(e.startLine,e.endLine)}${r}`,onClick:()=>t(e),children:[(0,O.jsx)(ah,{entry:e,small:!0}),(0,O.jsxs)(`span`,{className:`mono`,children:[`l.`,e.startLine]})]},n.id)})})}function Zx({analysis:e,file:t,numbered:n,explanations:r,filters:i,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shownLines:d,composer:f,setComposer:p,onToggleFix:m,scopeRef:h,scrollRef:g,onReveal:_,revealedId:y}){let b=(0,v.useRef)(null),x=(0,v.useRef)(null);Jx(x,h);let S=Gx(g,b),C=S.length===0?void 0:n.find(e=>e.finding.id===S[0]),w=d??new Set,T=Hx(e,t),ee=e=>(0,O.jsx)(Xm,{path:t.path,line:e,findingId:f?.findingId??null,onClose:()=>p(null)}),E=Ux({analysis:e,file:t,numbered:n,explanations:r,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shown:w,setComposer:p,onToggleFix:m,revealedId:y}),te=[],D=[];for(let e of E)e.anchor===null?D.push((0,O.jsx)(`div`,{children:e.content},e.key)):te.push({...e,anchor:e.anchor});let k=f?.line??null,ne=f!==null&&k!==null&&w.has(k);if(ne){let e=Gl(k,l);te.push({key:`composer`,anchor:Vl(e),line:Hl(e),rank:2e3,color:`#6d7cff`,content:ee(k)})}f!==null&&k!==null&&!ne&&D.push((0,O.jsx)(`div`,{children:ee(k)},`composer`)),te.sort((e,t)=>e.line-t.line||e.rank-t.rank);let re=n.length===0&&r.length===0&&u.length===0&&T.length===0&&f===null,ie=(i.findingsShown?0:i.findingCount)+(i.explanationsShown?0:i.explanationCount),ae=n.filter(e=>e.finding.status===`open`).length;return(0,O.jsxs)(`aside`,{className:`margin-column`,"aria-label":`Constats et explications de ce fichier`,ref:b,children:[(0,O.jsxs)(`div`,{className:`margin-head`,children:[(0,O.jsxs)(`h2`,{className:`margin-title`,children:[`Constats et explications`,` `,i.findingsShown&&(0,O.jsxs)(`span`,{className:`margin-count`,title:`Constats ouverts de ce fichier ; le total compte aussi les constats ignorés et obsolètes.`,children:[W(ae,`constat ouvert`,`constats ouverts`),n.length!==ae&&` · ${n.length} au total`]})]}),(0,O.jsx)(Yx,{filters:i}),re&&ie>0?(0,O.jsxs)(`p`,{className:`margin-subtitle`,children:[W(ie,`élément masqué`,`éléments masqués`),` sur ce fichier : affichez-les avec les boutons ci-dessus.`]}):re?(0,O.jsx)(`p`,{className:`margin-subtitle`,children:`Aucun constat, explication ni remarque sur ce fichier. Cliquez sur un numéro de ligne pour ajouter une remarque.`}):(0,O.jsx)(`p`,{className:`margin-subtitle is-aligned-hint`,children:`Chaque carte est alignée sur les lignes qu'elle concerne.`}),n.length>0&&(0,O.jsx)(Xx,{numbered:n,onReveal:_})]}),(T.length>0||f?.line===null)&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),T.map(e=>(0,O.jsx)(Gm,{note:e},e.id)),f?.line===null&&ee(null)]}),d!==null&&D.length>0&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),D]}),(0,O.jsx)(`div`,{className:`margin-track`,ref:x,children:d!==null&&te.map(e=>(0,O.jsxs)(`div`,{className:`margin-item`,"data-anchor":e.anchor,style:{"--link":e.color},children:[(0,O.jsx)(`span`,{className:`margin-link-a`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`margin-link-b`,"aria-hidden":`true`}),e.content]},e.key))}),C&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-more`,onClick:()=>_(C),children:[W(S.length,`constat`),` plus bas ↓`]})]})}var Qx={central:`target`,check:`eye`,skim:`chevrons-right`};function $x({file:e}){let t=H(e=>e.setFileLevel),n=e.classification,r=Fd(e);if(n===null||r===null)return null;let i=Object.fromEntries(Object.keys(Pu).map(e=>[e,{icon:Qx[e],label:Pu[e].label,description:e===n.level?`${Pu[e].description} · choix de l'agent`:Pu[e].description}]));return(0,O.jsxs)(`div`,{className:`classification-bar`,children:[(0,O.jsxs)(`span`,{className:`level-chip is-${r}`,children:[(0,O.jsx)(U,{name:Qx[r]}),Pu[r].label]}),(0,O.jsx)(`span`,{className:`classification-reason`,title:n.reason,children:n.reason}),n.reviewerLevel!==null&&(0,O.jsxs)(`span`,{className:`classification-override`,children:[`Reclassé par vous · l'agent proposait `,Pu[n.level].label]}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(ch,{label:`Niveau de ce fichier`,options:i,value:r,onChange:n=>{n!==r&&t(e.path,n)},trigger:{icon:`arrow-up-down`,label:`Reclasser`}})]})}function eS(e){return e===`unclassified`?`Non classés`:Pu[e].label}function tS({name:e}){let{head:t,tail:n}=Xu(e);return(0,O.jsxs)(`span`,{className:`middle-ellipsis`,children:[(0,O.jsx)(`span`,{className:`middle-ellipsis-head`,children:t}),(0,O.jsx)(`span`,{className:`middle-ellipsis-tail`,children:n})]})}function nS({analysis:e,file:t,current:n}){let r=t.reviewed?`circle-check`:n?`circle-dot`:`circle`,i=t.reviewed?`#3fb950`:n?`#8b97ff`:`#3a4050`,a=Jd(e,t.path);return(0,O.jsxs)(`div`,{className:`files-item${n?` is-current`:``}${t.reviewed?` is-reviewed`:``}`,children:[(0,O.jsxs)(`a`,{href:w.review(e.id,t.path),className:`files-item-link`,title:t.path,"aria-current":n?`page`:void 0,children:[(0,O.jsx)(U,{name:r,color:i}),(0,O.jsx)(`span`,{className:`files-item-name`,children:(0,O.jsx)(tS,{name:Vu(t.path).name})})]}),qd(e,t.path).map(({severity:n,count:r,firstLine:i})=>(0,O.jsx)(yd,{severity:n,count:r,href:w.review(e.id,t.path,i),title:`${Yu(n,r)} — ${r>1?`aller au premier`:`y aller`}`},n)),a&&(0,O.jsx)(bd,{count:a.count,href:w.review(e.id,t.path,a.firstLine??void 0),title:a.firstLine===null?`${W(a.count,`remarque`)} sur le fichier — y aller`:`${W(a.count,`remarque`)} — ${a.count>1?`aller à la première`:`y aller`}`}),(0,O.jsx)(`span`,{className:`files-item-status mono is-${t.status}`,title:Mu[t.status],children:Nu[t.status]})]})}function rS({analysis:e,files:t,currentPath:n}){return(0,O.jsx)(`nav`,{className:`files-list`,children:t.map((r,i)=>{let a=Vu(r.path).folder,o=i===0?a!==``:Vu(t[i-1].path).folder!==a;return(0,O.jsxs)(v.Fragment,{children:[o&&(0,O.jsx)(`span`,{className:`files-group mono`,title:a||`racine du dépôt`,children:a||`./`}),(0,O.jsx)(nS,{analysis:e,file:r,current:r.path===n})]},r.path)})})}function iS({analysis:e,tab:t,onChange:n,skimAlert:r}){let i=zd.filter(t=>t!==`unclassified`||Vd(e,t).length>0);return(0,O.jsx)(`div`,{className:`level-tabs`,role:`tablist`,"aria-label":`Niveaux de relecture`,children:i.map(i=>(0,O.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":i===t,className:`level-tab${i===t?` is-active`:``}`,title:i===`unclassified`?`Fichiers que l'agent n'a pas classés`:Pu[i].description,onClick:()=>n(i),children:[eS(i),(0,O.jsx)(`span`,{className:`level-tab-count`,children:Vd(e,i).length}),i===`skim`&&r&&(0,O.jsx)(`span`,{className:`level-tab-alert`,"aria-label":`un fichier en survol a un constat`})]},i))})}function aS({analysis:e,tab:t,onOpen:n}){let r=zd.slice(zd.indexOf(t)+1).find(t=>Vd(e,t).length>0);if(r===void 0)return null;let i=Vd(e,r).length;return(0,O.jsxs)(`button`,{type:`button`,className:`level-card level-next`,onClick:()=>n(r),children:[(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-card-label`,children:`Ensuite`}),(0,O.jsxs)(`span`,{className:`level-card-title`,children:[eS(r),` · `,W(i,`fichier`)]})]}),(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})]})}function oS({analysis:e,files:t}){return(0,O.jsxs)(`div`,{className:`level-card level-alert`,children:[(0,O.jsx)(U,{name:`circle-alert`,color:`#e3a33b`}),(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-alert-title`,children:t.length>1?`${t.length} fichiers en survol ont un constat`:`Un fichier en survol a un constat`}),t.map(t=>(0,O.jsx)(`a`,{className:`level-alert-link`,href:w.review(e.id,t.path),title:t.path,children:Vu(t.path).name},t.path))]})]})}function sS({analysis:e,currentPath:t}){let n=e.files.find(e=>e.path===t),r=n?Bd(n):null,[i,a]=(0,v.useState)(r??`central`);(0,v.useEffect)(()=>{r!==null&&a(r)},[t,r]);let o=Rd(e),s=Gd(e);return(0,O.jsxs)(`aside`,{className:`files-panel`,children:[(0,O.jsxs)(`div`,{className:`files-panel-head`,children:[(0,O.jsx)(`span`,{className:`files-panel-title`,children:`Fichiers`}),(0,O.jsx)(`span`,{className:`files-panel-count`,children:e.files.length})]}),o?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(iS,{analysis:e,tab:i,onChange:a,skimAlert:s.length>0}),(0,O.jsx)(rS,{analysis:e,files:Vd(e,i),currentPath:t}),(0,O.jsxs)(`div`,{className:`level-cards`,children:[(0,O.jsx)(aS,{analysis:e,tab:i,onOpen:t=>{a(t);let n=Wd(e,t);n!==null&&T(w.review(e.id,n))}}),i!==`skim`&&s.length>0&&(0,O.jsx)(oS,{analysis:e,files:s})]})]}):(0,O.jsx)(rS,{analysis:e,files:e.files,currentPath:t})]})}var cS={storageKey:`feature-analyzer.files-panel-width`,default:280,min:200,max:600},lS={storageKey:`feature-analyzer.findings-panel-width`,default:400,min:280,max:720};function uS(e,t){return Math.round(Math.min(Math.max(t,e.min),e.max))}function dS(e){try{let t=Number(window.localStorage.getItem(e.storageKey));return t>0?uS(e,t):e.default}catch{return e.default}}function fS(e,t){try{window.localStorage.setItem(e.storageKey,String(t))}catch{}}function pS(e){let[t,n]=(0,v.useState)(()=>dS(e)),r=(0,v.useRef)(t);return{width:t,setWidth:(0,v.useCallback)(t=>{let i=uS(e,typeof t==`function`?t(r.current):t);r.current=i,n(i),fS(e,i)},[e])}}function mS({setting:e,side:t,label:n,width:r,setWidth:i,containerRef:a,preview:o}){let[s,c]=(0,v.useState)(!1),l=n=>{let i=a.current?.getBoundingClientRect();return i?uS(e,t===`left`?n-i.left:i.right-n):r},u=t===`left`?`ArrowRight`:`ArrowLeft`,d=t===`left`?`ArrowLeft`:`ArrowRight`;return(0,O.jsx)(`div`,{className:`panel-resizer is-${t}${s?` is-dragging`:``}`,style:{[t]:r},role:`separator`,"aria-orientation":`vertical`,"aria-label":n,"aria-valuenow":r,"aria-valuemin":e.min,"aria-valuemax":e.max,tabIndex:0,title:`Glisser pour régler la largeur · double-clic pour la largeur par défaut`,onPointerDown:e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),c(!0)},onPointerMove:e=>{let n=a.current;if(!s||!n)return;let r=l(e.clientX);o(n,r),e.currentTarget.style[t]=`${r}px`},onPointerUp:e=>{s&&(c(!1),i(l(e.clientX)))},onDoubleClick:()=>i(e.default),onKeyDown:e=>{e.key===u&&i(e=>e+16),e.key===d&&i(e=>e-16)}})}var hS=14,gS=200,_S=22,vS=8,yS=`unplaced`;function bS(e){return e instanceof HTMLElement&&(e.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName))}function xS({items:e,fileNotes:t,scopeRef:n,scrollRef:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(null),o=(0,v.useRef)(void 0),[s,c]=(0,v.useState)(new Map),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)({root:0,track:0,trackTop:0}),[p,m]=(0,v.useState)(null),h=e.filter(e=>e.anchor!==null);(0,v.useLayoutEffect)(()=>{let e=r.current,t=n.current,o=i.current,s=a.current;if(!e||!t||!o||!s)return;let l=()=>{let t=e.scrollHeight,n=t>0?{top:e.scrollTop/t,height:e.clientHeight/t}:null;u(e=>e?.top===n?.top&&e?.height===n?.height?e:n)},d=()=>{let n=e.scrollHeight,r=e.getBoundingClientRect().top-e.scrollTop,i=new Map;for(let e of h){let a=t.querySelector(e.anchor);if(!a)throw Error(`Ancre introuvable dans le diff : ${e.anchor}`);n>0&&i.set(e.key,(a.getBoundingClientRect().top-r)/n)}c(e=>e.size===i.size&&[...i].every(([t,n])=>e.get(t)===n)?e:i);let a={root:o.offsetHeight,track:s.offsetHeight,trackTop:s.offsetTop};f(e=>e.root===a.root&&e.track===a.track&&e.trackTop===a.trackTop?e:a),l()};d(),e.addEventListener(`scroll`,l,{passive:!0});let p=new ResizeObserver(d);return p.observe(e),p.observe(t),p.observe(o),()=>{e.removeEventListener(`scroll`,l),p.disconnect()}}),(0,v.useEffect)(()=>{if(!p?.pinned)return;let e=()=>m(null),t=t=>{i.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&!bS(t.target)&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n)}},[p?.pinned]),(0,v.useEffect)(()=>()=>clearTimeout(o.current),[]);let g=[],_=h.filter(e=>s.has(e.key)).map(e=>({item:e,top:s.get(e.key)*d.track})).sort((e,t)=>e.top-t.top||e.item.line-t.item.line||e.item.rank-t.item.rank);for(let{item:e,top:t}of _){let n=g[g.length-1];n&&t-n.top<hS?n.items.push(e):g.push({key:e.key,top:t,items:[e]})}let y=e.filter(e=>e.anchor===null),b=y.length+t.length,x=e=>{clearTimeout(o.current),m(t=>t?.key===e?t:{key:e,pinned:!1})},S=()=>{clearTimeout(o.current),o.current=setTimeout(()=>m(e=>e?.pinned?e:null),gS)},C=e=>{clearTimeout(o.current),m({key:e,pinned:!0})},w=e=>{let t=e.items[0].anchor;t&&n.current?.querySelector(t)?.scrollIntoView({block:`center`}),C(e.key)},T=e=>{let t=r.current,n=a.current;if(e.button!==0||e.target!==e.currentTarget||!t||!n)return;let i=n.getBoundingClientRect();t.scrollTop=Math.min(Math.max((e.clientY-i.top)/i.height,0),1)*t.scrollHeight-t.clientHeight/2},ee=null;p?.key===yS&&b>0&&(ee={y:20,content:(0,O.jsxs)(O.Fragment,{children:[t.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),t.map(e=>(0,O.jsx)(Gm,{note:e},e.id))]}),y.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),y.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))]})]})});let E=p===null?void 0:g.find(e=>e.key===p.key);return E&&(ee={y:d.trackTop+E.top,content:E.items.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))}),(0,O.jsxs)(`aside`,{className:`zen-rail`,ref:i,"aria-label":`Repères des constats, explications et remarques`,children:[(0,O.jsx)(`div`,{className:`zen-rail-slot`,children:b>0&&(0,O.jsxs)(`button`,{type:`button`,className:`zen-rail-group${p?.key===yS?` is-open`:``}`,title:`Remarques sur le fichier et cartes hors des lignes affichées`,"aria-label":W(b,`élément hors du diff`,`éléments hors du diff`),onPointerEnter:()=>x(yS),onPointerLeave:S,onFocus:()=>x(yS),onBlur:S,onClick:()=>C(yS),children:[(0,O.jsx)(U,{name:`list`,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`zen-rail-group-count`,children:b})]})}),(0,O.jsxs)(`div`,{className:`zen-rail-track`,ref:a,onPointerDown:T,children:[l&&(0,O.jsx)(`div`,{className:`zen-rail-view`,style:{top:`${l.top*100}%`,height:`${l.height*100}%`}}),g.map(e=>{let t=e.items.find(e=>e.kind===`finding`)??e.items[0];return(0,O.jsx)(`button`,{type:`button`,className:`zen-marker is-${t.kind}${p?.key===e.key?` is-open`:``}`,style:{top:e.top,"--marker":t.color},"aria-label":e.items.map(e=>e.label).join(` ; `),onPointerEnter:()=>x(e.key),onPointerLeave:S,onFocus:()=>x(e.key),onBlur:S,onClick:()=>w(e),children:e.items.length>1&&(0,O.jsx)(`span`,{className:`zen-marker-count`,children:e.items.length})},e.key)})]}),ee&&p&&(0,O.jsx)(`div`,{className:`zen-popover`,style:(e=>e>d.root/2?{bottom:Math.max(d.root-e-_S,vS),maxHeight:e+_S-vS}:{top:Math.max(e-_S,vS),maxHeight:d.root-Math.max(e-_S,vS)-vS})(ee.y),onPointerEnter:()=>x(p.key),onPointerLeave:S,onPointerDown:()=>C(p.key),children:ee.content})]})}function SS({analysis:e}){let t=H(e=>e.gapsCollapsed),n=H(e=>e.setGapsCollapsed),r=Yd(e);if(r.length===0)return null;let i=r.filter(e=>e.status===`open`).length;return(0,O.jsxs)(`section`,{className:`gap-banner${t?` is-collapsed`:``}`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`gap-banner-toggle block-title`,"aria-expanded":!t,onClick:()=>n(!t),children:[(0,O.jsx)(U,{name:t?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`triangle-alert`,color:`#e3a33b`}),W(r.length,`exigence manquante`,`exigences manquantes`),i!==r.length&&(0,O.jsxs)(`span`,{className:`gap-banner-count`,children:[`· `,W(i,`ouverte`)]})]}),!t&&r.map(t=>(0,O.jsx)(Wm,{analysis:e,finding:t},t.id))]})}function CS({file:e}){return e.binary?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier binaire (`,Mu[e.status].toLowerCase(),`) : son contenu n'est pas affiché.`]}):e.status===`renamed`?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier renommé depuis `,e.oldPath,` sans changement de contenu.`]}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Aucune ligne modifiée dans ce fichier (changement de mode ou fichier vide).`})}function wS({file:e}){let{folder:t,name:n}=Vu(e.path);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`file-head-path mono`,title:e.oldPath?`${e.oldPath} → ${e.path}`:e.path,children:[(0,O.jsx)(`span`,{className:`path-folder`,children:t}),(0,O.jsx)(`span`,{className:`file-head-name`,children:n})]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,e.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,e.deletions]}),e.status!==`modified`&&(0,O.jsx)(`span`,{className:`tag tag-file-${e.status}`,children:Mu[e.status]})]})}function TS({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.setFileReviewed),i=H(e=>e.saving),a=Ld(e.files),o=a.findIndex(e=>e.path===t.path),s=a[o-1],c=a[o+1];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,onClick:n,children:[(0,O.jsx)(U,{name:`message-square`,size:13}),`Remarque sur le fichier`]}),(0,O.jsxs)(`div`,{className:`icon-button-group`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!s,title:s?`Fichier précédent : ${s.path}`:`Premier fichier`,onClick:()=>s&&T(w.review(e.id,s.path)),children:(0,O.jsx)(U,{name:`arrow-left`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!c,title:c?`Fichier suivant : ${c.path}`:`Dernier fichier`,onClick:()=>c&&T(w.review(e.id,c.path)),children:(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary reviewed-toggle${t.reviewed?` is-on`:``}`,"aria-pressed":t.reviewed,disabled:i,onClick:()=>void r(t.path,!t.reviewed),children:[(0,O.jsx)(U,{name:`square-check`,color:t.reviewed?`#3fb950`:`#9aa1b1`}),t.reviewed?`Revu`:`Marquer comme revu`]})]})}function ES({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.filesPanelCollapsed),i=H(e=>e.setFilesPanelCollapsed),a=H(e=>e.setZenMode);return(0,O.jsxs)(`div`,{className:`file-head`,children:[(0,O.jsxs)(`div`,{className:`icon-button-group file-head-toggles`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-pressed":!r,title:r?`Afficher la liste des fichiers`:`Masquer la liste des fichiers`,onClick:()=>i(!r),children:(0,O.jsx)(U,{name:r?`panel-left-open`:`panel-left-close`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Mode zen : le code sur toute la page`,onClick:()=>a(!0),children:(0,O.jsx)(U,{name:`maximize`,color:`#9aa1b1`})})]}),(0,O.jsx)(wS,{file:t}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(TS,{analysis:e,file:t,onFileNote:n})]})}function DS({analysis:e,file:t,menus:n}){let r=H(e=>e.setZenMode);return(0,O.jsxs)(`header`,{className:`file-head zen-bar`,children:[(0,O.jsx)(`a`,{className:`brand-mark`,href:w.home(),title:`Feature Analyzer — accueil`,children:(0,O.jsx)(U,{name:`scan-search`,color:`#8b97ff`})}),(0,O.jsx)(`span`,{className:`zen-bar-separator`,"aria-hidden":`true`}),(0,O.jsx)(wS,{file:t}),(0,O.jsx)(`div`,{className:`zen-bar-menus`,children:n}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(Eu,{analysis:e}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button is-on`,"aria-pressed":!0,title:`Quitter le mode zen`,onClick:()=>r(!1),children:(0,O.jsx)(U,{name:`minimize`,color:`#8b97ff`})}),(0,O.jsx)(k,{analysis:e})]})}function OS({analysis:e,path:t,line:n}){let r=H(e=>e.diff),i=H(e=>e.diffError),a=H(e=>e.fixMode),o=H(e=>e.setFixMode),s=H(e=>e.codeView),c=H(e=>e.setCodeView),l=H(e=>e.diffScope),u=H(e=>e.setDiffScope),d=H(e=>e.copy),f=H(e=>e.findingsShown),p=H(e=>e.setFindingsShown),m=H(e=>e.explanationsShown),h=H(e=>e.setExplanationsShown),g=H(e=>e.filesPanelCollapsed),_=H(e=>e.zenMode),y=pS(cS),b=pS(lS),x=(0,v.useRef)(null),S=(0,v.useRef)(null),[C,ee]=(0,v.useState)(null),E=C&&C.path===t?{line:C.line,findingId:C.findingId}:null,te=e=>ee(e&&t!==null?{path:t,...e}:null),[D,k]=(0,v.useState)({}),[ne,re]=(0,v.useState)({}),[ie,ae]=(0,v.useState)(null),oe=(0,v.useRef)(null),se=(0,v.useRef)(null),ce=Ud(e);(0,v.useEffect)(()=>{t===null&&ce!==null&&T(w.review(e.id,ce),{replace:!0})},[t,ce,e.id]);let le=e.files.find(e=>e.path===t)??null,A=r?.id===e.id?r.snapshot.files.find(e=>e.path===t):void 0,ue=A!==void 0&&A.newContent!==null,de=ue?l:`changes`,fe=(0,v.useMemo)(()=>de===`file`&&A?Hm(A)??void 0:A,[de,A]),pe=t===null?void 0:ne[t],me=(0,v.useMemo)(()=>de===`changes`&&A?Pm(A,pe??[]):null,[de,A,pe]),he=me?.fileDiff??fe,ge=(e,n)=>{if(t===null||!me)return;let r=Fm(me,e,n);re(e=>({...e,[t]:r}))},_e=i!==null&&r?.id!==e.id,ve=t===null?[]:Nl(e,t),ye=f?ve:[],j=Bl(ye,he??{path:t??``,hunks:[],newContent:null},e=>D[e.id]??(e.suggestion!==null&&e.status===`open`),a),M=Wl(ye,j,a),be=n===null?null:Gl(n,M),xe=be===null?null:Vl(be),Se=ie!==null&&ie.path===t&&ie.line===n?ie.findingId:null,Ce=ie?.seq??0;if((0,v.useEffect)(()=>{let e=oe.current;fe&&e&&(xe===null?e.scrollTo({top:0}):(e.querySelector(xe)?.scrollIntoView({block:`center`}),Se!==null&&e.querySelector(`[data-finding-card="${CSS.escape(Se)}"]`)?.scrollIntoView({block:`nearest`})))},[fe,xe,t,Se,Ce]),t===null)return(0,O.jsx)(`div`,{className:`page`,children:(0,O.jsx)(`p`,{className:`empty-text`,children:`L'analyse ne contient aucun fichier modifié : il n'y a rien à revoir.`})});let we=Xl(e,t),N=m?we:[],Te=he?$l(he,ye,j,a,N,s):[],Ee=he?Pl(he):_e?new Set:null,De=su(e,t),Oe=new Set(De.map(e=>e.location.line)),ke=(e,t)=>k(n=>({...n,[e]:t})),Ae=n=>{ae(e=>({path:t,findingId:n.finding.id,line:n.startLine,seq:(e?.seq??0)+1})),T(w.review(e.id,t,n.startLine))},je=(t,n)=>(0,O.jsxs)(`div`,{className:`review-center`,ref:se,children:[f&&(0,O.jsx)(SS,{analysis:e}),!t.contentAvailable&&!t.binary&&t.status!==`deleted`&&(0,O.jsx)(`p`,{className:`diff-notice`,children:`Fichier trop volumineux pour être conservé en entier : les remarques ne peuvent viser que le fichier entier.`}),_e?(0,O.jsx)(`p`,{className:`diff-message is-error`,children:i}):he?A?.hunks.length===0?(0,O.jsx)(CS,{file:t}):(0,O.jsx)(Rx,{file:t,fileDiff:he,hunks:Te,hunkContexts:me?.hunks??null,addedContext:me?.added??null,onContextChange:ge,findings:ye,notedLines:Oe,scrollRef:oe,mode:a,onModeChange:o,codeView:s,onCodeViewChange:c,scope:de,onScopeChange:u,wholeFileAvailable:ue,explained:N.length>0,target:be,onLineNote:e=>te({line:e,findingId:null}),onHideFix:e=>ke(e,!1),onRequestExplanation:n=>void d(Bm(e,t,n),`Demande d'explication copiée : collez-la dans la conversation de l'agent.`),zen:n}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Chargement du diff…`})]}),Me=()=>te({line:null,findingId:null});if(le!==null&&Xd(_,e,t)){let t=Ee===null?[]:Ux({analysis:e,file:le,numbered:ye,explanations:N,fileDiff:he??null,fixes:j,mode:a,codeView:s,removed:M,lineNotes:De,shown:Ee,setComposer:te,onToggleFix:ke,revealedId:Se});return(0,O.jsxs)(`div`,{className:`zen`,children:[(0,O.jsx)(DS,{analysis:e,file:le,menus:(0,O.jsx)(bx,{scope:de,onScopeChange:u,wholeFileAvailable:ue,codeView:s,onCodeViewChange:c,mode:a,onModeChange:o})}),(0,O.jsxs)(`div`,{className:`zen-main`,children:[(0,O.jsx)(`div`,{className:`review-body`,ref:oe,children:je(le,!0)}),(0,O.jsx)(xS,{items:t,fileNotes:Hx(e,le),scopeRef:se,scrollRef:oe}),(0,O.jsxs)(`div`,{className:`zen-dock`,children:[E!==null&&(0,O.jsx)(`div`,{className:`zen-composer`,children:(0,O.jsx)(Xm,{path:le.path,line:E.line,findingId:E.findingId,onClose:()=>te(null)},`${E.line??`file`}-${E.findingId??``}`)}),(0,O.jsx)(`div`,{className:`zen-actions`,children:(0,O.jsx)(TS,{analysis:e,file:le,onFileNote:Me})})]})]})]})}let Ne=g&&le!==null;return(0,O.jsxs)(`div`,{className:`review${Ne?` is-files-hidden`:``}`,ref:x,style:Ne?void 0:{gridTemplateColumns:`${y.width}px minmax(0, 1fr)`},children:[!Ne&&(0,O.jsx)(sS,{analysis:e,currentPath:t}),!Ne&&(0,O.jsx)(mS,{setting:cS,side:`left`,label:`Largeur de la liste des fichiers`,width:y.width,setWidth:y.setWidth,containerRef:x,preview:(e,t)=>e.style.gridTemplateColumns=`${t}px minmax(0, 1fr)`}),(0,O.jsx)(`section`,{className:`review-main`,children:le===null?(0,O.jsx)(`div`,{className:`review-body review-body-padded`,children:(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Le fichier « `,t,` » ne fait pas partie de cette analyse. Choisissez un fichier dans la liste.`]})}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ES,{analysis:e,file:le,onFileNote:Me}),(0,O.jsx)($x,{file:le}),(0,O.jsx)(`div`,{className:`review-body`,ref:oe,children:(0,O.jsxs)(`div`,{className:`review-columns`,ref:S,style:{"--findings-panel-width":`${b.width}px`},children:[je(le,!1),(0,O.jsx)(mS,{setting:lS,side:`right`,label:`Largeur de la colonne des constats`,width:b.width,setWidth:b.setWidth,containerRef:S,preview:(e,t)=>e.style.setProperty(`--findings-panel-width`,`${t}px`)}),(0,O.jsx)(Zx,{analysis:e,file:le,numbered:ye,explanations:N,filters:{findingCount:ve.length,explanationCount:we.length,findingsShown:f,explanationsShown:m,onFindingsShownChange:p,onExplanationsShownChange:h},fileDiff:he??null,fixes:j,mode:a,codeView:s,removed:M,lineNotes:De,shownLines:Ee,composer:E,setComposer:te,onToggleFix:ke,scopeRef:se,scrollRef:oe,onReveal:Ae,revealedId:Se})]})})]})})]})}function kS(e){return e.name===`feature`||e.name===`review`||e.name===`finish`?e.id:null}function AS({children:e}){return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:e})})}function jS(){kd();let e=te(),t=H(e=>e.current),n=H(e=>e.openAnalysis),r=H(e=>e.zenMode),i=kS(e);(0,v.useEffect)(()=>{i&&n(i)},[i,n]);let a=t&&t.id===i?t.analysis:null,o=t&&t.id===i?t.error:null,s=t&&t.id===i?t.links:null,c=e.name===`review`&&a!==null&&Xd(r,a,e.path),l=e.name===`review`&&a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Eu,{analysis:a}),(0,O.jsx)(k,{analysis:a})]}):null,u;return u=e.name===`home`?(0,O.jsx)(Am,{}):e.name===`not_found`?(0,O.jsx)(AS,{children:(0,O.jsxs)(`p`,{children:[`Adresse inconnue : `,(0,O.jsx)(`code`,{children:e.hash}),`. `,(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`}),`.`]})}):o?(0,O.jsxs)(AS,{children:[(0,O.jsxs)(`p`,{className:`error-text`,children:[`Analyse illisible : `,o]}),(0,O.jsx)(`p`,{children:(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`})})]}):a?e.name===`feature`?(0,O.jsx)(vm,{analysis:a,links:s,tab:e.tab}):e.name===`review`?(0,O.jsx)(OS,{analysis:a,path:e.path,line:e.line}):(0,O.jsx)(Sm,{analysis:a},a.id):(0,O.jsx)(AS,{children:(0,O.jsx)(`p`,{children:`Chargement de l'analyse…`})}),(0,O.jsxs)(`div`,{className:`app`,children:[!c&&(0,O.jsx)(Td,{currentId:i,action:l}),(0,O.jsx)(`main`,{className:`main${e.name===`review`?` main-fixed`:``}`,children:u}),(0,O.jsx)(Tu,{})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(v.StrictMode,{children:(0,O.jsx)(jS,{})}));export{s as t};
87
+ `)?e:o)},i.current()}),(0,v.useEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=()=>i.current();n.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(n),o.observe(r),()=>{n.removeEventListener(`scroll`,a),o.disconnect()}},[e,t]),n}var eS=12;function tS(e){let t=[],n=-12;for(let r of e){let e=Math.max(r.anchorTop,n+eS,0);t.push(e),n=e+r.height}return t}function nS(e,t){(0,v.useLayoutEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let i=[...n.querySelectorAll(`:scope > [data-anchor]`)],a=()=>{let e=n.getBoundingClientRect().top,t=i.map(t=>{let n=r.querySelector(t.dataset.anchor);if(!n)throw Error(`Ancre introuvable dans le diff : ${t.dataset.anchor}`);return{anchorTop:n.getBoundingClientRect().top-e,height:t.offsetHeight}}),a=tS(t);i.forEach((e,n)=>{e.style.top=`${a[n]}px`,e.style.setProperty(`--shift`,`${a[n]-t[n].anchorTop}px`)});let o=i.length-1;n.style.minHeight=o<0?``:`${a[o]+t[o].height}px`};a();let o=new ResizeObserver(a);o.observe(r);for(let e of i)o.observe(e);return()=>o.disconnect()})}function rS({filters:e}){let t=[{key:`findings`,label:`Constats`,count:e.findingCount,shown:e.findingsShown,color:`#e3a33b`,onChange:e.onFindingsShownChange},{key:`explanations`,label:`Explications`,count:e.explanationCount,shown:e.explanationsShown,color:`#3cc4b4`,onChange:e.onExplanationsShownChange}];return(0,O.jsx)(`div`,{className:`margin-filters`,role:`group`,"aria-label":`Éléments affichés`,children:t.map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`margin-filter${e.shown?` is-on`:``}`,style:{"--filter":e.color},"aria-pressed":e.shown,title:e.shown?`Masquer les ${e.label.toLowerCase()}`:`Afficher les ${e.label.toLowerCase()}`,onClick:()=>e.onChange(!e.shown),children:[(0,O.jsx)(`span`,{className:`margin-filter-dot`,"aria-hidden":`true`}),e.label,(0,O.jsx)(`span`,{className:`margin-filter-count`,children:e.count})]},e.key))})}function iS({numbered:e,onReveal:t}){return(0,O.jsx)(`nav`,{className:`margin-index`,"aria-label":`Index des constats du fichier`,children:e.map(e=>{let{finding:n}=e,r=n.status===`open`?``:` · ${Mu[n.status].toLowerCase()}`;return(0,O.jsxs)(`button`,{type:`button`,className:`margin-index-item${n.status===`open`?``:` is-muted`}`,style:{color:ku[n.severity].color},title:`${n.title} · ${K(e.startLine,e.endLine)}${r}`,onClick:()=>t(e),children:[(0,O.jsx)(ph,{entry:e,small:!0}),(0,O.jsxs)(`span`,{className:`mono`,children:[`l.`,e.startLine]})]},n.id)})})}function aS({analysis:e,file:t,numbered:n,explanations:r,filters:i,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shownLines:d,composer:f,setComposer:p,onToggleFix:m,scopeRef:h,scrollRef:g,onReveal:_,revealedId:y}){let b=(0,v.useRef)(null),x=(0,v.useRef)(null);nS(x,h);let S=$x(g,b),C=S.length===0?void 0:n.find(e=>e.finding.id===S[0]),w=d??new Set,T=Xx(e,t),ee=e=>(0,O.jsx)(ih,{path:t.path,line:e,findingId:f?.findingId??null,onClose:()=>p(null)}),E=Zx({analysis:e,file:t,numbered:n,explanations:r,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shown:w,setComposer:p,onToggleFix:m,revealedId:y}),te=[],D=[];for(let e of E)e.anchor===null?D.push((0,O.jsx)(`div`,{children:e.content},e.key)):te.push({...e,anchor:e.anchor});let k=f?.line??null,ne=f!==null&&k!==null&&w.has(k);if(ne){let e=ql(k,l);te.push({key:`composer`,anchor:Ul(e),line:Wl(e),rank:2e3,color:`#6d7cff`,content:ee(k)})}f!==null&&k!==null&&!ne&&D.push((0,O.jsx)(`div`,{children:ee(k)},`composer`)),te.sort((e,t)=>e.line-t.line||e.rank-t.rank);let re=n.length===0&&r.length===0&&u.length===0&&T.length===0&&f===null,ie=(i.findingsShown?0:i.findingCount)+(i.explanationsShown?0:i.explanationCount),ae=n.filter(e=>e.finding.status===`open`).length;return(0,O.jsxs)(`aside`,{className:`margin-column`,"aria-label":`Constats et explications de ce fichier`,ref:b,children:[(0,O.jsxs)(`div`,{className:`margin-head`,children:[(0,O.jsxs)(`h2`,{className:`margin-title`,children:[`Constats et explications`,` `,i.findingsShown&&(0,O.jsxs)(`span`,{className:`margin-count`,title:`Constats ouverts de ce fichier ; le total compte aussi les constats ignorés et obsolètes.`,children:[Yu(ae,`constat ouvert`,`constats ouverts`),n.length!==ae&&` · ${n.length} au total`]})]}),(0,O.jsx)(rS,{filters:i}),re&&ie>0?(0,O.jsxs)(`p`,{className:`margin-subtitle`,children:[Yu(ie,`élément masqué`,`éléments masqués`),` sur ce fichier : affichez-les avec les boutons ci-dessus.`]}):re?(0,O.jsx)(`p`,{className:`margin-subtitle`,children:`Aucun constat, explication ni remarque sur ce fichier. Cliquez sur un numéro de ligne pour ajouter une remarque.`}):(0,O.jsx)(`p`,{className:`margin-subtitle is-aligned-hint`,children:`Chaque carte est alignée sur les lignes qu'elle concerne.`}),n.length>0&&(0,O.jsx)(iS,{numbered:n,onReveal:_})]}),(T.length>0||f?.line===null)&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),T.map(e=>(0,O.jsx)(Zm,{note:e},e.id)),f?.line===null&&ee(null)]}),d!==null&&D.length>0&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),D]}),(0,O.jsx)(`div`,{className:`margin-track`,ref:x,children:d!==null&&te.map(e=>(0,O.jsxs)(`div`,{className:`margin-item`,"data-anchor":e.anchor,style:{"--link":e.color},children:[(0,O.jsx)(`span`,{className:`margin-link-a`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`margin-link-b`,"aria-hidden":`true`}),e.content]},e.key))}),C&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-more`,onClick:()=>_(C),children:[Yu(S.length,`constat`),` plus bas ↓`]})]})}var oS={central:`target`,check:`eye`,skim:`chevrons-right`};function sS({file:e}){let t=H(e=>e.setFileLevel),n=e.classification,r=Vd(e);if(n===null||r===null)return null;let i=Object.fromEntries(Object.keys(Iu).map(e=>[e,{icon:oS[e],label:Iu[e].label,description:e===n.level?`${Iu[e].description} · choix de l'agent`:Iu[e].description}]));return(0,O.jsxs)(`div`,{className:`classification-bar`,children:[(0,O.jsxs)(`span`,{className:`level-chip is-${r}`,children:[(0,O.jsx)(U,{name:oS[r]}),Iu[r].label]}),(0,O.jsx)(`span`,{className:`classification-reason`,title:n.reason,children:n.reason}),n.reviewerLevel!==null&&(0,O.jsxs)(`span`,{className:`classification-override`,children:[`Reclassé par vous · l'agent proposait `,Iu[n.level].label]}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(gh,{label:`Niveau de ce fichier`,options:i,value:r,onChange:n=>{n!==r&&t(e.path,n)},trigger:{icon:`arrow-up-down`,label:`Reclasser`}})]})}function cS(e){return e===`unclassified`?`Non classés`:Iu[e].label}function lS({name:e}){let{head:t,tail:n}=$u(e);return(0,O.jsxs)(`span`,{className:`middle-ellipsis`,children:[(0,O.jsx)(`span`,{className:`middle-ellipsis-head`,children:t}),(0,O.jsx)(`span`,{className:`middle-ellipsis-tail`,children:n})]})}function uS({analysis:e,file:t,current:n}){let r=t.reviewed?`circle-check`:n?`circle-dot`:`circle`,i=t.reviewed?`#3fb950`:n?`#8b97ff`:`#3a4050`,a=ef(e,t.path);return(0,O.jsxs)(`div`,{className:`files-item${n?` is-current`:``}${t.reviewed?` is-reviewed`:``}`,children:[(0,O.jsxs)(`a`,{href:w.review(e.id,t.path),className:`files-item-link`,title:t.path,"aria-current":n?`page`:void 0,children:[(0,O.jsx)(U,{name:r,color:i}),(0,O.jsx)(`span`,{className:`files-item-name`,children:(0,O.jsx)(lS,{name:Uu(t.path).name})})]}),$d(e,t.path).map(({severity:n,count:r,firstLine:i})=>(0,O.jsx)(Td,{severity:n,count:r,href:w.review(e.id,t.path,i),title:`${Qu(n,r)} — ${r>1?`aller au premier`:`y aller`}`},n)),a&&(0,O.jsx)(Ed,{count:a.count,href:w.review(e.id,t.path,a.firstLine??void 0),title:a.firstLine===null?`${Yu(a.count,`remarque`)} sur le fichier — y aller`:`${Yu(a.count,`remarque`)} — ${a.count>1?`aller à la première`:`y aller`}`}),(0,O.jsx)(`span`,{className:`files-item-status mono is-${t.status}`,title:Pu[t.status],children:Fu[t.status]})]})}function dS({analysis:e,files:t,currentPath:n}){return(0,O.jsx)(`nav`,{className:`files-list`,children:t.map((r,i)=>{let a=Uu(r.path).folder,o=i===0?a!==``:Uu(t[i-1].path).folder!==a;return(0,O.jsxs)(v.Fragment,{children:[o&&(0,O.jsx)(`span`,{className:`files-group mono`,title:a||`racine du dépôt`,children:a||`./`}),(0,O.jsx)(uS,{analysis:e,file:r,current:r.path===n})]},r.path)})})}function fS({analysis:e,tab:t,onChange:n,skimAlert:r}){let i=Gd.filter(t=>t!==`unclassified`||qd(e,t).length>0);return(0,O.jsx)(`div`,{className:`level-tabs`,role:`tablist`,"aria-label":`Niveaux de relecture`,children:i.map(i=>(0,O.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":i===t,className:`level-tab${i===t?` is-active`:``}`,title:i===`unclassified`?`Fichiers que l'agent n'a pas classés`:Iu[i].description,onClick:()=>n(i),children:[cS(i),(0,O.jsx)(`span`,{className:`level-tab-count`,children:qd(e,i).length}),i===`skim`&&r&&(0,O.jsx)(`span`,{className:`level-tab-alert`,"aria-label":`un fichier en survol a un constat`})]},i))})}function pS({analysis:e,tab:t,onOpen:n}){let r=Gd.slice(Gd.indexOf(t)+1).find(t=>qd(e,t).length>0);if(r===void 0)return null;let i=qd(e,r).length;return(0,O.jsxs)(`button`,{type:`button`,className:`level-card level-next`,onClick:()=>n(r),children:[(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-card-label`,children:`Ensuite`}),(0,O.jsxs)(`span`,{className:`level-card-title`,children:[cS(r),` · `,Yu(i,`fichier`)]})]}),(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})]})}function mS({analysis:e,files:t}){return(0,O.jsxs)(`div`,{className:`level-card level-alert`,children:[(0,O.jsx)(U,{name:`circle-alert`,color:`#e3a33b`}),(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-alert-title`,children:t.length>1?`${t.length} fichiers en survol ont un constat`:`Un fichier en survol a un constat`}),t.map(t=>(0,O.jsx)(`a`,{className:`level-alert-link`,href:w.review(e.id,t.path),title:t.path,children:Uu(t.path).name},t.path))]})]})}function hS({analysis:e,currentPath:t}){let n=e.files.find(e=>e.path===t),r=n?Kd(n):null,[i,a]=(0,v.useState)(r??`central`);(0,v.useEffect)(()=>{r!==null&&a(r)},[t,r]);let o=Wd(e),s=Zd(e);return(0,O.jsxs)(`aside`,{className:`files-panel`,children:[(0,O.jsxs)(`div`,{className:`files-panel-head`,children:[(0,O.jsx)(`span`,{className:`files-panel-title`,children:`Fichiers`}),(0,O.jsx)(`span`,{className:`files-panel-count`,children:e.files.length})]}),o?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(fS,{analysis:e,tab:i,onChange:a,skimAlert:s.length>0}),(0,O.jsx)(dS,{analysis:e,files:qd(e,i),currentPath:t}),(0,O.jsxs)(`div`,{className:`level-cards`,children:[(0,O.jsx)(pS,{analysis:e,tab:i,onOpen:t=>{a(t);let n=Xd(e,t);n!==null&&T(w.review(e.id,n))}}),i!==`skim`&&s.length>0&&(0,O.jsx)(mS,{analysis:e,files:s})]})]}):(0,O.jsx)(dS,{analysis:e,files:e.files,currentPath:t})]})}var gS={storageKey:`feature-analyzer.files-panel-width`,default:280,min:200,max:600},_S={storageKey:`feature-analyzer.findings-panel-width`,default:400,min:280,max:720};function vS(e,t){return Math.round(Math.min(Math.max(t,e.min),e.max))}function yS(e){try{let t=Number(window.localStorage.getItem(e.storageKey));return t>0?vS(e,t):e.default}catch{return e.default}}function bS(e,t){try{window.localStorage.setItem(e.storageKey,String(t))}catch{}}function xS(e){let[t,n]=(0,v.useState)(()=>yS(e)),r=(0,v.useRef)(t);return{width:t,setWidth:(0,v.useCallback)(t=>{let i=vS(e,typeof t==`function`?t(r.current):t);r.current=i,n(i),bS(e,i)},[e])}}function SS({setting:e,side:t,label:n,width:r,setWidth:i,containerRef:a,preview:o}){let[s,c]=(0,v.useState)(!1),l=n=>{let i=a.current?.getBoundingClientRect();return i?vS(e,t===`left`?n-i.left:i.right-n):r},u=t===`left`?`ArrowRight`:`ArrowLeft`,d=t===`left`?`ArrowLeft`:`ArrowRight`;return(0,O.jsx)(`div`,{className:`panel-resizer is-${t}${s?` is-dragging`:``}`,style:{[t]:r},role:`separator`,"aria-orientation":`vertical`,"aria-label":n,"aria-valuenow":r,"aria-valuemin":e.min,"aria-valuemax":e.max,tabIndex:0,title:`Glisser pour régler la largeur · double-clic pour la largeur par défaut`,onPointerDown:e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),c(!0)},onPointerMove:e=>{let n=a.current;if(!s||!n)return;let r=l(e.clientX);o(n,r),e.currentTarget.style[t]=`${r}px`},onPointerUp:e=>{s&&(c(!1),i(l(e.clientX)))},onDoubleClick:()=>i(e.default),onKeyDown:e=>{e.key===u&&i(e=>e+16),e.key===d&&i(e=>e-16)}})}var CS=14,wS=200,TS=22,ES=8,DS=`unplaced`;function OS(e){return e instanceof HTMLElement&&(e.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName))}function kS({items:e,fileNotes:t,scopeRef:n,scrollRef:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(null),o=(0,v.useRef)(void 0),[s,c]=(0,v.useState)(new Map),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)({root:0,track:0,trackTop:0}),[p,m]=(0,v.useState)(null),h=e.filter(e=>e.anchor!==null);(0,v.useLayoutEffect)(()=>{let e=r.current,t=n.current,o=i.current,s=a.current;if(!e||!t||!o||!s)return;let l=()=>{let t=e.scrollHeight,n=t>0?{top:e.scrollTop/t,height:e.clientHeight/t}:null;u(e=>e?.top===n?.top&&e?.height===n?.height?e:n)},d=()=>{let n=e.scrollHeight,r=e.getBoundingClientRect().top-e.scrollTop,i=new Map;for(let e of h){let a=t.querySelector(e.anchor);if(!a)throw Error(`Ancre introuvable dans le diff : ${e.anchor}`);n>0&&i.set(e.key,(a.getBoundingClientRect().top-r)/n)}c(e=>e.size===i.size&&[...i].every(([t,n])=>e.get(t)===n)?e:i);let a={root:o.offsetHeight,track:s.offsetHeight,trackTop:s.offsetTop};f(e=>e.root===a.root&&e.track===a.track&&e.trackTop===a.trackTop?e:a),l()};d(),e.addEventListener(`scroll`,l,{passive:!0});let p=new ResizeObserver(d);return p.observe(e),p.observe(t),p.observe(o),()=>{e.removeEventListener(`scroll`,l),p.disconnect()}}),(0,v.useEffect)(()=>{if(!p?.pinned)return;let e=()=>m(null),t=t=>{i.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&!OS(t.target)&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n)}},[p?.pinned]),(0,v.useEffect)(()=>()=>clearTimeout(o.current),[]);let g=[],_=h.filter(e=>s.has(e.key)).map(e=>({item:e,top:s.get(e.key)*d.track})).sort((e,t)=>e.top-t.top||e.item.line-t.item.line||e.item.rank-t.item.rank);for(let{item:e,top:t}of _){let n=g[g.length-1];n&&t-n.top<CS?n.items.push(e):g.push({key:e.key,top:t,items:[e]})}let y=e.filter(e=>e.anchor===null),b=y.length+t.length,x=e=>{clearTimeout(o.current),m(t=>t?.key===e?t:{key:e,pinned:!1})},S=()=>{clearTimeout(o.current),o.current=setTimeout(()=>m(e=>e?.pinned?e:null),wS)},C=e=>{clearTimeout(o.current),m({key:e,pinned:!0})},w=e=>{let t=e.items[0].anchor;t&&n.current?.querySelector(t)?.scrollIntoView({block:`center`}),C(e.key)},T=e=>{let t=r.current,n=a.current;if(e.button!==0||e.target!==e.currentTarget||!t||!n)return;let i=n.getBoundingClientRect();t.scrollTop=Math.min(Math.max((e.clientY-i.top)/i.height,0),1)*t.scrollHeight-t.clientHeight/2},ee=null;p?.key===DS&&b>0&&(ee={y:20,content:(0,O.jsxs)(O.Fragment,{children:[t.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),t.map(e=>(0,O.jsx)(Zm,{note:e},e.id))]}),y.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),y.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))]})]})});let E=p===null?void 0:g.find(e=>e.key===p.key);return E&&(ee={y:d.trackTop+E.top,content:E.items.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))}),(0,O.jsxs)(`aside`,{className:`zen-rail`,ref:i,"aria-label":`Repères des constats, explications et remarques`,children:[(0,O.jsx)(`div`,{className:`zen-rail-slot`,children:b>0&&(0,O.jsxs)(`button`,{type:`button`,className:`zen-rail-group${p?.key===DS?` is-open`:``}`,title:`Remarques sur le fichier et cartes hors des lignes affichées`,"aria-label":Yu(b,`élément hors du diff`,`éléments hors du diff`),onPointerEnter:()=>x(DS),onPointerLeave:S,onFocus:()=>x(DS),onBlur:S,onClick:()=>C(DS),children:[(0,O.jsx)(U,{name:`list`,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`zen-rail-group-count`,children:b})]})}),(0,O.jsxs)(`div`,{className:`zen-rail-track`,ref:a,onPointerDown:T,children:[l&&(0,O.jsx)(`div`,{className:`zen-rail-view`,style:{top:`${l.top*100}%`,height:`${l.height*100}%`}}),g.map(e=>{let t=e.items.find(e=>e.kind===`finding`)??e.items[0];return(0,O.jsx)(`button`,{type:`button`,className:`zen-marker is-${t.kind}${p?.key===e.key?` is-open`:``}`,style:{top:e.top,"--marker":t.color},"aria-label":e.items.map(e=>e.label).join(` ; `),onPointerEnter:()=>x(e.key),onPointerLeave:S,onFocus:()=>x(e.key),onBlur:S,onClick:()=>w(e),children:e.items.length>1&&(0,O.jsx)(`span`,{className:`zen-marker-count`,children:e.items.length})},e.key)})]}),ee&&p&&(0,O.jsx)(`div`,{className:`zen-popover`,style:(e=>e>d.root/2?{bottom:Math.max(d.root-e-TS,ES),maxHeight:e+TS-ES}:{top:Math.max(e-TS,ES),maxHeight:d.root-Math.max(e-TS,ES)-ES})(ee.y),onPointerEnter:()=>x(p.key),onPointerLeave:S,onPointerDown:()=>C(p.key),children:ee.content})]})}function AS({analysis:e}){let t=H(e=>e.gapsCollapsed),n=H(e=>e.setGapsCollapsed),r=tf(e);if(r.length===0)return null;let i=r.filter(e=>e.status===`open`).length;return(0,O.jsxs)(`section`,{className:`gap-banner${t?` is-collapsed`:``}`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`gap-banner-toggle block-title`,"aria-expanded":!t,onClick:()=>n(!t),children:[(0,O.jsx)(U,{name:t?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`triangle-alert`,color:`#e3a33b`}),Yu(r.length,`exigence manquante`,`exigences manquantes`),i!==r.length&&(0,O.jsxs)(`span`,{className:`gap-banner-count`,children:[`· `,Yu(i,`ouverte`)]})]}),!t&&r.map(t=>(0,O.jsx)(Xm,{analysis:e,finding:t},t.id))]})}function jS({file:e}){return e.binary?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier binaire (`,Pu[e.status].toLowerCase(),`) : son contenu n'est pas affiché.`]}):e.status===`renamed`?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier renommé depuis `,e.oldPath,` sans changement de contenu.`]}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Aucune ligne modifiée dans ce fichier (changement de mode ou fichier vide).`})}function MS({file:e}){let{folder:t,name:n}=Uu(e.path);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`file-head-path mono`,title:e.oldPath?`${e.oldPath} → ${e.path}`:e.path,children:[(0,O.jsx)(`span`,{className:`path-folder`,children:t}),(0,O.jsx)(`span`,{className:`file-head-name`,children:n})]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,e.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,e.deletions]}),e.status!==`modified`&&(0,O.jsx)(`span`,{className:`tag tag-file-${e.status}`,children:Pu[e.status]})]})}function NS({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.setFileReviewed),i=H(e=>e.saving),a=Ud(e.files),o=a.findIndex(e=>e.path===t.path),s=a[o-1],c=a[o+1];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,onClick:n,children:[(0,O.jsx)(U,{name:`message-square`,size:13}),`Remarque sur le fichier`]}),(0,O.jsxs)(`div`,{className:`icon-button-group`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!s,title:s?`Fichier précédent : ${s.path}`:`Premier fichier`,onClick:()=>s&&T(w.review(e.id,s.path)),children:(0,O.jsx)(U,{name:`arrow-left`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!c,title:c?`Fichier suivant : ${c.path}`:`Dernier fichier`,onClick:()=>c&&T(w.review(e.id,c.path)),children:(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary reviewed-toggle${t.reviewed?` is-on`:``}`,"aria-pressed":t.reviewed,disabled:i,onClick:()=>void r(t.path,!t.reviewed),children:[(0,O.jsx)(U,{name:`square-check`,color:t.reviewed?`#3fb950`:`#9aa1b1`}),t.reviewed?`Revu`:`Marquer comme revu`]})]})}function PS({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.filesPanelCollapsed),i=H(e=>e.setFilesPanelCollapsed),a=H(e=>e.setZenMode);return(0,O.jsxs)(`div`,{className:`file-head`,children:[(0,O.jsxs)(`div`,{className:`icon-button-group file-head-toggles`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-pressed":!r,title:r?`Afficher la liste des fichiers`:`Masquer la liste des fichiers`,onClick:()=>i(!r),children:(0,O.jsx)(U,{name:r?`panel-left-open`:`panel-left-close`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Mode zen : le code sur toute la page`,onClick:()=>a(!0),children:(0,O.jsx)(U,{name:`maximize`,color:`#9aa1b1`})})]}),(0,O.jsx)(MS,{file:t}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(NS,{analysis:e,file:t,onFileNote:n})]})}function FS({analysis:e,file:t,menus:n}){let r=H(e=>e.setZenMode);return(0,O.jsxs)(`header`,{className:`file-head zen-bar`,children:[(0,O.jsx)(`a`,{className:`brand-mark`,href:w.home(),title:`Feature Analyzer — accueil`,children:(0,O.jsx)(U,{name:`scan-search`,color:`#8b97ff`})}),(0,O.jsx)(`span`,{className:`zen-bar-separator`,"aria-hidden":`true`}),(0,O.jsx)(MS,{file:t}),(0,O.jsx)(`div`,{className:`zen-bar-menus`,children:n}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(Ou,{analysis:e}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button is-on`,"aria-pressed":!0,title:`Quitter le mode zen`,onClick:()=>r(!1),children:(0,O.jsx)(U,{name:`minimize`,color:`#8b97ff`})}),(0,O.jsx)(k,{analysis:e})]})}function IS({analysis:e,path:t,line:n}){let r=H(e=>e.diff),i=H(e=>e.diffError),a=H(e=>e.fixMode),o=H(e=>e.setFixMode),s=H(e=>e.codeView),c=H(e=>e.setCodeView),l=H(e=>e.diffScope),u=H(e=>e.setDiffScope),d=H(e=>e.copy),f=H(e=>e.findingsShown),p=H(e=>e.setFindingsShown),m=H(e=>e.explanationsShown),h=H(e=>e.setExplanationsShown),g=H(e=>e.filesPanelCollapsed),_=H(e=>e.zenMode),y=xS(gS),b=xS(_S),x=(0,v.useRef)(null),S=(0,v.useRef)(null),[C,ee]=(0,v.useState)(null),E=C&&C.path===t?{line:C.line,findingId:C.findingId}:null,te=e=>ee(e&&t!==null?{path:t,...e}:null),[D,k]=(0,v.useState)({}),[ne,re]=(0,v.useState)({}),[ie,ae]=(0,v.useState)(null),oe=(0,v.useRef)(null),se=(0,v.useRef)(null),ce=Yd(e);(0,v.useEffect)(()=>{t===null&&ce!==null&&T(w.review(e.id,ce),{replace:!0})},[t,ce,e.id]);let le=e.files.find(e=>e.path===t)??null,A=r?.id===e.id?r.snapshot.files.find(e=>e.path===t):void 0,ue=A!==void 0&&A.newContent!==null,de=ue?l:`changes`,fe=(0,v.useMemo)(()=>de===`file`&&A?Jm(A)??void 0:A,[de,A]),pe=t===null?void 0:ne[t],me=(0,v.useMemo)(()=>de===`changes`&&A?Bm(A,pe??[]):null,[de,A,pe]),he=me?.fileDiff??fe,ge=(e,n)=>{if(t===null||!me)return;let r=Vm(me,e,n);re(e=>({...e,[t]:r}))},_e=i!==null&&r?.id!==e.id,ve=t===null?[]:Fl(e,t),ye=f?ve:[],j=Hl(ye,he??{path:t??``,hunks:[],newContent:null},e=>D[e.id]??(e.suggestion!==null&&e.status===`open`),a),M=Kl(ye,j,a),be=n===null?null:ql(n,M),xe=be===null?null:Ul(be),Se=ie!==null&&ie.path===t&&ie.line===n?ie.findingId:null,Ce=ie?.seq??0;if((0,v.useEffect)(()=>{let e=oe.current;fe&&e&&(xe===null?e.scrollTo({top:0}):(e.querySelector(xe)?.scrollIntoView({block:`center`}),Se!==null&&e.querySelector(`[data-finding-card="${CSS.escape(Se)}"]`)?.scrollIntoView({block:`nearest`})))},[fe,xe,t,Se,Ce]),t===null)return(0,O.jsx)(`div`,{className:`page`,children:(0,O.jsx)(`p`,{className:`empty-text`,children:`L'analyse ne contient aucun fichier modifié : il n'y a rien à revoir.`})});let we=Ql(e,t),N=m?we:[],Te=he?tu(he,ye,j,a,N,s):[],Ee=he?Il(he):_e?new Set:null,De=V(e,t),Oe=new Set(De.map(e=>e.location.line)),ke=(e,t)=>k(n=>({...n,[e]:t})),Ae=n=>{ae(e=>({path:t,findingId:n.finding.id,line:n.startLine,seq:(e?.seq??0)+1})),T(w.review(e.id,t,n.startLine))},je=(t,n)=>(0,O.jsxs)(`div`,{className:`review-center`,ref:se,children:[f&&(0,O.jsx)(AS,{analysis:e}),!t.contentAvailable&&!t.binary&&t.status!==`deleted`&&(0,O.jsx)(`p`,{className:`diff-notice`,children:`Fichier trop volumineux pour être conservé en entier : les remarques ne peuvent viser que le fichier entier.`}),_e?(0,O.jsx)(`p`,{className:`diff-message is-error`,children:i}):he?A?.hunks.length===0?(0,O.jsx)(jS,{file:t}):(0,O.jsx)(Kx,{file:t,fileDiff:he,hunks:Te,hunkContexts:me?.hunks??null,addedContext:me?.added??null,onContextChange:ge,findings:ye,notedLines:Oe,scrollRef:oe,mode:a,onModeChange:o,codeView:s,onCodeViewChange:c,scope:de,onScopeChange:u,wholeFileAvailable:ue,explained:N.length>0,target:be,onLineNote:e=>te({line:e,findingId:null}),onHideFix:e=>ke(e,!1),onRequestExplanation:n=>void d(Km(e,t,n),`Demande d'explication copiée : collez-la dans la conversation de l'agent.`),zen:n}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Chargement du diff…`})]}),Me=()=>te({line:null,findingId:null});if(le!==null&&nf(_,e,t)){let t=Ee===null?[]:Zx({analysis:e,file:le,numbered:ye,explanations:N,fileDiff:he??null,fixes:j,mode:a,codeView:s,removed:M,lineNotes:De,shown:Ee,setComposer:te,onToggleFix:ke,revealedId:Se});return(0,O.jsxs)(`div`,{className:`zen`,children:[(0,O.jsx)(FS,{analysis:e,file:le,menus:(0,O.jsx)(Ox,{scope:de,onScopeChange:u,wholeFileAvailable:ue,codeView:s,onCodeViewChange:c,mode:a,onModeChange:o})}),(0,O.jsxs)(`div`,{className:`zen-main`,children:[(0,O.jsx)(`div`,{className:`review-body`,ref:oe,children:je(le,!0)}),(0,O.jsx)(kS,{items:t,fileNotes:Xx(e,le),scopeRef:se,scrollRef:oe}),(0,O.jsxs)(`div`,{className:`zen-dock`,children:[E!==null&&(0,O.jsx)(`div`,{className:`zen-composer`,children:(0,O.jsx)(ih,{path:le.path,line:E.line,findingId:E.findingId,onClose:()=>te(null)},`${E.line??`file`}-${E.findingId??``}`)}),(0,O.jsx)(`div`,{className:`zen-actions`,children:(0,O.jsx)(NS,{analysis:e,file:le,onFileNote:Me})})]})]})]})}let Ne=g&&le!==null;return(0,O.jsxs)(`div`,{className:`review${Ne?` is-files-hidden`:``}`,ref:x,style:Ne?void 0:{gridTemplateColumns:`${y.width}px minmax(0, 1fr)`},children:[!Ne&&(0,O.jsx)(hS,{analysis:e,currentPath:t}),!Ne&&(0,O.jsx)(SS,{setting:gS,side:`left`,label:`Largeur de la liste des fichiers`,width:y.width,setWidth:y.setWidth,containerRef:x,preview:(e,t)=>e.style.gridTemplateColumns=`${t}px minmax(0, 1fr)`}),(0,O.jsx)(`section`,{className:`review-main`,children:le===null?(0,O.jsx)(`div`,{className:`review-body review-body-padded`,children:(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Le fichier « `,t,` » ne fait pas partie de cette analyse. Choisissez un fichier dans la liste.`]})}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(PS,{analysis:e,file:le,onFileNote:Me}),(0,O.jsx)(sS,{file:le}),(0,O.jsx)(`div`,{className:`review-body`,ref:oe,children:(0,O.jsxs)(`div`,{className:`review-columns`,ref:S,style:{"--findings-panel-width":`${b.width}px`},children:[je(le,!1),(0,O.jsx)(SS,{setting:_S,side:`right`,label:`Largeur de la colonne des constats`,width:b.width,setWidth:b.setWidth,containerRef:S,preview:(e,t)=>e.style.setProperty(`--findings-panel-width`,`${t}px`)}),(0,O.jsx)(aS,{analysis:e,file:le,numbered:ye,explanations:N,filters:{findingCount:ve.length,explanationCount:we.length,findingsShown:f,explanationsShown:m,onFindingsShownChange:p,onExplanationsShownChange:h},fileDiff:he??null,fixes:j,mode:a,codeView:s,removed:M,lineNotes:De,shownLines:Ee,composer:E,setComposer:te,onToggleFix:ke,scopeRef:se,scrollRef:oe,onReveal:Ae,revealedId:Se})]})})]})})]})}function LS(e){return e.name===`feature`||e.name===`review`||e.name===`finish`?e.id:null}function RS({children:e}){return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:e})})}function zS(){Fd();let e=te(),t=H(e=>e.current),n=H(e=>e.openAnalysis),r=H(e=>e.zenMode),i=LS(e);(0,v.useEffect)(()=>{i&&n(i)},[i,n]);let a=t&&t.id===i?t.analysis:null,o=t&&t.id===i?t.error:null,s=t&&t.id===i?t.links:null,c=e.name===`review`&&a!==null&&nf(r,a,e.path),l=e.name===`review`&&a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Ou,{analysis:a}),(0,O.jsx)(k,{analysis:a})]}):null,u;return u=e.name===`home`?(0,O.jsx)(Im,{}):e.name===`not_found`?(0,O.jsx)(RS,{children:(0,O.jsxs)(`p`,{children:[`Adresse inconnue : `,(0,O.jsx)(`code`,{children:e.hash}),`. `,(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`}),`.`]})}):o?(0,O.jsxs)(RS,{children:[(0,O.jsxs)(`p`,{className:`error-text`,children:[`Analyse illisible : `,o]}),(0,O.jsx)(`p`,{children:(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`})})]}):a?e.name===`feature`?(0,O.jsx)(wm,{analysis:a,links:s,tab:e.tab}):e.name===`review`?(0,O.jsx)(IS,{analysis:a,path:e.path,line:e.line}):(0,O.jsx)(Om,{analysis:a},a.id):(0,O.jsx)(RS,{children:(0,O.jsx)(`p`,{children:`Chargement de l'analyse…`})}),(0,O.jsxs)(`div`,{className:`app`,children:[!c&&(0,O.jsx)(jd,{currentId:i,action:l}),(0,O.jsx)(`main`,{className:`main${e.name===`review`?` main-fixed`:``}`,children:u}),(0,O.jsx)(Du,{})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(v.StrictMode,{children:(0,O.jsx)(zS,{})}));export{s as t};