difit 5.0.0 → 5.0.2
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.
- package/README.ja.md +0 -1
- package/README.ko.md +0 -1
- package/README.md +0 -1
- package/README.zh.md +0 -1
- package/dist/cli/index.js +0 -4
- package/dist/cli/index.test.js +0 -110
- package/dist/client/assets/{arc-DbOd2jxV.js → arc-6rfKPaO5.js} +1 -1
- package/dist/client/assets/architecture-7EHR7CIX-BVjNdUJk.js +1 -0
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-BFXI_tUS.js → architectureDiagram-3BPJPVTR-DAPpx935.js} +3 -3
- package/dist/client/assets/blockDiagram-GPEHLZMM-CDPNTGF3.js +132 -0
- package/dist/client/assets/{c4Diagram-AHTNJAMY-BdIoPSTS.js → c4Diagram-AAUBKEIU-CQ1lD37n.js} +2 -2
- package/dist/client/assets/channel-CI_kbhRo.js +1 -0
- package/dist/client/assets/{chunk-EDXVE4YY-EPdmphYw.js → chunk-2J33WTMH-wS77xj1o.js} +1 -1
- package/dist/client/assets/chunk-3OPIFGDE-DC3iOSQY.js +62 -0
- package/dist/client/assets/{chunk-4BX2VUAB-CNkIhTNe.js → chunk-4BX2VUAB-C_jnlJZs.js} +1 -1
- package/dist/client/assets/chunk-4EGX6M5U-B5J4lyUG.js +1 -0
- package/dist/client/assets/{chunk-55IACEB6-J_10GkPG.js → chunk-55IACEB6-BJ8kKTix.js} +1 -1
- package/dist/client/assets/chunk-5DO6E6H7-UL04E-Sm.js +1 -0
- package/dist/client/assets/chunk-5ZQYHXKU-Bh6BPUBA.js +2 -0
- package/dist/client/assets/chunk-727SXJPM-BKLMyeWY.js +206 -0
- package/dist/client/assets/chunk-AQP2D5EJ-Df_usvOe.js +231 -0
- package/dist/client/assets/{chunk-LIHQZDEY-BEYvjNoB.js → chunk-BR22UD5L-iAygIt6T.js} +1 -1
- package/dist/client/assets/{chunk-BSJP7CBP-DiXS795w.js → chunk-BSJP7CBP-DE9tFfBp.js} +1 -1
- package/dist/client/assets/chunk-CSCIHK7Q-4xM5RfGk.js +124 -0
- package/dist/client/assets/chunk-FHYWG6QK-BgSLVmZJ.js +1 -0
- package/dist/client/assets/{chunk-FMBD7UC4-Dgx4um1Q.js → chunk-FMBD7UC4-Cv9IlI4O.js} +1 -1
- package/dist/client/assets/chunk-KSCS5N6A-DWLHH_AM.js +10 -0
- package/dist/client/assets/{chunk-ZZ45TVLE-CwpZ5yb7.js → chunk-L5ZTLDWV-DOT8BvSV.js} +1 -1
- package/dist/client/assets/chunk-LZXEDZCA-D6qoNMjr.js +2 -0
- package/dist/client/assets/chunk-MPE355IW-cyI0EFc3.js +1 -0
- package/dist/client/assets/chunk-MZUSXYTE-5xqZ7HV0.js +1 -0
- package/dist/client/assets/chunk-N66VUXT2-CoBMKqlP.js +1 -0
- package/dist/client/assets/{chunk-YZCP3GAM-D_AeoI3D.js → chunk-ND2GUHAM-CL1pz8JY.js} +1 -1
- package/dist/client/assets/chunk-NNHCCRGN-CyaCWJWT.js +159 -0
- package/dist/client/assets/{chunk-X2U36JSP-BAcfna0L.js → chunk-NZK2D7GU-C5yW1m8s.js} +1 -1
- package/dist/client/assets/{chunk-U2HBQHQK-CpVfEbNc.js → chunk-O5CBEL6O-DxoQOZDE.js} +4 -4
- package/dist/client/assets/chunk-PUPMXCY4-DkoNKY6Q.js +1 -0
- package/dist/client/assets/chunk-QZHKN3VN-Bo6EoZG3.js +1 -0
- package/dist/client/assets/chunk-UIBZB4QT-3h9dqf89.js +1 -0
- package/dist/client/assets/chunk-WCWK7LTN-CoJXc1FG.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-wj9gaxvS.js +1 -0
- package/dist/client/assets/{chunk-XPW4576I-D0wrDPCQ.js → chunk-XPW4576I-CaGs7AFA.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK--B_Qh3IG.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-ChlqxE3w.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-DJvkrscF.js → cose-bilkent-S5V4N54A-0teiw0GI.js} +1 -1
- package/dist/client/assets/cytoscape.esm-CJYKJE1R.js +321 -0
- package/dist/client/assets/dagre-BLlLfumR.js +1 -0
- package/dist/client/assets/dagre-BM42HDAG-D_-3GRUj.js +4 -0
- package/dist/client/assets/diagram-2AECGRRQ-_W3aY5Zc.js +43 -0
- package/dist/client/assets/{diagram-5BDNPKRD-CJSn8eie.js → diagram-5GNKFQAL-CMT8oSlm.js} +2 -2
- package/dist/client/assets/diagram-KO2AKTUF-B9w0z9LU.js +3 -0
- package/dist/client/assets/{diagram-TYMM5635-DKIgp_-m.js → diagram-LMA3HP47-BuYAHh0a.js} +1 -1
- package/dist/client/assets/diagram-OG6HWLK6-C2f4LrLS.js +24 -0
- package/dist/client/assets/{dist-CL_sSZWx.js → dist-DpSceyb-.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-Iw0m0edr.js → erDiagram-TEJ5UH35-BDcc9ZeJ.js} +2 -2
- package/dist/client/assets/eventmodeling-FCH6USID-BMkJE7Xb.js +1 -0
- package/dist/client/assets/{flowDiagram-DWJPFMVM-CtXQs1rX.js → flowDiagram-I6XJVG4X-C46q_MLU.js} +6 -6
- package/dist/client/assets/ganttDiagram-6RSMTGT7-DgM194yE.js +292 -0
- package/dist/client/assets/gitGraph-WXDBUCRP-hUiiT7ot.js +1 -0
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-CpIhNWuv.js +106 -0
- package/dist/client/assets/graphlib-DkOQ9ah2.js +1 -0
- package/dist/client/assets/index-CFVmjhs_.css +2 -0
- package/dist/client/assets/index-abQ5IgAS.js +82 -0
- package/dist/client/assets/info-J43DQDTF-Dn8zxm9V.js +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-Cfjrwz2v.js → infoDiagram-5YYISTIA-ZvGYZ-kQ.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-Cc-jozqB.js → ishikawaDiagram-YF4QCWOH-B9iBTUWg.js} +2 -2
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-Bjx1sC-s.js → journeyDiagram-JHISSGLW-BjR1KB-M.js} +3 -3
- package/dist/client/assets/{kanban-definition-6JOO6SKY-CIkJYslO.js → kanban-definition-UN3LZRKU-C-omJVr_.js} +6 -6
- package/dist/client/assets/katex-Du_qQZ_j.js +257 -0
- package/dist/client/assets/line-BrFp4RcF.js +1 -0
- package/dist/client/assets/{linear-DCAQGlgU.js → linear-Ce90hYCv.js} +1 -1
- package/dist/client/assets/mermaid-parser.core-DyzS6net.js +4 -0
- package/dist/client/assets/mermaid.core-dZvhJRm4.js +9 -0
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-CPflWkUN.js → mindmap-definition-RKZ34NQL-B1-aSgk-.js} +28 -28
- package/dist/client/assets/{ordinal-DIg8h6NI.js → ordinal-7rXhq2H9.js} +1 -1
- package/dist/client/assets/packet-YPE3B663-D4pLqEWp.js +1 -0
- package/dist/client/assets/pie-LRSECV5Y-Cl1Syrbg.js +1 -0
- package/dist/client/assets/pieDiagram-4H26LBE5-Dsq8XbGX.js +30 -0
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-Cown2EYl.js +7 -0
- package/dist/client/assets/radar-GUYGQ44K-DJuoaUBO.js +1 -0
- package/dist/client/assets/{requirementDiagram-MS252O5E-CZW6zJs_.js → requirementDiagram-4Y6WPE33-IHqUu4n-.js} +4 -4
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-D4r0GNlW.js → sankeyDiagram-5OEKKPKP-BvIfULX_.js} +36 -6
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-DNZh6NI8.js +162 -0
- package/dist/client/assets/src-iMPju4xR.js +1 -0
- package/dist/client/assets/stateDiagram-AJRCARHV-CGHI9QKF.js +1 -0
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Cags9ZgQ.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-DmlaOXs4.js → timeline-definition-PNZ67QCA-C3MNpio4.js} +5 -5
- package/dist/client/assets/treeView-BLDUP644-DsanmcrA.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-CCkKzd8F.js +1 -0
- package/dist/client/assets/vennDiagram-CIIHVFJN-2XAu0kKE.js +34 -0
- package/dist/client/assets/wardley-L42UT6IY-BuMHDenj.js +1 -0
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-B5lHUuTU.js → wardleyDiagram-YWT4CUSO-e5Pq-VXT.js} +61 -3
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-D8nLdJo8.js → xychartDiagram-2RQKCTM6-DlYK0YFq.js} +3 -3
- package/dist/client/index.html +2 -2
- package/dist/server/file-watcher.test.js +40 -36
- package/dist/server/git-diff.test.js +6 -4
- package/dist/server/server.d.ts +0 -1
- package/dist/server/server.js +25 -7
- package/dist/server/server.test.js +120 -39
- package/dist/types/diff.d.ts +1 -2
- package/dist/utils/commentImports.js +4 -1
- package/package.json +3 -3
- package/dist/client/assets/_baseFor-Dq1lbcoh.js +0 -1
- package/dist/client/assets/architecture-YZFGNWBL-0n2ZLuLj.js +0 -1
- package/dist/client/assets/blockDiagram-DXYQGD6D-BOEZDsFe.js +0 -132
- package/dist/client/assets/channel-DPag0OPA.js +0 -1
- package/dist/client/assets/chunk-2KRD3SAO-BaHSMZbk.js +0 -1
- package/dist/client/assets/chunk-336JU56O-BGfMTguc.js +0 -2
- package/dist/client/assets/chunk-426QAEUC-Ct2OJ1s3.js +0 -1
- package/dist/client/assets/chunk-4TB4RGXK-wFMAN-Ug.js +0 -206
- package/dist/client/assets/chunk-5FUZZQ4R-0NY9W0kL.js +0 -62
- package/dist/client/assets/chunk-5PVQY5BW-nUEO-vub.js +0 -2
- package/dist/client/assets/chunk-67CJDMHE-CpK_DCjw.js +0 -1
- package/dist/client/assets/chunk-7N4EOEYR-CJfX2SRB.js +0 -1
- package/dist/client/assets/chunk-AA7GKIK3-DGHjDQX4.js +0 -1
- package/dist/client/assets/chunk-CIAEETIT-DaOGL_z8.js +0 -1
- package/dist/client/assets/chunk-ENJZ2VHE-9x7-Qpzy.js +0 -10
- package/dist/client/assets/chunk-FOC6F5B3-BaVe0aqm.js +0 -1
- package/dist/client/assets/chunk-ICPOFSXX-C9l3r2YR.js +0 -122
- package/dist/client/assets/chunk-K5T4RW27-Bv0dnd8C.js +0 -94
- package/dist/client/assets/chunk-KGLVRYIC-BdTDi9hU.js +0 -1
- package/dist/client/assets/chunk-ORNJ4GCN-CHeeoEx_.js +0 -1
- package/dist/client/assets/chunk-OYMX7WX6-Bapbqtyc.js +0 -231
- package/dist/client/assets/chunk-QZHKN3VN-CNqVW4m2.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-aX3PLX0y.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-CshAcrwe.js +0 -1
- package/dist/client/assets/clone-J5cJUwR3.js +0 -1
- package/dist/client/assets/cytoscape.esm-DdcHPZAZ.js +0 -321
- package/dist/client/assets/dagre-BADyoi72.js +0 -1
- package/dist/client/assets/dagre-KV5264BT-BDTirpEd.js +0 -4
- package/dist/client/assets/diagram-G4DWMVQ6-COzN0wAe.js +0 -24
- package/dist/client/assets/diagram-MMDJMWI5-Bau__Yfk.js +0 -43
- package/dist/client/assets/flatten-SRIRKgqP.js +0 -1
- package/dist/client/assets/ganttDiagram-T4ZO3ILL-B0341I_2.js +0 -292
- package/dist/client/assets/gitGraph-7Q5UKJZL-NWgYXB7y.js +0 -1
- package/dist/client/assets/gitGraphDiagram-UUTBAWPF-Yv3oicIa.js +0 -106
- package/dist/client/assets/graphlib-BLiSTux3.js +0 -1
- package/dist/client/assets/index-C2jd9xpN.js +0 -79
- package/dist/client/assets/index-v-PY_jQI.css +0 -2
- package/dist/client/assets/info-OMHHGYJF-Bvc7BWzq.js +0 -1
- package/dist/client/assets/isEmpty-CStpjy4G.js +0 -1
- package/dist/client/assets/katex-CeIlAR55.js +0 -257
- package/dist/client/assets/line-yxqmb99x.js +0 -1
- package/dist/client/assets/mermaid-parser.core-B5ufZrv2.js +0 -4
- package/dist/client/assets/mermaid.core-BFOnV1aK.js +0 -11
- package/dist/client/assets/packet-4T2RLAQJ-DNpLsp8v.js +0 -1
- package/dist/client/assets/pie-ZZUOXDRM-D8uToFEL.js +0 -1
- package/dist/client/assets/pieDiagram-DEJITSTG-Dl3gScVb.js +0 -30
- package/dist/client/assets/quadrantDiagram-34T5L4WZ-38YyGeXU.js +0 -7
- package/dist/client/assets/radar-PYXPWWZC-VrpLp1jL.js +0 -1
- package/dist/client/assets/reduce-CG4cgj93.js +0 -1
- package/dist/client/assets/sequenceDiagram-FGHM5R23-2xItvAxs.js +0 -157
- package/dist/client/assets/src-YK4ClFOB.js +0 -1
- package/dist/client/assets/stateDiagram-FHFEXIEX-lBViG7kM.js +0 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BcU-AM4S.js +0 -1
- package/dist/client/assets/treeView-SZITEDCU-B1qc9ijP.js +0 -1
- package/dist/client/assets/treemap-W4RFUUIX-Dl7yWWae.js +0 -1
- package/dist/client/assets/vennDiagram-DHZGUBPP-BOLv0A8q.js +0 -34
- package/dist/client/assets/wardley-RL74JXVD-CEXd-1Ht.js +0 -1
- /package/dist/client/assets/{array-DOVTz2Mq.js → array-yLZkcI6Y.js} +0 -0
- /package/dist/client/assets/{defaultLocale-Ck2Xxk-C.js → defaultLocale-Bld4b7vH.js} +0 -0
- /package/dist/client/assets/{init-Bft5Ffpj.js → init-rddNFwID.js} +0 -0
- /package/dist/client/assets/{path-DfRbCp9y.js → path-BJQEcSo7.js} +0 -0
- /package/dist/client/assets/{prism-bash-CPkZUJMA.js → prism-bash-ElxVK2UI.js} +0 -0
- /package/dist/client/assets/{prism-clojure-BpoF2XhX.js → prism-clojure-Coed_dlT.js} +0 -0
- /package/dist/client/assets/{prism-csharp-BEk8D1-3.js → prism-csharp-BvoTEt-U.js} +0 -0
- /package/dist/client/assets/{prism-dart-ByLYrdQB.js → prism-dart-59mV4Nzl.js} +0 -0
- /package/dist/client/assets/{prism-elixir-BZtyIEab.js → prism-elixir-VMbXB0ch.js} +0 -0
- /package/dist/client/assets/{prism-haskell-NAsbeo3V.js → prism-haskell-DbMQ4t9D.js} +0 -0
- /package/dist/client/assets/{prism-hcl-crnGqmVp.js → prism-hcl-DaTFd4M9.js} +0 -0
- /package/dist/client/assets/{prism-java-BovStacA.js → prism-java-Bvhe07ID.js} +0 -0
- /package/dist/client/assets/{prism-markup-templating-Cl8NiLjy.js → prism-markup-templating-DOf10VS2.js} +0 -0
- /package/dist/client/assets/{prism-nix-BS_cm_1n.js → prism-nix-CNZSWapd.js} +0 -0
- /package/dist/client/assets/{prism-perl-DGLVMq5H.js → prism-perl-ZBgEPf6s.js} +0 -0
- /package/dist/client/assets/{prism-php-BskSwJN8.js → prism-php-CBX1LG5n.js} +0 -0
- /package/dist/client/assets/{prism-protobuf-DfbIYpO7.js → prism-protobuf-KYCaTc8s.js} +0 -0
- /package/dist/client/assets/{prism-ruby-FBVh1PRE.js → prism-ruby-Dtn_AROP.js} +0 -0
- /package/dist/client/assets/{prism-scala--9AfMHPY.js → prism-scala-B4gvAG5X.js} +0 -0
- /package/dist/client/assets/{prism-solidity-BgJNkj1z.js → prism-solidity-BS9JVLL6.js} +0 -0
- /package/dist/client/assets/{prism-sql-C9Czmpov.js → prism-sql-DL_NEVBy.js} +0 -0
- /package/dist/client/assets/{prism-vim-CzUNf0WQ.js → prism-vim-DqdsfG3_.js} +0 -0
- /package/dist/client/assets/{rough.esm-Bbn_-PMU.js → rough.esm-KjoEK0it.js} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-dZvhJRm4.js","assets/chunk-O5CBEL6O-DxoQOZDE.js","assets/src-iMPju4xR.js","assets/chunk-5ZQYHXKU-Bh6BPUBA.js","assets/dist-DpSceyb-.js","assets/chunk-CSCIHK7Q-4xM5RfGk.js","assets/chunk-3OPIFGDE-DC3iOSQY.js","assets/chunk-L5ZTLDWV-DOT8BvSV.js","assets/chunk-NZK2D7GU-C5yW1m8s.js","assets/rough.esm-KjoEK0it.js","assets/chunk-BSJP7CBP-DE9tFfBp.js","assets/chunk-KSCS5N6A-DWLHH_AM.js","assets/line-BrFp4RcF.js","assets/path-BJQEcSo7.js","assets/array-yLZkcI6Y.js","assets/chunk-LZXEDZCA-D6qoNMjr.js","assets/chunk-WU5MYG2G-wj9gaxvS.js","assets/chunk-XPW4576I-CaGs7AFA.js"])))=>i.map(i=>d[i]);
|
|
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),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,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=`data-theme`,d={dark:{"--color-github-bg-primary":`#0d1117`,"--color-github-bg-secondary":`#161b22`,"--color-github-bg-tertiary":`#21262d`,"--color-github-border":`#30363d`,"--color-github-text-primary":`#f0f6fc`,"--color-github-text-secondary":`#8b949e`,"--color-github-text-muted":`#6e7681`,"--color-github-accent":`#238636`,"--color-github-danger":`#da3633`,"--color-github-warning":`#d29922`,"--color-diff-addition-bg":`#0d4429`,"--color-diff-addition-border":`#1b7c3d`,"--color-diff-deletion-bg":`#67060c`,"--color-diff-deletion-border":`#da3633`,"--color-diff-neutral-bg":`#21262d`,"--color-comment-bg":`#1c2128`,"--color-comment-border":`#373e47`,"--color-comment-text":`#e6edf3`,"--color-yellow-btn-bg":`rgba(180, 83, 9, 0.2)`,"--color-yellow-btn-border":`rgba(217, 119, 6, 0.5)`,"--color-yellow-btn-text":`#fbbf24`,"--color-yellow-btn-hover-bg":`rgba(180, 83, 9, 0.3)`,"--color-yellow-btn-hover-border":`#d97706`,"--color-yellow-path-bg":`rgba(180, 83, 9, 0.3)`,"--color-yellow-path-text":`#fbbf24`,"--color-editor-btn-bg":`rgba(248, 250, 252, 0.1)`,"--color-editor-btn-border":`rgba(248, 250, 252, 0.3)`,"--color-editor-btn-text":`#f0f6fc`,"--color-editor-btn-hover-bg":`rgba(248, 250, 252, 0.2)`,"--color-editor-btn-hover-border":`rgba(248, 250, 252, 0.45)`},light:{"--color-github-bg-primary":`#ffffff`,"--color-github-bg-secondary":`#f6f8fa`,"--color-github-bg-tertiary":`#f1f3f4`,"--color-github-border":`#d1d9e0`,"--color-github-text-primary":`#24292f`,"--color-github-text-secondary":`#656d76`,"--color-github-text-muted":`#8c959f`,"--color-github-accent":`#1f883d`,"--color-github-danger":`#cf222e`,"--color-github-warning":`#bf8700`,"--color-diff-addition-bg":`#d1f4cd`,"--color-diff-addition-border":`#1f883d`,"--color-diff-deletion-bg":`#ffd8d3`,"--color-diff-deletion-border":`#cf222e`,"--color-diff-neutral-bg":`#f1f3f4`,"--color-comment-bg":`#fff8e1`,"--color-comment-border":`#ffd54f`,"--color-comment-text":`#5d4037`,"--color-yellow-btn-bg":`#fef3c7`,"--color-yellow-btn-border":`#f59e0b`,"--color-yellow-btn-text":`#92400e`,"--color-yellow-btn-hover-bg":`#fde68a`,"--color-yellow-btn-hover-border":`#d97706`,"--color-yellow-path-bg":`#fde68a`,"--color-yellow-path-text":`#92400e`,"--color-editor-btn-bg":`rgba(248, 250, 252, 0.1)`,"--color-editor-btn-border":`rgba(31, 41, 55, 0.35)`,"--color-editor-btn-text":`#1f2937`,"--color-editor-btn-hover-bg":`rgba(248, 250, 252, 0.2)`,"--color-editor-btn-hover-border":`rgba(31, 41, 55, 0.5)`}},f=`reviewit-appearance-settings`,p=e=>e===`light`||e===`dark`||e===`auto`,m=e=>e===`normal`||e===`deuteranopia`,h=e=>e===`light`||e===`dark`,g=()=>{if(!(typeof window>`u`))try{return window.localStorage}catch{return}},_=()=>{if(!(typeof window>`u`))return window};function v(e=g()){if(!e)return null;try{let t=e.getItem(f);if(!t)return null;let n=JSON.parse(t);if(n&&typeof n==`object`){let e={},t=n;return p(t.theme)&&(e.theme=t.theme),m(t.colorVision)&&(e.colorVision=t.colorVision),e}}catch{return null}return null}function y(e=_()){return e?.matchMedia(`(prefers-color-scheme: dark)`).matches??!0?`dark`:`light`}function b(e,t=y()){return e===`light`||e===`dark`?e:t}function x(e=typeof document>`u`?void 0:document,t=g(),n=_()){let r=e?.documentElement.getAttribute(u)??null;return h(r)?r:b(v(t)?.theme,y(n))}var S={dark:{"--color-github-accent":`#58a6ff`,"--color-github-danger":`#d29922`,"--color-diff-addition-bg":`#0c2d6b`,"--color-diff-addition-border":`#388bfd`,"--color-diff-deletion-bg":`#5a3600`,"--color-diff-deletion-border":`#d29922`},light:{"--color-github-accent":`#0969da`,"--color-github-danger":`#bf8700`,"--color-diff-addition-bg":`#ddf4ff`,"--color-diff-addition-border":`#0969da`,"--color-diff-deletion-bg":`#fff8c5`,"--color-diff-deletion-border":`#bf8700`}};function C(e,t=`normal`,n=document){let r=n.documentElement;r.setAttribute(u,e),r.setAttribute(`data-color-vision`,t);let i=d[e];if(Object.entries(i).forEach(([e,t])=>{r.style.setProperty(e,t)}),t===`deuteranopia`){let t=S[e];Object.entries(t).forEach(([e,t])=>{r.style.setProperty(e,t)})}n.body&&(n.body.style.backgroundColor=`var(--color-github-bg-primary)`,n.body.style.color=`var(--color-github-text-primary)`)}function w(e=typeof document>`u`?void 0:document,t=g(),n=_()){if(!e)return null;let r=v(t),i=b(r?.theme,y(n));return C(i,r?.colorVision??`normal`,e),i}w();var T=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.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=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 D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 N(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,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},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=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.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)T.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=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),E=o(((e,t)=>{t.exports=T()})),D=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,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){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&&E());){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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),O=o(((e,t)=>{t.exports=D()})),k=o((e=>{var t=E();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`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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.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 o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.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=c(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=c(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})}}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=c(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=c(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})}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 s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),A=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=k()})),j=o((e=>{var t=O(),n=E(),r=A();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){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n: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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function L(e){return{current:e}}function ie(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=L(null),oe=L(null),se=L(null),ce=L(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ie(ae),R(ae,e)}function ue(){ie(ae),ie(oe),ie(se)}function de(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Hd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function fe(e){oe.current===e&&(ie(ae),ie(oe)),ce.current===e&&(ie(ce),Qf._currentValue=te)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!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}e.call(n.prototype)}}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(`
|
|
5
|
+
`),l=s.split(`
|
|
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
|
+
`+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{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,z=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:B,Le=Math.log,Re=Math.LN2;function B(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var ze=256,Be=262144,Ve=4194304;function He(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&261888;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 Ue(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=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(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 We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(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-Ie(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&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(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 et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function nt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[it])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},wt={};function Tt(e){return be.call(wt,e)?!0:be.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(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 Dt(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 Ot(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 kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(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 Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Pt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(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=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):zt(e,o,kt(n)):zt(e,o,kt(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=``+kt(s):e.removeAttribute(`name`)}function Rt(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)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(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),Mt(e)}function zt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Bt(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=``+kt(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 Vt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Ht(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Ut(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wt=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 Gt(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||Wt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(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]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Gt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Gt(e,o,t[o])}function qt(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 Jt=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`],[`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`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(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="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Lt(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&&Nt(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Bt(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(xu(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||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 sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,`passive`,{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.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 fn=i.slice(e,1<r?1-r:void 0)}function mn(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 hn(){return!0}function gn(){return!1}function _n(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)?hn:gn,this.isPropagationStopped=gn,this}return f(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=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=f({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=f({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,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!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(f({},Tn,{dataTransfer:0})),On=_n(f({},bn,{relatedTarget:0})),kn=_n(f({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=_n(f({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=_n(f({},vn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=_n(f({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),V=_n(f({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=_n(f({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),zn=_n(f({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=_n(f({},Tn,{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})),Vn=_n(f({},vn,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=sn&&`CompositionEvent`in window,Wn=null;sn&&`documentMode`in document&&(Wn=document.documentMode);var Gn=sn&&`TextEvent`in window&&!Wn,Kn=sn&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=pn(),fn=dn=un=null,Zn=!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 Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Td(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){vd(e,0)}function or(e){if(Nt(ht(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(sn){var lr;if(sn){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,$t(e)),an(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function _r(e,t){if(e===`input`||e===`change`)return or(t)}function vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var H=typeof Object.is==`function`?Object.is:vr;function yr(e,t){if(H(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)||!H(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(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=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(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=Pt(e.document)}return t}function wr(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 Tr=sn&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Pt(r)||(r=Er,`selectionStart`in r&&wr(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}),Or&&yr(Or,r)||(Or=r,r=Td(Dr,`onSelect`),0<r.length&&(t=new yn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};sn&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),bt(t,[e])}var Kr=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)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[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&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(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-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(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 U(e,t,n,r){return new ri(e,t,n,r)}function ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ai(e,t){var n=e.alternate;return n===null?(n=U(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&65011712,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 oi(e,t){e.flags&=65011714;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 si(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ii(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=U(31,n,t,a),e.elementType=D,e.lanes=o,e;case g:return ci(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=U(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=U(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=U(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=U(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ci(e,t,n,r){return e=U(7,e,r,t),e.lanes=n,e}function li(e,t,n){return e=U(6,e,null,t),e.lanes=n,e}function ui(e){var t=U(18,null,null,0);return t.stateNode=e,t}function di(e,t,n){return t=U(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fi=new WeakMap;function pi(e,t){if(typeof e==`object`&&e){var n=fi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},fi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var mi=[],hi=0,gi=null,_i=0,vi=[],yi=0,bi=null,xi=1,Si=``;function Ci(e,t){mi[hi++]=_i,mi[hi++]=gi,gi=e,_i=t}function wi(e,t,n){vi[yi++]=xi,vi[yi++]=Si,vi[yi++]=bi,bi=e;var r=xi;e=Si;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xi=1<<32-Ie(t)+i|n<<i|r,Si=a+e}else xi=1<<a|n<<i|r,Si=e}function Ti(e){e.return!==null&&(Ci(e,1),wi(e,1,0))}function Ei(e){for(;e===gi;)gi=mi[--hi],mi[hi]=null,_i=mi[--hi],mi[hi]=null;for(;e===bi;)bi=vi[--yi],vi[yi]=null,Si=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null}function Di(e,t){vi[yi++]=xi,vi[yi++]=Si,vi[yi++]=bi,xi=t.id,Si=t.overflow,bi=e}var Oi=null,ki=null,W=!1,Ai=null,ji=!1,Mi=Error(i(519));function Ni(e){throw zi(pi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Mi}function Pi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Rt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ht(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||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||Ni(e,!0)}function Fi(e){for(Oi=e.return;Oi;)switch(Oi.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:Oi=Oi.return}}function Ii(e){if(e!==Oi)return!1;if(!W)return Fi(e),W=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&ki&&Ni(e),Fi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ki=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ki=uf(e)}else t===27?(t=ki,Zd(e.type)?(e=lf,lf=null,ki=e):ki=t):ki=Oi?cf(e.stateNode.nextSibling):null;return!0}function Li(){ki=Oi=null,W=!1}function Ri(){var e=Ai;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Ai=null),e}function zi(e){Ai===null?Ai=[e]:Ai.push(e)}var Bi=L(null),Vi=null,Hi=null;function Ui(e,t,n){R(Bi,t._currentValue),t._currentValue=n}function Wi(e){e._currentValue=Bi.current,ie(Bi)}function Gi(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 Ki(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),Gi(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),Gi(s,n,e),s=null}else 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 qi(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;H(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Ki(t,e,n,r),t.flags|=262144}function Ji(e){for(e=e.firstContext;e!==null;){if(!H(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Yi(e){Vi=e,Hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xi(e){return Qi(Vi,e)}function Zi(e,t){return Vi===null&&Yi(e),Qi(e,t)}function Qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Hi===null){if(e===null)throw Error(i(308));Hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Hi=Hi.next=t;return n}var $i=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()})}},ea=t.unstable_scheduleCallback,ta=t.unstable_NormalPriority,na={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ra(){return{controller:new $i,data:new Map,refCount:0}}function ia(e){e.refCount--,e.refCount===0&&ea(ta,function(){e.controller.abort()})}var aa=null,oa=0,sa=0,ca=null;function la(e,t){if(aa===null){var n=aa=[];oa=0,sa=ud(),ca={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return oa++,t.then(ua,ua),t}function ua(){if(--oa===0&&aa!==null){ca!==null&&(ca.status=`fulfilled`);var e=aa;aa=null,sa=0,ca=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function da(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 fa=F.S;F.S=function(e,t){tu=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&la(e,t),fa!==null&&fa(e,t)};var pa=L(null);function ma(){var e=pa.current;return e===null?Rl.pooledCache:e}function ha(e,t){t===null?R(pa,pa.current):R(pa,t.pool)}function ga(){var e=ma();return e===null?null:{parent:na._currentValue,pool:e}}var _a=Error(i(460)),va=Error(i(474)),ya=Error(i(542)),ba={then:function(){}};function xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Sa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then(Zt,Zt);else{if(e=Rl,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,Ea(e),e}throw wa=t,_a}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(wa=e,_a):e}}var wa=null;function Ta(){if(wa===null)throw Error(i(459));var e=wa;return wa=null,e}function Ea(e){if(e===_a||e===ya)throw Error(i(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),Sa(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ja(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ma(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=ai(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|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=li(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===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ca(i)===t.type)?(t=a(t,n.props),Aa(t,n),t.return=e,t):(t=si(n.type,n.key,n.props,null,e.mode,r),Aa(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=di(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=ci(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=li(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=si(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case h:return t=di(t,e.mode,n),t.return=e,t;case T:return t=Ca(t),f(e,t,n)}if(ee(t)||M(t))return t=ci(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===b)return f(e,Zi(e,t),n);ja(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 m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ca(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===b)return p(e,t,Zi(e,n),r);ja(e,n)}return null}function _(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 m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ca(r),_(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,ka(r),i);if(r.$$typeof===b)return _(e,t,n,Zi(t,r),i);ja(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),W&&Ci(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return W&&Ci(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),W&&Ci(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),W&&Ci(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return W&&Ci(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),W&&Ci(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=si(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case h: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}else{n(e,r);break}else t(e,r);r=r.sibling}c=di(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ca(o),x(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ka(o),c);if(o.$$typeof===b)return x(e,r,Zi(e,o),c);ja(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=li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=x(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=U(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ba(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,Ze(e,n)}}function Va(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;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(Y&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ga(n[e],t)}var qa=L(null),Ja=L(0);function Ya(e,t){e=Wl,R(Ja,e),R(qa,t),Wl=e|t.baseLanes}function Xa(){R(Ja,Wl),R(qa,qa.current)}function Za(){Wl=Ja.current,ie(qa),ie(Ja)}var Qa=L(null),$a=null;function eo(e){var t=e.alternate;R(ao,ao.current&1),R(Qa,e),$a===null&&(t===null||qa.current!==null||t.memoizedState!==null)&&($a=e)}function to(e){R(ao,ao.current),R(Qa,e),$a===null&&($a=e)}function no(e){e.tag===22?(R(ao,ao.current),R(Qa,e),$a===null&&($a=e)):ro(e)}function ro(){R(ao,ao.current),R(Qa,Qa.current)}function io(e){ie(Qa),$a===e&&($a=null),ie(ao)}var ao=L(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 so=0,G=null,co=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!H(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return so=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){F.H=Is;var t=co!==null&&co.next!==null;if(so=0,lo=co=G=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&Ji(e)&&(tc=!0))}function So(e,t,n,r){G=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=co=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(co===null?null:co.memoizedState)!==e&&(G.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}so=0,lo=co=G=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?G.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(co===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=co.next;var t=lo===null?G.memoizedState:lo.next;if(t!==null)lo=t,co=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));co=e,e={memoizedState:co.memoizedState,baseState:co.baseState,baseQueue:co.baseQueue,queue:co.queue,next:null},lo===null?G.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Sa(go,e,t),t=G,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===b)return Xi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.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=ko(),G.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]=k;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),co,e)}function Fo(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?(so&f)===f:(Y&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===sa&&(d=!0);else if((so&p)===p){u=u.next,p===sa&&(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,G.lanes|=p,Kl|=p;f=u.action,po&&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,G.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!H(o,e.memoizedState)&&(tc=!0,d&&(n=ca,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 Io(e){var t=Oo(),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);H(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=G,a=Oo(),o=W;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!H((co||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||so&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=ko(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!H(e,n)}catch{return!0}}function Ho(e){var t=$r(e,2);t!==null&&gu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,co,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(W){var n=Rl.formState;if(n!==null){a:{var r=G;if(W){if(ki){b:{for(var i=ki,a=ji;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ki=cf(i.nextSibling),r=i.data===`F!`;break a}}Ni(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,G,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,G,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),co,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===_a?ya:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=co;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();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=G.updateQueue,t===null&&(t=ko(),G.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 is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();G.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;co!==null&&r!==null&&yo(r,co.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(G.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=ko(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(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 ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||so&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),G.lanes|=e,Kl|=e,n)}function ys(e,t,n,r){return H(n,t)?n:qa.current===null?!(so&42)||so&1073741824&&!(Y&261930)?(tc=!0,e.memoizedState=n):(e=hu(),G.lanes|=e,Kl|=e,t):(e=vs(e,n,r),H(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Ms(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,da(c,r),mu(e)):js(e,t,r,mu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,te,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},mu())}function Ts(){return Xi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Ra(n);var r=za(t,e,n);r!==null&&(gu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=Qr(e,t,n,r),n!==null&&(gu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,mu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(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,H(s,o))return Zr(e,t,i,0),Rl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return gu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&gu(t,e,2)}function Ns(e){var t=e.alternate;return e===G||t!==null&&t===G}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Is={readContext:Xi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Xi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Fe(!0);try{n(t)}finally{Fe(!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=ks.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,G,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=Do();if(W){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Rl.identifierPrefix;if(W){var n=Si,r=xi;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,G)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Xi,use:jo,useCallback:gs,useContext:Xi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),co.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Xi,use:jo,useCallback:gs,useContext:Xi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return co===null?vs(n,e,t):ys(n,co.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return co===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(gu(t,e,r),Ba(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(gu(t,e,r),Ba(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=za(e,r,n),t!==null&&(gu(t,e,n),Ba(t,e,n))}};function Hs(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?!yr(n,r)||!yr(i,a):!0}function Us(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&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Kr(e)}function Ks(e){console.error(e)}function qs(e){Kr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(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 Xs(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=Ra(e),e.tag=3,e}function Qs(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(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&qi(t,n,a,!0),n=Qa.current,n!==null){switch(n.tag){case 31:case 13:return $a===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,a)),!1;case 22:return n.flags|=65536,r===ba?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)),qu(e,r,a)),!1}throw Error(i(435,n.tag))}return qu(e,r,a),Ou(),!1}if(W)return t=Qa.current,t===null?(r!==Mi&&(t=Error(i(423),{cause:r}),zi(pi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=pi(r,n),a=Xs(e.stateNode,r,a),Va(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Mi&&(e=Error(i(422),{cause:r}),zi(pi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=pi(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=pi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Va(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`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Va(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(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 Yi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(W&&s&&Ti(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=si(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=ai(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(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 cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ha(t,a===null?null:a.cachePool),a===null?Xa():Ya(t,a),no(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ha(t,null),Xa(),ro(t)):(ha(t,a.cachePool),Ya(t,a),ro(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ma();return a=a===null?null:{parent:na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ha(t,null),Xa(),no(t),e!==null&&qi(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Na(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(W){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(to(t),(e=ki)?(e=rf(e,ji),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bi===null?null:{id:xi,overflow:Si},retryLane:536870912,hydrationErrors:null},n=ui(e),n.return=t,t.child=n,Oi=t,ki=null)):e=null,e===null)throw Ni(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(to(t),a)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(tc||qi(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=Rl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),gu(r,e,s),ec;Ou(),t=uc(e,t,n)}else e=o.treeContext,ki=cf(s.nextSibling),Oi=t,W=!0,Ai=null,ji=!1,e!==null&&Di(t,e),t=lc(t,r),t.flags|=4096;return t}return e=ai(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(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 pc(e,t,n,r,i){return Yi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(W&&r&&Ti(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Yi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(W&&r&&Ti(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Yi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Xi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ia(t),o=n.contextType,a.context=typeof o==`object`&&o?Xi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(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&&Vs.enqueueReplaceState(a,a.state,null),Wa(t,r,a,i),Ua(),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=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Xi(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)&&Us(t,a,r,o),Fa=!1;var f=t.memoizedState;a.state=f,Wa(t,r,a,i),Ua(),l=t.memoizedState,s||f!==l||Fa?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Fa||Hs(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,La(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Xi(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)&&Us(t,a,r,c),Fa=!1,f=t.memoizedState,a.state=f,Wa(t,r,a,i),Ua();var p=t.memoizedState;o!==d||f!==p||Fa||e!==null&&e.dependencies!==null&&Ji(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Fa||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ji(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,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Li(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:ga()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ao.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(W){if(a?eo(t):ro(t),(e=ki)?(e=rf(e,ji),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bi===null?null:{id:xi,overflow:Si},retryLane:536870912,hydrationErrors:null},n=ui(e),n.return=t,t.child=n,Oi=t,ki=null)):e=null,e===null)throw Ni(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ro(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=ci(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(eo(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(eo(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=ci(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Na(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(eo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,zi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||qi(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=Rl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),gu(s,e,r),ec;af(c)||Ou(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ki=cf(c.nextSibling),Oi=t,W=!0,Ai=null,ji=!1,e!==null&&Di(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(ro(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ai(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ci(c,a,n,null),c.flags|=2):c=ai(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=ga():(l=na._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(eo(t),n=e.child,e=n.sibling,n=ai(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=U(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Na(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gi(e.return,t,n)}function Tc(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 Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ao.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(ao,o),nc(e,t,r,n),r=W?_i:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(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`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(qi(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=ai(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ai(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ji(e))):!0}function kc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ui(t,na,e.memoizedState.cache),Li();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(eo(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(eo(t),t.flags|=128,null);eo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(ao,ao.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Ui(t,na,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}else tc=!1,W&&t.flags&1048576&&wi(t,_i,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e==`function`)ii(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=rc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,La(e,t),Wa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ui(t,na,r),r!==o.cache&&Ki(t,[na],n,!0),Ua(),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=gc(e,t,r,n);break a}else if(r!==a){a=pi(Error(i(424)),t),zi(a),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ki=cf(e.firstChild),Oi=t,W=!0,Ai=null,ji=!0,n=Pa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Li(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(n=t.type,e=t.pendingProps,r=Bd(se.current).createElement(n),r[it]=t,r[at]=e,Pd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&W&&(r=t.stateNode=ff(t.type,t.pendingProps,se.current),Oi=t,ji=!0,a=ki,Zd(t.type)?(lf=a,ki=cf(r.firstChild)):ki=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((a=r=ki)&&(r=tf(r,t.type,t.pendingProps,ji),r===null?a=!1:(t.stateNode=r,Oi=t,ki=cf(r.firstChild),ji=!1,a=!0)),a||Ni(t)),de(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&W&&((e=n=ki)&&(n=nf(n,t.pendingProps,ji),n===null?e=!1:(t.stateNode=n,Oi=t,ki=null,e=!0)),e||Ni(t)),null;case 13:return bc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ui(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Yi(t),a=Xi(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Yi(t),r=Xi(na),e===null?(a=ma(),a===null&&(a=Rl,o=ra(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ia(t),Ui(t,na,a)):((e.lanes&n)!==0&&(La(e,t),Wa(t,null,null,n),Ua()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ui(t,na,r),r!==a.cache&&Ki(t,[na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ui(t,na,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw wa=ba,va}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Tu())e.flags|=8192;else throw wa=ba,va}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,Xl|=t)}function Fc(e,t){if(!W)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var 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}}function Ic(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&65011712,r|=i.flags&65011712,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 Lc(e,t,n){var r=t.pendingProps;switch(Ei(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Wi(na),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ri())),Ic(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,a,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,a,e,r,n)),null;case 27:if(fe(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}e=ae.current,Ii(t)?Pi(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}if(o=ae.current,Ii(t))Pi(t,o);else{var s=Bd(se.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[it]=t,o[at]=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(Pd(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&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Oi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ni(t,!0)}else e=Bd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(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[it]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(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[it]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(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),Pc(t,t.updateQueue),Ic(t),null);case 4:return ue(),e===null&&xd(t.stateNode.containerInfo),Ic(t),null;case 10:return Wi(t.type),Ic(t),null;case 19:if(ie(ao),r=t.memoizedState,r===null)return Ic(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Fc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)oi(n,e),n=n.sibling;return R(ao,ao.current&1|2),W&&Ci(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>nu&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}else{if(!a)if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!W)return Ic(t),null}else 2*Te()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,Fc(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)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=ao.current,R(ao,a?n&1|2:n&1),W&&Ci(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(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&&ie(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(Ei(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(ao),null;case 4:return ue(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&ie(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function zc(e,t){switch(Ei(t),t.tag){case 3:Wi(na),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:ie(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&ie(pa);break;case 24:Wi(na)}}function Bc(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){Ku(t,t.return,e)}}function Vc(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){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Ku(e,e.return,t)}}}function Uc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Wc(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:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(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){Ku(e,t,n)}else n.current=null}function Kc(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){Ku(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[at]=t}catch(t){Ku(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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&&Zd(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 Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[it]=e,t[at]=n}catch(t){Ku(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ku(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:yl(e,n),r&4&&Bc(5,n);break;case 1:if(yl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ku(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ku(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(yl(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{Ka(e,t)}catch(e){Ku(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:yl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:yl(e,n);break;case 31:yl(e,n),r&4&&dl(e,n);break;case 13:yl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?q(e,n,(n.subtreeFlags&8772)!=0):yl(e,n),$c=i,el=a}break;case 30:break;default:yl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(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 sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Ku(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Ku(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Ku(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Ku(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{Ut(a,``)}catch(t){Ku(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ku(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Ku(e,e.return,t)}tl&&(tl=!1,K(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||bl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Ku(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Ku(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Ku(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ut(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Ku(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function K(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;K(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),bl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),bl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function q(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:q(i,a,n),Bc(4,a);break;case 1:if(q(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ku(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ga(c[i],s)}catch(e){Ku(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:q(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:q(i,a,n);break;case 31:q(i,a,n),n&&o&4&&dl(i,a);break;case 13:q(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&q(i,a,n),Wc(a,a.return);break;case 30:break;default:q(i,a,n)}t=t.sibling}}function xl(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&&ia(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Ku(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!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:Tl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(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:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Ol(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(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 jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(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:ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Fl={getCacheForType:function(e){var t=Xi(na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xi(na).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,J=null,Y=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Ll&2&&Y!==0?Y&-Y:F.T===null?tt():ud()}function hu(){if(Yl===0)if(!(Y&536870912)||W){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),Yl=e}else Yl=536870912;return e=Qa.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Rl&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Y,Yl,!1)),Je(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(ql|=n),Gl===4&&bu(e,Y,Yl,!1)),rd(e))}function _u(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||We(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}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=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(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)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-Te(),10<a)){if(bu(r,t,Yl,!Vl),Ue(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Kd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}}break}while(1);rd(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},kl(t,a,d);var m=(a&62914560)===a?eu-Te():(a&4194048)===a?tu-Te():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(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(!H(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 bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function xu(){return Ll&6?!0:(id(0,!1),!1)}function Su(){if(J!==null){if(zl===0)var e=J.return;else e=J,Hi=Vi=null,Eo(e),Da=null,Oa=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Rl=e,J=n=ai(e.current,null),Y=t,zl=0,Bl=null,Vl=!1,Hl=We(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,Xr(),n}function wu(e,t){G=null,F.H=Is,t===_a||t===ya?(t=Ta(),zl=3):t===va?(t=Ta(),zl=4):zl=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,J===null&&(Gl=1,Js(e,pi(t,e.current)))}function Tu(){var e=Qa.current;return e===null?!0:(Y&4194048)===Y?$a===null:(Y&62914560)===Y||Y&536870912?e===$a:!1}function Eu(){var e=F.H;return F.H=Is,e===null?Is:e}function Du(){var e=F.A;return F.A=Fl,e}function Ou(){Gl=4,Vl||(Y&4194048)!==Y&&Qa.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Rl===null||bu(Rl,Y,Yl,!1)}function ku(e,t,n){var r=Ll;Ll|=2;var i=Eu(),a=Du();(Rl!==e||Y!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&J!==null){var s=J,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:Qa.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Hi=Vi=null,Ll=r,F.H=i,F.A=a,J===null&&(Rl=null,Y=0,Xr()),o}function Au(){for(;J!==null;)Nu(J)}function ju(e,t){var n=Ll;Ll|=2;var r=Eu(),a=Du();Rl!==e||Y!==t?(ru=null,nu=Te()+500,Cu(e,t)):Hl=We(e,t);a:do try{if(zl!==0&&J!==null){t=J;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(xa(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Rl!==e||(zl=7),rd(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:xa(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Iu(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Hi=Vi=null,F.H=r,F.A=a,Ll=n,J===null?(Rl=null,Y=0,Xr(),Gl):0}function Mu(){for(;J!==null&&!Ce();)Nu(J)}function Nu(e){var t=Ac(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):J=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:zc(n,t),t=J=oi(t,Wl),t=Ac(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):J=t}function Fu(e,t,n,r){Hi=Vi=null,Eo(t),Da=null,Oa=0;var i=t.return;try{if($s(e,i,t,n,Y)){Gl=1,Js(e,pi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Gl=1,Js(e,pi(n,e.current)),J=null;return}t.flags&32768?(W||r===1?e=!0:Hl||Y&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=Lc(t.alternate,t,Wl);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Gl=6,J=null}function Ru(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Uu();while(au!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,Ye(e,n,o,s,c,l),e===Rl&&(J=Rl=null,Y=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(ke,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Ll,Ll|=4;try{il(e,t,n)}finally{Ll=s,I.p=a,F.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Ll;Ll|=4;try{_l(t,e);var a=zd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(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 _=xr(s,h),v=xr(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}}sp=!!Rd,zd=Rd=null}finally{Ll=i,I.p=r,F.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Ll;Ll|=4;try{al(e,t.alternate,t)}finally{Ll=i,I.p=r,F.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,we();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),et(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}cu&3&&Uu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,id(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ia(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=et(cu),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,id(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{I.p=a,F.T=r,Hu(e,t)}}function Gu(e,t,n){t=pi(n,t),t=Xs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Je(e,2),rd(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=pi(n,e),n=Zs(2),r=za(t,n,2),r!==null&&(Qs(n,r,t,e),Je(r,2),rd(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;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)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>Te()-eu?!(Ll&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),rd(e)}function Yu(e,t){t===0&&(t=Ke()),e=$r(e,t),e!==null&&(Je(e,t),rd(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(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),Yu(e,n)}function Qu(e,t){return xe(e,t)}var $u=null,ed=null,td=!1,X=!1,nd=!1,Z=0;function rd(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),X=!0,td||(td=!0,ld())}function id(e,t){if(!nd&&X){nd=!0;do for(var n=!1,r=$u;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-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Y,a=Ue(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,cd(r,a));r=r.next}while(n);nd=!1}}function ad(){od()}function od(){X=td=!1;var e=0;Z!==0&&Gd()&&(e=Z);for(var t=Te(),n=null,r=$u;r!==null;){var i=r.next,a=Q(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(X=!0)),r=i}au!==0&&au!==5||id(e,!1),Z!==0&&(Z=0)}function Q(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),et(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=Ae;break;default:n=ke}return r=sd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=Y;return r=Ue(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),Q(e,Te()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Uu())return null;_u(e,t,!0)}function ld(){Yd(function(){Ll&6?xe(De,ad):od()})}function ud(){if(Z===0){var e=sa;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),Z=e}return Z}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Z!==0){var e=o?fd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Wr.length;md++){var hd=Wr[md];Gr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;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){Kr(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){Kr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,vt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!cn||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 Cd(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=pt(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}an(function(){var r=a,i=$t(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:l=Ln;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;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=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Ir:case Lr:case Rr:l=kn;break;case Hr:l=zn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=V;break;case`toggle`:case`beforetoggle`:l=Vn}var d=(t&4)!=0,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(wd(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(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Qt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=V,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c))if(cr)v=_r;else{v=hr;var y=mr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&qt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&zt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Un)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Zn=!0)),y=Td(r,x),0<y.length&&(x=new jn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new jn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(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(wd(e,i,a)),i=on(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(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(wd(n,l,c))):i||(l=on(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
|
|
10
|
+
`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+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}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;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));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=Xt(``+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`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`:$(`beforetoggle`,e),$(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Jt.get(n)||n,Et(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Kt(e,r,o);break;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));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`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:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`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:Md(e,t,r,d,n,null)}}Rt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Bt(e,!!r,n,!0):Bt(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:Md(e,t,s,c,n,null)}Ht(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:Md(e,t,u,r,n,null)}return;default:if(qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(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)||Md(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`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Lt(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)||Md(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`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Bt(e,!!n,n?[]:``,!1):Bt(e,!!n,t,!0)):Bt(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:Md(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`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Vt(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:Md(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`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if(qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(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||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[dt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=I.d;I.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=xu();return e||t}function yf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=gt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);_t(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=gt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),_t(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=gt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),_t(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=se.current)?gf(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`?(t=Af(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,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=Af(n.href);var o=gt(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,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`?(t=Pf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+It(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),_t(t),e.head.appendChild(t))}function Pf(e){return`[src="`+It(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,_t(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[dt]||a[it]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:b,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function $f(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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=U(3,null,null,t),e.current=a,a.stateNode=e,t=ra(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ia(a),e}function tp(e){return e?(e=ni,e):ni}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=za(e,r,t),n!==null&&(gu(n,e,t),Ba(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&gu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=mu();t=$e(t);var n=$r(e,t);n!==null&&gu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Ll&6)&&(nu=Te()+500,id(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&gu(s,a,2),xu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=$t(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=pt(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 fp=e,null}function mp(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`resize`: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`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`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ee()){case De:return 2;case Oe:return 8;case ke:case z:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=mt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=pt(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,nt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=mt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[at]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,mu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),xu(),t[ot]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.6`)throw Error(i(527,Lp,`19.2.6`));I.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:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ne=zp.inject(Rp),Pe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;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=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[ot]=t.current,xd(e),new Fp(t)}})),M=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=j()})),N=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})),P=o(((e,t)=>{t.exports=N()})),ee=l(M(),1),F=l(E(),1),I=P(),te=[`shift`,`alt`,`meta`,`mod`,`ctrl`,`control`];function ne(){return typeof navigator>`u`?!1:/mac/i.test(navigator.userAgent)&&!/iphone|ipad|ipod/i.test(navigator.userAgent)}var re={esc:`escape`,return:`enter`,left:`arrowleft`,right:`arrowright`,up:`arrowup`,down:`arrowdown`,ShiftLeft:`shift`,ShiftRight:`shift`,AltLeft:`alt`,AltRight:`alt`,MetaLeft:`meta`,MetaRight:`meta`,OSLeft:`meta`,OSRight:`meta`,ControlLeft:`ctrl`,ControlRight:`ctrl`};function L(e){return(re[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,``)}function ie(e){return te.includes(e)}function R(e,t=`,`){return e.toLowerCase().split(t)}function ae(e,t=`+`,n=`>`,r=!1,i,a){let o=[],s=!1;e=e.trim(),e.includes(n)?(s=!0,o=e.toLocaleLowerCase().split(n).map(e=>L(e))):o=e.toLocaleLowerCase().split(t).map(e=>L(e));let c={alt:o.includes(`alt`),ctrl:o.includes(`ctrl`)||o.includes(`control`),shift:o.includes(`shift`),meta:o.includes(`meta`),mod:o.includes(`mod`),useKey:r},l=o.filter(e=>!te.includes(e));return{...c,keys:l,description:i,isSequence:s,hotkey:e,metadata:a}}typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.code!==void 0&&le([L(e.code)])}),document.addEventListener(`keyup`,e=>{e.code!==void 0&&ue([L(e.code)])})),typeof window<`u`&&(window.addEventListener(`blur`,()=>{oe.clear()}),window.addEventListener(`focus`,()=>{oe.clear()}),window.addEventListener(`contextmenu`,()=>{setTimeout(()=>{oe.clear()},0)})),typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{oe.clear()});var oe=new Set;function se(e){return Array.isArray(e)}function ce(e,t=`,`){return(se(e)?e:e.split(t)).every(e=>oe.has(e.trim().toLowerCase()))}function le(e){let t=Array.isArray(e)?e:[e];oe.has(`meta`)&&oe.forEach(e=>{ie(e)||oe.delete(e.toLowerCase())}),t.forEach(e=>{oe.add(e.toLowerCase())})}function ue(e){e===`meta`?oe.clear():(Array.isArray(e)?e:[e]).forEach(e=>{oe.delete(e.toLowerCase())})}function de(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function fe(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}var pe=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`];function me(e){return he(e,pe)}function he(e,t=!1){let{target:n,composed:r}=e,i,a;return ge(n)&&r?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,a=e.composedPath()[0]&&e.composedPath()[0].role):(i=n&&n.tagName,a=n&&n.role),se(t)?!!(i&&t?.some(e=>e.toLowerCase()===i.toLowerCase()||e===a)):!!(i&&t&&t)}function ge(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function _e(e,t){return e.length===0&&t?!1:t?e.some(e=>t.includes(e))||e.includes(`*`):!0}var ve=(e,t,n=!1)=>{let{alt:r,meta:i,mod:a,shift:o,ctrl:s,keys:c,useKey:l}=t,{code:u,key:d,ctrlKey:f,metaKey:p,shiftKey:m,altKey:h}=e,g=L(u);if(l&&c?.length===1&&c.includes(d.toLowerCase()))return!0;if(!c?.includes(g)&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(g))return!1;if(!n){if(r!==h&&g!==`alt`||o!==m&&g!==`shift`)return!1;if(a){if(ne()?!p:!f)return!1}else if(i!==p&&g!==`meta`&&g!==`os`||s!==f&&g!==`ctrl`&&g!==`control`)return!1}return c&&c.length===1&&c.includes(g)?!0:c&&c.length>0?c.includes(g)?ce(c):!1:!c||c.length===0},ye=(0,F.createContext)(void 0),be=()=>(0,F.useContext)(ye);function xe({addHotkey:e,removeHotkey:t,children:n}){return(0,I.jsx)(ye.Provider,{value:{addHotkey:e,removeHotkey:t},children:n})}function Se(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&Se(e[r],t[r]),!0):e===t}var Ce=(0,F.createContext)({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),we=()=>(0,F.useContext)(Ce),Te=({initiallyActiveScopes:e=[`*`],children:t})=>{let[n,r]=(0,F.useState)(e),[i,a]=(0,F.useState)([]),o=(0,F.useCallback)(e=>{r(t=>t.includes(`*`)?[e]:Array.from(new Set([...t,e])))},[]),s=(0,F.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]),c=(0,F.useCallback)(e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):t.includes(`*`)?[e]:Array.from(new Set([...t,e])))},[]),l=(0,F.useCallback)(e=>{a(t=>[...t,e])},[]),u=(0,F.useCallback)(e=>{a(t=>t.filter(t=>!Se(t,e)))},[]);return(0,I.jsx)(Ce.Provider,{value:{activeScopes:n,hotkeys:i,enableScope:o,disableScope:s,toggleScope:c},children:(0,I.jsx)(xe,{addHotkey:l,removeHotkey:u,children:t})})};function Ee(e){let t=(0,F.useRef)(void 0);return Se(t.current,e)||(t.current=e),t.current}var De=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Oe=typeof window<`u`?F.useLayoutEffect:F.useEffect;function ke(e){if(!e)return;let{enabled:t,preventDefault:n,ignoreEventWhen:r,...i}=e;return typeof t==`function`?i:{...i,enabled:t}}function z(e,t,n,r){let[i,a]=(0,F.useState)(null),o=(0,F.useCallback)(e=>(a(e),()=>a(null)),[]),s=(0,F.useRef)(!1),c=Array.isArray(n)?Array.isArray(r)?void 0:r:n,l=se(e)?e.join(c?.delimiter):e,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,d=(0,F.useCallback)(t,u??[]),f=(0,F.useRef)(d);u?f.current=d:f.current=t;let p=Ee(ke(c)),m=(0,F.useRef)(c?.enabled);m.current=c?.enabled;let h=(0,F.useRef)(c?.preventDefault);h.current=c?.preventDefault;let g=(0,F.useRef)(c?.ignoreEventWhen);g.current=c?.ignoreEventWhen;let{activeScopes:_}=we(),v=be();return Oe(()=>{if(m.current===!1||!_e(_,p?.scopes))return;let e=[],t,n=(n,r=!1)=>{if(!(me(n)&&!he(n,p?.enableOnFormTags))){if(i!==null){let e=i.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&e.activeElement!==i&&!i.contains(e.activeElement)){De(n);return}}n.target?.isContentEditable&&!p?.enableOnContentEditable||R(l,p?.delimiter).forEach(i=>{if(i.includes(p?.splitKey??`+`)&&i.includes(p?.sequenceSplitKey??`>`)){console.warn(`Hotkey ${i} contains both ${p?.splitKey??`+`} and ${p?.sequenceSplitKey??`>`} which is not supported.`);return}let a=ae(i,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata);if(a.isSequence){t=setTimeout(()=>{e=[]},p?.sequenceTimeoutMs??1e3);let r=a.useKey?n.key:L(n.code);if(ie(r.toLowerCase()))return;if(e.push(r),r!==a.keys?.[e.length-1]){e=[],t&&clearTimeout(t);return}e.length===a.keys?.length&&(f.current(n,a),t&&clearTimeout(t),e=[])}else if(ve(n,a,p?.ignoreModifiers)||a.keys?.includes(`*`)){if(g.current?.(n)||r&&s.current||(de(n,a,h.current),!fe(n,a,m.current)))return;f.current(n,a),r||(s.current=!0)}})}},r=e=>{e.code!==void 0&&(le(L(e.code)),(p?.keydown===void 0&&p?.keyup!==!0||p?.keydown)&&n(e))},a=e=>{e.code!==void 0&&(ue(L(e.code)),s.current=!1,p?.keyup&&n(e,!0))},o=i||c?.document||document;return o.addEventListener(`keyup`,a,c?.eventListenerOptions),o.addEventListener(`keydown`,r,c?.eventListenerOptions),v&&R(l,p?.delimiter).forEach(e=>{v.addHotkey(ae(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),()=>{o.removeEventListener(`keyup`,a,c?.eventListenerOptions),o.removeEventListener(`keydown`,r,c?.eventListenerOptions),v&&R(l,p?.delimiter).forEach(e=>{v.removeHotkey(ae(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),e=[],t&&clearTimeout(t)}},[i,p,_,l]),o}var Ae=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),je=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Me=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ne=e=>{let t=Me(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Fe=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ie=(0,F.createContext)({}),Le=()=>(0,F.useContext)(Ie),Re=(0,F.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Le()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,F.createElement)(`svg`,{ref:c,...Pe,width:t??l??Pe.width,height:t??l??Pe.height,stroke:e??f,strokeWidth:m,className:Ae(`lucide`,p,i),...!a&&!Fe(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,F.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),B=(e,t)=>{let n=(0,F.forwardRef)(({className:n,...r},i)=>(0,F.createElement)(Re,{ref:i,iconNode:t,className:Ae(`lucide-${je(Ne(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ne(e),n},ze=B(`arrow-down-from-line`,[[`path`,{d:`M19 3H5`,key:`1236rx`}],[`path`,{d:`M12 21V7`,key:`gj6g52`}],[`path`,{d:`m6 15 6 6 6-6`,key:`h15q88`}]]),Be=B(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Ve=B(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),He=B(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ue=B(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),We=B(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ge=B(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),Ke=B(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),qe=B(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Je=B(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),Ye=B(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Xe=B(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),Ze=B(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Qe=B(`eye`,[[`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`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),$e=B(`file-diff`,[[`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`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),et=B(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),tt=B(`file-plus`,[[`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`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),nt=B(`file-x`,[[`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`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m14.5 12.5-5 5`,key:`b62r18`}],[`path`,{d:`m9.5 12.5 5 5`,key:`1rk7el`}]]),rt=B(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),it=B(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),at=B(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ot=B(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),st=B(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),ct=B(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),lt=B(`message-square-reply`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`m10 8-3 3 3 3`,key:`fp6dz7`}],[`path`,{d:`M17 14v-1a2 2 0 0 0-2-2H7`,key:`1tkjnz`}]]),ut=B(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),dt=B(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),ft=B(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),pt=B(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),mt=B(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ht=B(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),gt=B(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),_t=B(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),vt=B(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),yt=B(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),bt=B(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),xt=B(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),St=`split`;function Ct(e){switch(e){case`split`:case`side-by-side`:return`split`;case`unified`:case`inline`:return`unified`;default:return St}}var wt=`abcdefghijklmnopqrstuvwxyz0123456789`,Tt=16;function Et(){return Array.from({length:Tt},()=>wt[Math.floor(Math.random()*36)]).join(``)}function Dt(e){return typeof e.line==`number`?`${e.side}:${e.line}`:`${e.side}:${e.line.start}-${e.line.end}`}function Ot(e,t){return Dt(e)===Dt(t)}function kt(e){return e?.trim()||``}function At(e,t,n=!0){return n&&t.id&&e.id===t.id?!0:!(kt(e.author)!==kt(t.author)||e.body!==t.body||t.createdAt&&e.createdAt!==t.createdAt)}function jt(e,t){if(t.id&&e.id===t.id)return!0;if(e.filePath!==t.filePath||!Ot(e.position,t.position))return!1;let n=e.messages[0];return n?At(n,t,!0):!1}function Mt(e,t){let n=e.createdAt??t;return{createdAt:n,updatedAt:e.updatedAt??n}}function Nt(e,t){return e.localeCompare(t)>=0?e:t}function Pt(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function Ft(e,t){let{createdAt:n,updatedAt:r}=Mt(e,t),i=e.id??Et();return{id:i,filePath:e.filePath,createdAt:n,updatedAt:r,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id??i,body:e.body,author:e.author,createdAt:n,updatedAt:r}]}}function It(e,t){let{createdAt:n,updatedAt:r}=Mt(e,t);return{id:e.id??Et(),body:e.body,author:e.author,createdAt:n,updatedAt:r}}function Lt(e){return typeof e==`number`?e:{start:e.start,end:e.end}}function Rt(e){return{side:e.side,line:Lt(e.line)}}function zt(e){if(e)return{content:e.content,language:e.language}}function Bt(e){return{id:e.id,body:e.body,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt}}function Vt(e){return{id:e.id,filePath:e.filePath,createdAt:e.createdAt,updatedAt:e.updatedAt,position:Rt(e.position),codeSnapshot:zt(e.codeSnapshot),messages:e.messages.map(Bt)}}function Ht(e,t){return e.id===t.id?!0:kt(e.author)===kt(t.author)?e.body===t.body&&e.createdAt===t.createdAt:!1}function Ut(e,t){if(e.id===t.id)return!0;if(e.filePath!==t.filePath||!Ot(e.position,t.position))return!1;let n=e.messages[0],r=t.messages[0];return!n||!r?!1:Ht(n,r)}function Wt(e,t){let n=e.createdAt.localeCompare(t.createdAt);return n===0?e.id.localeCompare(t.id):n}function Gt(e,t){return t.updatedAt.localeCompare(e.updatedAt)>=0?Bt(t):Bt(e)}function Kt(e,t){let n=e.messages.map(Bt);for(let e of t.messages){let t=n.findIndex(t=>Ht(t,e));if(t>=0){n[t]=Gt(n[t],e);continue}n.push(Bt(e))}let[r,...i]=n,a=r?[r,...i.sort(Wt)]:i.sort(Wt),o=a.reduce((e,t)=>Nt(e,t.updatedAt),Nt(e.updatedAt,t.updatedAt));return{...Vt(e),createdAt:e.createdAt.localeCompare(t.createdAt)<=0?e.createdAt:t.createdAt,updatedAt:o,position:Rt(e.position),codeSnapshot:zt(t.codeSnapshot??e.codeSnapshot),messages:a}}function qt(e,t){let n=e.map(Vt);for(let e of t){let t=n.findIndex(t=>Ut(t,e));if(t<0){n.push(Vt(e));continue}n[t]=Kt(n[t],e)}return{threads:n,warnings:[]}}function Jt(e,t){let n=e.map(Vt),r=[];for(let e of t){let t=new Date().toISOString();if(e.type===`thread`){if(n.some(t=>jt(t,e)))continue;n.push(Ft(e,t));continue}let i=n.filter(t=>t.filePath===e.filePath&&Ot(t.position,e.position)).sort(Pt)[0];if(!i){r.push(`Skipped reply import for ${e.filePath}:${Dt(e.position)} because no matching thread was found.`);continue}if(i.messages.some(t=>At(t,e,!0)))continue;let a=It(e,t);i.messages=[...i.messages,a],i.updatedAt=Nt(i.updatedAt,a.updatedAt)}return{threads:n,warnings:r}}function Yt(e){return e??`direct`}function Xt(e,t,n){return Yt(n)===`merge-base`?{baseCommitish:e,targetCommitish:t,baseMode:`merge-base`}:{baseCommitish:e,targetCommitish:t}}function Zt(e,t){return e?.baseCommitish===t?.baseCommitish&&e?.targetCommitish===t?.targetCommitish&&Yt(e?.baseMode)===Yt(t?.baseMode)}function Qt(e){return`${e.baseCommitish}:${e.targetCommitish}:${Yt(e.baseMode)}`}function $t({checked:e,onChange:t,label:n,className:r=``,title:i}){return(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${r}`,title:i,onClick:n=>{n.stopPropagation(),t(!e)},onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),n.stopPropagation(),t(!e))},role:`checkbox`,"aria-checked":e,tabIndex:0,children:[(0,I.jsx)(`div`,{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?`bg-github-accent border-github-accent`:`bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50`}`,children:e&&(0,I.jsx)(Ve,{size:10,className:`text-white`})}),n&&(0,I.jsx)(`span`,{className:`select-none`,children:n})]})}function en({commentsCount:e,isCopiedAll:t,onCopyAll:n,onDeleteAll:r,onViewAll:i,direction:a=`down`,compact:o=!1}){let[s,c]=(0,F.useState)(!1),l=(0,F.useRef)(null),u=o,d=a===`up`;(0,F.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let f=()=>{n(),c(!1)},p=()=>{r(),c(!1)},m=()=>{i?.(),c(!1)},h=u?t?`Copied`:`Copy All (${e})`:t?`Copied All!`:`Copy All Prompt (${e})`;return(0,I.jsxs)(`div`,{className:`relative`,ref:l,children:[(0,I.jsxs)(`div`,{className:`flex`,children:[(0,I.jsxs)(`button`,{onClick:f,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${u?`whitespace-normal`:`whitespace-nowrap`}`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`,borderRight:`none`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},title:`Copy all ${e} comments to AI coding agent`,children:[t?(0,I.jsx)(Ve,{size:12}):(0,I.jsx)(Ye,{size:12}),h]}),(0,I.jsx)(`button`,{onClick:()=>c(!s),className:`text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,borderTop:`1px solid var(--color-yellow-btn-border)`,borderRight:`1px solid var(--color-yellow-btn-border)`,borderBottom:`1px solid var(--color-yellow-btn-border)`,borderLeft:`1px solid var(--color-yellow-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},title:`More options`,children:(0,I.jsx)(He,{size:12,className:`transition-transform duration-200 ${s?`rotate-180`:``}`})})]}),s&&(0,I.jsxs)(`div`,{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${d?`bottom-full rounded-t`:`top-full rounded-b`}`,style:{borderTop:d?void 0:`none`,borderBottom:d?`none`:void 0},children:[i&&(0,I.jsxs)(`button`,{onClick:m,className:`w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors`,disabled:e===0,children:[(0,I.jsx)(st,{size:12}),`View All Comments`]}),(0,I.jsxs)(`button`,{onClick:p,className:`w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors`,children:[(0,I.jsx)(Xe,{size:12}),`Cleanup All Prompt`]})]})]})}function tn(e){if(typeof document>`u`||typeof document.execCommand!=`function`)throw Error(`Clipboard is unavailable in this environment`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.setAttribute(`aria-hidden`,`true`),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`-9999px`,t.style.opacity=`0`;let n=document.getSelection(),r=n?.rangeCount?n.getRangeAt(0):null,i=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.append(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);let a=document.execCommand(`copy`);if(t.remove(),n&&r&&(n.removeAllRanges(),n.addRange(r)),i?.focus(),!a)throw Error(`Failed to copy text`)}async function nn(e){try{if(typeof navigator>`u`||typeof navigator.clipboard?.writeText!=`function`)throw Error(`Modern clipboard API is unavailable`);await navigator.clipboard.writeText(e);return}catch{tn(e)}}function rn(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function an(e){let t=[],n=/```suggestion\n([\s\S]*?)```/g,r;for(;(r=n.exec(e))!==null;)t.push({suggestedCode:r[1].replace(/\n$/,``),startIndex:r.index,endIndex:r.index+r[0].length});return t}function on(e){return`\`\`\`suggestion\n${e.endsWith(`
|
|
11
|
+
`)?e:e+`
|
|
12
|
+
`}\`\`\``}var sn=(0,F.createContext)({getOldTokens:null,getNewTokens:null});function cn({value:e,children:t}){return(0,I.jsx)(sn.Provider,{value:e,children:t})}function ln(){return(0,F.useContext)(sn)}var un=2,dn=100;function fn(e){return!(e.length<un||e.length>dn)}function pn(e){return e.toLowerCase()}function mn(e){let t=e.trim();return t?t.match(/^\w+$/)!==null&&fn(t):!1}var hn=200,gn=(0,F.createContext)(void 0);function _n({children:e}){let[t,n]=(0,F.useState)(null),r=(0,F.useRef)(null),i=(0,F.useCallback)(()=>{r.current&&=(clearTimeout(r.current),null)},[]),a=(0,F.useCallback)(e=>{let t=e.target;if(!t.classList.contains(`word-token`))return;i();let a=t.getAttribute(`data-word`);a&&(r.current=setTimeout(()=>{n(a)},hn))},[i]),o=(0,F.useCallback)(()=>{i(),n(null)},[i]),s=(0,F.useCallback)(e=>t?pn(e)===pn(t):!1,[t]);(0,F.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);let c=(0,F.useMemo)(()=>({highlightedWord:t,handleMouseOver:a,handleMouseOut:o,isWordHighlighted:s}),[t,a,o,s]);return(0,I.jsx)(gn.Provider,{value:c,children:e})}function vn(){let e=(0,F.useContext)(gn);if(!e)throw Error(`useWordHighlight must be used within a WordHighlightProvider`);return e}function yn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function bn(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yn(e))&&(r&&(r+=` `),r+=t);return r}var xn=Object.create,Sn=Object.defineProperty,Cn=Object.defineProperties,wn=Object.getOwnPropertyDescriptor,Tn=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertyNames,Dn=Object.getOwnPropertySymbols,On=Object.getPrototypeOf,kn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,jn=(e,t,n)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mn=(e,t)=>{for(var n in t||={})kn.call(t,n)&&jn(e,n,t[n]);if(Dn)for(var n of Dn(t))An.call(t,n)&&jn(e,n,t[n]);return e},Nn=(e,t)=>Cn(e,Tn(t)),Pn=(e,t)=>{var n={};for(var r in e)kn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dn)for(var r of Dn(e))t.indexOf(r)<0&&An.call(e,r)&&(n[r]=e[r]);return n},Fn=(e,t)=>function(){return t||(0,e[En(e)[0]])((t={exports:{}}).exports,t),t.exports},In=(e,t)=>{for(var n in t)Sn(e,n,{get:t[n],enumerable:!0})},Ln=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of En(t))!kn.call(e,i)&&i!==n&&Sn(e,i,{get:()=>t[i],enumerable:!(r=wn(t,i))||r.enumerable});return e},V=((e,t,n)=>(n=e==null?{}:xn(On(e)),Ln(t||!e||!e.__esModule?Sn(n,`default`,{value:e,enumerable:!0}):n,e)))(Fn({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&`).replace(/</g,`<`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,`__id`,{value:++t}),e.__id},clone:function e(t,n){n||={};var i,a;switch(r.util.type(t)){case`Object`:if(a=r.util.objId(t),n[a])return n[a];for(var o in i={},n[a]=i,t)t.hasOwnProperty(o)&&(i[o]=e(t[o],n));return i;case`Array`:return a=r.util.objId(t),n[a]?n[a]:(i=[],n[a]=i,t.forEach(function(t,r){i[r]=e(t,n)}),i);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return`none`},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,`gi`),``),t.classList.add(`language-`+n)},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var i in t)n[i]=t[i];return n},insertBefore:function(e,t,n,i){i||=r.languages;var a=i[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=i[e];return i[e]=o,r.languages.DFS(r.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,i,a){a||={};var o=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],i||s);var c=t[s],l=r.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run(`before-tokenize`,a),!a.grammar)throw Error(`The language "`+a.language+`" has no grammar.`);return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run(`after-tokenize`,a),i.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new s;return c(i,i.head,e),o(e,i,t,i.head,0),u(i)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(!(!n||!n.length))for(var i=0,a;a=n[i++];)a(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}i.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var i=``;return t.forEach(function(t){i+=e(t,n)}),i}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),r.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`"`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function o(e,t,n,s,u,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=s.next,C=u;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof i)){var T=1,E;if(v){if(E=a(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof i)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=a(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),P=C+w.length;d&&P>d.reach&&(d.reach=P);var ee=S.prev;M&&(ee=c(t,ee,M),C+=M.length),l(t,ee,T);var F=new i(f,g?r.tokenize(j,g):j,y,j);if(S=c(t,ee,F),N&&c(t,S,N),T>1){var I={cause:f+`,`+m,reach:P};o(e,t,n,S.prev,C,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function l(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function u(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}return r}();t.exports=n,n.default=n}})());V.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},V.languages.markup.tag.inside[`attr-value`].inside.entity=V.languages.markup.entity,V.languages.markup.doctype.inside[`internal-subset`].inside=V.languages.markup,V.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&/,`&`))}),Object.defineProperty(V.languages.markup.tag,`addInlined`,{value:function(e,t){var n={},n=(n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:V.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),t=(n[`language-`+t]={pattern:/[\s\S]+/,inside:V.languages[t]},{});t[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:n},V.languages.insertBefore(`markup`,`cdata`,t)}}),Object.defineProperty(V.languages.markup.tag,`addAttribute`,{value:function(e,t){V.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:V.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),V.languages.html=V.languages.markup,V.languages.mathml=V.languages.markup,V.languages.svg=V.languages.markup,V.languages.xml=V.languages.extend(`markup`,{}),V.languages.ssml=V.languages.xml,V.languages.atom=V.languages.xml,V.languages.rss=V.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:`escape`},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r=`(?:[^\\\\-]|`+n.source+`)`,r=RegExp(r+`-`+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:`variable`};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:`operator`},"char-class-punctuation":{pattern:/^\[|\]$/,alias:`punctuation`},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:`operator`}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:`keyword`},{pattern:/\\k<[^<>']+>/,alias:`keyword`,inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:`function`},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:`punctuation`,inside:{"group-name":i}},{pattern:/\)/,alias:`punctuation`}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:`number`},alternation:{pattern:/\|/,alias:`keyword`}}}(V),V.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},V.languages.javascript=V.languages.extend(`clike`,{"class-name":[V.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),V.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,V.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:V.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:V.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:V.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:V.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:V.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),V.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:V.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),V.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),V.languages.markup&&(V.languages.markup.tag.addInlined(`script`,`javascript`),V.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),V.languages.js=V.languages.javascript,V.languages.actionscript=V.languages.extend(`javascript`,{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),V.languages.actionscript[`class-name`].alias=`function`,delete V.languages.actionscript.parameter,delete V.languages.actionscript[`literal-property`],V.languages.markup&&V.languages.insertBefore(`actionscript`,`string`,{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:V.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:`variable`};e.languages.coffeescript=e.languages.extend(`javascript`,{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:`variable`}}),e.languages.insertBefore(`coffeescript`,`comment`,{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:`comment`},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:`regex`,inside:{comment:t,interpolation:n}}}),e.languages.insertBefore(`coffeescript`,`string`,{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:`punctuation`},script:{pattern:/[\s\S]+/,alias:`language-javascript`,inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:`string`},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:`string`,inside:{interpolation:n}}]}),e.languages.insertBefore(`coffeescript`,`keyword`,{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript[`template-string`],e.languages.coffee=e.languages.coffeescript}(V),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,`addSupport`,{value:function(t,n){(t=typeof t==`string`?[t]:t).forEach(function(t){var r=function(e){e.inside||={},e.inside.rest=n},i=`doc-comment`;if(a=e.languages[t]){var a,o=a[i];if((o||=(a=e.languages.insertBefore(t,`comment`,{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:`comment`}}))[i])instanceof RegExp&&(o=a[i]={pattern:o}),Array.isArray(o))for(var s=0,c=o.length;s<c;s++)o[s]instanceof RegExp&&(o[s]={pattern:o[s]}),r(o[s]);else r(o)}})}}),t.addSupport([`java`,`javascript`,`php`],t)}(V),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined(`style`,`css`),t.tag.addAttribute(`style`,`css`))}(V),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+`)*\\]`),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:`keyword`},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside[`selector-function-argument`].inside=t,e.languages.insertBefore(`css`,`property`,{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore(`css`,`function`,{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:`color`},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(V),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r=`(?:`+n.source+`(?:[ ]+`+t.source+`)?|`+t.source+`(?:[ ]+`+n.source+`)?)`,i=`(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&'*,\\-:>?@[\\]\`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*`.replace(/<PLAIN>/g,function(){return`[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]`}),a=`"(?:[^"\\\\\\r\\n]|\\\\.)*"|'(?:[^'\\\\\\r\\n]|\\\\.)*'`;function o(e,t){t=(t||``).replace(/m/g,``)+`m`;var n=`([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))`.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)`.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)`.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return`(?:`+i+`|`+a+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:o(`\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?`),lookbehind:!0,alias:`number`},boolean:{pattern:o(`false|true`,`i`),lookbehind:!0,alias:`important`},null:{pattern:o(`null|~`,`i`),lookbehind:!0,alias:`important`},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(`[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)`,`i`),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(V),function(e){var t=`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var r="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",i=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return r}),a=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`,o=(e.languages.markdown=e.languages.extend(`markup`,{}),e.languages.insertBefore(`markdown`,`prolog`,{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:[`yaml`,`language-yaml`],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:`punctuation`},table:{pattern:RegExp(`^`+i+a+`(?:`+i+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+i+a+`)(?:`+i+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+i+`)`+a+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+i+`$`),inside:{"table-header":{pattern:RegExp(r),alias:`important`,inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:`keyword`},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:`important`,inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:`important`,inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:`punctuation`},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:`punctuation`},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:`url`},bold:{pattern:n(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(`(~~?)(?:(?!~)<inner>)+\\2`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:[`code`,`keyword`]},url:{pattern:n(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),[`url`,`bold`,`italic`,`strike`].forEach(function(t){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add(`after-tokenize`,function(e){e.language!==`markdown`&&e.language!==`md`||function e(t){if(t&&typeof t!=`string`)for(var n=0,r=t.length;n<r;n++){var i,a=t[n];a.type===`code`?(i=a.content[1],a=a.content[3],i&&a&&i.type===`code-language`&&a.type===`code-block`&&typeof i.content==`string`&&(i=i.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`),i=`language-`+(i=(/[a-z][\w-]*/i.exec(i)||[``])[0].toLowerCase()),a.alias?typeof a.alias==`string`?a.alias=[a.alias,i]:a.alias.push(i):a.alias=[i])):e(a.content)}}(e.tokens)}),e.hooks.add(`wrap`,function(t){if(t.type===`code-block`){for(var n=``,r=0,i=t.classes.length;r<i;r++){var a=t.classes[r],a=/language-(.+)/.exec(a);if(a){n=a[1];break}}var l,u=e.languages[n];u?t.content=e.highlight(function(e){return e=e.replace(o,``),e=e.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;return(t=t.toLowerCase())[0]===`#`?(n=t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1)),c(n)):s[t]||e})}(t.content),u,n):n&&n!==`none`&&e.plugins.autoloader&&(l=`md-`+new Date().valueOf()+`-`+Math.floor(0x2386f26fc10000*Math.random()),t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}),RegExp(e.languages.markup.tag.pattern.source,`gi`)),s={amp:`&`,lt:`<`,gt:`>`,quot:`"`},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(V),V.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:`string`,inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:V.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:`function`},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:`class-name`},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},V.hooks.add(`after-tokenize`,function(e){if(e.language===`graphql`)for(var t=e.tokens.filter(function(e){return typeof e!=`string`&&e.type!==`comment`&&e.type!==`scalar`}),n=0;n<t.length;){var r=t[n++];if(r.type===`keyword`&&r.content===`mutation`){var i=[];if(d([`definition-mutation`,`punctuation`])&&u(1).content===`(`){n+=2;var a=f(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=u(0);o.type===`variable`&&(p(o,`variable-input`),i.push(o.content))}n=a+1}if(d([`punctuation`,`property-query`])&&u(0).content===`{`&&(n++,p(u(0),`property-mutation`),0<i.length)){var s=f(/^\{$/,/^\}$/);if(s!==-1)for(var c=n;c<s;c++){var l=t[c];l.type===`variable`&&0<=i.indexOf(l.content)&&p(l,`variable-input`)}}}}function u(e){return t[n+e]}function d(e,t){t||=0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function f(e,r){for(var i=1,a=n;a<t.length;a++){var o=t[a],s=o.content;if(o.type===`punctuation`&&typeof s==`string`){if(e.test(s))i++;else if(r.test(s)&&--i===0)return a}}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}}),V.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript[`template-string`],n=t.pattern.source,r=t.inside.interpolation,i=r.inside[`interpolation-punctuation`],a=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp(`((?:`+r+`)\\s*)`+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run(`before-tokenize`,t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run(`after-tokenize`,t),t.tokens}function c(t,n,o){var c=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),l=0,u={},c=s(c.map(function(e){if(typeof e==`string`)return e;for(var n,r,e=e.content;t.indexOf((r=l++,n=`___`+o.toUpperCase()+`_`+r+`___`))!==-1;);return u[n]=e,n}).join(``),n,o),d=Object.keys(u);return l=0,function t(n){for(var a=0;a<n.length;a++){if(l>=d.length)return;var o,c,f,p,m,h,g,_=n[a];typeof _==`string`||typeof _.content==`string`?(o=d[l],(g=(h=typeof _==`string`?_:_.content).indexOf(o))!==-1&&(++l,c=h.substring(0,g),m=u[o],f=void 0,(p={})[`interpolation-punctuation`]=i,(p=e.tokenize(m,p)).length===3&&((f=[1,1]).push.apply(f,s(p[1],e.languages.javascript,`javascript`)),p.splice.apply(p,f)),f=new e.Token(`interpolation`,p,r.alias,m),p=h.substring(g+o.length),m=[],c&&m.push(c),m.push(f),p&&(t(h=[p]),m.push.apply(m,h)),typeof _==`string`?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):_.content=m)):(g=_.content,t(Array.isArray(g)?g:[g]))}}(c),new e.Token(o,c,`language-`+o,t)}e.languages.javascript[`template-string`]=[o(`css`,`\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)`),o(`html`,`\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?=`),o(`svg`,`\\bsvg`),o(`markdown`,`\\b(?:markdown|md)`),o(`graphql`,`\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)`),o(`sql`,`\\bsql`),t].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return typeof e==`string`?e:Array.isArray(e)?e.map(u).join(``):u(e.content)}e.hooks.add(`after-tokenize`,function(t){t.language in l&&function t(n){for(var r=0,i=n.length;r<i;r++){var a,o,s,l=n[r];typeof l!=`string`&&(a=l.content,Array.isArray(a)?l.type===`template-string`?(l=a[1],a.length===3&&typeof l!=`string`&&l.type===`embedded-code`&&(o=u(l),l=l.alias,l=Array.isArray(l)?l[0]:l,s=e.languages[l])&&(a[1]=c(o,s,l))):t(a):typeof a!=`string`&&t([a]))}}(t.tokens)})}(V),function(e){e.languages.typescript=e.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript[`literal-property`];var t=e.languages.extend(`typescript`,{});delete t[`class-name`],e.languages.typescript[`class-name`].inside=t,e.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:t}}}}),e.languages.ts=e.languages.typescript}(V),function(e){var t=e.languages.javascript,n=`\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})+\\}`,r=`(@(?:arg|argument|param|property)\\s+(?:`+n+`\\s+)?)`;e.languages.jsdoc=e.languages.extend(`javadoclike`,{parameter:{pattern:RegExp(r+`(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?=\\s|$)`),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore(`jsdoc`,`keyword`,{"optional-parameter":{pattern:RegExp(r+`\\[(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?:=[^[\\]]+)?\\](?=\\s|$)`),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:`language-javascript`},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(`(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\\s+(?:<TYPE>\\s+)?)[A-Z]\\w*(?:\\.[A-Z]\\w*)*`.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp(`(@[a-z]+\\s+)`+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:`language-javascript`}}}}),e.languages.javadoclike.addSupport(`javascript`,e.languages.jsdoc)}(V),function(e){e.languages.flow=e.languages.extend(`javascript`,{}),e.languages.insertBefore(`flow`,`keyword`,{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:`class-name`}]}),e.languages.flow[`function-variable`].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore(`flow`,`operator`,{"flow-punctuation":{pattern:/\{\||\|\}/,alias:`punctuation`}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(V),V.languages.n4js=V.languages.extend(`javascript`,{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),V.languages.insertBefore(`n4js`,`constant`,{annotation:{pattern:/@+\w+/,alias:`operator`}}),V.languages.n4jsd=V.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return`(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*`}),t)}e.languages.insertBefore(`javascript`,`function-variable`,{"method-variable":{pattern:RegExp(`(\\.\\s*)`+e.languages.javascript[`function-variable`].pattern.source),lookbehind:!0,alias:[`function-variable`,`method`,`function`,`property-access`]}}),e.languages.insertBefore(`javascript`,`function`,{method:{pattern:RegExp(`(\\.\\s*)`+e.languages.javascript.function.source),lookbehind:!0,alias:[`function`,`property-access`]}}),e.languages.insertBefore(`javascript`,`constant`,{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:`class-name`},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:`class-name`}]}),e.languages.insertBefore(`javascript`,`keyword`,{imports:{pattern:t(`(\\bimport\\b\\s*)(?:<ID>(?:\\s*,\\s*(?:\\*\\s*as\\s+<ID>|\\{[^{}]*\\}))?|\\*\\s*as\\s+<ID>|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)`),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(`(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+<ID>)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})`),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:`module`},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:`control-flow`},{pattern:/\bnull\b/,alias:[`null`,`nil`]},{pattern:/\bundefined\b/,alias:`nil`}),e.languages.insertBefore(`javascript`,`operator`,{spread:{pattern:/\.{3}/,alias:`operator`},arrow:{pattern:/=>/,alias:`operator`}}),e.languages.insertBefore(`javascript`,`punctuation`,{"property-access":{pattern:t(`(\\.\\s*)#?<ID>`),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:`variable`},console:{pattern:/\bconsole(?=\s*\.)/,alias:`class-name`}});for(var n=[`function`,`function-variable`,`method`,`method-variable`,`property-access`],r=0;r<n.length;r++){var i=n[r],a=e.languages.javascript[i],i=(a=e.util.type(a)===`RegExp`?e.languages.javascript[i]={pattern:a}:a).inside||{};(a.inside=i)[`maybe-class-name`]=/^[A-Z][\s\S]*/}}(V),function(e){var t=e.util.clone(e.languages.javascript),n=`(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)`,r=`(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})`,i=`(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})`;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend(`markup`,t),e.languages.jsx.tag.pattern=a(`<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[\\s\\S]|[^\\\\"])*"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>`),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside[`attr-value`].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside[`class-name`]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore(`inside`,`attr-name`,{spread:{pattern:a(`<SPREAD>`),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore(`inside`,`special-attr`,{script:{pattern:a(`=<BRACES>`),alias:`language-javascript`,inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:`punctuation`},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;typeof i!=`string`&&(i.type===`tag`&&i.content[0]&&i.content[0].type===`tag`?i.content[0].content[0].content===`</`?0<n.length&&n[n.length-1].tagName===s(i.content[0].content[1])&&n.pop():i.content[i.content.length-1].content!==`/>`&&n.push({tagName:s(i.content[0].content[1]),openedBraces:0}):0<n.length&&i.type===`punctuation`&&i.content===`{`?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&i.type===`punctuation`&&i.content===`}`?n[n.length-1].openedBraces--:a=!0),(a||typeof i==`string`)&&0<n.length&&n[n.length-1].openedBraces===0&&(a=s(i),r<t.length-1&&(typeof t[r+1]==`string`||t[r+1].type===`plain-text`)&&(a+=s(t[r+1]),t.splice(r+1,1)),0<r&&(typeof t[r-1]==`string`||t[r-1].type===`plain-text`)&&(a=s(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token(`plain-text`,a,null,a)),i.content&&typeof i.content!=`string`&&o(i.content)}}var s=function(e){return e?typeof e==`string`?e:typeof e.content==`string`?e.content:e.content.map(s).join(``):``};e.hooks.add(`after-tokenize`,function(e){e.language!==`jsx`&&e.language!==`tsx`||o(e.tokens)})}(V),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend(`jsx`,t),delete e.languages.tsx.parameter,delete e.languages.tsx[`literal-property`],e.languages.tsx.tag);t.pattern=RegExp(`(^|[^\\w$]|(?=<\\/))(?:`+t.pattern.source+`)`,t.pattern.flags),t.lookbehind=!0}(V),V.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),alias:`property`,inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:`constant`},"other-directive":{pattern:/#\w+\b/,alias:`property`},attribute:{pattern:/@\w+/,alias:`atrule`},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:`function`},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:`important`},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:`constant`},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:`keyword`},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},V.languages.swift[`string-literal`].forEach(function(e){e.inside.interpolation.inside=V.languages.swift}),function(e){e.languages.kotlin=e.languages.extend(`clike`,{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin[`class-name`];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:`punctuation`},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore(`kotlin`,`string`,{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:`multiline`,inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:`singleline`,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore(`kotlin`,`keyword`,{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:`builtin`}}),e.languages.insertBefore(`kotlin`,`function`,{label:{pattern:/\b\w+@|@\w+\b/,alias:`symbol`}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(V),V.languages.c=V.languages.extend(`clike`,{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),V.languages.insertBefore(`c`,`string`,{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),V.languages.insertBefore(`c`,`string`,{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:`property`,inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},V.languages.c.string],char:V.languages.c.char,comment:V.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:`function`}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:`keyword`},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:V.languages.c}}}}),V.languages.insertBefore(`c`,`function`,{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete V.languages.c.boolean,V.languages.objectivec=V.languages.extend(`c`,{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete V.languages.objectivec[`class-name`],V.languages.objc=V.languages.objectivec,V.languages.reason=V.languages.extend(`clike`,{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),V.languages.insertBefore(`reason`,`class-name`,{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:`symbol`}}),delete V.languages.reason.function,function(e){for(var t=`\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),e.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:`attr-name`,inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:`punctuation`},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:`symbol`},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:`punctuation`},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:`function`},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:`class-name`},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:`namespace`},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:`namespace`,inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:`property`},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust[`closure-params`].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(V),V.languages.go=V.languages.extend(`clike`,{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),V.languages.insertBefore(`go`,`string`,{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete V.languages.go[`class-name`],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=`\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b`.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend(`c`,{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore(`cpp`,`string`,{module:{pattern:RegExp(`(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.replace(/<mod-name>/g,function(){return n})+`)`),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:`string`,greedy:!0}}),e.languages.insertBefore(`cpp`,`keyword`,{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:e.languages.cpp}}}}),e.languages.insertBefore(`cpp`,`operator`,{"double-colon":{pattern:/::/,alias:`punctuation`}}),e.languages.insertBefore(`cpp`,`class-name`,{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend(`cpp`,{})}}),e.languages.insertBefore(`inside`,`double-colon`,{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp[`base-clause`])}(V),V.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:`punctuation`},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:`string`},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:[`annotation`,`punctuation`],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},V.languages.python[`string-interpolation`].inside.interpolation.inside.rest=V.languages.python,V.languages.py=V.languages.python,V.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},V.languages.webmanifest=V.languages.json;var Rn={};In(Rn,{dracula:()=>zn,duotoneDark:()=>Bn,duotoneLight:()=>Vn,github:()=>Hn,gruvboxMaterialDark:()=>ir,gruvboxMaterialLight:()=>ar,jettwaveDark:()=>er,jettwaveLight:()=>tr,nightOwl:()=>Un,nightOwlLight:()=>Wn,oceanicNext:()=>Kn,okaidia:()=>qn,oneDark:()=>nr,oneLight:()=>rr,palenight:()=>Jn,shadesOfPurple:()=>Yn,synthwave84:()=>Xn,ultramin:()=>Zn,vsDark:()=>Qn,vsLight:()=>$n});var zn={plain:{color:`#F8F8F2`,backgroundColor:`#282A36`},styles:[{types:[`prolog`,`constant`,`builtin`],style:{color:`rgb(189, 147, 249)`}},{types:[`inserted`,`function`],style:{color:`rgb(80, 250, 123)`}},{types:[`deleted`],style:{color:`rgb(255, 85, 85)`}},{types:[`changed`],style:{color:`rgb(255, 184, 108)`}},{types:[`punctuation`,`symbol`],style:{color:`rgb(248, 248, 242)`}},{types:[`string`,`char`,`tag`,`selector`],style:{color:`rgb(255, 121, 198)`}},{types:[`keyword`,`variable`],style:{color:`rgb(189, 147, 249)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(98, 114, 164)`}},{types:[`attr-name`],style:{color:`rgb(241, 250, 140)`}}]},Bn={plain:{backgroundColor:`#2a2734`,color:`#9a86fd`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`,`punctuation`],style:{color:`#6c6783`}},{types:[`namespace`],style:{opacity:.7}},{types:[`tag`,`operator`,`number`],style:{color:`#e09142`}},{types:[`property`,`function`],style:{color:`#9a86fd`}},{types:[`tag-id`,`selector`,`atrule-id`],style:{color:`#eeebff`}},{types:[`attr-name`],style:{color:`#c4b9fe`}},{types:[`boolean`,`string`,`entity`,`url`,`attr-value`,`keyword`,`control`,`directive`,`unit`,`statement`,`regex`,`atrule`,`placeholder`,`variable`],style:{color:`#ffcc99`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`#c4b9fe`}}]},Vn={plain:{backgroundColor:`#faf8f5`,color:`#728fcb`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`,`punctuation`],style:{color:`#b6ad9a`}},{types:[`namespace`],style:{opacity:.7}},{types:[`tag`,`operator`,`number`],style:{color:`#063289`}},{types:[`property`,`function`],style:{color:`#b29762`}},{types:[`tag-id`,`selector`,`atrule-id`],style:{color:`#2d2006`}},{types:[`attr-name`],style:{color:`#896724`}},{types:[`boolean`,`string`,`entity`,`url`,`attr-value`,`keyword`,`control`,`directive`,`unit`,`statement`,`regex`,`atrule`],style:{color:`#728fcb`}},{types:[`placeholder`,`variable`],style:{color:`#93abdc`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`#896724`}}]},Hn={plain:{color:`#393A34`,backgroundColor:`#f6f8fa`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`],style:{color:`#999988`,fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}},{types:[`string`,`attr-value`],style:{color:`#e3116c`}},{types:[`punctuation`,`operator`],style:{color:`#393A34`}},{types:[`entity`,`url`,`symbol`,`number`,`boolean`,`variable`,`constant`,`property`,`regex`,`inserted`],style:{color:`#36acaa`}},{types:[`atrule`,`keyword`,`attr-name`,`selector`],style:{color:`#00a4db`}},{types:[`function`,`deleted`,`tag`],style:{color:`#d73a49`}},{types:[`function-variable`],style:{color:`#6f42c1`}},{types:[`tag`,`selector`,`keyword`],style:{color:`#00009f`}}]},Un={plain:{color:`#d6deeb`,backgroundColor:`#011627`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`,fontStyle:`italic`}},{types:[`inserted`,`attr-name`],style:{color:`rgb(173, 219, 103)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(99, 119, 119)`,fontStyle:`italic`}},{types:[`string`,`url`],style:{color:`rgb(173, 219, 103)`}},{types:[`variable`],style:{color:`rgb(214, 222, 235)`}},{types:[`number`],style:{color:`rgb(247, 140, 108)`}},{types:[`builtin`,`char`,`constant`,`function`],style:{color:`rgb(130, 170, 255)`}},{types:[`punctuation`],style:{color:`rgb(199, 146, 234)`}},{types:[`selector`,`doctype`],style:{color:`rgb(199, 146, 234)`,fontStyle:`italic`}},{types:[`class-name`],style:{color:`rgb(255, 203, 139)`}},{types:[`tag`,`operator`,`keyword`],style:{color:`rgb(127, 219, 202)`}},{types:[`boolean`],style:{color:`rgb(255, 88, 116)`}},{types:[`property`],style:{color:`rgb(128, 203, 196)`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`}}]},Wn={plain:{color:`#403f53`,backgroundColor:`#FBFBFB`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`,fontStyle:`italic`}},{types:[`inserted`,`attr-name`],style:{color:`rgb(72, 118, 214)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(152, 159, 177)`,fontStyle:`italic`}},{types:[`string`,`builtin`,`char`,`constant`,`url`],style:{color:`rgb(72, 118, 214)`}},{types:[`variable`],style:{color:`rgb(201, 103, 101)`}},{types:[`number`],style:{color:`rgb(170, 9, 130)`}},{types:[`punctuation`],style:{color:`rgb(153, 76, 195)`}},{types:[`function`,`selector`,`doctype`],style:{color:`rgb(153, 76, 195)`,fontStyle:`italic`}},{types:[`class-name`],style:{color:`rgb(17, 17, 17)`}},{types:[`tag`],style:{color:`rgb(153, 76, 195)`}},{types:[`operator`,`property`,`keyword`,`namespace`],style:{color:`rgb(12, 150, 155)`}},{types:[`boolean`],style:{color:`rgb(188, 84, 84)`}}]},Gn={char:`#D8DEE9`,comment:`#999999`,keyword:`#c5a5c5`,primitive:`#5a9bcf`,string:`#8dc891`,variable:`#d7deea`,boolean:`#ff8b50`,punctuation:`#5FB3B3`,tag:`#fc929e`,function:`#79b6f2`,className:`#FAC863`,method:`#6699CC`,operator:`#fc929e`},Kn={plain:{backgroundColor:`#282c34`,color:`#ffffff`},styles:[{types:[`attr-name`],style:{color:Gn.keyword}},{types:[`attr-value`],style:{color:Gn.string}},{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`,`shebang`],style:{color:Gn.comment}},{types:[`property`,`number`,`function-name`,`constant`,`symbol`,`deleted`],style:{color:Gn.primitive}},{types:[`boolean`],style:{color:Gn.boolean}},{types:[`tag`],style:{color:Gn.tag}},{types:[`string`],style:{color:Gn.string}},{types:[`punctuation`],style:{color:Gn.string}},{types:[`selector`,`char`,`builtin`,`inserted`],style:{color:Gn.char}},{types:[`function`],style:{color:Gn.function}},{types:[`operator`,`entity`,`url`,`variable`],style:{color:Gn.variable}},{types:[`keyword`],style:{color:Gn.keyword}},{types:[`atrule`,`class-name`],style:{color:Gn.className}},{types:[`important`],style:{fontWeight:`400`}},{types:[`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}}]},qn={plain:{color:`#f8f8f2`,backgroundColor:`#272822`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`#f92672`,fontStyle:`italic`}},{types:[`inserted`],style:{color:`rgb(173, 219, 103)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`#8292a2`,fontStyle:`italic`}},{types:[`string`,`url`],style:{color:`#a6e22e`}},{types:[`variable`],style:{color:`#f8f8f2`}},{types:[`number`],style:{color:`#ae81ff`}},{types:[`builtin`,`char`,`constant`,`function`,`class-name`],style:{color:`#e6db74`}},{types:[`punctuation`],style:{color:`#f8f8f2`}},{types:[`selector`,`doctype`],style:{color:`#a6e22e`,fontStyle:`italic`}},{types:[`tag`,`operator`,`keyword`],style:{color:`#66d9ef`}},{types:[`boolean`],style:{color:`#ae81ff`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`,opacity:.7}},{types:[`tag`,`property`],style:{color:`#f92672`}},{types:[`attr-name`],style:{color:`#a6e22e !important`}},{types:[`doctype`],style:{color:`#8292a2`}},{types:[`rule`],style:{color:`#e6db74`}}]},Jn={plain:{color:`#bfc7d5`,backgroundColor:`#292d3e`},styles:[{types:[`comment`],style:{color:`rgb(105, 112, 152)`,fontStyle:`italic`}},{types:[`string`,`inserted`],style:{color:`rgb(195, 232, 141)`}},{types:[`number`],style:{color:`rgb(247, 140, 108)`}},{types:[`builtin`,`char`,`constant`,`function`],style:{color:`rgb(130, 170, 255)`}},{types:[`punctuation`,`selector`],style:{color:`rgb(199, 146, 234)`}},{types:[`variable`],style:{color:`rgb(191, 199, 213)`}},{types:[`class-name`,`attr-name`],style:{color:`rgb(255, 203, 107)`}},{types:[`tag`,`deleted`],style:{color:`rgb(255, 85, 114)`}},{types:[`operator`],style:{color:`rgb(137, 221, 255)`}},{types:[`boolean`],style:{color:`rgb(255, 88, 116)`}},{types:[`keyword`],style:{fontStyle:`italic`}},{types:[`doctype`],style:{color:`rgb(199, 146, 234)`,fontStyle:`italic`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`}},{types:[`url`],style:{color:`rgb(221, 221, 221)`}}]},Yn={plain:{color:`#9EFEFF`,backgroundColor:`#2D2A55`},styles:[{types:[`changed`],style:{color:`rgb(255, 238, 128)`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`}},{types:[`inserted`],style:{color:`rgb(173, 219, 103)`}},{types:[`comment`],style:{color:`rgb(179, 98, 255)`,fontStyle:`italic`}},{types:[`punctuation`],style:{color:`rgb(255, 255, 255)`}},{types:[`constant`],style:{color:`rgb(255, 98, 140)`}},{types:[`string`,`url`],style:{color:`rgb(165, 255, 144)`}},{types:[`variable`],style:{color:`rgb(255, 238, 128)`}},{types:[`number`,`boolean`],style:{color:`rgb(255, 98, 140)`}},{types:[`attr-name`],style:{color:`rgb(255, 180, 84)`}},{types:[`keyword`,`operator`,`property`,`namespace`,`tag`,`selector`,`doctype`],style:{color:`rgb(255, 157, 0)`}},{types:[`builtin`,`char`,`constant`,`function`,`class-name`],style:{color:`rgb(250, 208, 0)`}}]},Xn={plain:{backgroundColor:`linear-gradient(to bottom, #2a2139 75%, #34294f)`,backgroundImage:`#34294f`,color:`#f92aad`,textShadow:`0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3`},styles:[{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`],style:{color:`#495495`,fontStyle:`italic`}},{types:[`punctuation`],style:{color:`#ccc`}},{types:[`tag`,`attr-name`,`namespace`,`number`,`unit`,`hexcode`,`deleted`],style:{color:`#e2777a`}},{types:[`property`,`selector`],style:{color:`#72f1b8`,textShadow:`0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475`}},{types:[`function-name`],style:{color:`#6196cc`}},{types:[`boolean`,`selector-id`,`function`],style:{color:`#fdfdfd`,textShadow:`0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975`}},{types:[`class-name`,`maybe-class-name`,`builtin`],style:{color:`#fff5f6`,textShadow:`0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75`}},{types:[`constant`,`symbol`],style:{color:`#f92aad`,textShadow:`0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3`}},{types:[`important`,`atrule`,`keyword`,`selector-class`],style:{color:`#f4eee4`,textShadow:`0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575`}},{types:[`string`,`char`,`attr-value`,`regex`,`variable`],style:{color:`#f87c32`}},{types:[`parameter`],style:{fontStyle:`italic`}},{types:[`entity`,`url`],style:{color:`#67cdcc`}},{types:[`operator`],style:{color:`ffffffee`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`entity`],style:{cursor:`help`}},{types:[`inserted`],style:{color:`green`}}]},Zn={plain:{color:`#282a2e`,backgroundColor:`#ffffff`},styles:[{types:[`comment`],style:{color:`rgb(197, 200, 198)`}},{types:[`string`,`number`,`builtin`,`variable`],style:{color:`rgb(150, 152, 150)`}},{types:[`class-name`,`function`,`tag`,`attr-name`],style:{color:`rgb(40, 42, 46)`}}]},Qn={plain:{color:`#9CDCFE`,backgroundColor:`#1E1E1E`},styles:[{types:[`prolog`],style:{color:`rgb(0, 0, 128)`}},{types:[`comment`],style:{color:`rgb(106, 153, 85)`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`rgb(86, 156, 214)`}},{types:[`number`,`inserted`],style:{color:`rgb(181, 206, 168)`}},{types:[`constant`],style:{color:`rgb(100, 102, 149)`}},{types:[`attr-name`,`variable`],style:{color:`rgb(156, 220, 254)`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`rgb(206, 145, 120)`}},{types:[`selector`],style:{color:`rgb(215, 186, 125)`}},{types:[`tag`],style:{color:`rgb(78, 201, 176)`}},{types:[`tag`],languages:[`markup`],style:{color:`rgb(86, 156, 214)`}},{types:[`punctuation`,`operator`],style:{color:`rgb(212, 212, 212)`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`rgb(220, 220, 170)`}},{types:[`class-name`],style:{color:`rgb(78, 201, 176)`}},{types:[`char`],style:{color:`rgb(209, 105, 105)`}}]},$n={plain:{color:`#000000`,backgroundColor:`#ffffff`},styles:[{types:[`comment`],style:{color:`rgb(0, 128, 0)`}},{types:[`builtin`],style:{color:`rgb(0, 112, 193)`}},{types:[`number`,`variable`,`inserted`],style:{color:`rgb(9, 134, 88)`}},{types:[`operator`],style:{color:`rgb(0, 0, 0)`}},{types:[`constant`,`char`],style:{color:`rgb(129, 31, 63)`}},{types:[`tag`],style:{color:`rgb(128, 0, 0)`}},{types:[`attr-name`],style:{color:`rgb(255, 0, 0)`}},{types:[`deleted`,`string`],style:{color:`rgb(163, 21, 21)`}},{types:[`changed`,`punctuation`],style:{color:`rgb(4, 81, 165)`}},{types:[`function`,`keyword`],style:{color:`rgb(0, 0, 255)`}},{types:[`class-name`],style:{color:`rgb(38, 127, 153)`}}]},er={plain:{color:`#f8fafc`,backgroundColor:`#011627`},styles:[{types:[`prolog`],style:{color:`#000080`}},{types:[`comment`],style:{color:`#6A9955`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`#569CD6`}},{types:[`number`,`inserted`],style:{color:`#B5CEA8`}},{types:[`constant`],style:{color:`#f8fafc`}},{types:[`attr-name`,`variable`],style:{color:`#9CDCFE`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`#cbd5e1`}},{types:[`selector`],style:{color:`#D7BA7D`}},{types:[`tag`],style:{color:`#0ea5e9`}},{types:[`tag`],languages:[`markup`],style:{color:`#0ea5e9`}},{types:[`punctuation`,`operator`],style:{color:`#D4D4D4`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`#7dd3fc`}},{types:[`class-name`],style:{color:`#0ea5e9`}},{types:[`char`],style:{color:`#D16969`}}]},tr={plain:{color:`#0f172a`,backgroundColor:`#f1f5f9`},styles:[{types:[`prolog`],style:{color:`#000080`}},{types:[`comment`],style:{color:`#6A9955`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`#0c4a6e`}},{types:[`number`,`inserted`],style:{color:`#B5CEA8`}},{types:[`constant`],style:{color:`#0f172a`}},{types:[`attr-name`,`variable`],style:{color:`#0c4a6e`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`#64748b`}},{types:[`selector`],style:{color:`#D7BA7D`}},{types:[`tag`],style:{color:`#0ea5e9`}},{types:[`tag`],languages:[`markup`],style:{color:`#0ea5e9`}},{types:[`punctuation`,`operator`],style:{color:`#475569`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`#0e7490`}},{types:[`class-name`],style:{color:`#0ea5e9`}},{types:[`char`],style:{color:`#D16969`}}]},nr={plain:{backgroundColor:`hsl(220, 13%, 18%)`,color:`hsl(220, 14%, 71%)`,textShadow:`0 1px rgba(0, 0, 0, 0.3)`},styles:[{types:[`comment`,`prolog`,`cdata`],style:{color:`hsl(220, 10%, 40%)`}},{types:[`doctype`,`punctuation`,`entity`],style:{color:`hsl(220, 14%, 71%)`}},{types:[`attr-name`,`class-name`,`maybe-class-name`,`boolean`,`constant`,`number`,`atrule`],style:{color:`hsl(29, 54%, 61%)`}},{types:[`keyword`],style:{color:`hsl(286, 60%, 67%)`}},{types:[`property`,`tag`,`symbol`,`deleted`,`important`],style:{color:`hsl(355, 65%, 65%)`}},{types:[`selector`,`string`,`char`,`builtin`,`inserted`,`regex`,`attr-value`],style:{color:`hsl(95, 38%, 62%)`}},{types:[`variable`,`operator`,`function`],style:{color:`hsl(207, 82%, 66%)`}},{types:[`url`],style:{color:`hsl(187, 47%, 55%)`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`hsl(220, 14%, 71%)`}}]},rr={plain:{backgroundColor:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`},styles:[{types:[`comment`,`prolog`,`cdata`],style:{color:`hsl(230, 4%, 64%)`}},{types:[`doctype`,`punctuation`,`entity`],style:{color:`hsl(230, 8%, 24%)`}},{types:[`attr-name`,`class-name`,`boolean`,`constant`,`number`,`atrule`],style:{color:`hsl(35, 99%, 36%)`}},{types:[`keyword`],style:{color:`hsl(301, 63%, 40%)`}},{types:[`property`,`tag`,`symbol`,`deleted`,`important`],style:{color:`hsl(5, 74%, 59%)`}},{types:[`selector`,`string`,`char`,`builtin`,`inserted`,`regex`,`attr-value`,`punctuation`],style:{color:`hsl(119, 34%, 47%)`}},{types:[`variable`,`operator`,`function`],style:{color:`hsl(221, 87%, 60%)`}},{types:[`url`],style:{color:`hsl(198, 99%, 37%)`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`hsl(230, 8%, 24%)`}}]},ir={plain:{color:`#ebdbb2`,backgroundColor:`#292828`},styles:[{types:[`imports`,`class-name`,`maybe-class-name`,`constant`,`doctype`,`builtin`,`function`],style:{color:`#d8a657`}},{types:[`property-access`],style:{color:`#7daea3`}},{types:[`tag`],style:{color:`#e78a4e`}},{types:[`attr-name`,`char`,`url`,`regex`],style:{color:`#a9b665`}},{types:[`attr-value`,`string`],style:{color:`#89b482`}},{types:[`comment`,`prolog`,`cdata`,`operator`,`inserted`],style:{color:`#a89984`}},{types:[`delimiter`,`boolean`,`keyword`,`selector`,`important`,`atrule`,`property`,`variable`,`deleted`],style:{color:`#ea6962`}},{types:[`entity`,`number`,`symbol`],style:{color:`#d3869b`}}]},ar={plain:{color:`#654735`,backgroundColor:`#f9f5d7`},styles:[{types:[`delimiter`,`boolean`,`keyword`,`selector`,`important`,`atrule`,`property`,`variable`,`deleted`],style:{color:`#af2528`}},{types:[`imports`,`class-name`,`maybe-class-name`,`constant`,`doctype`,`builtin`],style:{color:`#b4730e`}},{types:[`string`,`attr-value`],style:{color:`#477a5b`}},{types:[`property-access`],style:{color:`#266b79`}},{types:[`function`,`attr-name`,`char`,`url`],style:{color:`#72761e`}},{types:[`tag`],style:{color:`#b94c07`}},{types:[`comment`,`prolog`,`cdata`,`operator`,`inserted`],style:{color:`#a89984`}},{types:[`entity`,`number`,`symbol`],style:{color:`#924f79`}}]},or=e=>(0,F.useCallback)(t=>{var n=t,{className:r,style:i,line:a}=n;let o=Nn(Mn({},Pn(n,[`className`,`style`,`line`])),{className:bn(`token-line`,r)});return typeof e==`object`&&`plain`in e&&(o.style=e.plain),typeof i==`object`&&(o.style=Mn(Mn({},o.style||{}),i)),o},[e]),sr=e=>{let t=(0,F.useCallback)(({types:t,empty:n})=>{if(e!=null)return t.length===1&&t[0]===`plain`?n==null?void 0:{display:`inline-block`}:t.length===1&&n!=null?e[t[0]]:Object.assign(n==null?{}:{display:`inline-block`},...t.map(t=>e[t]))},[e]);return(0,F.useCallback)(e=>{var n=e,{token:r,className:i,style:a}=n;let o=Nn(Mn({},Pn(n,[`token`,`className`,`style`])),{className:bn(`token`,...r.types,i),children:r.content,style:t(r)});return a!=null&&(o.style=Mn(Mn({},o.style||{}),a)),o},[t])},cr=/\r\n|\r|\n/,lr=e=>{e.length===0?e.push({types:[`plain`],content:`
|
|
13
|
+
`,empty:!0}):e.length===1&&e[0].content===``&&(e[0].content=`
|
|
14
|
+
`,e[0].empty=!0)},ur=(e,t)=>{let n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},dr=e=>{let t=[[]],n=[e],r=[0],i=[e.length],a=0,o=0,s=[],c=[s];for(;o>-1;){for(;(a=r[o]++)<i[o];){let e,l=t[o],u=n[o][a];if(typeof u==`string`?(l=o>0?l:[`plain`],e=u):(l=ur(l,u.type),u.alias&&(l=ur(l,u.alias)),e=u.content),typeof e!=`string`){o++,t.push(l),n.push(e),r.push(0),i.push(e.length);continue}let d=e.split(cr),f=d.length;s.push({types:l,content:d[0]});for(let e=1;e<f;e++)lr(s),c.push(s=[]),s.push({types:l,content:d[e]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return lr(s),c},fr=({prism:e,code:t,grammar:n,language:r})=>(0,F.useMemo)(()=>{if(n==null)return dr([t]);let i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run(`before-tokenize`,i),i.tokens=e.tokenize(t,n),e.hooks.run(`after-tokenize`,i),dr(i.tokens)},[t,n,r,e]),pr=(e,t)=>{let{plain:n}=e,r=e.styles.reduce((e,n)=>{let{languages:r,style:i}=n;return r&&!r.includes(t)||n.types.forEach(t=>{e[t]=Mn(Mn({},e[t]),i)}),e},{});return r.root=n,r.plain=Nn(Mn({},n),{backgroundColor:void 0}),r},mr=({children:e,language:t,code:n,theme:r,prism:i})=>{let a=t.toLowerCase(),o=pr(r,a),s=or(o),c=sr(o),l=i.languages[a];return e({tokens:fr({prism:i,language:a,code:n,grammar:l}),className:`prism-code language-${a}`,style:o==null?{}:o.root,getLineProps:s,getTokenProps:c})},hr=e=>(0,F.createElement)(mr,Nn(Mn({},e),{prism:e.prism||V,theme:e.theme||Qn,code:e.code,language:e.language})),gr=`modulepreload`,_r=function(e){return`/`+e},vr={},H=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),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}))))}r=o(t.map(t=>{if(t=_r(t,n),t in vr)return;vr[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:gr,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}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)})},yr={};function br(e){if(!yr[e]){let t={bash:()=>H(()=>import(`./prism-bash-ElxVK2UI.js`),[]),sh:()=>H(()=>import(`./prism-bash-ElxVK2UI.js`),[]),shell:()=>H(()=>import(`./prism-bash-ElxVK2UI.js`),[]),php:async()=>(await H(()=>import(`./prism-markup-templating-DOf10VS2.js`),[]),H(()=>import(`./prism-php-CBX1LG5n.js`),[])),sql:()=>H(()=>import(`./prism-sql-DL_NEVBy.js`),[]),ruby:()=>H(()=>import(`./prism-ruby-Dtn_AROP.js`),[]),java:()=>H(()=>import(`./prism-java-Bvhe07ID.js`),[]),scala:async()=>(await br(`java`),H(()=>import(`./prism-scala-B4gvAG5X.js`),[])),solidity:()=>H(()=>import(`./prism-solidity-BS9JVLL6.js`),[]),vim:()=>H(()=>import(`./prism-vim-DqdsfG3_.js`),[]),dart:()=>H(()=>import(`./prism-dart-59mV4Nzl.js`),[]),csharp:()=>H(()=>import(`./prism-csharp-BvoTEt-U.js`),[]),protobuf:()=>H(()=>import(`./prism-protobuf-KYCaTc8s.js`),[]),hcl:()=>H(()=>import(`./prism-hcl-DaTFd4M9.js`),[]),perl:()=>H(()=>import(`./prism-perl-ZBgEPf6s.js`),[]),elixir:()=>H(()=>import(`./prism-elixir-VMbXB0ch.js`),[]),nix:()=>H(()=>import(`./prism-nix-CNZSWapd.js`),[]),haskell:()=>H(()=>import(`./prism-haskell-DbMQ4t9D.js`),[]),clojure:()=>H(()=>import(`./prism-clojure-Coed_dlT.js`),[])}[e];if(!t)return console.warn(`No loader available for language: ${e}`),Promise.reject(Error(`Unsupported language: ${e}`));yr[e]=t().then(()=>void 0).catch(t=>{throw delete yr[e],console.warn(`Failed to load language: ${e}`,t),t})}return yr[e]}typeof global<`u`?global.Prism=V:typeof window<`u`&&(window.Prism=V);var xr=V,Sr=`markup.html.xml.svg.javascript.js.typescript.ts.jsx.tsx.css.c.cpp.swift.kotlin.objectivec.reason.rust.go.graphql.yaml.yml.json.markdown.md.python.py`.split(`.`);function Cr(e,t){let[n,r]=(0,F.useState)(()=>Sr.includes(t)||!!xr.languages[t]);return(0,F.useEffect)(()=>{if(!n){if(Sr.includes(t)){r(!0);return}br(t).then(()=>{r(!0)}).catch(()=>{r(!1)})}},[t,n]),{ready:n,actualLang:n?t:`text`}}function wr(e){return e&&e.split(`.`).pop()?.toLowerCase()||null}function Tr(e){return e&&e.split(`/`).pop()||``}var Er={js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`javascript`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`typescript`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,cpp:`cpp`,c:`c`,cs:`csharp`,php:`php`,swift:`swift`,kt:`kotlin`,scala:`scala`,r:`r`,sql:`sql`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,yml:`yaml`,yaml:`yaml`,json:`json`,xml:`xml`,html:`html`,vue:`html`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,md:`markdown`,markdown:`markdown`,tex:`latex`,vim:`vim`,ex:`elixir`,exs:`elixir`,heex:`elixir`,nix:`nix`,hs:`haskell`,lhs:`haskell`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,edn:`clojure`},Dr={ts:`typescript`,tsx:`tsx`,mts:`typescript`,cts:`typescript`,js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,json:`json`,css:`css`,scss:`css`,html:`html`,vue:`html`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,yml:`yaml`,yaml:`yaml`,md:`markdown`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,cpp:`cpp`,c:`c`,php:`php`,sql:`sql`,xml:`xml`,swift:`swift`,kt:`kotlin`,scala:`scala`,svelte:`svelte`,r:`r`,lua:`lua`,perl:`perl`,pl:`perl`,pm:`perl`,dockerfile:`docker`,makefile:`makefile`,gitignore:`git`,env:`bash`,conf:`nginx`,ini:`ini`,toml:`toml`,sol:`solidity`,vim:`vim`,dart:`dart`,cs:`csharp`,proto:`protobuf`,tf:`hcl`,tfvars:`hcl`,hcl:`hcl`,ex:`elixir`,exs:`elixir`,heex:`elixir`,nix:`nix`,hs:`haskell`,lhs:`haskell`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,edn:`clojure`},Or={dockerfile:`docker`,makefile:`makefile`,".gitignore":`git`,".env":`bash`,".bashrc":`bash`,".zshrc":`bash`,".bash_profile":`bash`,".profile":`bash`};function kr(e,t){if(e)return t[e.toLowerCase()]}function Ar(e){return kr(wr(e),Er)}function jr(e){return Or[Tr(e).toLowerCase()]||kr(wr(e),Dr)||`text`}var Mr=new Set([`vue`,`svelte`,`astro`]);function Nr(e){let t=wr(e);return t!=null&&Mr.has(t)}function Pr(e){return{...e,styles:e.styles.map(e=>({...e,style:{...e.style,background:void 0,backgroundColor:void 0}}))}}function Fr(e){let t;switch(e){case`github`:t=Rn.github;break;case`vsLight`:t=Rn.vsLight;break;case`oneLight`:t=Rn.oneLight;break;case`gruvboxMaterialLight`:t=Rn.gruvboxMaterialLight;break;case`nightOwlLight`:t=Rn.nightOwlLight;break;case`vsDark`:t=Rn.vsDark;break;case`oneDark`:t=Rn.oneDark;break;case`gruvboxMaterialDark`:t=Rn.gruvboxMaterialDark;break;case`nightOwl`:t=Rn.nightOwl;break;case`dracula`:t=Rn.dracula;break;case`okaidia`:t=Rn.okaidia;break;default:t=Rn.vsDark}return Pr(t)}var Ir=F.memo(function({code:e,language:t,className:n,syntaxTheme:r=`vsDark`,filename:i=``,precomputedTokens:a,renderToken:o,onMouseOver:s,onMouseOut:c}){let{actualLang:l}=Cr(e,t||(i?jr(i):`text`)),u=Fr(r),d=!!a,f=(0,F.useCallback)(({style:e,tokens:t,getLineProps:r,getTokenProps:i})=>{let l=a??t;return(0,I.jsx)(`span`,{className:n,style:{...e,background:`transparent`,backgroundColor:`transparent`},onMouseOver:s,onMouseOut:c,children:l.map((e,t)=>(0,I.jsx)(`span`,{...r({line:e}),children:e.map((e,t)=>o?o(e,t,i):(0,I.jsx)(`span`,{...i({token:e})},t))},t))})},[n,s,c,o,a]);return(0,I.jsx)(hr,{code:d?``:e,language:l,theme:u,prism:xr,children:f})}),Lr=F.memo(function(e){let{handleMouseOver:t,handleMouseOut:n,isWordHighlighted:r}=vn(),i=(0,F.useCallback)((e,t,n)=>{let i=n({token:e}),a=e.content.split(/( +)/);if(a.length===1&&a[0]&&!mn(a[0]))return(0,I.jsx)(`span`,{...i},t);let o=a.map((e,n)=>{if(!e)return null;if(mn(e)){let i=e.trim();return(0,I.jsx)(`span`,{className:`word-token ${r(i)?`word-highlight`:``}`,"data-word":i,children:e},`${t}-${n}`)}return(0,I.jsx)(`span`,{children:e},`${t}-${n}`)});return(0,I.jsx)(`span`,{...i,children:o},t)},[r]);return(0,I.jsx)(Ir,{...e,renderToken:i,onMouseOver:t,onMouseOut:n})}),Rr=F.memo(function({segments:e,className:t=``}){return(0,I.jsx)(`span`,{className:t,children:(0,F.useMemo)(()=>e.map((e,t)=>(0,I.jsx)(`span`,{className:e.type===`added`?`word-diff-added`:e.type===`removed`?`word-diff-removed`:``,children:e.value},t)),[e])})}),zr=e=>{switch(e){case`add`:return`+`;case`delete`:return`-`;default:return` `}},Br=e=>{switch(e){case`add`:return`text-github-accent bg-diff-addition-bg`;case`delete`:return`text-github-danger bg-diff-deletion-bg`;default:return`text-github-text-muted bg-github-bg-secondary`}};function Vr({line:e,syntaxTheme:t,filename:n,diffSegments:r,showPrefixBorder:i=!0}){let{getOldTokens:a,getNewTokens:o}=ln();return(0,I.jsxs)(`div`,{className:`flex items-center relative min-h-[16px]`,children:[(0,I.jsx)(`span`,{className:`w-5 text-center flex-shrink-0 ${i?`border-r border-github-border`:``} ${Br(e.type)}`,children:zr(e.type)}),r?(0,I.jsx)(Rr,{segments:r,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,I.jsx)(Lr,{code:e.content,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`,syntaxTheme:t,filename:n,precomputedTokens:(()=>{let t=e.oldLineNumber==null?null:a?.(e.oldLineNumber)??null;if(e.type===`delete`)return t?[t]:null;let n=e.newLineNumber==null?t:o?.(e.newLineNumber)??null;return n?[n]:null})()})]})}var Hr=e=>e===`add`?`bg-diff-addition-bg`:`bg-diff-deletion-bg`,Ur=(e,t)=>({type:e,content:t});function Wr({code:e,type:t,filename:n,keyPrefix:r,syntaxTheme:i}){return(0,I.jsx)(I.Fragment,{children:e.split(`
|
|
15
|
+
`).map((e,a)=>(0,I.jsx)(`div`,{className:Hr(t),children:(0,I.jsx)(Vr,{line:Ur(t,e),filename:n,syntaxTheme:i,showPrefixBorder:!1})},`${r}-${a}`))})}function Gr(e){return rn(e)}function Kr({body:e,originalCode:t,filename:n,syntaxTheme:r}){return(0,I.jsx)(`div`,{className:`text-github-text-primary text-sm leading-6`,children:(0,F.useMemo)(()=>{let n=an(e);if(n.length===0)return[{type:`text`,content:e}];let r=[],i=0;for(let a of n)a.startIndex>i&&r.push({type:`text`,content:e.slice(i,a.startIndex)}),r.push({type:`suggestion`,code:a.suggestedCode,original:t||``}),i=a.endIndex;return i<e.length&&r.push({type:`text`,content:e.slice(i)}),r},[e,t]).map((e,t)=>e.type===`text`?(0,I.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.content},t):(0,I.jsx)(`div`,{className:`my-2 border border-github-border rounded-md overflow-hidden`,children:(0,I.jsxs)(`div`,{className:`font-mono text-sm`,children:[e.original&&(0,I.jsx)(Wr,{code:e.original,type:`delete`,filename:n,keyPrefix:`orig-${t}`,syntaxTheme:r}),(0,I.jsx)(Wr,{code:e.code,type:`add`,filename:n,keyPrefix:`sugg-${t}`,syntaxTheme:r})]})},t))})}var qr=`text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1`;function Jr({selectedCode:e,value:t,onChange:n,textareaRef:r,className:i=qr}){return e?(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{let i=on(e),a=r?.current;if(!a){n(`${t}${t?`
|
|
16
|
+
|
|
17
|
+
`:``}${i}\n\n`);return}let o=a.selectionStart,s=a.selectionEnd,c=t.slice(0,o),l=t.slice(s),u=`${c?`
|
|
18
|
+
|
|
19
|
+
`:``}${i}\n\n`;n(c+u+l);let d=c.length+u.length;requestAnimationFrame(()=>{a.focus(),a.setSelectionRange(d,d)})},className:i,title:`Add code suggestion`,children:[(0,I.jsx)(qe,{size:12}),`Add suggestion`]}):null}function Yr({onSubmit:e,onCancel:t,selectedCode:n,syntaxTheme:r,filename:i,initialValue:a=``,embedded:o=!1,title:s=`Add a comment`,submitLabel:c=`Submit`,placeholder:l=`Leave a comment...`}){let[u,d]=(0,F.useState)(a),[f,p]=(0,F.useState)(!1),[m,h]=(0,F.useState)(`edit`),g=(0,F.useRef)(null),_=Gr(u),v=_?m:`edit`,y=async t=>{if(t.preventDefault(),u.trim()){p(!0);try{await e(u.trim()),d(``),h(`edit`)}catch(e){console.error(`Failed to submit comment:`,e)}finally{p(!1)}}};return(0,I.jsxs)(`form`,{className:o?`bg-transparent`:`m-2 mx-3 rounded-md border border-yellow-600/50 border-l-4 border-l-yellow-400 bg-github-bg-tertiary p-3`,onSubmit:y,onClick:e=>e.stopPropagation(),"data-empty":!u.trim(),children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,style:{color:`var(--color-yellow-path-text)`},children:s}),_?(0,I.jsxs)(`div`,{className:`flex items-center border border-github-border rounded-md overflow-hidden`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>h(`edit`),className:`text-xs px-2.5 py-1.5 ${v===`edit`?`bg-github-bg-tertiary text-github-text-primary`:`bg-github-bg-secondary text-github-text-secondary`} transition-colors`,children:`Edit`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>h(`preview`),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${v===`preview`?`bg-github-bg-tertiary text-github-text-primary`:`bg-github-bg-secondary text-github-text-secondary`} transition-colors`,children:`Preview`})]}):(0,I.jsx)(Jr,{selectedCode:n,value:u,onChange:d,textareaRef:g})]}),_&&v===`preview`?(0,I.jsx)(`div`,{className:`min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2`,children:(0,I.jsx)(Kr,{body:u,originalCode:n,filename:i,syntaxTheme:r})}):(0,I.jsx)(`textarea`,{ref:g,className:`w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50`,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)?y(e):e.key===`Escape`&&t()},placeholder:l,rows:Math.max(3,u.split(`
|
|
20
|
+
`).length),autoFocus:!0,disabled:f}),(0,I.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:t,className:`text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50`,disabled:f,children:`Cancel`}),(0,I.jsx)(`button`,{type:`submit`,className:`text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},disabled:!u.trim()||f,children:f?`Submitting...`:c})]})]})}function Xr({message:e,isRootMessage:t=!1,showAuthorBadge:n,syntaxTheme:r,filename:i,originalCode:a,onUpdate:o,onResolveOrDelete:s,actionLabel:c,confirmMessage:l,onClick:u}){let[d,f]=(0,F.useState)(!1),p=n&&!!e.author,m=e.author?.trim()===`User`;return(0,I.jsx)(`div`,{className:d?``:`flex min-w-0 items-start gap-3`,onClick:u,children:d?(0,I.jsx)(Yr,{onSubmit:t=>(t!==e.body&&o(t),f(!1),Promise.resolve()),onCancel:()=>{f(!1)},selectedCode:a,syntaxTheme:r,filename:i,initialValue:e.body,embedded:!0,title:`Edit comment`,submitLabel:`Save`,placeholder:`Edit your message...`}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[p&&(0,I.jsx)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 pr-2 text-xs text-github-text-secondary`,children:(0,I.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-github-border bg-github-bg-primary px-2 py-0.5 text-[11px] font-medium text-github-text-primary`,children:e.author})}),(0,I.jsx)(Kr,{body:e.body,originalCode:a,filename:i,syntaxTheme:r})]}),(t||m)&&(0,I.jsxs)(`div`,{className:`flex shrink-0 items-start gap-2 pt-0.5`,children:[m&&(0,I.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),f(!0)},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 text-github-text-primary transition-all hover:bg-github-bg-primary`,title:`Edit message`,children:(0,I.jsx)(pt,{size:12})}),(0,I.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),!(l&&!confirm(l))&&s()},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 transition-all hover:bg-github-bg-primary ${t?`text-green-700 hover:text-green-800`:`text-github-danger`}`,title:c,"aria-label":c,children:t?(0,I.jsx)(Ve,{size:12}):(0,I.jsx)(yt,{size:12})})]})]})})}function Zr({thread:e,showAuthorBadges:t=!1,confirmRootAction:n=!0,onGeneratePrompt:r,onRemoveThread:i,onReplyToThread:a,onRemoveMessage:o,onUpdateMessage:s,onClick:c,syntaxTheme:l}){let[u,d]=(0,F.useState)(!1),[f,p]=(0,F.useState)(!1),m=Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line,h=async t=>{t.stopPropagation();try{await nn(r(e)),d(!0),setTimeout(()=>d(!1),2e3)}catch(e){console.error(`Failed to copy thread prompt:`,e)}},g=e.messages[0];return g?(0,I.jsxs)(`div`,{id:`comment-thread-${e.id}`,className:`rounded-md border border-yellow-600/50 border-l-4 border-l-yellow-400 bg-github-bg-tertiary p-3 shadow-sm transition-all ${c?`cursor-pointer hover:shadow-md`:``}`,onClick:c,children:[(0,I.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-github-text-secondary`,children:[(0,I.jsxs)(`span`,{className:`font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap`,style:{backgroundColor:`var(--color-yellow-path-bg)`,color:`var(--color-yellow-path-text)`},children:[e.file,`:`,m]}),e.isOutdated&&(0,I.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded-full border border-github-text-muted px-2 text-[10px] font-medium text-github-text-muted`,title:`Code has changed since this comment was made`,"aria-label":`Outdated comment`,children:`Outdated`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:h,className:`whitespace-nowrap rounded px-2 py-1 text-xs transition-all`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},title:`Copy thread prompt for AI coding agent`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,I.jsx)(Ye,{size:12}),u?`Copied!`:`Copy Prompt`]})}),(0,I.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),p(e=>!e)},"aria-label":`Reply`,className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 text-github-text-primary transition-all hover:bg-github-bg-primary`,title:`Reply to thread`,children:(0,I.jsx)(lt,{size:14})})]})]}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(Xr,{message:g,isRootMessage:!0,showAuthorBadge:t,syntaxTheme:l,filename:e.file,originalCode:e.codeContent,onUpdate:t=>s(e.id,g.id,t),onResolveOrDelete:()=>i(e.id),actionLabel:`Resolve thread`,confirmMessage:n?`Resolve this thread?\n\n"${g.body}"`:void 0}),e.messages.slice(1).map(n=>(0,I.jsx)(`div`,{className:`ml-4 border-l border-github-border pl-3`,children:(0,I.jsx)(Xr,{message:n,showAuthorBadge:t,syntaxTheme:l,filename:e.file,originalCode:e.codeContent,onUpdate:t=>s(e.id,n.id,t),onResolveOrDelete:()=>o(e.id,n.id),actionLabel:`Delete reply`,confirmMessage:`Delete this reply?\n\n"${n.body}"`})},n.id)),f&&(0,I.jsx)(`div`,{className:`ml-4 border-l border-github-border pl-3`,onClick:e=>e.stopPropagation(),children:(0,I.jsx)(Yr,{onSubmit:async t=>{await a(e.id,t),p(!1)},onCancel:()=>p(!1),selectedCode:e.codeContent,syntaxTheme:l,filename:e.file,embedded:!0,title:`Reply to thread`,submitLabel:`Reply`,placeholder:`Write a reply...`})})]})]}):null}function Qr({isOpen:e,onClose:t,onNavigate:n,comments:r,showAuthorBadges:i=!1,onRemoveThread:a,onGenerateThreadPrompt:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u}){let[d,f]=(0,F.useState)(0),p=(0,F.useRef)([]),{enableScope:m,disableScope:h}=we(),g=[...r].sort((e,t)=>{let n=e.file.localeCompare(t.file);if(n!==0)return n;let r=Array.isArray(e.line)?e.line[0]:e.line,i=Array.isArray(t.line)?t.line[0]:t.line;return r===i?e.createdAt.localeCompare(t.createdAt):r-i}),_=(0,F.useCallback)(e=>{n(e),t()},[t,n]),v=(0,F.useCallback)(e=>{let t=e.messages[0]?.body||``;confirm(`Resolve this thread?\n\n"${t}"`)&&(a(e.id),d>=g.length-1&&d>0&&f(d-1))},[a,d,g.length]);(0,F.useEffect)(()=>(e?(m(`comments-list`),h(`navigation`)):(m(`navigation`),h(`comments-list`),f(0)),()=>{m(`navigation`),h(`comments-list`)}),[h,m,e]);let y={scopes:`comments-list`,enableOnFormTags:!1};return z(`escape`,()=>t(),y,[t]),z(`j, down`,()=>f(e=>Math.min(e+1,g.length-1)),y,[g.length]),z(`k, up`,()=>f(e=>Math.max(e-1,0)),y,[]),z(`enter`,()=>{g[d]&&_(g[d])},y,[_,d,g]),z(`d`,()=>{g[d]&&v(g[d])},y,[v,d,g]),(0,F.useEffect)(()=>{p.current[d]&&p.current[d]?.scrollIntoView({block:`nearest`})},[d]),e?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,I.jsxs)(`div`,{className:`relative max-h-[80vh] w-full max-w-4xl overflow-hidden rounded-lg border border-github-border bg-github-bg-primary shadow-lg`,children:[(0,I.jsxs)(`div`,{className:`sticky top-0 border-b border-github-border bg-github-bg-primary px-6 py-4`,children:[(0,I.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,I.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`All Comments`}),(0,I.jsx)(`button`,{onClick:t,className:`text-github-text-secondary transition-colors hover:text-github-text-primary`,"aria-label":`Close comments list`,children:(0,I.jsx)(xt,{size:20})})]}),(0,I.jsxs)(`div`,{className:`text-xs text-github-text-secondary`,children:[(0,I.jsx)(`span`,{className:`font-mono`,children:`j/k`}),` or `,(0,I.jsx)(`span`,{className:`font-mono`,children:`↑/↓`}),` to navigate • `,(0,I.jsx)(`span`,{className:`font-mono`,children:`Enter`}),` to jump •`,` `,(0,I.jsx)(`span`,{className:`font-mono`,children:`d`}),` to resolve • `,(0,I.jsx)(`span`,{className:`font-mono`,children:`Esc`}),` `,`to close`]})]}),(0,I.jsx)(`div`,{className:`max-h-[calc(80vh-120px)] overflow-y-auto`,children:(0,I.jsx)(`div`,{className:`p-6`,children:g.length===0?(0,I.jsx)(`p`,{className:`text-center text-github-text-secondary`,children:`No comments yet`}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`space-y-2`,children:g.map((e,t)=>(0,I.jsx)(`div`,{ref:e=>{p.current[t]=e},className:d===t?`rounded ring-2 ring-blue-500`:``,children:(0,I.jsx)(Zr,{thread:e,showAuthorBadges:i,confirmRootAction:!1,onGeneratePrompt:o,onRemoveThread:t=>{t===e.id&&v(e)},onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u,onClick:n=>{n.stopPropagation(),f(t),_(e)}})},e.id))}),(0,I.jsxs)(`div`,{className:`mt-4 border-t border-github-border pt-4 text-center text-xs text-github-text-secondary`,children:[d+1,` of `,g.length,` threads`]})]})})})]})]}):null}function $r(){return typeof window<`u`}function ei(e){return ri(e)?(e.nodeName||``).toLowerCase():`#document`}function ti(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ni(e){return((ri(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ri(e){return $r()?e instanceof Node||e instanceof ti(e).Node:!1}function U(e){return $r()?e instanceof Element||e instanceof ti(e).Element:!1}function ii(e){return $r()?e instanceof HTMLElement||e instanceof ti(e).HTMLElement:!1}function ai(e){return!$r()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ti(e).ShadowRoot}function oi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=_i(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function si(e){return/^(table|td|th)$/.test(ei(e))}function ci(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var li=/transform|translate|scale|rotate|perspective|filter/,ui=/paint|layout|strict|content/,di=e=>!!e&&e!==`none`,fi;function pi(e){let t=U(e)?_i(e):e;return di(t.transform)||di(t.translate)||di(t.scale)||di(t.rotate)||di(t.perspective)||!hi()&&(di(t.backdropFilter)||di(t.filter))||li.test(t.willChange||``)||ui.test(t.contain||``)}function mi(e){let t=yi(e);for(;ii(t)&&!gi(t);){if(pi(t))return t;if(ci(t))return null;t=yi(t)}return null}function hi(){return fi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),fi}function gi(e){return/^(html|body|#document)$/.test(ei(e))}function _i(e){return ti(e).getComputedStyle(e)}function vi(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yi(e){if(ei(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ai(e)&&e.host||ni(e);return ai(t)?t.host:t}function bi(e){let t=yi(e);return gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ii(t)&&oi(t)?t:bi(t)}function xi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=bi(e),i=r===e.ownerDocument?.body,a=ti(r);if(i){let e=Si(a);return t.concat(a,a.visualViewport||[],oi(r)?r:[],e&&n?xi(e):[])}else return t.concat(r,xi(r,[],n))}function Si(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ci=Math.min,wi=Math.max,Ti=Math.round,Ei=Math.floor,Di=e=>({x:e,y:e}),Oi={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ki(e,t,n){return wi(e,Ci(t,n))}function W(e,t){return typeof e==`function`?e(t):e}function Ai(e){return e.split(`-`)[0]}function ji(e){return e.split(`-`)[1]}function Mi(e){return e===`x`?`y`:`x`}function Ni(e){return e===`y`?`height`:`width`}function Pi(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Fi(e){return Mi(Pi(e))}function Ii(e,t,n){n===void 0&&(n=!1);let r=ji(e),i=Fi(e),a=Ni(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Gi(o)),[o,Gi(o)]}function Li(e){let t=Gi(e);return[Ri(e),t,Ri(t)]}function Ri(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zi=[`left`,`right`],Bi=[`right`,`left`],Vi=[`top`,`bottom`],Hi=[`bottom`,`top`];function Ui(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Bi:zi:t?zi:Bi;case`left`:case`right`:return t?Vi:Hi;default:return[]}}function Wi(e,t,n,r){let i=ji(e),a=Ui(Ai(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ri)))),a}function Gi(e){let t=Ai(e);return Oi[t]+e.slice(t.length)}function Ki(e){return{top:0,right:0,bottom:0,left:0,...e}}function qi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ki(e)}function Ji(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var Yi=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),Xi=typeof Element>`u`,Zi=Xi?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qi=!Xi&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},$i=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):$i(e.parentNode))},ea=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},ta=function(e,t,n){if($i(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Yi));return t&&Zi.call(e,Yi)&&r.unshift(e),r=r.filter(n),r},na=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!$i(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=na(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Zi.call(a,Yi)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!$i(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=na(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},ra=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},ia=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ea(e))&&!ra(e)?0:e.tabIndex},aa=function(e,t){var n=ia(e);return n<0&&t&&!ra(e)?0:n},oa=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},sa=function(e){return e.tagName===`INPUT`},ca=function(e){return sa(e)&&e.type===`hidden`},la=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},ua=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},da=function(e){if(!e.name)return!0;var t=e.form||Qi(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=ua(r,e.form);return!i||i===e},fa=function(e){return sa(e)&&e.type===`radio`},pa=function(e){return fa(e)&&!da(e)},ma=function(e){var t=e&&Qi(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=Qi(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},ha=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ga=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Zi.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Zi.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=Qi(e);if(o&&!o.shadowRoot&&r(o)===!0)return ha(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(ma(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return ha(e);return!1},_a=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Zi.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},va=function(e,t){return!(t.disabled||ca(t)||ga(t,e)||la(t)||_a(t))},ya=function(e,t){return!(pa(t)||ia(t)<0||!va(e,t))},ba=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},xa=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=aa(a,i),s=i?xa(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(oa).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Sa=function(e,t){return t||={},xa(t.getShadowRoot?na([e],t.includeContainer,{filter:ya.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ba}):ta(e,t.includeContainer,ya.bind(null,t)))},Ca=function(e,t){return t||={},t.getShadowRoot?na([e],t.includeContainer,{filter:va.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ta(e,t.includeContainer,va.bind(null,t))},wa=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Zi.call(e,Yi)===!1?!1:ya(t,e)};function Ta(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ea(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function Da(){return/apple/i.test(navigator.vendor)}function Oa(){let e=/android/i;return e.test(Ta())||e.test(Ea())}function ka(){return Ta().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function Aa(){return Ea().includes(`jsdom/`)}var ja=`data-floating-ui-focusable`,Ma=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function Na(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Pa(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ai(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fa(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ia(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function La(e){return e.matches(`html,body`)}function Ra(e){return e?.ownerDocument||document}function za(e){return ii(e)&&e.matches(Ma)}function Ba(e){return e?e.getAttribute(`role`)===`combobox`&&za(e):!1}function Va(e){if(!e||Aa())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ha(e){return e?e.hasAttribute(ja)?e:e.querySelector(`[`+ja+`]`)||e:null}function Ua(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Ua(e,t.id,n)])}function Wa(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Ga(e){e.preventDefault(),e.stopPropagation()}function Ka(e){return`nativeEvent`in e}function qa(e){return e.mozInputSource===0&&e.isTrusted?!0:Oa()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ja(e){return Aa()?!1:!Oa()&&e.width===0&&e.height===0||Oa()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Ya(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Xa=typeof document<`u`?F.useLayoutEffect:function(){},Za={...F};function Qa(e){let t=F.useRef(e);return Xa(()=>{t.current=e}),t}var $a=Za.useInsertionEffect||(e=>e());function eo(e){let t=F.useRef(()=>{});return $a(()=>{t.current=e}),F.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var to=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function no(e,t){let n=Sa(e,to()),r=n.length;if(r===0)return;let i=Na(Ra(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ro(e){return no(Ra(e).body,1)||e}function io(e){return no(Ra(e).body,-1)||e}function ao(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Pa(n,r)}function oo(e){Sa(e,to()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function so(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var G=l(A(),1);function co(e,t,n){let{reference:r,floating:i}=e,a=Pi(t),o=Fi(t),s=Ni(o),c=Ai(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ji(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function lo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=W(t,e),p=qi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ji(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ji(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var uo=50,fo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:lo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=co(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<uo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=co(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},po=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=W(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ai(r),_=Pi(o),v=Ai(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Gi(o)]:Li(o)),x=p!==`none`;!d&&x&&b.push(...Wi(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ii(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Pi(t))||T.every(e=>Pi(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Pi(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},mo=new Set([`left`,`top`]);async function ho(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ai(n),s=ji(n),c=Pi(n)===`y`,l=mo.has(o)?-1:1,u=a&&c?-1:1,d=W(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var go=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ho(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_o=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=W(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Pi(Ai(i)),p=Mi(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ki(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ki(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}};function vo(e){let t=_i(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ii(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ti(n)!==a||Ti(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function yo(e){return U(e)?e:e.contextElement}function bo(e){let t=yo(e);if(!ii(t))return Di(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=vo(t),o=(a?Ti(n.width):n.width)/r,s=(a?Ti(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var xo=Di(0);function So(e){let t=ti(e);return!hi()||!t.visualViewport?xo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Co(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ti(e)?!1:t}function wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=yo(e),o=Di(1);t&&(r?U(r)&&(o=bo(r)):o=bo(e));let s=Co(a,n,r)?So(a):Di(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ti(a),t=r&&U(r)?ti(r):r,n=e,i=Si(n);for(;i&&r&&t!==n;){let e=bo(i),t=i.getBoundingClientRect(),r=_i(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ti(i),i=Si(n)}}return Ji({width:u,height:d,x:c,y:l})}function To(e,t){let n=vi(e).scrollLeft;return t?t.left+n:wo(ni(e)).left+n}function Eo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-To(e,n),y:n.top+t.scrollTop}}function Do(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ni(r),s=t?ci(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Di(1),u=Di(0),d=ii(r);if((d||!d&&!a)&&((ei(r)!==`body`||oi(o))&&(c=vi(r)),d)){let e=wo(r);l=bo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Eo(o,c):Di(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Oo(e){return Array.from(e.getClientRects())}function ko(e){let t=ni(e),n=vi(e),r=e.ownerDocument.body,i=wi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+To(e),s=-n.scrollTop;return _i(r).direction===`rtl`&&(o+=wi(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ao=25;function jo(e,t){let n=ti(e),r=ni(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=hi();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=To(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ao&&(a-=o)}else l<=Ao&&(a+=l);return{width:a,height:o,x:s,y:c}}function Mo(e,t){let n=wo(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ii(e)?bo(e):Di(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function No(e,t,n){let r;if(t===`viewport`)r=jo(e,n);else if(t===`document`)r=ko(ni(e));else if(U(t))r=Mo(t,n);else{let n=So(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ji(r)}function Po(e,t){let n=yi(e);return n===t||!U(n)||gi(n)?!1:_i(n).position===`fixed`||Po(n,t)}function Fo(e,t){let n=t.get(e);if(n)return n;let r=xi(e,[],!1).filter(e=>U(e)&&ei(e)!==`body`),i=null,a=_i(e).position===`fixed`,o=a?yi(e):e;for(;U(o)&&!gi(o);){let t=_i(o),n=pi(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||oi(o)&&!n&&Po(e,o))?r=r.filter(e=>e!==o):i=t,o=yi(o)}return t.set(e,r),r}function Io(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ci(t)?[]:Fo(t,this._c):[].concat(n),r],o=No(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=No(t,a[e],i);s=wi(n.top,s),c=Ci(n.right,c),l=Ci(n.bottom,l),u=wi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Lo(e){let{width:t,height:n}=vo(e);return{width:t,height:n}}function Ro(e,t,n){let r=ii(t),i=ni(t),a=n===`fixed`,o=wo(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Di(0);function l(){c.x=To(i)}if(r||!r&&!a)if((ei(t)!==`body`||oi(i))&&(s=vi(t)),r){let e=wo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Eo(i,s):Di(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function zo(e){return _i(e).position===`static`}function Bo(e,t){if(!ii(e)||_i(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ni(e)===n&&(n=n.ownerDocument.body),n}function Vo(e,t){let n=ti(e);if(ci(e))return n;if(!ii(e)){let t=yi(e);for(;t&&!gi(t);){if(U(t)&&!zo(t))return t;t=yi(t)}return n}let r=Bo(e,t);for(;r&&si(r)&&zo(r);)r=Bo(r,t);return r&&gi(r)&&zo(r)&&!pi(r)?n:r||mi(e)||n}var Ho=async function(e){let t=this.getOffsetParent||Vo,n=this.getDimensions,r=await n(e.floating);return{reference:Ro(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Uo(e){return _i(e).direction===`rtl`}var Wo={convertOffsetParentRelativeRectToViewportRelativeRect:Do,getDocumentElement:ni,getClippingRect:Io,getOffsetParent:Vo,getElementRects:Ho,getClientRects:Oo,getDimensions:Lo,getScale:bo,isElement:U,isRTL:Uo};function Go(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ko(e,t){let n=null,r,i=ni(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ei(d),h=Ei(i.clientWidth-(u+f)),g=Ei(i.clientHeight-(d+p)),_=Ei(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:wi(0,Ci(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Go(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function qo(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=yo(e),u=i||a?[...l?xi(l):[],...t?xi(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ko(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?wo(e):null;c&&g();function g(){let t=wo(e);h&&!Go(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Jo=go,Yo=_o,Xo=po,Zo=(e,t,n)=>{let r=new Map,i={platform:Wo,...n},a={...i.platform,_c:r};return fo(e,t,{...i,platform:a})},Qo=typeof document<`u`?F.useLayoutEffect:function(){};function $o(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$o(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!$o(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function es(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ts(e,t){let n=es(e);return Math.round(t*n)/n}function ns(e){let t=F.useRef(e);return Qo(()=>{t.current=e}),t}function rs(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=F.useState(r);$o(f,r)||p(r);let[m,h]=F.useState(null),[g,_]=F.useState(null),v=F.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=F.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=F.useRef(null),C=F.useRef(null),w=F.useRef(u),T=c!=null,E=ns(c),D=ns(i),O=ns(l),k=F.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Zo(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!$o(w.current,t)&&(w.current=t,G.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Qo(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=F.useRef(!1);Qo(()=>(A.current=!0,()=>{A.current=!1}),[]),Qo(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=F.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=F.useMemo(()=>({reference:b,floating:x}),[b,x]),N=F.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=ts(M.floating,u.x),r=ts(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...es(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var is=(e,t)=>{let n=Jo(e);return{name:n.name,fn:n.fn,options:[e,t]}},as=(e,t)=>{let n=Yo(e);return{name:n.name,fn:n.fn,options:[e,t]}},os=(e,t)=>{let n=Xo(e);return{name:n.name,fn:n.fn,options:[e,t]}},ss=`data-floating-ui-focusable`,cs=`active`,ls=`selected`,us=`ArrowLeft`,ds=`ArrowRight`,fs=`ArrowUp`,ps=`ArrowDown`,ms=[us,ds],hs=[fs,ps];[...ms,...hs];var gs={...F},_s=!1,vs=0,ys=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ vs++;function bs(){let[e,t]=F.useState(()=>_s?ys():void 0);return Xa(()=>{e??t(ys())},[]),F.useEffect(()=>{_s=!0},[]),e}var xs=gs.useId||bs;function Ss(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Cs=F.createContext(null),ws=F.createContext(null),Ts=()=>F.useContext(Cs)?.id||null,Es=()=>F.useContext(ws);function Ds(e){return`data-floating-ui-`+e}function Os(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var ks=Ds(`safe-polygon`);function As(e,t,n){if(n&&!Ya(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function js(e){return typeof e==`function`?e():e}function Ms(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Es(),m=Ts(),h=Qa(l),g=Qa(c),_=Qa(n),v=Qa(d),y=F.useRef(),b=F.useRef(-1),x=F.useRef(),S=F.useRef(-1),C=F.useRef(!0),w=F.useRef(!1),T=F.useRef(()=>{}),E=F.useRef(!1),D=eo(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});F.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Os(b),Os(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),F.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=Ra(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=F.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=As(g.current,`close`,y.current);i&&!x.current?(Os(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Os(b),r(!1,e,n))},[g,r]),k=eo(()=>{T.current(),x.current=void 0}),A=eo(()=>{if(w.current){let e=Ra(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(ks),w.current=!1}}),j=eo(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);F.useEffect(()=>{if(!s)return;function e(e){if(Os(b),C.current=!1,u&&!Ya(y.current)||js(v.current)>0&&!As(g.current,`open`))return;let t=As(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=Ra(o.floating);if(Os(S),E.current=!1,h.current&&i.current.floatingContext){n||Os(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!Pa(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){Os(b)}function l(e){j()||O(e,!1)}if(U(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),Xa(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(U(o.domReference)&&e){var t;let n=Ra(o.floating).body;n.setAttribute(ks,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),Xa(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),F.useEffect(()=>()=>{k(),Os(b),Os(S),A()},[s,o.domReference,k,A]);let M=F.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!Ya(y.current)||n||js(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Os(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,js(v.current))))}}},[u,r,n,_,v]);return F.useMemo(()=>s?{reference:M}:{},[s,M])}var Ns=0;function Ps(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Ns);let a=()=>e?.focus({preventScroll:n});i?a():Ns=requestAnimationFrame(a)}function Fs(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ai(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Is(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ls(e){return e?.ownerDocument||document}var Rs={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function zs(e){return e===`inert`?Rs.inert:e===`aria-hidden`?Rs[`aria-hidden`]:Rs.none}var Bs=new WeakSet,Vs={},Hs=0,Us=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function Ws(e){return e?ai(e)?e.host:Ws(e.parentNode):null}var Gs=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Ws(t);return e.contains(n)?n:null}).filter(e=>e!=null);function Ks(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=Gs(t,e),s=new Set,c=new Set(o),l=[];Vs[i]||(Vs[i]=new WeakMap);let u=Vs[i];o.forEach(d),f(t),s.clear();function d(e){!e||s.has(e)||(s.add(e),e.parentNode&&d(e.parentNode))}function f(e){!e||c.has(e)||[].forEach.call(e.children,e=>{if(ei(e)!==`script`)if(s.has(e))f(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=zs(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&Bs.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}})}return Hs++,()=>{l.forEach(e=>{let t=zs(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!Bs.has(e)&&a&&e.removeAttribute(a),Bs.delete(e)),r||e.removeAttribute(i)}),Hs--,Hs||(Rs.inert=new WeakMap,Rs[`aria-hidden`]=new WeakMap,Rs.none=new WeakMap,Bs=new WeakSet,Vs={})}}function qs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=Ls(e[0]).body;return Ks(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}var Js={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Ys=F.forwardRef(function(e,t){let[n,r]=F.useState();Xa(()=>{Da()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Ds(`focus-guard`)]:``,style:Js};return(0,I.jsx)(`span`,{...e,...i})}),Xs={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Zs=F.createContext(null),Qs=Ds(`portal`);function $s(e){e===void 0&&(e={});let{id:t,root:n}=e,r=xs(),i=tc(),[a,o]=F.useState(null),s=F.useRef(null);return Xa(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),Xa(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(Qs,``),e.appendChild(n),s.current=n,o(n)},[t,r]),Xa(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!ri(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(Qs,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function ec(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=$s({id:n,root:r}),[o,s]=F.useState(null),c=F.useRef(null),l=F.useRef(null),u=F.useRef(null),d=F.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return F.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&ao(e)&&(e.type===`focusin`?so:oo)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),F.useEffect(()=>{a&&(p||so(a))},[p,a]),(0,I.jsxs)(Zs.Provider,{value:F.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,I.jsx)(Ys,{"data-type":`outside`,ref:c,onFocus:e=>{if(ao(e,a)){var t;(t=u.current)==null||t.focus()}else io(o?o.domReference:null)?.focus()}}),m&&a&&(0,I.jsx)(`span`,{"aria-owns":a.id,style:Xs}),a&&G.createPortal(t,a),m&&a&&(0,I.jsx)(Ys,{"data-type":`outside`,ref:l,onFocus:e=>{if(ao(e,a)){var t;(t=d.current)==null||t.focus()}else ro(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var tc=()=>F.useContext(Zs);function nc(e){return F.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}var rc=20,ic=[];function ac(){ic=ic.filter(e=>e.deref()?.isConnected)}function oc(e){ac(),e&&ei(e)!==`body`&&(ic.push(new WeakRef(e)),ic.length>rc&&(ic=ic.slice(-rc)))}function sc(){return ac(),ic[ic.length-1]?.deref()}function cc(e){let t=to();return wa(e,t)?e:Sa(e,t)[0]||e}function lc(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=to(),i=Ca(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return wa(e,r)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),a=e.getAttribute(`tabindex`);t.current.includes(`floating`)||i.length===0?a!==`0`&&e.setAttribute(`tabindex`,`0`):(a!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}var uc=F.forwardRef(function(e,t){return(0,I.jsx)(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:Js})});function dc(e){let{context:t,children:n,disabled:r=!1,order:i=[`content`],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:h,events:g,dataRef:_,elements:{domReference:v,floating:y}}=t,b=eo(()=>_.current.floatingContext?.nodeId),x=eo(p),S=typeof o==`number`&&o<0,C=Ba(v)&&S,w=Us(),T=w?a:!0,E=!T||w&&f,D=Qa(i),O=Qa(o),k=Qa(s),A=Es(),j=tc(),M=F.useRef(null),N=F.useRef(null),P=F.useRef(!1),ee=F.useRef(!1),te=F.useRef(-1),ne=F.useRef(-1),re=j!=null,L=Ha(y),ie=eo(function(e){return e===void 0&&(e=L),e?Sa(e,to()):[]}),R=eo(e=>{let t=ie(e);return D.current.map(e=>v&&e===`reference`?v:L&&e===`floating`?L:t).filter(Boolean).flat()});F.useEffect(()=>{if(r||!l)return;function e(e){if(e.key===`Tab`){Pa(L,Na(Ra(L)))&&ie().length===0&&!C&&Ga(e);let t=R(),n=Fa(e);D.current[0]===`reference`&&n===v&&(Ga(e),e.shiftKey?Ps(t[t.length-1]):Ps(t[1])),D.current[1]===`floating`&&n===L&&e.shiftKey&&(Ga(e),Ps(t[0]))}}let t=Ra(L);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,v,L,l,D,C,ie,R]),F.useEffect(()=>{if(r||!y)return;function e(e){let t=Fa(e),n=ie().indexOf(t);n!==-1&&(te.current=n)}return y.addEventListener(`focusin`,e),()=>{y.removeEventListener(`focusin`,e)}},[r,y,ie]),F.useEffect(()=>{if(r||!d)return;function e(){ee.current=!0,setTimeout(()=>{ee.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=Fa(e);queueMicrotask(()=>{let i=b(),a=!(Pa(v,t)||Pa(y,t)||Pa(t,y)||Pa(j?.portalNode,t)||t!=null&&t.hasAttribute(Ds(`focus-guard`))||A&&(Ua(A.nodesRef.current,i).find(e=>Pa(e.context?.elements.floating,t)||Pa(e.context?.elements.domReference,t))||Wa(A.nodesRef.current,i).find(e=>[e.context?.elements.floating,Ha(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===v&&L&&lc(L,D),c&&n!==v&&!(r!=null&&r.isConnected)&&Na(Ra(L))===Ra(L).body){ii(L)&&L.focus();let e=te.current,t=ie(),n=t[e]||t[t.length-1]||L;ii(n)&&n.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(C||!l)&&t&&a&&!ee.current&&t!==sc()&&(P.current=!0,h(!1,e,`focus-out`))})}let n=!!(!A&&j);function i(){Os(ne),_.current.insideReactTree=!0,ne.current=window.setTimeout(()=>{_.current.insideReactTree=!1})}if(y&&ii(v))return v.addEventListener(`focusout`,t),v.addEventListener(`pointerdown`,e),y.addEventListener(`focusout`,t),n&&y.addEventListener(`focusout`,i,!0),()=>{v.removeEventListener(`focusout`,t),v.removeEventListener(`pointerdown`,e),y.removeEventListener(`focusout`,t),n&&y.removeEventListener(`focusout`,i,!0)}},[r,v,y,L,l,A,j,h,d,c,ie,C,b,D,_]);let ae=F.useRef(null),oe=F.useRef(null),se=nc([ae,j?.beforeInsideRef]),ce=nc([oe,j?.afterInsideRef]);F.useEffect(()=>{var e,t;if(r||!y)return;let n=Array.from((j==null||(e=j.portalNode)==null?void 0:e.querySelectorAll(`[`+Ds(`portal`)+`]`))||[]),i=[y,(t=(A?Wa(A.nodesRef.current,b()):[]).find(e=>Ba(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,...n,...x(),M.current,N.current,ae.current,oe.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,D.current.includes(`reference`)||C?v:null].filter(e=>e!=null),a=l||C?qs(i,!E,E):qs(i);return()=>{a()}},[r,v,y,l,D,j,C,T,E,A,b,x]),Xa(()=>{if(r||!ii(L))return;let e=Na(Ra(L));queueMicrotask(()=>{let t=R(L),n=O.current,r=(typeof n==`number`?t[n]:n.current)||L,i=Pa(L,e);!S&&!i&&m&&Ps(r,{preventScroll:r===L})})},[r,m,L,S,R,O]),Xa(()=>{if(r||!L)return;let e=Ra(L);oc(Na(e));function t(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(P.current=!0),t===`outside-press`)if(r)P.current=!1;else if(qa(n)||Ja(n))P.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?P.current=!1:P.current=!0}}g.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,Js),re&&v&&v.insertAdjacentElement(`afterend`,n);function i(){if(typeof k.current==`boolean`){let e=v||sc();return e&&e.isConnected?e:n}return k.current.current||n}return()=>{g.off(`openchange`,t);let r=Na(e),a=Pa(y,r)||A&&Ua(A.nodesRef.current,b(),!1).some(e=>Pa(e.context?.elements.floating,r)),o=i();queueMicrotask(()=>{let t=cc(o);k.current&&!P.current&&ii(t)&&(!(t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),n.remove()})}},[r,y,L,k,_,g,A,re,v,b]),F.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(ac)}),[r]),Xa(()=>{if(!r&&j)return j.setFocusManagerState({modal:l,closeOnFocusOut:d,open:m,onOpenChange:h,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,l,m,h,d,v]),Xa(()=>{r||L&&lc(L,D)},[r,L,D]);function le(e){return r||!u||!l?null:(0,I.jsx)(uc,{ref:e===`start`?M:N,onClick:e=>h(!1,e.nativeEvent),children:typeof u==`string`?u:`Dismiss`})}let ue=!r&&T&&(l?!C:!0)&&(re||l);return(0,I.jsxs)(I.Fragment,{children:[ue&&(0,I.jsx)(Ys,{"data-type":`inside`,ref:se,onFocus:e=>{if(l){let e=R();Ps(i[0]===`reference`?e[0]:e[e.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(P.current=!1,ao(e,j.portalNode))ro(v)?.focus();else{var t;(t=j.beforeOutsideRef.current)==null||t.focus()}}}),!C&&le(`start`),n,le(`end`),ue&&(0,I.jsx)(Ys,{"data-type":`inside`,ref:ce,onFocus:e=>{if(l)Ps(R()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(d&&(P.current=!0),ao(e,j.portalNode))io(v)?.focus();else{var t;(t=j.afterOutsideRef.current)==null||t.focus()}}})]})}function fc(e){return ii(e.target)&&e.target.tagName===`BUTTON`}function pc(e){return ii(e.target)&&e.target.tagName===`A`}function mc(e){return za(e)}function hc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=F.useRef(),p=F.useRef(!1),m=F.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current;e.button===0&&s!==`click`&&(Ya(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent,`click`):(e.preventDefault(),r(!0,e.nativeEvent,`click`))))},onClick(e){let t=f.current;if(s===`mousedown`&&f.current){f.current=void 0;return}Ya(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`click`)?r(!1,e.nativeEvent,`click`):r(!0,e.nativeEvent,`click`))},onKeyDown(e){f.current=void 0,!(e.defaultPrevented||!u||fc(e))&&(e.key===` `&&!mc(a)&&(e.preventDefault(),p.current=!0),!pc(e)&&e.key===`Enter`&&r(!(n&&c),e.nativeEvent,`click`))},onKeyUp(e){e.defaultPrevented||!u||fc(e)||mc(a)||e.key===` `&&p.current&&(p.current=!1,r(!(n&&c),e.nativeEvent,`click`))}}),[i,a,s,l,u,r,n,d,c]);return F.useMemo(()=>o?{reference:m}:{},[o,m])}var gc={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},_c={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},vc=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function yc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Es(),g=eo(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=F.useRef(!1),{escapeKey:y,outsidePress:b}=vc(p),{escapeKey:x,outsidePress:S}=vc(m),C=F.useRef(!1),w=eo(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?Ua(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,Ka(e)?e.nativeEvent:e,`escape-key`)}),T=eo(e=>{var t;let n=()=>{var t;w(e),(t=Fa(e))==null||t.removeEventListener(`keydown`,n)};(t=Fa(e))==null||t.addEventListener(`keydown`,n)}),E=eo(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=Fa(e),s=`[`+Ds(`inert`)+`]`,c=Ra(i.floating).querySelectorAll(s),u=U(o)?o:null;for(;u&&!gi(u);){let e=yi(u);if(gi(e)||!U(e))break;u=e}if(c.length&&U(o)&&!La(o)&&!Pa(o,i.floating)&&Array.from(c).every(e=>!Pa(u,e)))return;if(ii(o)&&k){let t=gi(o),n=_i(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Ua(h.nodesRef.current,d).some(t=>Ia(e,t.context?.elements.floating));if(Ia(e,i.floating)||Ia(e,i.domReference)||f)return;let p=h?Ua(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=eo(e=>{var t;let n=()=>{var t;E(e),(t=Fa(e))==null||t.removeEventListener(l,n)};(t=Fa(e))==null||t.addEventListener(l,n)});F.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},hi()?5:0)}let d=Ra(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(U(i.domReference)&&(p=xi(i.domReference)),U(i.floating)&&(p=p.concat(xi(i.floating))),!U(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(xi(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),F.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=F.useMemo(()=>({onKeyDown:w,...u&&{[gc[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=F.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[_c[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return F.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function bc(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=xs(),a=F.useRef({}),[o]=F.useState(()=>Ss()),s=Ts()!=null,[c,l]=F.useState(r.reference),u=eo((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=F.useMemo(()=>({setPositionReference:l}),[]),f=F.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return F.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function xc(e){e===void 0&&(e={});let{nodeId:t}=e,n=bc({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=F.useState(null),[s,c]=F.useState(null),l=i?.domReference||a,u=F.useRef(null),d=Es();Xa(()=>{l&&(u.current=l)},[l]);let f=rs({...e,elements:{...i,...s&&{reference:s}}}),p=F.useCallback(e=>{let t=U(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=F.useCallback(e=>{(U(e)||e===null)&&(u.current=e,o(e)),(U(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!U(e))&&f.refs.setReference(e)},[f.refs]),h=F.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=F.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=F.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return Xa(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),F.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function Sc(){return ka()&&Da()}function Cc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=F.useRef(!1),u=F.useRef(-1),d=F.useRef(!0);F.useEffect(()=>{if(!s)return;let e=ti(o.domReference);function t(){!n&&ii(o.domReference)&&o.domReference===Na(Ra(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Sc()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Sc()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),F.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),F.useEffect(()=>()=>{Os(u)},[]);let f=F.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=Fa(e.nativeEvent);if(c&&U(t)){if(Sc()&&!e.relatedTarget){if(!d.current&&!za(t))return}else if(!Va(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=U(t)&&t.hasAttribute(Ds(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=Na(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||Pa(a.current.floatingContext?.refs.floating.current,e)||Pa(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return F.useMemo(()=>s?{reference:f}:{},[s,f])}function wc(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[cs]:t,[ls]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ss]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[cs,ls].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Tc(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=F.useCallback(t=>wc(t,e,`reference`),t),a=F.useCallback(t=>wc(t,e,`floating`),n),o=F.useCallback(t=>wc(t,e,`item`),r);return F.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Ec=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Dc(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=xs(),c=r.domReference?.id||s,l=F.useMemo(()=>Ha(r.floating)?.id||i,[r.floating,i]),u=Ec.get(o)??o,d=Ts()!=null,f=F.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=F.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=F.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return F.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Oc=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase());function kc(e,t){return typeof e==`function`?e(t):e}function Ac(e,t){let[n,r]=F.useState(e);return e&&!n&&r(!0),F.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}function jc(e,t){t===void 0&&(t={});let{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i==`number`?i:i.close)||0,[o,s]=F.useState(`unmounted`),c=Ac(n,a);return!c&&o===`close`&&s(`unmounted`),Xa(()=>{if(r){if(n){s(`initial`);let e=requestAnimationFrame(()=>{G.flushSync(()=>{s(`open`)})});return()=>{cancelAnimationFrame(e)}}s(`close`)}},[n,r]),{isMounted:c,status:o}}function Mc(e,t){t===void 0&&(t={});let{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,s=e.placement,c=s.split(`-`)[0],l=F.useMemo(()=>({side:c,placement:s}),[c,s]),u=typeof o==`number`,d=(u?o:o.open)||0,f=(u?o:o.close)||0,[p,m]=F.useState(()=>({...kc(a,l),...kc(n,l)})),{isMounted:h,status:g}=jc(e,{duration:o}),_=Qa(n),v=Qa(r),y=Qa(i),b=Qa(a);return Xa(()=>{let e=kc(_.current,l),t=kc(y.current,l),n=kc(b.current,l),r=kc(v.current,l)||Object.keys(e).reduce((e,t)=>(e[t]=``,e),{});if(g===`initial`&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),g===`open`&&m({transitionProperty:Object.keys(r).map(Oc).join(`,`),transitionDuration:d+`ms`,...n,...r}),g===`close`){let r=t||e;m({transitionProperty:Object.keys(r).map(Oc).join(`,`),transitionDuration:f+`ms`,...n,...r})}},[f,y,_,v,b,d,g,l]),{isMounted:h,styles:p}}function Nc(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Nc(e,t.id,n)])}function Pc(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Fc(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Ic(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){Os(i),u()}if(Os(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=Is(e),v=e.type===`mouseleave`,y=Fs(c.floating,_),b=Fs(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=Fc(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&U(e.relatedTarget)&&Fs(c.floating,e.relatedTarget)||f&&Nc(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]];break}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!Pc([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}Pc([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var Lc={".":`Uncommitted Changes`,staged:`Staging Area`,working:`Working Directory`},Rc=new Set([`.`,`staged`,`working`]),zc=e=>{let t=!e||Rc.has(e)?`HEAD`:`${e}^`;return Xt(`${t}^`,t)},Bc=e=>Yt(e.baseMode)===`merge-base`?!1:!!e.targetCommitish&&e.baseCommitish===`${e.targetCommitish}^`,Vc=(e,t)=>e?e===t.shortHash||e===t.hash:!1,Hc=(e,t)=>t?`${e.shortHash}^`:e.shortHash,Uc=(e,t,n)=>{if(!t)return`Select...`;let r=t.endsWith(`^`),i=r?t.slice(0,-1):t;if(i.startsWith(`HEAD`))return t;let a=Lc[t];if(a)return a;let o=e.specialOptions.find(e=>e.value===t);if(o)return o.label;let s=e.branches.find(e=>e.name===i);if(s)return r?`${s.name}^`:s.name;let c=e.commits.find(e=>e.shortHash===i||e.hash===i);if(c)return Hc(c,r);if(n){let t=e.commits.find(e=>e.shortHash===n||e.hash===n);if(t)return Hc(t,!1)}return t};function Wc({options:e,selection:t,resolvedBaseRevision:n,resolvedTargetRevision:r,onSelectDiff:i,onOpenAdvanced:a,compact:o=!1}){let[s,c]=(0,F.useState)(!1),[l,u]=(0,F.useState)(!1),d=o,{refs:f,floatingStyles:p,context:m}=xc({open:s||l,onOpenChange:e=>{!e&&l||c(e)},placement:`bottom-end`,middleware:[is(6),os(),as({padding:8})],whileElementsMounted:qo}),{getReferenceProps:h,getFloatingProps:g}=Tc([Ms(m,{handleClose:Ic()}),hc(m),yc(m),Dc(m,{role:`menu`})]),{refs:_,floatingStyles:v,context:y}=xc({open:l,onOpenChange:e=>{e&&c(!0),u(e)},placement:`left-start`,middleware:[is(0),os(),as({padding:8})],whileElementsMounted:qo}),{getReferenceProps:b,getFloatingProps:x}=Tc([Ms(y,{handleClose:Ic()}),hc(y),yc(y),Dc(y,{role:`menu`})]);(0,F.useEffect)(()=>{s||u(!1)},[s]);let S=(0,F.useMemo)(()=>{let i=Bc(t),a=e.commits.find(e=>i?Vc(t.targetCommitish,e)||Vc(r,e):!1);return a?`${a.shortHash} ${a.message}`:`${Uc(e,t.baseCommitish,n)}...${Uc(e,t.targetCommitish,r)}${Yt(t.baseMode)===`merge-base`?` (merge-base)`:``}`},[e,t,n,r]),C=(0,F.useMemo)(()=>e.branches.find(e=>e.name===`main`)||e.branches.find(e=>e.name===`master`),[e.branches]),w=e.originDefaultBranch,T=(0,F.useMemo)(()=>Xt(`HEAD^`,`HEAD`),[]),E=(0,F.useMemo)(()=>Xt(`HEAD`,`.`,`merge-base`),[]),D=(0,F.useMemo)(()=>C?Xt(C.name,`.`,`merge-base`):null,[C]),O=(0,F.useMemo)(()=>w?Xt(w,`.`,`merge-base`):null,[w]),k=(0,F.useMemo)(()=>zc(t.targetCommitish),[t.targetCommitish]),A=e=>{i(e),u(!1),c(!1)},j=()=>{u(!1),c(!1),a()},M=(e,t)=>[`w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors`,e?`hover:bg-diff-selected-bg focus:bg-diff-selected-bg`:`hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary`,e?`bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2`:``,t?`opacity-50 cursor-not-allowed`:`cursor-pointer`].join(` `),N=e=>Zt(t,e),P=e=>Bc(t)?Vc(t.targetCommitish,e)||Vc(r,e):!1;return(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`button`,{ref:f.setReference,type:`button`,className:`flex items-center gap-1.5 cursor-pointer group`,"aria-haspopup":`menu`,"aria-expanded":s,"aria-label":`Revision menu: ${S}`,title:S,...h(),children:d?(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors`,children:[(0,I.jsx)(at,{size:14,className:`text-github-text-secondary`}),(0,I.jsx)(He,{size:12,className:`text-github-text-secondary group-hover:text-github-text-primary transition-colors`})]}):(0,I.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors`,children:[(0,I.jsx)(`code`,{className:`text-xs text-github-text-primary`,children:S}),(0,I.jsx)(He,{size:12,className:`text-github-text-secondary group-hover:text-github-text-primary transition-colors`})]})}),s&&(0,I.jsx)(ec,{children:(0,I.jsxs)(`div`,{ref:f.setFloating,style:p,className:`bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto`,...g(),children:[(0,I.jsxs)(`div`,{className:`border-b border-github-border`,children:[(0,I.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Quick Diffs`}),(0,I.jsx)(`button`,{onClick:()=>A(T),className:M(N(T),!1),children:`HEAD`}),(0,I.jsx)(`button`,{onClick:()=>A(E),className:M(N(E),!1),children:`HEAD...Uncommitted (merge-base)`}),C&&D&&(0,I.jsx)(I.Fragment,{children:(0,I.jsxs)(`button`,{onClick:()=>A(D),className:M(N(D),!1),children:[C.name,`...Uncommitted (merge-base)`]})}),w&&O&&(0,I.jsxs)(`button`,{onClick:()=>A(O),className:M(N(O),!1),children:[w,`...Uncommitted (merge-base)`]})]}),(0,I.jsx)(`div`,{className:`border-b border-github-border`,children:(0,I.jsx)(`button`,{onClick:()=>A(k),className:M(N(k),!1),type:`button`,children:`Previous commit`})}),(0,I.jsx)(`div`,{className:`border-b border-github-border`,children:(0,I.jsx)(`button`,{ref:e.commits.length>0?_.setReference:void 0,className:M(!1,e.commits.length===0),...e.commits.length>0?b():{},disabled:e.commits.length===0,type:`button`,children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Ue,{size:12,className:`text-github-text-secondary`}),(0,I.jsx)(`span`,{children:`Pick Commit...`})]})})}),(0,I.jsx)(`div`,{children:(0,I.jsx)(`button`,{onClick:j,className:M(!1,!1),type:`button`,children:`Detailed...`})})]})}),l&&e.commits.length>0&&(0,I.jsx)(ec,{children:(0,I.jsxs)(`div`,{ref:_.setFloating,style:v,className:`bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto`,...x(),children:[(0,I.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Recent Commits`}),e.commits.map(e=>(0,I.jsx)(`button`,{onClick:()=>A(Xt(`${e.shortHash}^`,e.shortHash)),className:M(P(e),!1),type:`button`,children:(0,I.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,I.jsx)(`code`,{className:`text-xs text-github-text-primary font-mono whitespace-nowrap`,children:e.shortHash}),(0,I.jsx)(`span`,{className:`text-xs text-github-text-secondary flex-1 break-words`,children:e.message})]})},e.hash))]})})]})}var Gc={getOldTokens:null,getNewTokens:null},Kc=2e3;async function qc(e,t){try{let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);return n.ok?await n.text():null}catch{return null}}function Jc(e,t){if(e.split(`
|
|
21
|
+
`).length>Kc)return null;let n=xr.languages[t];if(!n)return null;try{return dr(xr.tokenize(e,n))}catch{return null}}function Yc({file:e,enabled:t,baseCommitish:n,targetCommitish:r,reloadKey:i}){let a=(0,F.useMemo)(()=>jr(e.path),[e.path]),[o,s]=(0,F.useState)(null),[c,l]=(0,F.useState)(null),[u,d]=(0,F.useState)(()=>!t||!!xr.languages[a]);(0,F.useEffect)(()=>{if(!t)return;if(xr.languages[a]){d(!0);return}let e=!1;return br(a).then(()=>{e||d(!0)}).catch(()=>{e||d(!1)}),()=>{e=!0}},[t,a]),(0,F.useEffect)(()=>{if(!t){s(null),l(null);return}let i=!1,a=e.status!==`added`&&!!n,o=e.status!==`deleted`&&!!r;return s(null),l(null),a&&qc(e.oldPath||e.path,n).then(e=>{i||s(e)}),o&&qc(e.path,r).then(e=>{i||l(e)}),()=>{i=!0}},[t,e.path,e.oldPath,e.status,n,r,i]);let f=(0,F.useMemo)(()=>!t||!u||o==null?null:Jc(o,a),[t,u,o,a]),p=(0,F.useMemo)(()=>!t||!u||c==null?null:Jc(c,a),[t,u,c,a]);return(0,F.useMemo)(()=>t?{getOldTokens:f?e=>f[e-1]??null:null,getNewTokens:p?e=>p[e-1]??null:null}:Gc,[t,f,p])}var Xc=[`jpg`,`jpeg`,`png`,`gif`,`bmp`,`svg`,`webp`,`ico`,`tiff`,`tif`,`avif`,`heic`,`heif`];function Zc(e){if(!e)return!1;let t=wr(e);return t?Xc.includes(t):!1}var Qc=[`md`,`markdown`];function $c(e){if(!e)return!1;let t=wr(e);return t?Qc.includes(t):!1}var el=[`ipynb`];function tl(e){if(!e)return!1;let t=wr(e);return t?el.includes(t):!1}var nl=(e,t)=>`${e.slice(0,7)}:${t}`,rl=(e,t)=>window.__DIFIT_STATIC_BLOB_URLS__?.[nl(t,e)]??`/api/blob/${e}?ref=${t}`;function il({file:e,diffMode:t,baseCommitish:n,targetCommitish:r}){let i=t??`split`,a=e.status===`deleted`,o=e.status===`added`,s=e.status===`modified`||e.status===`renamed`,c=n||`HEAD~1`,l=r||`HEAD`,[u,d]=(0,F.useState)({}),[f,p]=(0,F.useState)({}),m=async(e,t)=>{try{let n=e.naturalWidth,r=e.naturalHeight,i=(await(await fetch(e.src)).blob()).size;t({width:n,height:r,size:i})}catch(e){console.error(`Failed to get image info:`,e)}},h=e=>e?e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:``,g=e=>!e.width||!e.height?``:`W: ${e.width}px | H: ${e.height}px`,_={backgroundImage:`
|
|
22
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
|
23
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
|
|
24
|
+
`,backgroundSize:`20px 20px`,backgroundPosition:`0 0, 10px 10px`,backgroundColor:`white`};return a?(0,I.jsx)(`div`,{className:`bg-github-bg-primary p-4`,children:(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`div`,{className:`mb-2`,children:(0,I.jsx)(`span`,{className:`text-github-danger font-medium`,children:`Deleted Image`})}),(0,I.jsxs)(`div`,{className:`inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,I.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,I.jsx)(`img`,{src:rl(e.oldPath||e.path,c),alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,I.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,I.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})]})}):o?(0,I.jsx)(`div`,{className:`bg-github-bg-primary p-4`,children:(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`div`,{className:`mb-2`,children:(0,I.jsx)(`span`,{className:`text-github-accent font-medium`,children:`Added Image`})}),(0,I.jsxs)(`div`,{className:`inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,I.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`New file:`}),(0,I.jsx)(`img`,{src:rl(e.path,l),alt:`New image ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,I.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,I.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})]})}):s?i===`split`?(0,I.jsxs)(`div`,{className:`bg-github-bg-primary p-4`,children:[(0,I.jsx)(`div`,{className:`text-center mb-4`,children:(0,I.jsx)(`span`,{className:`text-github-text-primary font-medium`,children:`Modified Image`})}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,I.jsx)(`div`,{className:`text-center`,children:(0,I.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,I.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,I.jsx)(`img`,{src:rl(e.oldPath||e.path,c),alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,I.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,I.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})}),(0,I.jsx)(`div`,{className:`text-center`,children:(0,I.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,I.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Current version:`}),(0,I.jsx)(`img`,{src:rl(e.path,l),alt:`Current version of ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,I.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,I.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})})]})]}):(0,I.jsxs)(`div`,{className:`bg-github-bg-primary p-4`,children:[(0,I.jsx)(`div`,{className:`text-center mb-4`,children:(0,I.jsx)(`span`,{className:`text-github-text-primary font-medium`,children:`Modified Image`})}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(`div`,{className:`text-center`,children:(0,I.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block`,children:[(0,I.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,I.jsx)(`img`,{src:rl(e.oldPath||e.path,c),alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,I.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,I.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})}),(0,I.jsx)(`div`,{className:`text-center`,children:(0,I.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block`,children:[(0,I.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Current version:`}),(0,I.jsx)(`img`,{src:rl(e.path,l),alt:`Current version of ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,I.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,I.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})})]})]}):null}function al(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ol=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cl={};function ll(e,t){return((t||cl).jsx?sl:ol).test(e)}var ul=/[ \t\n\f\r]/g;function dl(e){return typeof e==`object`?e.type===`text`?fl(e.value):!1:fl(e)}function fl(e){return e.replace(ul,``)===``}var pl=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};pl.prototype.normal={},pl.prototype.property={},pl.prototype.space=void 0;function ml(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new pl(n,r,t)}function hl(e){return e.toLowerCase()}var gl=class{constructor(e,t){this.attribute=t,this.property=e}};gl.prototype.attribute=``,gl.prototype.booleanish=!1,gl.prototype.boolean=!1,gl.prototype.commaOrSpaceSeparated=!1,gl.prototype.commaSeparated=!1,gl.prototype.defined=!1,gl.prototype.mustUseProperty=!1,gl.prototype.number=!1,gl.prototype.overloadedBoolean=!1,gl.prototype.property=``,gl.prototype.spaceSeparated=!1,gl.prototype.space=void 0;var _l=s({boolean:()=>K,booleanish:()=>yl,commaOrSpaceSeparated:()=>Cl,commaSeparated:()=>Sl,number:()=>q,overloadedBoolean:()=>bl,spaceSeparated:()=>xl}),vl=0,K=wl(),yl=wl(),bl=wl(),q=wl(),xl=wl(),Sl=wl(),Cl=wl();function wl(){return 2**++vl}var Tl=Object.keys(_l),El=class extends gl{constructor(e,t,n,r){let i=-1;if(super(e,t),Dl(this,`space`,r),typeof n==`number`)for(;++i<Tl.length;){let e=Tl[i];Dl(this,Tl[i],(n&_l[e])===_l[e])}}};El.prototype.defined=!0;function Dl(e,t,n){n&&(e[t]=n)}function Ol(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new El(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hl(r)]=r,n[hl(a.attribute)]=r}return new pl(t,n,e.space)}var kl=Ol({properties:{ariaActiveDescendant:null,ariaAtomic:yl,ariaAutoComplete:null,ariaBusy:yl,ariaChecked:yl,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:xl,ariaCurrent:null,ariaDescribedBy:xl,ariaDetails:null,ariaDisabled:yl,ariaDropEffect:xl,ariaErrorMessage:null,ariaExpanded:yl,ariaFlowTo:xl,ariaGrabbed:yl,ariaHasPopup:null,ariaHidden:yl,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xl,ariaLevel:q,ariaLive:null,ariaModal:yl,ariaMultiLine:yl,ariaMultiSelectable:yl,ariaOrientation:null,ariaOwns:xl,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:yl,ariaReadOnly:yl,ariaRelevant:null,ariaRequired:yl,ariaRoleDescription:xl,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:yl,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 Al(e,t){return t in e?e[t]:t}function jl(e,t){return Al(e,t.toLowerCase())}var Ml=Ol({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Sl,acceptCharset:xl,accessKey:xl,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:xl,autoFocus:K,autoPlay:K,blocking:xl,capture:null,charSet:null,checked:K,cite:null,className:xl,cols:q,colSpan:null,content:null,contentEditable:yl,controls:K,controlsList:xl,coords:q|Sl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:bl,draggable:yl,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:xl,height:q,hidden:bl,high:q,href:null,hrefLang:null,htmlFor:xl,httpEquiv:xl,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:xl,itemRef:xl,itemScope:K,itemType:xl,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,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:K,optimum:q,pattern:null,ping:xl,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:xl,required:K,reversed:K,rows:q,rowSpan:q,sandbox:xl,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:yl,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:K,useMap:null,value:yl,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xl,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:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:yl,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:K,disableRemotePlayback:K,prefix:null,property:null,results:q,security:null,unselectable:null},space:`html`,transform:jl}),Nl=Ol({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`,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:Cl,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:xl,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:K,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:Sl,g2:Sl,glyphName:Sl,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:Cl,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,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:xl,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Cl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Cl,rev:Cl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Cl,requiredFeatures:Cl,requiredFonts:Cl,requiredFormats:Cl,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:Cl,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:Cl,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:Cl,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:Al}),Pl=Ol({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()}}),Fl=Ol({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:jl}),Il=Ol({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ll={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Rl=/[A-Z]/g,J=/-[a-z]/g,Y=/^data[-\w.:]+$/i;function zl(e,t){let n=hl(t),r=t,i=gl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Y.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(J,Vl);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!J.test(e)){let n=e.replace(Rl,Bl);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=El}return new i(r,t)}function Bl(e){return`-`+e.toLowerCase()}function Vl(e){return e.charAt(1).toUpperCase()}var Hl=ml([kl,Ml,Pl,Fl,Il],`html`),Ul=ml([kl,Nl,Pl,Fl,Il],`svg`);function Wl(e){return e.join(` `).trim()}var Gl=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
25
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Kl=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Gl());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),ql=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Jl=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Kl()),r=ql();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Yl=Zl(`end`),Xl=Zl(`start`);function Zl(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ql(e){let t=Xl(e),n=Yl(e);if(t&&n)return{start:t,end:n}}function $l(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?tu(e.position):`start`in e||`end`in e?tu(e):`line`in e||`column`in e?eu(e):``}function eu(e){return nu(e&&e.line)+`:`+nu(e&&e.column)}function tu(e){return eu(e&&e.start)+`-`+eu(e&&e.end)}function nu(e){return e&&typeof e==`number`?e:1}var ru=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=$l(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ru.prototype.file=``,ru.prototype.name=``,ru.prototype.reason=``,ru.prototype.message=``,ru.prototype.stack=``,ru.prototype.column=void 0,ru.prototype.line=void 0,ru.prototype.ancestors=void 0,ru.prototype.cause=void 0,ru.prototype.fatal=void 0,ru.prototype.place=void 0,ru.prototype.ruleId=void 0,ru.prototype.source=void 0;var iu=l(Jl(),1),au={}.hasOwnProperty,ou=new Map,su=/[A-Z]/g,cu=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),lu=new Set([`td`,`th`]),uu=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function du(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Su(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=xu(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ul:Hl,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=fu(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function fu(e,t,n){if(t.type===`element`)return pu(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return mu(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return gu(e,t,n);if(t.type===`mdxjsEsm`)return hu(e,t);if(t.type===`root`)return _u(e,t,n);if(t.type===`text`)return vu(e,t)}function pu(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ul,e.schema=i),e.ancestors.push(t);let a=Ou(e,t.tagName,!1),o=Cu(e,t),s=Tu(e,t);return cu.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!dl(e):!0})),yu(e,o,a,t),bu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mu(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ku(e,t.position)}function hu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ku(e,t.position)}function gu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ul,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ou(e,t.name,!0),o=wu(e,t),s=Tu(e,t);return yu(e,o,a,t),bu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _u(e,t,n){let r={};return bu(r,Tu(e,t)),e.create(t,e.Fragment,r,n)}function vu(e,t){return t.value}function yu(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function xu(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Su(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Xl(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Cu(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&au.call(t.properties,i)){let a=Eu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&lu.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function wu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ku(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else ku(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Tu(e,t){let n=[],r=-1,i=e.passKeys?new Map:ou;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=fu(e,a,o);s!==void 0&&n.push(s)}return n}function Eu(e,t,n){let r=zl(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?al(n):Wl(n)),r.property===`style`){let t=typeof n==`object`?n:Du(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Au(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ll[r.property]||r.property:r.attribute,n]}}function Du(e,t){try{return(0,iu.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ru("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=uu+`#cannot-parse-style-attribute`,r}}function Ou(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=ll(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=ll(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return au.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ku(e)}function ku(e,t){let n=new ru("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=uu+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Au(e){let t={},n;for(n in e)au.call(e,n)&&(t[ju(n)]=e[n]);return t}function ju(e){let t=e.replace(su,Mu);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Mu(e){return`-`+e.toLowerCase()}var Nu={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Pu={};function Fu(e,t){let n=t||Pu;return Iu(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Iu(e,t,n){if(Ru(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Lu(e.children,t,n)}return Array.isArray(e)?Lu(e,t,n):``}function Lu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Iu(e[i],t,n);return r.join(``)}function Ru(e){return!!(e&&typeof e==`object`)}var zu=document.createElement(`i`);function Bu(e){let t=`&`+e+`;`;zu.innerHTML=t;let n=zu.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Vu(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Hu(e,t){return e.length>0?(Vu(e,e.length,0,t),e):t}var Uu={}.hasOwnProperty;function Wu(e){let t={},n=-1;for(;++n<e.length;)Gu(t,e[n]);return t}function Gu(e,t){let n;for(n in t){let r=(Uu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Uu.call(r,a)||(r[a]=[]);let e=i[a];Ku(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ku(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Vu(e,0,0,r)}function qu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ju(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Yu=ad(/[A-Za-z]/),Xu=ad(/[\dA-Za-z]/),Zu=ad(/[#-'*+\--9=?A-Z^-~]/);function Qu(e){return e!==null&&(e<32||e===127)}var $u=ad(/\d/),ed=ad(/[\dA-Fa-f]/),td=ad(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function nd(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var rd=ad(/\p{P}|\p{S}/u),id=ad(/\s/);function ad(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function od(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Xu(e.charCodeAt(n+1))&&Xu(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var sd={tokenize:cd};function cd(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ld={tokenize:dd},ud={tokenize:fd};function dd(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Vu(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ud,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(ud,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Vu(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fd(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function pd(e){if(e===null||nd(e)||id(e))return 1;if(rd(e))return 2}function md(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var hd={name:`attention`,resolveAll:gd,tokenize:_d};function gd(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};vd(d,-c),vd(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Hu(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Hu(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Hu(l,md(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Hu(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Hu(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Vu(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function _d(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=pd(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=pd(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function vd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var $={name:`autolink`,tokenize:yd};function yd(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Yu(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Xu(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Xu(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Qu(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Zu(t)?(e.consume(t),l):n(t)}function u(e){return Xu(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Xu(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var bd={partial:!0,tokenize:xd};function xd(e,t,n){return r;function r(t){return Z(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var Sd={continuation:{tokenize:wd},exit:Td,name:`blockQuote`,tokenize:Cd};function Cd(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function wd(e,t,n){let r=this;return i;function i(t){return Z(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Sd,t,n)(r)}}function Td(e){e.exit(`blockQuote`)}var Ed={name:`characterEscape`,tokenize:Dd};function Dd(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return td(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Od={name:`characterReference`,tokenize:kd};function kd(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Xu,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=ed,u):(e.enter(`characterReferenceValue`),a=7,o=$u,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Xu&&!Bu(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ad={partial:!0,tokenize:Nd},jd={concrete:!0,name:`codeFenced`,tokenize:Md};function Md(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ad,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(Ad,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Nd(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Pd={name:`codeIndented`,tokenize:Id},Fd={partial:!0,tokenize:Ld};function Id(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):X(t)?e.attempt(Fd,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||X(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Ld(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):X(e)?i(e):n(e)}}var Rd={name:`codeText`,previous:Bd,resolve:zd,tokenize:Vd};function zd(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Bd(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Vd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Hd=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ud(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ud(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ud(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Ud(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ud(this.left,t.reverse())}}};function Ud(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Hd(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Gd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Vu(e,0,1/0,u.slice(0)),!l}function Gd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Kd={resolve:Jd,tokenize:Yd},qd={partial:!0,tokenize:Xd};function Jd(e){return Wd(e),e}function Yd(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(qd,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Xd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Zd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Qu(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||nd(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Qu(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Qd(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function $d(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ef(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var tf={name:`definition`,tokenize:rf},nf={partial:!0,tokenize:af};function rf(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Qd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ju(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return nd(t)?ef(e,l)(t):l(t)}function l(t){return Zd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(nf,d,d)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function af(e,t,n){return r;function r(t){return nd(t)?ef(e,i)(t):n(t)}function i(t){return $d(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var of={name:`hardBreakEscape`,tokenize:sf};function sf(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var cf={name:`headingAtx`,resolve:lf,tokenize:uf};function lf(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Vu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function uf(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||nd(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Z(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||nd(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var df=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ff=[`pre`,`script`,`style`,`textarea`],pf={concrete:!0,name:`htmlFlow`,resolveTo:gf,tokenize:_f},mf={partial:!0,tokenize:yf},hf={partial:!0,tokenize:vf};function gf(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _f(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):Yu(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Yu(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Yu(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||nd(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ff.includes(l)?(i=1,r.interrupt?t(s):O(s)):df.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Xu(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Yu(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Xu(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||X(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||nd(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||X(t)?O(t):Z(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(mf,te,k)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(hf,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||X(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return ff.includes(n)?(e.consume(t),I):O(t)}return Yu(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||X(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function vf(e,t,n){let r=this;return i;function i(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function yf(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(bd,t,n)}}var bf={name:`htmlText`,tokenize:xf};function xf(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Yu(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Yu(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):X(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Yu(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Xu(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,N(t)):Z(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Xu(t)?(e.consume(t),w):t===47||t===62||nd(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Yu(t)?(e.consume(t),E):X(t)?(o=T,N(t)):Z(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Xu(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):X(t)?(o=D,N(t)):Z(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):X(t)?(o=O,N(t)):Z(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):X(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||nd(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||nd(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Z(t)?Q(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var Sf={name:`labelEnd`,resolveAll:Ef,resolveTo:Df,tokenize:Of},Cf={tokenize:kf},wf={tokenize:Af},Tf={tokenize:jf};function Ef(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Vu(e,0,e.length,n),e}function Df(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Hu(s,e.slice(a+1,a+r+3)),s=Hu(s,[[`enter`,u,t]]),s=Hu(s,md(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Hu(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Hu(s,e.slice(o+1)),s=Hu(s,[[`exit`,c,t]]),Vu(e,a,e.length,s),e}function Of(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ju(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Cf,u,o?u:d)(t):t===91?e.attempt(wf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Tf,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function kf(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return nd(t)?ef(e,a)(t):a(t)}function a(t){return t===41?u(t):Zd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return nd(t)?ef(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?$d(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return nd(t)?ef(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Af(e,t,n){let r=this;return i;function i(t){return Qd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ju(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function jf(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Mf={name:`labelStartImage`,resolveAll:Sf.resolveAll,tokenize:Nf};function Nf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Pf={name:`labelStartLink`,resolveAll:Sf.resolveAll,tokenize:Ff};function Ff(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var If={name:`lineEnding`,tokenize:Lf};function Lf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var Rf={name:`thematicBreak`,tokenize:zf};function zf(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?Q(e,s,`whitespace`)(t):s(t))}}var Bf={continuation:{tokenize:Wf},exit:Kf,name:`list`,tokenize:Uf},Vf={partial:!0,tokenize:qf},Hf={partial:!0,tokenize:Gf};function Uf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:$u(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Rf,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return $u(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(bd,r.interrupt?n:u,e.attempt(Vf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Wf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(bd,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Hf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(Bf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Gf(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Kf(e){e.exit(this.containerState.type)}function qf(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Jf={name:`setextUnderline`,resolveTo:Yf,tokenize:Xf};function Yf(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Xf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Zf={tokenize:Qf};function Qf(e){let t=this,n=e.attempt(bd,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Kd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var $f={resolveAll:rp()},ep=np(`string`),tp=np(`text`);function np(e){return{resolveAll:rp(e===`text`?ip:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function rp(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ip(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var ap=s({attentionMarkers:()=>pp,contentInitial:()=>sp,disable:()=>mp,document:()=>op,flow:()=>lp,flowInitial:()=>cp,insideSpan:()=>fp,string:()=>up,text:()=>dp}),op={42:Bf,43:Bf,45:Bf,48:Bf,49:Bf,50:Bf,51:Bf,52:Bf,53:Bf,54:Bf,55:Bf,56:Bf,57:Bf,62:Sd},sp={91:tf},cp={[-2]:Pd,[-1]:Pd,32:Pd},lp={35:cf,42:Rf,45:[Jf,Rf],60:pf,61:Jf,95:Rf,96:jd,126:jd},up={38:Od,92:Ed},dp={[-5]:If,[-4]:If,[-3]:If,33:Mf,38:Od,42:hd,60:[$,bf],91:Pf,92:[of,Ed],93:Sf,95:hd,96:Rd},fp={null:[hd,$f]},pp={null:[42,95]},mp={null:[]};function hp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Hu(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=md(a,l.events,l),l.events):[]}function f(e,t){return _p(p(e),t)}function p(e){return gp(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Vu(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function gp(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function _p(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
26
|
+
`;break;case-3:o=`\r
|
|
27
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function vp(e){let t={constructs:Wu([ap,...(e||{}).extensions||[]]),content:n(sd),defined:[],document:n(ld),flow:n(Zf),lazy:{},string:n(ep),text:n(tp)};return t;function n(e){return n;function n(n){return hp(t,e,n)}}}function yp(e){for(;!Wd(e););return e}var bp=/[\0\t\n\r]/g;function xp(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(bp.lastIndex=u,c=bp.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Sp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cp(e){return e.replace(Sp,wp)}function wp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return qu(n.slice(t?2:1),t?16:10)}return Bu(n)||e}var Tp={}.hasOwnProperty;function Ep(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),Dp(n)(yp(vp(n).document().write(xp()(e,t,!0))))}function Dp(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:ie,characterReference:R,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};kp(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Tp.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||jp).call(a,void 0,e[0])}for(r.position={start:Op(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Op(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Op(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||jp).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+$l({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Op(e.end)}function u(){return Fu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:Op(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Op(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Op(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Cp(t),n.identifier=Ju(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function L(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=qu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Bu(t);let i=this.stack[this.stack.length-1];i.value+=r}function R(e){let t=this.stack.pop();t.position.end=Op(e.end)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function Op(e){return{line:e.line,column:e.column,offset:e.offset}}function kp(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?kp(e,r):Ap(e,r)}}function Ap(e,t){let n;for(n in t)if(Tp.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function jp(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+$l({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+`) is still open`)}function Mp(e){let t=this;t.parser=n;function n(n){return Ep(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Np(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Pp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
28
|
+
`}]}function Fp(e,t){let n=t.value?t.value+`
|
|
29
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ip(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=od(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function zp(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Hp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vp(e,t);let i={src:od(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Up(e,t){let n={src:od(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Wp(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Gp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vp(e,t);let i={href:od(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Kp(e,t){let n={href:od(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qp(e,t,n){let r=e.all(t),i=n?Jp(n):Yp(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
30
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
31
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Jp(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Yp(n[r])}return t}function Yp(e){return e.spread??e.children.length>1}function Xp(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Zp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function $p(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function em(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Xl(t.children[1]),o=Yl(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function tm(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function nm(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var rm=9,im=32;function am(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(om(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(om(t.slice(i),i>0,!1)),a.join(``)}function om(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===rm||t===im;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===rm||t===im;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function sm(e,t){let n={type:`text`,value:am(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cm(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var lm={blockquote:Np,break:Pp,code:Fp,delete:Ip,emphasis:Lp,footnoteReference:Rp,heading:zp,html:Bp,imageReference:Hp,image:Up,inlineCode:Wp,linkReference:Gp,link:Kp,listItem:qp,list:Xp,paragraph:Zp,root:Qp,strong:$p,table:em,tableCell:nm,tableRow:tm,text:sm,thematicBreak:cm,toml:um,yaml:um,definition:um,footnoteDefinition:um};function um(){}var dm=typeof self==`object`?self:globalThis,fm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new dm[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new dm[a](o),i)};return r},pm=e=>fm(new Map,e)(0),mm=``,{toString:hm}={},{keys:gm}=Object,_m=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=hm.call(e).slice(8,-1);switch(n){case`Array`:return[1,mm];case`Object`:return[2,mm];case`Date`:return[3,mm];case`RegExp`:return[4,mm];case`Map`:return[5,mm];case`Set`:return[6,mm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},vm=([e,t])=>e===0&&(t===`function`||t===`symbol`),ym=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=_m(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of gm(r))(e||!vm(_m(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(vm(_m(n))||vm(_m(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!vm(_m(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},bm=(e,{json:t,lossy:n}={})=>{let r=[];return ym(!(t||n),!!t,new Map,r)(e),r},xm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?pm(bm(e,t)):structuredClone(e):(e,t)=>pm(bm(e,t));function Sm(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Cm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function wm(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Sm,r=e.options.footnoteBackLabel||Cm,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=od(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...xm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
32
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
33
|
+
`}]}}var Tm=(function(e){if(e==null)return Am;if(typeof e==`function`)return km(e);if(typeof e==`object`)return Array.isArray(e)?Em(e):Dm(e);if(typeof e==`string`)return Om(e);throw Error(`Expected function, string, or object as test`)});function Em(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Tm(e[n]);return km(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Dm(e){let t=e;return km(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Om(e){return km(t);function t(t){return t&&t.type===e}}function km(e){return t;function t(t,n,r){return!!(jm(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Am(){return!0}function jm(e){return typeof e==`object`&&!!e&&`type`in e}function Mm(e){return e}var Nm=[];function Pm(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Tm(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Mm(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Nm,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Fm(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Fm(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Nm:[e]}function Im(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Pm(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Lm={}.hasOwnProperty,Rm={};function zm(e,t){let n=t||Rm,r=new Map,i=new Map,a={all:s,applyData:Vm,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...lm,...n.handlers},one:o,options:n,patch:Bm,wrap:Um};return Im(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Lm.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=xm(n);return r.children=a.all(e),r}return xm(e)}return(a.options.unknownHandler||Hm)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Wm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Wm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Bm(e,t){e.position&&(t.position=Ql(e))}function Vm(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,xm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Hm(e,t){let n=t.data||{},r=`value`in t&&!(Lm.call(n,`hProperties`)||Lm.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Um(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
34
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
35
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
36
|
+
`}),n}function Wm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gm(e,t){let n=zm(e,t),r=n.one(e,void 0),i=wm(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
37
|
+
`},i)),a}function Km(e,t){return e&&`run`in e?async function(n,r){let i=Gm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Gm(n,{file:r,...e||t})}}function qm(e){if(e)throw e}var Jm=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ym(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xm(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Zm(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Zm(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Qm={basename:$m,dirname:eh,extname:th,join:nh,sep:`/`};function $m(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ah(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function eh(e){if(ah(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function th(e){ah(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function nh(...e){let t=-1,n;for(;++t<e.length;)ah(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:rh(n)}function rh(e){ah(e);let t=e.codePointAt(0)===47,n=ih(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ih(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ah(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var oh={cwd:sh};function sh(){return`/`}function ch(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function lh(e){if(typeof e==`string`)e=new URL(e);else if(!ch(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return uh(e)}function uh(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var dh=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],fh=class{constructor(e){let t;t=e?ch(e)?{path:e}:typeof e==`string`||gh(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:oh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<dh.length;){let e=dh[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)dh.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Qm.basename(this.path):void 0}set basename(e){mh(e,`basename`),ph(e,`basename`),this.path=Qm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Qm.dirname(this.path):void 0}set dirname(e){hh(this.basename,`dirname`),this.path=Qm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Qm.extname(this.path):void 0}set extname(e){if(ph(e,`extname`),hh(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Qm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ch(e)&&(e=lh(e)),mh(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Qm.basename(this.path,this.extname):void 0}set stem(e){mh(e,`stem`),ph(e,`stem`),this.path=Qm.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ru(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ph(e,t){if(e&&e.includes(Qm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Qm.sep+"`")}function mh(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function hh(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function gh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var _h=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),vh=l(Jm(),1),yh={}.hasOwnProperty,bh=new class e extends _h{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,vh.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Ch(`data`,this.frozen),this.namespace[e]=t,this):yh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ch(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Eh(e),n=this.parser||this.Parser;return xh(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),xh(`process`,this.parser||this.Parser),Sh(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Eh(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Oh(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),xh(`processSync`,this.parser||this.Parser),Sh(`processSync`,this.compiler||this.Compiler),this.process(e,r),Th(`processSync`,`process`,t),n;function r(e,r){t=!0,qm(e),n=r}}run(e,t,n){wh(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Eh(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Th(`runSync`,`run`,n),r;function i(e,t){qm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Eh(t),r=this.compiler||this.Compiler;return Sh(`stringify`,r),wh(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Ch(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,vh.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ym(o)&&Ym(r)&&(r=(0,vh.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function xh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Sh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Ch(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wh(e){if(!Ym(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Th(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Eh(e){return Dh(e)?e:new fh(e)}function Dh(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Oh(e){return typeof e==`string`||kh(e)}function kh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ah=[],jh={allowDangerousHtml:!0},Mh=/^(https?|ircs?|mailto|xmpp)$/i,Nh=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ph(e){let t=Fh(e),n=Ih(e);return Lh(t.runSync(t.parse(n),n),e)}function Fh(e){let t=e.rehypePlugins||Ah,n=e.remarkPlugins||Ah,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jh}:jh;return bh().use(Mp).use(n).use(Km,r).use(t)}function Ih(e){let t=e.children||``,n=new fh;return typeof t==`string`?n.value=t:``+t,n}function Lh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Rh;for(let e of Nh)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Im(e,l),du(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Nu)if(Object.hasOwn(Nu,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Nu[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Rh(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Mh.test(e.slice(0,t))?e:``}function zh(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 Bh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Vh(e,t,n){let r=Tm((n||{}).ignore||[]),i=Hh(t),a=-1;for(;++a<i.length;)Pm(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Hh(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Uh(e[0]),Wh(e[1])])}return t}function Uh(e){return typeof e==`string`?new RegExp(Bh(e),`g`):e}function Wh(e){return typeof e==`function`?e:function(){return e}}var Gh=`phrasing`,Kh=[`autolink`,`link`,`image`,`label`];function qh(){return{transforms:[tg],enter:{literalAutolink:Yh,literalAutolinkEmail:Xh,literalAutolinkHttp:Xh,literalAutolinkWww:Xh},exit:{literalAutolink:eg,literalAutolinkEmail:$h,literalAutolinkHttp:Zh,literalAutolinkWww:Qh}}}function Jh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Gh,notInConstruct:Kh},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Gh,notInConstruct:Kh},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Gh,notInConstruct:Kh}]}}function Yh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Xh(e){this.config.enter.autolinkProtocol.call(this,e)}function Zh(e){this.config.exit.autolinkProtocol.call(this,e)}function Qh(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function $h(e){this.config.exit.autolinkEmail.call(this,e)}function eg(e){this.exit(e)}function tg(e){Vh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ng],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,rg]],{ignore:[`link`,`linkReference`]})}function ng(e,t,n,r,i){let a=``;if(!og(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!ig(n)))return!1;let o=ag(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function rg(e,t,n,r){return!og(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function ig(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ag(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=zh(e,`(`),a=zh(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function og(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||id(n)||rd(n))&&(!t||n!==47)}gg.peek=hg;function sg(){this.buffer()}function cg(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function lg(){this.buffer()}function ug(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function dg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fg(e){this.exit(e)}function pg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mg(e){this.exit(e)}function hg(){return`[`}function gg(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function _g(){return{enter:{gfmFootnoteCallString:sg,gfmFootnoteCall:cg,gfmFootnoteDefinitionLabelString:lg,gfmFootnoteDefinition:ug},exit:{gfmFootnoteCallString:dg,gfmFootnoteCall:fg,gfmFootnoteDefinitionLabelString:pg,gfmFootnoteDefinition:mg}}}function vg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:gg},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
38
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?bg:yg))),s(),o}}function yg(e,t,n){return t===0?e:bg(e,t,n)}function bg(e,t,n){return(n?``:` `)+e}var xg=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Eg.peek=Dg;function Sg(){return{canContainEols:[`delete`],enter:{strikethrough:wg},exit:{strikethrough:Tg}}}function Cg(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:xg}],handlers:{delete:Eg}}}function wg(e){this.enter({type:`delete`,children:[]},e)}function Tg(e){this.exit(e)}function Eg(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Dg(){return`~`}function Og(e){return e.length}function kg(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Og,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Ag(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=jg(r[d]);else{let e=jg(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
39
|
+
`)}function Ag(e){return e==null?``:String(e)}function jg(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Mg(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ng);return i(),o}function Ng(e,t,n){return`>`+(n?``:` `)+e}function Pg(e,t){return Fg(e,t.inConstruct,!0)&&!Fg(e,t.notInConstruct,!1)}function Fg(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ig(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
40
|
+
`&&Pg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
41
|
+
`}function Lg(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Rg(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function zg(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Bg(e,t,n,r){let i=zg(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Rg(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Vg);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Lg(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
42
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
43
|
+
`),a&&(u+=s.move(a+`
|
|
44
|
+
`)),u+=s.move(c),l(),u}function Vg(e,t,n){return(n?``:` `)+e}function Hg(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ug(e,t,n,r){let i=Hg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
45
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Wg(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Gg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Kg(e,t,n){let r=pd(e),i=pd(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qg.peek=Jg;function qg(e,t,n,r){let i=Wg(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Kg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Gg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Kg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Gg(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Jg(e,t,n){return n.options.emphasis||`*`}function Yg(e,t){let n=!1;return Im(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Fu(e)&&(t.options.setext||n))}function Xg(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Yg(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
46
|
+
`,after:`
|
|
47
|
+
`});return r(),t(),o+`
|
|
48
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
49
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
50
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=Gg(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Zg.peek=Qg;function Zg(e){return e.value||``}function Qg(){return`<`}$g.peek=e_;function $g(e,t,n,r){let i=Hg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function e_(){return`!`}t_.peek=n_;function t_(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function n_(){return`!`}r_.peek=i_;function r_(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function i_(){return"`"}function a_(e,t){let n=Fu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}o_.peek=s_;function o_(e,t,n,r){let i=Hg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(a_(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function s_(e,t,n){return a_(e,n)?`<`:`[`}c_.peek=l_;function c_(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function l_(){return`[`}function u_(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function d_(e){let t=u_(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function f_(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function p_(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function m_(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?f_(n):u_(n),s=e.ordered?o===`.`?`)`:`.`:d_(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),p_(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function h_(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function g_(e,t,n,r){let i=h_(n),a=n.bulletCurrent||u_(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function __(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var v_=Tm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function y_(e,t,n,r){return(e.children.some(function(e){return v_(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function b_(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}x_.peek=S_;function x_(e,t,n,r){let i=b_(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Kg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Gg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Kg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Gg(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function S_(e,t,n){return n.options.strong||`*`}function C_(e,t,n,r){return n.safe(e.value,r)}function w_(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function T_(e,t,n){let r=(p_(n)+(n.options.ruleSpaces?` `:``)).repeat(w_(n));return n.options.ruleSpaces?r.slice(0,-1):r}var E_={blockquote:Mg,break:Ig,code:Bg,definition:Ug,emphasis:qg,hardBreak:Ig,heading:Xg,html:Zg,image:$g,imageReference:t_,inlineCode:r_,link:o_,linkReference:c_,list:m_,listItem:g_,paragraph:__,root:y_,strong:x_,text:C_,thematicBreak:T_};function D_(){return{enter:{table:O_,tableData:M_,tableHeader:M_,tableRow:A_},exit:{codeText:N_,table:k_,tableData:j_,tableHeader:j_,tableRow:j_}}}function O_(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function k_(e){this.exit(e),this.data.inTable=void 0}function A_(e){this.enter({type:`tableRow`,children:[]},e)}function j_(e){this.exit(e)}function M_(e){this.enter({type:`tableCell`,children:[]},e)}function N_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,P_));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function P_(e,t){return t===`|`?t:e}function F_(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
51
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
52
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return kg(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=E_.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function I_(){return{exit:{taskListCheckValueChecked:R_,taskListCheckValueUnchecked:R_,paragraph:z_}}}function L_(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:B_}}}function R_(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function z_(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function B_(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=E_.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function V_(){return[qh(),_g(),Sg(),D_(),I_()]}function H_(e){return{extensions:[Jh(),vg(e),Cg(),F_(e),L_()]}}var U_={tokenize:rv,partial:!0},W_={tokenize:iv,partial:!0},G_={tokenize:av,partial:!0},K_={tokenize:ov,partial:!0},q_={tokenize:sv,partial:!0},J_={name:`wwwAutolink`,tokenize:tv,previous:cv},Y_={name:`protocolAutolink`,tokenize:nv,previous:lv},X_={name:`emailAutolink`,tokenize:ev,previous:uv},Z_={};function Q_(){return{text:Z_}}for(var $_=48;$_<123;)Z_[$_]=X_,$_++,$_===58?$_=65:$_===91&&($_=97);Z_[43]=X_,Z_[45]=X_,Z_[46]=X_,Z_[95]=X_,Z_[72]=[X_,Y_],Z_[104]=[X_,Y_],Z_[87]=[X_,J_],Z_[119]=[X_,J_];function ev(e,t,n){let r=this,i,a;return o;function o(t){return!dv(t)||!uv.call(r,r.previous)||fv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return dv(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(q_,u,l)(t):t===45||t===95||Xu(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Yu(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function tv(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!cv.call(r,r.previous)||fv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(U_,e.attempt(W_,e.attempt(G_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function nv(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&lv.call(r,r.previous)&&!fv(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Yu(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Qu(t)||nd(t)||id(t)||rd(t)?n(t):e.attempt(W_,e.attempt(G_,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function rv(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function iv(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(K_,c,s)(t):t===null||nd(t)||id(t)||t!==45&&rd(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function av(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(K_,t,a)(o):o===null||nd(o)||id(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ov(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||nd(o)||id(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||nd(e)||id(e)?t(e):r(e)}function a(e){return Yu(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Yu(t)?(e.consume(t),o):n(t)}}function sv(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Xu(e)?n(e):t(e)}}function cv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||nd(e)}function lv(e){return!Yu(e)}function uv(e){return!(e===47||dv(e))}function dv(e){return e===43||e===45||e===46||e===95||Xu(e)}function fv(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var pv={tokenize:xv,partial:!0};function mv(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:vv,continuation:{tokenize:yv},exit:bv}},text:{91:{name:`gfmFootnoteCall`,tokenize:_v},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:hv,resolveTo:gv}}}}function hv(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Ju(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function gv(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function _v(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||nd(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Ju(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return nd(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function vv(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||nd(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Ju(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return nd(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function yv(e,t,n){return e.check(bd,t,e.attempt(pv,t,n))}function bv(e){e.exit(`gfmFootnoteDefinition`)}function xv(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Sv(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Vu(o,o.length,0,md(s,e.slice(r+1,n),t)),Vu(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Vu(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=pd(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=pd(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Cv=class{constructor(){this.map=[]}add(e,t,n){wv(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function wv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Tv(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ev(){return{flow:{null:{name:`table`,tokenize:Dv,resolveAll:Ov}}}}function Dv(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||nd(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Z(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||nd(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Ov(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Cv;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Av(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=kv(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=kv(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=kv(f,t,o,i,n,d)):(o[0]=o[1],d=kv(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Av(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Tv(t.events,n))}return e}function kv(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},jv(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=jv(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=jv(t.events,n[2]),a=jv(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},jv(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Av(e,t,n,r,i){let a=[],o=jv(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function jv(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Mv={name:`tasklistCheck`,tokenize:Pv};function Nv(){return{text:{91:Mv}}}function Pv(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return nd(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Z(r)?e.check({tokenize:Fv},t,n)(r):n(r)}}function Fv(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Iv(e){return Wu([Q_(),mv(),Sv(e),Ev(),Nv()])}var Lv={};function Rv(e){let t=this,n=e||Lv,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Iv(n)),a.push(V_()),o.push(H_(n))}var zv=null,Bv=()=>(zv??=H(()=>import(`./mermaid.core-dZvhJRm4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),zv),Vv=e=>e===`light`?`default`:`dark`;function Hv({chart:e}){let t=(0,F.useRef)(null),n=(0,F.useId)().replace(/:/g,`-`),[r,i]=(0,F.useState)(()=>x()),[a,o]=(0,F.useState)(null),s=Vv(r);return(0,F.useEffect)(()=>{let e=document.documentElement,t=()=>{let e=x();i(t=>t===e?t:e)};t();let n=new MutationObserver(e=>{e.some(e=>e.attributeName===`data-theme`)&&t()});return n.observe(e,{attributes:!0,attributeFilter:[`data-theme`]}),()=>{n.disconnect()}},[]),(0,F.useEffect)(()=>{let r=!1,i=t.current;return(async()=>{if(i){i.innerHTML=``,o(null);try{let{default:t}=await Bv();t.initialize({startOnLoad:!1,securityLevel:`strict`,theme:s});let{svg:a,bindFunctions:o}=await t.render(`mermaid-diagram-${n}`,e);if(r)return;i.innerHTML=a,o?.(i)}catch(e){if(r)return;i.innerHTML=``,o(e instanceof Error?e.message:`Failed to render Mermaid diagram`)}}})(),()=>{r=!0,i&&(i.innerHTML=``)}},[e,n,s]),a?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`div`,{className:`text-sm text-github-danger`,title:a,children:`Unable to render Mermaid diagram.`}),(0,I.jsx)(`pre`,{className:`markdown-preview-code whitespace-pre-wrap border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm font-mono text-github-text-primary`,children:e})]}):(0,I.jsx)(`div`,{ref:t,"aria-label":`Mermaid diagram`,className:`mermaid-diagram overflow-x-auto rounded border border-github-border bg-github-bg-secondary p-3`})}var Uv=({mode:e,hasFullPreview:t,onModeChange:n})=>(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsxs)(`button`,{onClick:()=>n(`diff`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${e===`diff`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Code Diff`,children:[(0,I.jsx)($e,{size:14}),`Diff`]}),(0,I.jsxs)(`button`,{onClick:()=>n(`diff-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${e===`diff-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Diff Preview`,children:[(0,I.jsx)(Qe,{size:14}),`Diff Preview`]}),t&&(0,I.jsxs)(`button`,{onClick:()=>n(`full-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${e===`full-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Full Preview`,children:[(0,I.jsx)(Qe,{size:14}),`Full Preview`]})]}),Wv=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends Wv{};function Gv(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function Kv(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function qv(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Jv(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Yv(e,t){return qv(e,t,``)}function Xv(e,t){return Jv(e,t,``)}function Zv(e,t){return t.slice(0,Qv(e,t))}function Qv(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function $v(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function ey(e,t){if(t)return ny(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function ty(e,t){if(t)return ny(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function ny(e,t){if(!t)return[ty(e),ey(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=$v(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var ry=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,iy=RegExp(`[${ry}]+|\\s+|[^${ry}]`,`ug`),ay=new class extends Wv{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=$v(e,r)}else n=e.match(iy)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&sy(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&sy(n,i,r,null,t.intlSegmenter),e}};function oy(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?ly(e,t,n):ay.diff(e,t,n)}function sy(e,t,n,r,i){if(t&&n){let[a,o]=ny(t.value,i),[s,c]=ny(n.value,i);if(e){let r=Gv(a,s);e.value=Jv(e.value,s,r),t.value=Yv(t.value,r),n.value=Yv(n.value,r)}if(r){let e=Kv(o,c);r.value=qv(r.value,c,e),t.value=Xv(t.value,e),n.value=Xv(n.value,e)}}else if(n){if(e){let e=ty(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=ty(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=ty(r.value,i),[a,o]=ny(t.value,i),s=Gv(n,a);t.value=Yv(t.value,s);let c=Kv(Yv(n,s),o);t.value=Xv(t.value,c),r.value=qv(r.value,n,c),e.value=Jv(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=ty(r.value,i),n=Zv(ey(t.value,i),e);t.value=Xv(t.value,n)}else if(e){let n=Zv(ey(e.value,i),ty(t.value,i));t.value=Yv(t.value,n)}}var cy=new class extends Wv{tokenize(e){let t=RegExp(`(\\r?\\n)|[${ry}]+|[^\\S\\n\\r]+|[^${ry}]`,`ug`);return e.match(t)||[]}};function ly(e,t,n){return cy.diff(e,t,n)}var uy=new class extends Wv{constructor(){super(...arguments),this.tokenize=fy}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
53
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
54
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
55
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
56
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function dy(e,t,n){return uy.diff(e,t,n)}function fy(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
57
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function py(e){return e==`.`||e==`!`||e==`?`}new class extends Wv{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(py(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Wv{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Wv{constructor(){super(...arguments),this.tokenize=fy}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(my(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function my(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=my(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=my(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Wv{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function hy(e,t){let n=ly(e,t),r=[],i=[];for(let e of n)e.added?i.push({value:e.value,type:`added`}):e.removed?r.push({value:e.value,type:`removed`}):(r.push({value:e.value,type:`unchanged`}),i.push({value:e.value,type:`unchanged`}));return{oldSegments:r,newSegments:i}}function gy(e,t){if(!e.trim()||!t.trim()||e===t)return!1;let n=oy(e,t),r=0,i=0;for(let e of n)i+=e.value.length,!e.added&&!e.removed&&(r+=e.value.length);return r/i>=.2}var _y=F.memo(({onMouseDown:e,onMouseUp:t,title:n=`Add a comment`})=>(0,I.jsx)(`button`,{className:`absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10`,"data-comment-button":`true`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},onMouseDown:e,onMouseUp:t,title:n,children:(0,I.jsx)(ut,{className:`w-4 h-4`})}));_y.displayName=`CommentButton`;var vy=F.memo(({onClick:e,title:t=`Open in editor`,className:n})=>(0,I.jsx)(`button`,{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${n||``}`,"data-open-in-editor-button":`true`,style:{backgroundColor:`var(--color-editor-btn-bg)`,color:`var(--color-editor-btn-text)`,border:`1px solid var(--color-editor-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-editor-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-editor-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-editor-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-editor-btn-border)`},onMouseDown:e=>{e.stopPropagation()},onClick:t=>{t.stopPropagation(),e(t)},title:t,children:(0,I.jsx)(Ze,{className:`w-4 h-4 opacity-80`})}));vy.displayName=`OpenInEditorButton`;var yy=e=>{if(`isExpanded`in e&&e.isExpanded)return`bg-github-bg-tertiary/80`;switch(e.type){case`add`:return`bg-diff-addition-bg`;case`delete`:return`bg-diff-deletion-bg`;default:return`bg-transparent`}},by=F.memo(({line:e,index:t,lineId:n,isCurrentLine:r=!1,hoveredLineIndex:i,selectedLineStyle:a,onMouseEnter:o,onMouseLeave:s,onMouseMove:c,onCommentButtonMouseDown:l,onCommentButtonMouseUp:u,onOpenInEditor:d,syntaxTheme:f,onClick:p,filename:m,diffSegments:h})=>{let g=e.newLineNumber||e.oldLineNumber,_=i===t&&g,v=r?`keyboard-cursor`:``;return(0,I.jsxs)(`tr`,{id:n,className:`group ${yy(e)} relative ${a} ${v} cursor-pointer`,onMouseEnter:o,onMouseLeave:s,onMouseMove:c,onClick:p,children:[(0,I.jsx)(`td`,{className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative`,children:e.oldLineNumber||``}),(0,I.jsxs)(`td`,{className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible`,children:[(0,I.jsx)(`span`,{children:e.newLineNumber||``}),_&&(0,I.jsxs)(I.Fragment,{children:[d&&(0,I.jsx)(vy,{onClick:d}),(0,I.jsx)(_y,{onMouseDown:l,onMouseUp:u})]})]}),(0,I.jsx)(`td`,{className:`p-0 w-full relative align-top`,children:(0,I.jsx)(Vr,{line:e,syntaxTheme:f,filename:m,diffSegments:h})})]})});by.displayName=`DiffLineRow`;var xy=e=>e!==void 0&&`isExpanded`in e&&e.isExpanded===!0,Sy=(e,t)=>t?`bg-github-bg-tertiary/80`:e?.type===`delete`?`bg-diff-deletion-bg`:e?.type===`add`?`bg-diff-addition-bg`:e?.type===`normal`?`bg-transparent`:`bg-github-bg-secondary`;function Cy({chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r=!1,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u,cursor:d=null,fileIndex:f=0,onLineClick:p,commentTrigger:m,onCommentTriggerHandled:h,filename:g,onOpenInEditor:_}){let{getOldTokens:v,getNewTokens:y}=ln(),[b,x]=(0,F.useState)(null),[S,C]=(0,F.useState)(null),[w,T]=(0,F.useState)(!1),[E,D]=(0,F.useState)(null),[O,k]=(0,F.useState)(null);(0,F.useEffect)(()=>{if(m?.lineIndex!==void 0){let t=e.lines[m.lineIndex];if(t&&t.type!==`delete`){let e=t.newLineNumber;e&&(D({side:`new`,lineNumber:e}),h?.())}}},[m,e.lines,h]),(0,F.useEffect)(()=>{if(w){let e=()=>{T(!1),x(null),C(null)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}}},[w]);let A=(0,F.useCallback)((e,t)=>{E?.side===e&&E?.lineNumber===t?D(null):D({side:e,lineNumber:t})},[E]),j=(0,F.useCallback)(()=>{D(null)},[]),M=(0,F.useCallback)(()=>{if(!E)return``;let{side:t,lineNumber:n}=E,r=e.lines;if(typeof n==`number`)return r.find(e=>t===`old`?e.oldLineNumber===n:e.newLineNumber===n)?.content??``;{let[e,i]=n;return r.filter(n=>{let r=t===`old`?n.oldLineNumber:n.newLineNumber;return r!==void 0&&r>=e&&r<=i}).map(e=>e.content??``).join(`
|
|
58
|
+
`)}},[E,e.lines]),N=(0,F.useCallback)(async e=>{if(E!==null){let t=M();await i(E.lineNumber,e,t,E.side),D(null)}},[E,i,M]),P=(0,F.useCallback)((e,t)=>{if(t==null)return null;let n=e?.(t)??null;return n?[n]:null},[]),ee=(e,t)=>n.filter(n=>{let r=Array.isArray(n.line)?n.line[1]===e:n.line===e,i=!n.side||n.side===t;return r&&i}).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),te=e=>e.oldLine?.type===`delete`&&e.newLine?.type===`add`?e.newLineNumber?`right`:`left`:e.oldLine?.type===`delete`?`left`:e.newLine?.type===`add`?`right`:`full`,ne=(e,t)=>{let n=e===`old`?t.oldLineNumber:t.newLineNumber;if(!n)return``;if(w&&b&&S&&b.side===e&&S.side===e){let e=Math.min(b.lineNumber,S.lineNumber),t=Math.max(b.lineNumber,S.lineNumber);if(n>=e&&n<=t){let r=`after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none`;return n===e&&(r+=` after:border-t-2`),n===t&&(r+=` after:border-b-2`),r}}if(E&&E.side===e){let e=Array.isArray(E.lineNumber)?E.lineNumber:[E.lineNumber,E.lineNumber],t=e[0],r=e[1];if(t!==void 0&&r!==void 0&&n>=t&&n<=r)return`after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none`}return``},re=(0,F.useCallback)(t=>{let n=[],r=e.oldStart,i=e.newStart,a=0;for(;a<t.length;){let e=t[a];if(!e){a++;continue}if(e.type===`normal`)n.push({oldLine:e,newLine:{...e},oldLineNumber:e.oldLineNumber??r,newLineNumber:e.newLineNumber??i,oldLineOriginalIndex:a,newLineOriginalIndex:a}),r++,i++,a++;else if(e.type===`delete`){let e=a+1;for(;e<t.length&&t[e]?.type===`delete`;)e++;let o=t.slice(a,e),s=a,c=[],l=e;for(;e<t.length&&t[e]?.type===`add`;){let n=t[e];n&&c.push(n),e++}let u=Math.max(o.length,c.length);for(let e=0;e<u;e++){let t=o[e],a=c[e],u;t&&a&&gy(t.content,a.content)&&(u=hy(t.content,a.content)),n.push({oldLine:t,newLine:a,oldLineNumber:t?t.oldLineNumber??r+e:void 0,newLineNumber:a?a.newLineNumber??i+e:void 0,oldLineOriginalIndex:t?s+e:void 0,newLineOriginalIndex:a?l+e:void 0,wordLevelDiff:u})}r+=o.length,i+=c.length,a=e}else e.type===`add`&&(n.push({newLine:e,newLineNumber:e.newLineNumber??i,newLineOriginalIndex:a}),i++,a++)}return n},[e.oldStart,e.newStart]);return(0,I.jsx)(`div`,{className:`bg-github-bg-primary overflow-hidden`,children:(0,I.jsx)(`table`,{className:`w-full table-fixed border-collapse font-mono text-sm leading-5`,children:(0,I.jsx)(`tbody`,{children:(0,F.useMemo)(()=>re(e.lines),[e.lines,re]).map((e,n)=>{let i=e.oldLineNumber?ee(e.oldLineNumber,`old`):[],m=e.newLineNumber?ee(e.newLineNumber,`new`):[],h=[...i,...m],D=e.oldLineOriginalIndex??-1,re=e.newLineOriginalIndex??-1,L=d?d.side===`left`&&D>=0?d.chunkIndex===t&&d.lineIndex===D:d.side===`right`&&re>=0?d.chunkIndex===t&&d.lineIndex===re:!1:!1,ie=D>=0?`file-${f}-chunk-${t}-line-${D}-left`:void 0,R=re>=0?`file-${f}-chunk-${t}-line-${re}-right`:void 0,ae=L&&d?.side===`left`,oe=L&&d?.side===`right`,se=`keyboard-cursor`;return(0,I.jsxs)(F.Fragment,{children:[(0,I.jsxs)(`tr`,{className:`group cursor-pointer`,onClick:e=>{if(!w){let n=e.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&D>=0?p?.(f,t,D,`left`):i&&re>=0&&p?.(f,t,re,`right`)}},onMouseEnter:t=>{let n=t.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&e.oldLineNumber?k({side:`old`,lineNumber:e.oldLineNumber}):i&&e.newLineNumber&&k({side:`new`,lineNumber:e.newLineNumber})},onMouseMove:t=>{let n=t.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&e.oldLineNumber?(O?.side!==`old`||O?.lineNumber!==e.oldLineNumber)&&k({side:`old`,lineNumber:e.oldLineNumber}):i&&e.newLineNumber&&(O?.side!==`new`||O?.lineNumber!==e.newLineNumber)&&k({side:`new`,lineNumber:e.newLineNumber}),w&&b&&(b.side===`old`&&e.oldLineNumber?C({side:`old`,lineNumber:e.oldLineNumber}):b.side===`new`&&e.newLineNumber&&C({side:`new`,lineNumber:e.newLineNumber}))},onMouseLeave:()=>k(null),children:[(0,I.jsxs)(`td`,{id:ie,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ae?se:``}`,children:[(0,I.jsx)(`span`,{children:e.oldLineNumber||``}),O?.side===`old`&&O?.lineNumber===e.oldLineNumber&&(0,I.jsxs)(I.Fragment,{children:[_&&g&&e.oldLine?.type!==`delete`&&e.newLineNumber!==void 0&&(0,I.jsx)(vy,{onClick:()=>{let t=e.newLineNumber;!g||t===void 0||_(g,t)}}),(0,I.jsx)(_y,{onMouseDown:t=>{t.stopPropagation(),e.oldLineNumber&&(x({side:`old`,lineNumber:e.oldLineNumber}),C({side:`old`,lineNumber:e.oldLineNumber}),T(!0))},onMouseUp:t=>{if(t.stopPropagation(),!e.oldLineNumber||!b){T(!1),x(null),C(null);return}let n=S&&S.side===`old`?S.lineNumber:e.oldLineNumber;b.side!==`old`||b.lineNumber===n?A(`old`,e.oldLineNumber):A(`old`,[Math.min(b.lineNumber,n),Math.max(b.lineNumber,n)]),T(!1),x(null),C(null)}})]})]}),(0,I.jsx)(`td`,{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Sy(e.oldLine,xy(e.oldLine))} ${ne(`old`,e)} ${ae?se:``}`,children:e.oldLine&&(0,I.jsx)(`div`,{className:`flex items-center relative min-h-[20px] px-3`,children:e.wordLevelDiff?(0,I.jsx)(Rr,{segments:e.wordLevelDiff.oldSegments,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,I.jsx)(Lr,{code:e.oldLine.content,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`,syntaxTheme:u,filename:g,precomputedTokens:P(v,e.oldLine.oldLineNumber)})})}),(0,I.jsxs)(`td`,{id:R,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${oe?se:``}`,children:[(0,I.jsx)(`span`,{children:e.newLineNumber||``}),O?.side===`new`&&O?.lineNumber===e.newLineNumber&&(0,I.jsxs)(I.Fragment,{children:[_&&g&&e.newLineNumber!==void 0&&(0,I.jsx)(vy,{onClick:()=>{let t=e.newLineNumber;!g||t===void 0||_(g,t)}}),(0,I.jsx)(_y,{onMouseDown:t=>{t.stopPropagation(),e.newLineNumber&&(x({side:`new`,lineNumber:e.newLineNumber}),C({side:`new`,lineNumber:e.newLineNumber}),T(!0))},onMouseUp:t=>{if(t.stopPropagation(),!e.newLineNumber||!b){T(!1),x(null),C(null);return}let n=S&&S.side===`new`?S.lineNumber:e.newLineNumber;b.side!==`new`||b.lineNumber===n?A(`new`,e.newLineNumber):A(`new`,[Math.min(b.lineNumber,n),Math.max(b.lineNumber,n)]),T(!1),x(null),C(null)}})]})]}),(0,I.jsx)(`td`,{className:`w-1/2 p-0 align-top relative ${Sy(e.newLine,xy(e.newLine))} ${ne(`new`,e)} ${oe?se:``}`,children:e.newLine&&(0,I.jsx)(`div`,{className:`flex items-center relative min-h-[20px] px-3`,children:e.wordLevelDiff?(0,I.jsx)(Rr,{segments:e.wordLevelDiff.newSegments,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,I.jsx)(Lr,{code:e.newLine.content,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`,syntaxTheme:u,filename:g,precomputedTokens:P(y,e.newLine.newLineNumber)})})})]}),h.length>0&&(0,I.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,I.jsx)(`td`,{colSpan:4,className:`p-0 border-t border-github-border`,children:h.map(t=>{let n=t.side||`new`,i;return i=n===`old`&&e.oldLineNumber?`left`:n===`new`&&e.newLineNumber?`right`:te(e),(0,I.jsx)(`div`,{className:`flex ${i===`left`?`justify-start`:i===`right`?`justify-end`:`justify-center`}`,children:(0,I.jsx)(`div`,{className:`${i===`full`?`w-full`:`w-1/2`}`,children:(0,I.jsx)(`div`,{className:`m-2 mx-3`,children:(0,I.jsx)(Zr,{thread:t,showAuthorBadges:r,onGeneratePrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u})})})},t.id)})})}),E&&(E.side===`old`&&E.lineNumber===e.oldLineNumber||E.side===`new`&&E.lineNumber===e.newLineNumber||Array.isArray(E.lineNumber)&&(E.side===`new`&&E.lineNumber[1]===e.newLineNumber||E.side===`old`&&E.lineNumber[1]===e.oldLineNumber))&&(0,I.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,I.jsx)(`td`,{colSpan:4,className:`p-0`,children:(0,I.jsx)(`div`,{className:`flex ${E.side===`old`?`justify-start`:E.side===`new`?`justify-end`:`justify-center`}`,children:(0,I.jsx)(`div`,{className:`w-1/2`,children:(0,I.jsx)(Yr,{onSubmit:N,onCancel:j,selectedCode:M(),syntaxTheme:u,filename:g})})})})})]},n)})})})})}var wy=(0,F.memo)(function({chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r=!1,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,mode:u=St,syntaxTheme:d,cursor:f=null,fileIndex:p=0,onLineClick:m,commentTrigger:h,onCommentTriggerHandled:g,filename:_,onOpenInEditor:v}){let[y,b]=(0,F.useState)(null),[x,S]=(0,F.useState)(null),[C,w]=(0,F.useState)(!1),[T,E]=(0,F.useState)(null),[D,O]=(0,F.useState)(null);(0,F.useEffect)(()=>{if(h?.lineIndex!==void 0){let t=e.lines[h.lineIndex];if(t){let e=t.newLineNumber||t.oldLineNumber,n=t.type===`delete`?`old`:`new`;e&&(E({side:n,lineNumber:e}),g?.())}}},[h,e.lines,g]),(0,F.useEffect)(()=>{if(C){let e=()=>{w(!1),b(null),S(null)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}}},[C]);let k=(0,F.useCallback)((e,t)=>{T?.side===e&&T?.lineNumber===t?E(null):E({side:e,lineNumber:t})},[T]),A=(0,F.useCallback)(()=>{E(null)},[]),j=(0,F.useCallback)(()=>{if(!T)return``;let{side:t,lineNumber:n}=T,r=e.lines;if(typeof n==`number`)return r.find(e=>t===`old`?e.oldLineNumber===n:e.newLineNumber===n)?.content??``;{let[e,i]=n;return r.filter(n=>{let r=t===`old`?n.oldLineNumber:n.newLineNumber;return r!==void 0&&r>=e&&r<=i}).map(e=>e.content??``).join(`
|
|
59
|
+
`)}},[T,e.lines]),M=(0,F.useCallback)(async e=>{if(T!==null){let t=j();await i(T.lineNumber,e,t,T.side),E(null)}},[T,i,j]),N=(e,t)=>n.filter(n=>{let r=Array.isArray(n.line)?n.line[1]===e:n.line===e,i=!n.side||n.side===t;return r&&i}).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),P=e=>{if(u===`unified`)return`full`;switch(e.type){case`delete`:return`left`;case`add`:return`right`;default:return`full`}},ee=(e,t)=>{if(!e)return``;if(C&&y&&x){let t=Math.min(y,x),n=Math.max(y,x);if(e>=t&&e<=n){let r=`after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none`;return e===t&&(r+=` after:border-t-2`),e===n&&(r+=` after:border-b-2`),r}}if(T&&T.side===t){let t=Array.isArray(T.lineNumber)?T.lineNumber[0]:T.lineNumber,n=Array.isArray(T.lineNumber)?T.lineNumber[1]:T.lineNumber;if(e>=t&&e<=n)return`after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none`}return``},te=(0,F.useMemo)(()=>{let t=new Map,n=e.lines,r=0;for(;r<n.length;){let e=n[r];if(!e){r++;continue}if(e.type===`delete`){let e=r+1;for(;e<n.length&&n[e]?.type===`delete`;)e++;let i=n.slice(r,e),a=r,o=[];for(;e<n.length&&n[e]?.type===`add`;){let t=n[e];t&&o.push({line:t,index:e}),e++}let s=Math.max(i.length,o.length);for(let e=0;e<s;e++){let n=i[e],r=o[e];if(n&&r&&gy(n.content,r.line.content)){let i=hy(n.content,r.line.content);t.set(a+e,i.oldSegments),t.set(r.index,i.newSegments)}}r=e}else r++}return t},[e.lines]);return u===`split`?(0,I.jsx)(Cy,{chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,onOpenInEditor:v,syntaxTheme:d,cursor:f,fileIndex:p,onLineClick:m,filename:_,commentTrigger:h,onCommentTriggerHandled:g}):(0,I.jsx)(`div`,{className:`bg-github-bg-primary`,children:(0,I.jsx)(`table`,{className:`w-full table-fixed border-collapse font-mono text-sm leading-5`,children:(0,I.jsx)(`tbody`,{children:e.lines.map((e,n)=>{let i=e.newLineNumber||e.oldLineNumber||0,u=e.type===`delete`?`old`:`new`,h=T?Array.isArray(T.lineNumber)?T.lineNumber[1]:T.lineNumber:null,g=e.type===`delete`?e.oldLineNumber:e.newLineNumber,E=e.type===`delete`?`old`:`new`,ne=g?N(g,E):[],re=`file-${p}-chunk-${t}-line-${n}`,L=f&&f.chunkIndex===t&&f.lineIndex===n;return(0,I.jsxs)(F.Fragment,{children:[(0,I.jsx)(by,{line:e,index:n,lineId:re,isCurrentLine:L||!1,hoveredLineIndex:D,selectedLineStyle:ee(e.newLineNumber||e.oldLineNumber,e.type===`delete`?`old`:`new`),onMouseEnter:()=>{O(n)},onMouseLeave:()=>O(null),onMouseMove:()=>{if(C&&y){let t=e.newLineNumber||e.oldLineNumber;t&&S(t)}},onCommentButtonMouseDown:t=>{t.stopPropagation();let n=e.newLineNumber||e.oldLineNumber;n&&(b(n),S(n),w(!0))},onCommentButtonMouseUp:t=>{t.stopPropagation();let n=e.newLineNumber||e.oldLineNumber,r=e.type===`delete`?`old`:`new`;if(!n||!y){w(!1),b(null),S(null);return}let i=x||n;y===i?k(r,n):k(r,[Math.min(y,i),Math.max(y,i)]),w(!1),b(null),S(null)},onOpenInEditor:v&&_&&e.type!==`delete`&&(e.newLineNumber||e.oldLineNumber)?()=>{let t=e.newLineNumber||e.oldLineNumber;t&&_&&v(_,t)}:void 0,syntaxTheme:d,filename:_,diffSegments:te.get(n),onClick:()=>{let r=e.type===`delete`?`left`:`right`;m?.(p,t,n,r)}}),ne.map(t=>{let n=P(e);return(0,I.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,I.jsx)(`td`,{colSpan:3,className:`p-0 border-t border-github-border`,children:(0,I.jsx)(`div`,{className:`flex ${n===`left`?`justify-start`:n===`right`?`justify-end`:`justify-center`}`,children:(0,I.jsx)(`div`,{className:`${n===`full`?`w-full`:`w-1/2`} m-2 mx-4`,children:(0,I.jsx)(Zr,{thread:t,showAuthorBadges:r,onGeneratePrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:d})})})})},t.id)}),T&&T.side===u&&h===i&&(0,I.jsx)(`tr`,{className:`bg-[var(--bg-secondary)]`,children:(0,I.jsx)(`td`,{colSpan:3,className:`p-0`,children:(0,I.jsx)(`div`,{className:`flex ${P(e)===`left`?`justify-start`:P(e)===`right`?`justify-end`:`justify-center`}`,children:(0,I.jsx)(`div`,{className:`${P(e)===`full`?`w-full`:`w-1/2`}`,children:(0,I.jsx)(Yr,{onSubmit:M,onCancel:A,selectedCode:j(),syntaxTheme:d,filename:_})})})})})]},n)})})})})}),Ty=20,Ey=(0,F.memo)(function({direction:e,hiddenLines:t,onExpandUp:n,onExpandDown:r,onExpandAll:i,isLoading:a=!1}){if(t<=0)return null;let o=`${t} ${t===1?`line`:`lines`}`,s=t<=Ty,c=[];return s?c.push({key:`all`,onClick:i,ariaLabel:`Expand all ${t} hidden lines`,icon:(0,I.jsx)(bt,{size:16,"aria-hidden":`true`})}):((e===`up`||e===`both`)&&c.push({key:`up`,onClick:n,ariaLabel:`Expand ${Ty} hidden lines above`,icon:(0,I.jsx)(Be,{size:12,"aria-hidden":`true`,className:`translate-y-0.5`})}),(e===`down`||e===`both`)&&c.push({key:`down`,onClick:r,ariaLabel:`Expand ${Ty} hidden lines below`,icon:(0,I.jsx)(ze,{size:12,"aria-hidden":`true`,className:`-translate-y-0.5`})})),(0,I.jsxs)(`div`,{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm grid-cols-[var(--line-number-width)_1fr]`,children:[(0,I.jsx)(`div`,{className:`flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border`,children:a?(0,I.jsx)(ct,{size:14,className:`animate-spin text-github-text-muted self-center`,"aria-hidden":`true`}):c.map(e=>(0,I.jsx)(`button`,{type:`button`,onClick:e.onClick,disabled:a||!e.onClick,className:`flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`,title:e.ariaLabel,"aria-label":e.ariaLabel,children:e.icon},e.key))}),(0,I.jsx)(`div`,{className:`flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none`,children:o})]})});function Dy({file:e,threads:t,showAuthorBadges:n,diffMode:r,syntaxTheme:i,cursor:a,fileIndex:o,mergedChunks:s,isExpandLoading:c,expandHiddenLines:l,expandAllBetweenChunks:u,onAddComment:d,onGenerateThreadPrompt:f,onRemoveThread:p,onReplyToThread:m,onRemoveMessage:h,onUpdateMessage:g,onLineClick:_,onOpenInEditor:v,commentTrigger:y,onCommentTriggerHandled:b}){let x=(t,n,r,i)=>t===`top`&&n.hiddenLinesBefore>0?(0,I.jsx)(Ey,{direction:`down`,hiddenLines:n.hiddenLinesBefore,onExpandDown:()=>l(e,r,`up`),onExpandAll:()=>u(e,r,n.hiddenLinesBefore),isLoading:c}):t===`middle`&&n.hiddenLinesBefore>0?(0,I.jsx)(Ey,{direction:`both`,hiddenLines:n.hiddenLinesBefore,onExpandUp:()=>l(e,r-1,`down`),onExpandDown:()=>l(e,r,`up`),onExpandAll:()=>u(e,r,n.hiddenLinesBefore),isLoading:c}):t===`bottom`&&n.hiddenLinesAfter>0?(0,I.jsx)(Ey,{direction:`up`,hiddenLines:n.hiddenLinesAfter,onExpandUp:()=>l(e,i,`down`),onExpandAll:()=>l(e,i,`down`,n.hiddenLinesAfter),isLoading:c}):null;return(0,I.jsx)(I.Fragment,{children:s.map((c,l)=>{let u=l===0,S=l===s.length-1,C=c.originalIndices[0]??0,w=c.originalIndices[c.originalIndices.length-1]??0;return(0,I.jsxs)(F.Fragment,{children:[u&&x(`top`,c,C,w),!u&&x(`middle`,c,C,w),(0,I.jsx)(`div`,{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,`-`)}-${l}`,children:(0,I.jsx)(wy,{chunk:c,chunkIndex:l,threads:t,showAuthorBadges:n,onAddComment:d,onGenerateThreadPrompt:f,onRemoveThread:p,onReplyToThread:m,onRemoveMessage:h,onUpdateMessage:g,onOpenInEditor:v,mode:r,syntaxTheme:i,cursor:a&&a.chunkIndex===l?a:null,fileIndex:o,onLineClick:_,commentTrigger:y&&y.chunkIndex===l?y:null,onCommentTriggerHandled:b,filename:e.path})}),S&&x(`bottom`,c,C,w)]},l)})})}var Oy=e=>!!(e&&e!==`stdin`),ky=[`text-[26px] font-semibold`,`text-[22px] font-semibold`,`text-xl font-semibold`,`text-lg font-semibold`,`text-base font-semibold uppercase tracking-wide`,`text-base font-semibold`],Ay=e=>e.type===`delete`||e.type===`remove`,jy=e=>e.type===`normal`||e.type===`context`,My=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Ny=(e,t,n)=>{let r=e[e.length-1];if(r&&r.type===t){r.lines.push(n);return}e.push({type:t,lines:[n]})},Py=(e,t)=>{t.forEach(t=>Ny(e,`delete`,t)),t.length=0},Fy=e=>{let t=[],n=[],r=!1;return e.forEach(e=>{e.lines.forEach(e=>{if(!(e.type===`header`||e.type===`hunk`)){if(Ay(e)){n.push(e.content);return}if(e.type===`add`){n.length>0&&(Py(t,n),r=!0),Ny(t,r?`change`:`add`,e.content);return}jy(e)&&(Py(t,n),r=!1,Ny(t,`context`,e.content))}}),Py(t,n),r=!1}),t},Iy=e=>F.isValidElement(e),Ly=e=>F.isValidElement(e),Ry=e=>e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(Ry).join(``):Iy(e)?Ry(e.props.children):``,zy=e=>({h1:({children:e})=>(0,I.jsx)(`h1`,{className:`${ky[0]} mt-6 mb-2 first:mt-0`,children:e}),h2:({children:e})=>(0,I.jsx)(`h2`,{className:`${ky[1]} mt-6 mb-2 first:mt-0`,children:e}),h3:({children:e})=>(0,I.jsx)(`h3`,{className:`${ky[2]} mt-6 mb-2 first:mt-0`,children:e}),h4:({children:e})=>(0,I.jsx)(`h4`,{className:`${ky[3]} mt-6 mb-2 first:mt-0`,children:e}),h5:({children:e})=>(0,I.jsx)(`h5`,{className:`${ky[4]} mt-6 mb-2 first:mt-0`,children:e}),h6:({children:e})=>(0,I.jsx)(`h6`,{className:`${ky[5]} mt-6 mb-2 first:mt-0`,children:e}),p:({children:e})=>(0,I.jsx)(`p`,{className:`text-base leading-7`,children:e}),ul:({children:e})=>(0,I.jsx)(`ul`,{className:`list-disc pl-6 text-base space-y-1`,children:e}),ol:({children:e})=>(0,I.jsx)(`ol`,{className:`list-decimal pl-6 text-base space-y-1`,children:e}),li:({children:e})=>(0,I.jsx)(`li`,{children:e}),blockquote:({children:e})=>(0,I.jsx)(`blockquote`,{className:`border-l-4 border-github-border pl-4 text-github-text-muted italic`,children:e}),hr:()=>(0,I.jsx)(`hr`,{className:`border-github-border`}),a:({href:e,children:t})=>{let n=e??``;if(!n||!My(n))return(0,I.jsx)(`span`,{children:t});let r=n.startsWith(`http`);return(0,I.jsx)(`a`,{href:n,target:r?`_blank`:void 0,rel:r?`noreferrer`:void 0,className:`text-sky-400 hover:text-sky-300 underline underline-offset-4`,children:t})},img:({src:e,alt:t})=>{let n=e??``;return!n||!My(n)?null:(0,I.jsx)(`img`,{src:n,alt:t??``,loading:`lazy`,className:`max-w-full rounded border border-github-border`})},pre:({children:t})=>{let n=(Array.isArray(t)?t:[t]).find(Ly),r=Ry(n??t),i=/language-(\S+)/.exec(n?.props.className??``)?.[1],a=r.replace(/\n$/,``);return i===`mermaid`&&a.trim()?(0,I.jsx)(Hv,{chart:a}):r.trim()?(0,I.jsx)(`pre`,{className:`markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm`,children:(0,I.jsx)(Ir,{code:a,language:i,syntaxTheme:e,className:`font-mono text-github-text-primary`})}):(0,I.jsx)(`pre`,{className:`markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm`,children:t})},code:({className:e,children:t})=>e?(0,I.jsx)(`code`,{className:e,children:t}):(0,I.jsx)(`code`,{className:`px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono`,children:t}),table:({children:e})=>(0,I.jsx)(`div`,{className:`overflow-x-auto`,children:(0,I.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:e})}),thead:({children:e})=>(0,I.jsx)(`thead`,{className:`bg-github-bg-secondary`,children:e}),tbody:({children:e})=>(0,I.jsx)(`tbody`,{children:e}),tr:({children:e})=>(0,I.jsx)(`tr`,{className:`border-b border-github-border`,children:e}),th:({children:e})=>(0,I.jsx)(`th`,{className:`px-3 py-2 text-left font-semibold border border-github-border`,children:e}),td:({children:e})=>(0,I.jsx)(`td`,{className:`px-3 py-2 border border-github-border`,children:e})}),By=e=>{switch(e){case`add`:return`border-l-4 border-diff-addition-border`;case`delete`:return`border-l-4 border-diff-deletion-border`;case`change`:return`border-l-4 border-diff-addition-border`;default:return`border-l-4 border-transparent`}},Vy=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),Hy=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),Uy=e=>{let t=e.trim();return t.length>=7&&t.startsWith(`<!--`)&&t.endsWith(`-->`)},Wy=e=>e.trim()===``||Vy(e)||Hy(e)||Uy(e),Gy=e=>e.every(Wy),Ky=e=>{let t=e.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!t)return null;let n=t[1];return n?{marker:n[0],length:n.length,raw:e}:null},qy=(e,t)=>{let n=e.match(/^\s{0,3}(`{3,}|~{3,})\s*$/);return n?.[1]?n[1][0]===t.marker&&n[1].length>=t.length:!1},Jy=e=>{let t=[],n=null,r=null,i=()=>{n&&=(t.push(n),null)},a=(e,t)=>{if(n?.type===e){n.lines.push(t);return}i(),n={kind:`markdown`,type:e,lines:[t]}},o=e=>{if(!r)return;let n=r.lines.every(e=>e.type===`context`);e&&n?(a(`context`,r.fence.raw),r.lines.forEach(e=>{a(`context`,e.content)}),a(`context`,e)):(i(),t.push({kind:`fenced-code`,lines:r.lines})),r=null};return e.forEach(e=>{e.lines.forEach(t=>{if(r){if(qy(t,r.fence)){o(t);return}r.lines.push({type:e.type,content:t});return}let n=Ky(t);if(n){i(),r={fence:n,lines:[]};return}a(e.type,t)})}),o(),i(),t},Yy=e=>{switch(e){case`add`:case`change`:return`border-l-4 border-diff-addition-border bg-diff-addition-bg`;case`delete`:return`border-l-4 border-diff-deletion-border bg-diff-deletion-bg`;default:return`border-l-4 border-transparent`}},Xy=({blocks:e,syntaxTheme:t})=>{let n=(0,F.useMemo)(()=>zy(t),[t]);return(0,I.jsx)(`div`,{className:`space-y-4`,children:(0,F.useMemo)(()=>Jy(e),[e]).map((e,t)=>{if(e.kind===`fenced-code`)return(0,I.jsx)(`div`,{className:`px-4`,children:(0,I.jsx)(`div`,{className:`markdown-preview-code overflow-x-auto rounded border border-github-border bg-github-bg-secondary text-sm font-mono text-github-text-primary`,children:e.lines.map((e,n)=>(0,I.jsx)(`div`,{className:`${Yy(e.type)} whitespace-pre px-3 py-1`,children:e.content||` `},`preview-code-line-${t}-${n}`))})},`preview-block-${t}`);let r=e.lines.join(`
|
|
60
|
+
`).trim();if(!r)return null;let i=Gy(e.lines);return(0,I.jsx)(`div`,{className:`px-4 ${By(e.type)}`,children:i?(0,I.jsx)(`pre`,{className:`whitespace-pre-wrap text-sm text-github-text-primary font-mono`,children:r}):(0,I.jsx)(Ph,{remarkPlugins:[Rv],urlTransform:e=>My(e)?e:``,components:n,children:r})},`preview-block-${t}`)})})},Zy=({content:e,syntaxTheme:t})=>{let n=(0,F.useMemo)(()=>zy(t),[t]);return(0,I.jsx)(`div`,{className:`space-y-4`,children:(0,I.jsx)(Ph,{remarkPlugins:[Rv],urlTransform:e=>My(e)?e:``,components:n,children:e})})};function Qy(e){let{file:t,baseCommitish:n,targetCommitish:r,mergedChunks:i,syntaxTheme:a}=e,[o,s]=(0,F.useState)(`diff`),[c,l]=(0,F.useState)(null),[u,d]=(0,F.useState)(!1),[f,p]=(0,F.useState)(null),[m,h]=(0,F.useState)(null),g=(0,F.useMemo)(()=>Fy(i),[i]),_=(0,F.useMemo)(()=>!n&&!r?null:t.status===`added`?r?{path:t.path,ref:r}:null:t.status===`deleted`?n?{path:t.oldPath||t.path,ref:n}:null:r?{path:t.path,ref:r}:n?{path:t.oldPath||t.path,ref:n}:null,[n,r,t.path,t.oldPath,t.status]),v=(0,F.useMemo)(()=>_?`${_.ref}:${_.path}`:null,[_]);(0,F.useEffect)(()=>{if(!_||!v||!Oy(_.ref)){l(null),h(null),p(null),d(!1);return}let e=!1;return(v!==m||c===null)&&(async()=>{v!==m&&l(null),d(!0),p(null);try{let t=encodeURIComponent(_.path),n=await fetch(`/api/blob/${t}?ref=${encodeURIComponent(_.ref)}`);if(!n.ok)throw Error(`Failed to fetch preview: ${n.statusText}`);let r=await n.text();e||(l(r),h(v))}catch(t){e||(l(null),h(null),p(t instanceof Error?t.message:`Failed to load preview`))}finally{e||d(!1)}})(),()=>{e=!0}},[c,m,_,v]);let y=(0,F.useMemo)(()=>v===m&&c!==null,[c,m,v]);return(0,F.useEffect)(()=>{o===`full-preview`&&!y&&s(`diff-preview`)},[y,o]),(0,I.jsxs)(`div`,{className:`bg-github-bg-primary`,children:[(0,I.jsx)(`div`,{className:`flex items-center justify-between border-b border-github-border px-4 py-2`,children:(0,I.jsx)(Uv,{mode:o,hasFullPreview:y,onModeChange:s})}),o===`diff`&&(0,I.jsx)(Dy,{...e}),o===`diff-preview`&&(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(Xy,{blocks:g,syntaxTheme:a})}),o===`full-preview`&&(0,I.jsxs)(`div`,{className:`p-4`,children:[u&&(0,I.jsx)(`div`,{className:`text-sm text-github-text-muted mb-3`,children:`Loading preview...`}),f&&(0,I.jsx)(`div`,{className:`text-sm text-github-danger mb-3`,children:f}),!u&&!f&&c!==null&&(0,I.jsx)(Zy,{content:c,syntaxTheme:a}),!u&&!f&&c===null&&(0,I.jsx)(`div`,{className:`text-sm text-github-text-muted`,children:`Preview unavailable.`})]})]})}var $y=[`text-2xl font-semibold`,`text-xl font-semibold`,`text-lg font-semibold`,`text-base font-semibold`,`text-sm font-semibold uppercase tracking-wide`,`text-sm font-semibold`],eb={markdown:`Markdown`,code:`Code`,raw:`Raw`,unknown:`Cell`},tb=/"cell_type"\s*:\s*"([^"]+)"/,nb=/"source"\s*:/,rb=/"execution_count"\s*:\s*(null|[0-9]+)/,ib=/"id"\s*:\s*"([^"]+)"/,ab=e=>e.type===`delete`||e.type===`remove`,ob=e=>e.type===`normal`||e.type===`context`,sb=e=>e.type===`add`?`add`:ab(e)?`delete`:ob(e)?`context`:null,cb=e=>e===`markdown`||e===`code`||e===`raw`?e:`unknown`,lb=e=>{let t=e.trim();if(!t.startsWith(`"`))return null;let n=t;n.endsWith(`,`)&&(n=n.slice(0,-1));try{let e=JSON.parse(n);return typeof e==`string`?e:null}catch{return n.replace(/^"/,``).replace(/"$/,``).replace(/\\n/g,`
|
|
61
|
+
`).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`)}},ub=e=>{let t=e.indexOf(`"source"`);if(t===-1)return null;let n=e.indexOf(`:`,t);if(n===-1)return null;let r=e.slice(n+1).trim();if(!r)return null;if(r.endsWith(`,`)&&(r=r.slice(0,-1).trim()),r.startsWith(`[`)){let e=r.lastIndexOf(`]`);if(e===-1)return null;let t=r.slice(0,e+1);try{let e=JSON.parse(t);if(Array.isArray(e))return e.filter(e=>typeof e==`string`)}catch{return null}return[]}if(r.startsWith(`"`))try{let e=JSON.parse(r);return typeof e==`string`?[e]:null}catch{return null}return null},db=e=>{let t=fb(e);if(t)return t;let n=[],r=null,i=!1,a=!1,o=!1,s=()=>{r&&(r.status=i&&a?`change`:i?`add`:a?`delete`:`context`,n.push(r),r=null,i=!1,a=!1,o=!1)},c=e=>{s(),r={cellType:e,sourceLines:[],status:`context`}};return e.forEach(e=>{e.lines.forEach(e=>{let t=sb(e);if(!t)return;let n=e.content.match(tb);if(n?c(cb(n[1]??``)):!r&&nb.test(e.content)&&c(`unknown`),!r)return;if(t===`add`&&(i=!0),t===`delete`&&(a=!0),!r.id){let t=e.content.match(ib);t&&(r.id=t[1])}if(r.executionCount===void 0){let t=e.content.match(rb);t&&(r.executionCount=t[1]===`null`?null:t[1])}if(nb.test(e.content)){let n=ub(e.content);if(n){n.forEach(e=>{r?.sourceLines.push({type:t,content:e})}),o=!1;return}o=!0;return}if(!o)return;if(e.content.trim().startsWith(`]`)){o=!1;return}let s=lb(e.content);s!==null&&r.sourceLines.push({type:t,content:s})})}),s(),{cells:n}},fb=e=>{let t=pb(e,[`add`,`context`]),n=pb(e,[`delete`,`context`]),r=mb(t),i=mb(n);if(!r&&!i||r&&r.cells.length===0&&!i)return null;let a=r?.language??i?.language;return{cells:vb(i?.cells??[],r?.cells??[]),language:a}},pb=(e,t)=>e.flatMap(e=>e.lines).map(e=>{let n=sb(e);return!n||!t.includes(n)?null:e.content}).filter(e=>e!==null).join(`
|
|
62
|
+
`),mb=e=>{if(!e.trim())return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||!(`cells`in t))return null;let n=t.cells;if(!Array.isArray(n))return null;let r=t.metadata,i=hb(r);return{cells:n.map(e=>gb(e)),language:i}}catch{return null}},hb=e=>{if(!e||typeof e!=`object`)return;let t=e,n=t.language_info;if(n&&typeof n==`object`){let e=n.name;if(typeof e==`string`&&e.trim())return e}let r=t.kernelspec;if(r&&typeof r==`object`){let e=r.language;if(typeof e==`string`&&e.trim())return e}},gb=e=>{let t=typeof e==`object`&&e?e:{},n=cb(typeof t.cell_type==`string`?t.cell_type:``),r=typeof t.id==`string`?t.id:void 0,i=t.execution_count,a=i===null?null:typeof i==`number`?String(i):typeof i==`string`?i:void 0;return{cellType:n,sourceText:_b(t.source),id:r,executionCount:a}},_b=e=>typeof e==`string`?e:Array.isArray(e)?e.filter(e=>typeof e==`string`).join(``):``,vb=(e,t)=>{let n=[];if(e.some(e=>!!e.id)||t.some(e=>!!e.id)){let r=new Map;e.forEach((e,t)=>{e.id&&r.set(e.id,{cell:e,index:t})});let i=new Set;return t.forEach(e=>{let t=e.id?r.get(e.id):void 0;t&&i.add(t.index),n.push(yb(t?.cell??null,e))}),e.forEach((e,t)=>{i.has(t)||n.push(yb(e,null))}),n}let r=Math.max(e.length,t.length);for(let i=0;i<r;i+=1){let r=e[i]??null,a=t[i]??null;n.push(yb(r,a))}return n},yb=(e,t)=>{if(!t&&e)return{cellType:e.cellType,sourceLines:bb(e.sourceText,`delete`),status:`delete`,id:e.id,executionCount:e.executionCount};if(t&&!e)return{cellType:t.cellType,sourceLines:bb(t.sourceText,`add`),status:`add`,id:t.id,executionCount:t.executionCount};let n=e?.sourceText??``,r=t?.sourceText??``,i=t?.cellType??e?.cellType??`unknown`,a=t?.id??e?.id,o=t?.executionCount??e?.executionCount;return n===r&&(e?.cellType??``)===(t?.cellType??``)?{cellType:i,sourceLines:bb(r,`context`),status:`context`,id:a,executionCount:o}:{cellType:i,sourceLines:[...bb(n,`delete`),...bb(r,`add`)],status:`change`,id:a,executionCount:o}},bb=(e,t)=>e?[{type:t,content:e}]:[],xb=e=>!!(e&&e!==`stdin`),Sb=async(e,t)=>{let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);return n.ok?n.text():null},Cb=(e,t)=>e.filter(e=>t.includes(e.type)).map(e=>e.content).join(``),wb=e=>{if(!e)return[];let t=e.split(`
|
|
63
|
+
`);return t.length>0&&t[t.length-1]===``&&t.pop(),t},Tb=(e,t)=>!e&&!t?[]:e?t?dy(e,t).flatMap(e=>{let t=e.added?`add`:e.removed?`delete`:`context`;return wb(e.value).map(e=>({type:t,content:e}))}):wb(e).map(e=>({type:`delete`,content:e})):wb(t).map(e=>({type:`add`,content:e})),Eb=e=>F.isValidElement(e),Db=e=>F.isValidElement(e),Ob=e=>e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(Ob).join(``):Eb(e)?Ob(e.props.children):``,kb=e=>{switch(e){case`add`:return`border-l-4 border-diff-addition-border`;case`delete`:return`border-l-4 border-diff-deletion-border`;case`change`:return`border-l-4 border-diff-addition-border`;default:return`border-l-4 border-transparent`}},Ab=e=>{switch(e){case`before`:return`border-l-4 border-diff-deletion-border`;case`after`:return`border-l-4 border-diff-addition-border`;default:return`border-l-4 border-transparent`}},jb=e=>{switch(e){case`add`:return`bg-diff-addition-bg`;case`delete`:return`bg-diff-deletion-bg`;default:return`bg-transparent`}},Mb=e=>{switch(e){case`add`:return`+`;case`delete`:return`-`;default:return` `}},Nb=e=>{switch(e){case`add`:return`text-github-accent`;case`delete`:return`text-github-danger`;default:return`text-github-text-muted`}},Pb=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Fb=e=>({h1:({children:e})=>(0,I.jsx)(`h1`,{className:`${$y[0]} mb-2`,children:e}),h2:({children:e})=>(0,I.jsx)(`h2`,{className:`${$y[1]} mb-2`,children:e}),h3:({children:e})=>(0,I.jsx)(`h3`,{className:`${$y[2]} mb-2`,children:e}),h4:({children:e})=>(0,I.jsx)(`h4`,{className:`${$y[3]} mb-2`,children:e}),h5:({children:e})=>(0,I.jsx)(`h5`,{className:`${$y[4]} mb-2`,children:e}),h6:({children:e})=>(0,I.jsx)(`h6`,{className:`${$y[5]} mb-2`,children:e}),p:({children:e})=>(0,I.jsx)(`p`,{className:`text-sm leading-7`,children:e}),ul:({children:e})=>(0,I.jsx)(`ul`,{className:`list-disc pl-6 text-sm space-y-1`,children:e}),ol:({children:e})=>(0,I.jsx)(`ol`,{className:`list-decimal pl-6 text-sm space-y-1`,children:e}),li:({children:e})=>(0,I.jsx)(`li`,{children:e}),blockquote:({children:e})=>(0,I.jsx)(`blockquote`,{className:`border-l-4 border-github-border pl-4 text-github-text-muted italic`,children:e}),hr:()=>(0,I.jsx)(`hr`,{className:`border-github-border`}),a:({href:e,children:t})=>{let n=e??``;if(!n||!Pb(n))return(0,I.jsx)(`span`,{children:t});let r=n.startsWith(`http`);return(0,I.jsx)(`a`,{href:n,target:r?`_blank`:void 0,rel:r?`noreferrer`:void 0,className:`text-sky-400 hover:text-sky-300 underline underline-offset-4`,children:t})},img:({src:e,alt:t})=>{let n=e??``;return!n||!Pb(n)?null:(0,I.jsx)(`img`,{src:n,alt:t??``,loading:`lazy`,className:`max-w-full rounded border border-github-border`})},pre:({children:t})=>{let n=(Array.isArray(t)?t:[t]).find(Db),r=Ob(n??t),i=/language-(\S+)/.exec(n?.props.className??``)?.[1];return r.trim()?(0,I.jsx)(`pre`,{className:`border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs`,children:(0,I.jsx)(Ir,{code:r.replace(/\n$/,``),language:i,syntaxTheme:e,className:`font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre`})}):(0,I.jsx)(`pre`,{className:`border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs`,children:t})},code:({className:e,children:t})=>e?(0,I.jsx)(`code`,{className:e,children:t}):(0,I.jsx)(`code`,{className:`px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono`,children:t}),table:({children:e})=>(0,I.jsx)(`div`,{className:`overflow-x-auto`,children:(0,I.jsx)(`table`,{className:`min-w-full border border-github-border`,children:e})}),th:({children:e})=>(0,I.jsx)(`th`,{className:`border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm`,children:e}),td:({children:e})=>(0,I.jsx)(`td`,{className:`border border-github-border px-2 py-1 text-sm`,children:e})}),Ib=e=>{let t=Cb(e.sourceLines,[`context`,`delete`]),n=Cb(e.sourceLines,[`context`,`add`]),r=[];return e.status===`change`?(t.trim()&&r.push({label:`Before`,content:t,tone:`before`}),n.trim()&&r.push({label:`After`,content:n,tone:`after`}),r.length===0&&r.push({label:`After`,content:n,tone:`after`}),r):e.status===`delete`?(r.push({label:`Before`,content:t||n,tone:`before`}),r):(r.push({label:`After`,content:n||t,tone:`after`}),r)},Lb=(e,t,n,r)=>{if(!t.trim())return(0,I.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`Empty cell`});if(e===`markdown`){let e=Fb(n);return(0,I.jsx)(Ph,{remarkPlugins:[Rv],urlTransform:e=>Pb(e)?e:``,components:e,children:t})}return e===`raw`?(0,I.jsx)(`pre`,{className:`whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary`,children:t}):(0,I.jsx)(`pre`,{className:`overflow-x-auto text-xs`,children:(0,I.jsx)(Lr,{code:t.replace(/\n$/,``),language:r||`python`,syntaxTheme:n,className:`font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre`})})},Rb=({lines:e,syntaxTheme:t,language:n})=>e.length===0?(0,I.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`Empty cell`}):(0,I.jsx)(`div`,{className:`overflow-x-auto`,children:(0,I.jsx)(`div`,{className:`font-mono text-xs`,children:e.map((e,r)=>(0,I.jsxs)(`div`,{className:`flex items-start min-h-[16px] ${jb(e.type)}`,children:[(0,I.jsx)(`span`,{className:`w-5 text-center flex-shrink-0 select-none ${Nb(e.type)}`,children:Mb(e.type)}),(0,I.jsx)(Lr,{code:e.content||` `,language:n||`python`,syntaxTheme:t,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`})]},`notebook-code-line-${r}`))})}),zb=({cells:e,syntaxTheme:t,language:n})=>(0,I.jsx)(`div`,{className:`space-y-4`,children:e.map((e,r)=>{let i=Ib(e),a=e.cellType===`code`&&e.executionCount!==void 0?`In[${e.executionCount??` `}]`:null,o=e.cellType===`code`,s=o?Tb(Cb(e.sourceLines,[`context`,`delete`]),Cb(e.sourceLines,[`context`,`add`])).filter(e=>e.type!==`context`):[];return o&&s.length===0?null:(0,I.jsxs)(`div`,{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${kb(e.status)}`,children:[(0,I.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 mb-3`,children:(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-github-text-muted`,children:eb[e.cellType]}),a&&(0,I.jsx)(`span`,{className:`text-xs font-mono text-github-text-secondary`,children:a}),e.id&&(0,I.jsx)(`span`,{className:`text-xs font-mono text-github-text-muted`,children:e.id})]})}),(0,I.jsx)(`div`,{className:`space-y-3`,children:o?(0,I.jsx)(`div`,{className:`px-4 py-3 ${Ab(e.status===`delete`?`before`:`after`)}`,children:(0,I.jsx)(Rb,{lines:s,syntaxTheme:t,language:n})}):i.map((i,a)=>(0,I.jsx)(`div`,{className:`px-4 py-3 ${Ab(i.tone)}`,children:(0,I.jsx)(`div`,{className:`text-sm text-github-text-primary`,children:Lb(e.cellType,i.content,t,n)})},`notebook-cell-${r}-section-${a}`))})]},`notebook-cell-${r}`)})}),Bb=({cells:e,syntaxTheme:t,language:n})=>(0,I.jsx)(`div`,{className:`space-y-4`,children:e.map((e,r)=>{let i=e.cellType===`code`&&e.executionCount!==void 0?`In[${e.executionCount??` `}]`:null;return(0,I.jsxs)(`div`,{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 mb-3`,children:[(0,I.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-github-text-muted`,children:eb[e.cellType]}),i&&(0,I.jsx)(`span`,{className:`text-xs font-mono text-github-text-secondary`,children:i}),e.id&&(0,I.jsx)(`span`,{className:`text-xs font-mono text-github-text-muted`,children:e.id})]}),(0,I.jsx)(`div`,{className:`text-sm text-github-text-primary`,children:Lb(e.cellType,e.sourceText,t,n)})]},`notebook-full-cell-${r}`)})});function Vb(e){let{file:t,baseCommitish:n,targetCommitish:r}=e,[i,a]=(0,F.useState)(`diff`),o=(0,F.useMemo)(()=>db(e.mergedChunks),[e.mergedChunks]),[s,c]=(0,F.useState)({status:`idle`,cells:o.cells,language:o.language}),l=(0,F.useMemo)(()=>s.cells.filter(e=>e.status===`context`?!1:e.cellType===`code`?Tb(Cb(e.sourceLines,[`context`,`delete`]),Cb(e.sourceLines,[`context`,`add`])).filter(e=>e.type!==`context`).length>0:!0),[s.cells]),[u,d]=(0,F.useState)(null),[f,p]=(0,F.useState)(o.language),[m,h]=(0,F.useState)(!1),[g,_]=(0,F.useState)(null),[v,y]=(0,F.useState)(null),b=(0,F.useMemo)(()=>!n&&!r?null:t.status===`added`?r?{path:t.path,ref:r}:null:t.status===`deleted`?n?{path:t.oldPath||t.path,ref:n}:null:r?{path:t.path,ref:r}:n?{path:t.oldPath||t.path,ref:n}:null,[n,r,t.oldPath,t.path,t.status]),x=(0,F.useMemo)(()=>b?`${b.ref}:${b.path}`:null,[b]);(0,F.useEffect)(()=>{let e=!1;return(async()=>{let i=n||`HEAD~1`,a=r||`HEAD`,s=t.oldPath||t.path,l=t.status!==`added`&&xb(i),u=t.status!==`deleted`&&xb(a);if(b&&x&&xb(b?.ref)?(d(null),_(null),h(!0)):(d(null),y(null),_(null),h(!1)),!l&&!u){c({status:`ready`,cells:o.cells,language:o.language,source:`diff`,message:`Notebook content could not be loaded, falling back to diff preview.`});return}c(e=>({...e,status:`loading`}));try{let[n,r]=await Promise.all([l?Sb(s,i):Promise.resolve(null),u?Sb(t.path,a):Promise.resolve(null)]),f=n?mb(n):null,m=r?mb(r):null;if(!f&&!m){e||c({status:`ready`,cells:o.cells,language:o.language,source:`diff`,message:`Notebook content could not be parsed, falling back to diff preview.`});return}let h=m?.language??f?.language??o.language,g=vb(f?.cells??[],m?.cells??[]),v=b?.ref===a&&b.path===t.path?m:b?.ref===i&&b.path===s?f:null;e||(c({status:`ready`,cells:g,source:`blob`,language:h}),v&&x?(d(v.cells),p(v.language??o.language),y(x),_(null)):(d(null),y(null),_(null)))}catch(t){e||(c({status:`error`,cells:o.cells,language:o.language,source:`diff`,message:t instanceof Error?t.message:`Failed to load notebook preview.`}),d(null),y(null),_(t instanceof Error?t.message:`Failed to load preview`))}finally{e||h(!1)}})(),()=>{e=!0}},[n,t.oldPath,t.path,t.status,e.mergedChunks,b,x,r,o]),(0,F.useEffect)(()=>{if(i!==`full-preview`)return;if(!b||!x||!xb(b.ref)){d(null),y(null),_(null),h(!1);return}let e=!1;return(x!==v||!u)&&(async()=>{x!==v&&d(null),h(!0),_(null);try{let t=await Sb(b.path,b.ref);if(!t)throw Error(`Failed to load preview.`);let n=mb(t);if(!n)throw Error(`Notebook content could not be parsed.`);e||(d(n.cells),p(n.language??o.language),y(x))}catch(t){e||(d(null),y(null),_(t instanceof Error?t.message:`Failed to load preview`))}finally{e||h(!1)}})(),()=>{e=!0}},[o.language,u,v,i,b,x]);let S=(0,F.useMemo)(()=>x===v&&u!==null,[u,v,x]);return(0,F.useEffect)(()=>{i===`full-preview`&&!S&&a(`diff-preview`)},[S,i]),(0,I.jsxs)(`div`,{className:`bg-github-bg-primary`,children:[(0,I.jsx)(`div`,{className:`flex items-center justify-between border-b border-github-border px-4 py-2`,children:(0,I.jsx)(Uv,{mode:i,hasFullPreview:S,onModeChange:a})}),i===`diff`&&(0,I.jsx)(Dy,{...e}),i===`diff-preview`&&(0,I.jsxs)(`div`,{className:`p-4`,children:[s.status===`loading`&&(0,I.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:`Loading notebook preview…`}),s.message&&(0,I.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:s.message}),l.length===0?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:`No changed notebook cells were found. Showing raw diff instead.`}),(0,I.jsx)(Dy,{...e})]}):(0,I.jsx)(zb,{cells:l,syntaxTheme:e.syntaxTheme,language:s.language})]}),i===`full-preview`&&(0,I.jsxs)(`div`,{className:`p-4`,children:[m&&(0,I.jsx)(`div`,{className:`text-sm text-github-text-muted mb-3`,children:`Loading preview...`}),g&&(0,I.jsx)(`div`,{className:`text-sm text-github-danger mb-3`,children:g}),!m&&!g&&u&&(0,I.jsx)(Bb,{cells:u,syntaxTheme:e.syntaxTheme,language:f??o.language}),!m&&!g&&!u&&(0,I.jsx)(`div`,{className:`text-sm text-github-text-muted`,children:`Preview unavailable.`})]})]})}var Hb=[{id:`image`,match:e=>Zc(e.path),Component:il,canExpandHiddenLines:()=>!1},{id:`markdown`,match:e=>$c(e.path),Component:Qy,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`},{id:`notebook`,match:e=>tl(e.path),Component:Vb,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`},{id:`default`,match:()=>!0,Component:Dy,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`}],Ub=e=>{let t=Hb[Hb.length-1];if(!t)throw Error(`No diff viewers registered`);return Hb.find(t=>t.match(e))??t},Wb=e=>{switch(e){case`added`:return(0,I.jsx)(tt,{size:16,className:`text-github-accent`});case`deleted`:return(0,I.jsx)(nt,{size:16,className:`text-github-danger`});case`renamed`:return(0,I.jsx)(et,{size:16,className:`text-github-warning`});default:return(0,I.jsx)($e,{size:16,className:`text-github-text-secondary`})}},Gb=({file:e,isCollapsed:t,isReviewed:n,isChangedSinceViewed:r=!1,onToggleCollapsed:i,onToggleAllCollapsed:a,onToggleReviewed:o})=>{let[s,c]=(0,F.useState)(!1);return(0,I.jsxs)(`div`,{className:`bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0`,children:[(0,I.jsx)(`button`,{onClick:n=>{n.altKey?a(!t):i(e.path)},className:`text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer`,title:t?`Expand file (Alt+Click to expand all)`:`Collapse file (Alt+Click to collapse all)`,children:t?(0,I.jsx)(We,{size:16}):(0,I.jsx)(He,{size:16})}),Wb(e.status),(0,I.jsx)(`h2`,{className:`text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:e.path}),(0,I.jsx)(`button`,{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${s?`text-github-accent`:`text-github-text-secondary hover:text-github-text-primary`}`,onClick:()=>{nn(e.path).then(()=>{console.log(`File path copied to clipboard:`,e.path),c(!0),setTimeout(()=>c(!1),2e3)}).catch(e=>{console.error(`Failed to copy file path:`,e)})},title:`Copy file path`,children:s?(0,I.jsx)(Ve,{size:14}):(0,I.jsx)(Ye,{size:14})}),e.oldPath&&e.oldPath!==e.path&&(0,I.jsxs)(`span`,{className:`text-xs text-github-text-muted italic`,children:[`(renamed from `,e.oldPath,`)`]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[r&&!n&&(0,I.jsx)(`span`,{className:`inline-flex h-6 items-center rounded-full border border-github-warning px-2.5 text-xs font-medium text-github-warning`,title:`Updated since you last viewed this file`,"aria-label":`Updated since you last viewed this file`,children:`Updated`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,I.jsxs)(`span`,{className:`font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10`,children:[`+`,e.additions]}),(0,I.jsxs)(`span`,{className:`font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10`,children:[`-`,e.deletions]})]}),(0,I.jsxs)(`button`,{onClick:()=>o(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${n?`bg-github-accent text-white`:`dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted`}`,title:n?`Mark as not reviewed`:`Mark as reviewed`,children:[n?(0,I.jsx)(Ve,{size:14}):(0,I.jsx)(_t,{size:14}),`Viewed`]})]})]})},Kb=e=>{let t={old:[],new:[]};return e.forEach(e=>{let n=e.side??`new`,[r,i]=Array.isArray(e.line)?[e.line[0],e.line[1]]:[e.line,e.line];r<=0||i<=0||t[n].push({start:Math.min(r,i),end:Math.max(r,i)})}),t},qb=(e,t)=>e.chunks.map((e,n)=>{let r=t===`old`?e.oldStart:e.newStart,i=t===`old`?e.oldLines:e.newLines;return!r||i<=0?null:{start:r,end:r+i-1,index:n}}).filter(e=>!!e),Jb=e=>{let t=[],n=e[0];if(!n)return t;n.start>1&&t.push({type:`before`,start:1,end:n.start-1,nextChunkIndex:n.index});for(let n=1;n<e.length;n+=1){let r=e[n-1],i=e[n];!r||!i||i.start>r.end+1&&t.push({type:`between`,start:r.end+1,end:i.start-1,prevChunkIndex:r.index,nextChunkIndex:i.index})}let r=e[e.length-1];return r&&t.push({type:`after`,start:r.end+1,end:1/0,prevChunkIndex:r.index}),t},Yb=e=>{let t=new Map;return e.forEach(e=>{let n=e.originalIndices[0];n!==void 0&&t.set(n,e)}),t},Xb=e=>{let t=e[e.length-1];return t?.originalIndices[t.originalIndices.length-1]??null},Zb=(0,F.memo)(function({file:e,threads:t,showAuthorBadges:n=!1,diffMode:r,reviewedFiles:i,isChangedSinceViewed:a=!1,onToggleReviewed:o,collapsedFiles:s,onToggleCollapsed:c,onToggleAllCollapsed:l,onAddComment:u,onGenerateThreadPrompt:d,onRemoveThread:f,onReplyToThread:p,onRemoveMessage:m,onUpdateMessage:h,onOpenInEditor:g,syntaxTheme:_,baseCommitish:v,targetCommitish:y,cursor:b=null,fileIndex:x=0,onLineClick:S,commentTrigger:C,onCommentTriggerHandled:w,mergedChunks:T,expandLines:E,expandAllBetweenChunks:D,prefetchFileContent:O,isExpandLoading:k,diffVersion:A}){let j=s.has(e.path),M=(0,F.useRef)(null),[N,P]=(0,F.useState)(!1),ee=Ub(e),te=ee.canExpandHiddenLines?.(e)??!1,ne=ee.id===`default`&&Nr(e.path);(0,F.useEffect)(()=>{if(!te)return;let e=M.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&P(!0)},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[te]),(0,F.useEffect)(()=>{N&&!j&&te&&O(e)},[N,j,te,e,O]);let re=(0,F.useCallback)(async(t,n,r,i)=>{try{await u(e.path,t,n,r,i)}catch(e){console.error(`Failed to add comment:`,e)}},[e.path,u]);(0,F.useEffect)(()=>{if(j||k||!te||t.length===0||e.chunks.length===0||T.length===0)return;let n=Kb(t),r=Yb(T),i=Xb(T),a=T[T.length-1],o=new Set,s=(e,t)=>{o.has(e)||(o.add(e),t())};[`old`,`new`].forEach(t=>{let o=n[t];o.length!==0&&Jb(qb(e,t)).forEach(t=>{if(!o.some(e=>e.start<=t.end&&e.end>=t.start))return;if(t.type===`after`&&a&&i!==null){a.hiddenLinesAfter>0&&s(`after-${i}`,()=>{E(e,i,`down`,a.hiddenLinesAfter)});return}let n=t.nextChunkIndex;if(n===void 0)return;let c=r.get(n);!c||c.hiddenLinesBefore<=0||(t.type===`before`?s(`before-${n}`,()=>{E(e,n,`up`,c.hiddenLinesBefore)}):t.type===`between`&&s(`between-${n}`,()=>{D(e,n,c.hiddenLinesBefore)}))})})},[t,D,E,e,j,k,T,te]);let L=Yc({file:e,enabled:ne,baseCommitish:v,targetCommitish:y,reloadKey:A}),ie=ee.Component,R={file:e,threads:t,showAuthorBadges:n,diffMode:r,syntaxTheme:_,baseCommitish:v,targetCommitish:y,cursor:b,fileIndex:x,mergedChunks:T,isExpandLoading:k,expandHiddenLines:E,expandAllBetweenChunks:D,onAddComment:re,onGenerateThreadPrompt:d,onRemoveThread:f,onReplyToThread:p,onRemoveMessage:m,onUpdateMessage:h,onOpenInEditor:g,onLineClick:S,commentTrigger:C,onCommentTriggerHandled:w};return(0,I.jsxs)(`div`,{ref:M,className:`bg-github-bg-primary`,style:{"--line-number-width":`4em`},children:[(0,I.jsx)(Gb,{file:e,isCollapsed:j,isReviewed:i.has(e.path),isChangedSinceViewed:a,onToggleCollapsed:c,onToggleAllCollapsed:l,onToggleReviewed:o}),!j&&(0,I.jsx)(cn,{value:L,children:(0,I.jsx)(`div`,{className:`overflow-y-auto`,children:(0,I.jsx)(ie,{...R})})})]})});function Qb(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`safari`)&&!t.includes(`chrome`)&&!t.includes(`chromium`)&&!t.includes(`crios`)&&!t.includes(`fxios`)&&!t.includes(`edg/`)&&!t.includes(`android`)}var $b=16,ex=24;function tx(e){return`${e*ex+$b}px`}function nx(e){if(!e.isDirectory||!e.children)return[];let t=[];return e.path&&t.push(e.path),e.children.forEach(e=>{t.push(...nx(e))}),t}function rx(e,t){let n=new Set,r=e=>{if(e.file)return t.has(e.file.path);if(!e.isDirectory||!e.children||e.children.length===0)return!1;let i=e.children.map(e=>r(e)).every(Boolean);return i&&e.path&&n.add(e.path),i};return r(e),n}function ix(e){let t={name:``,path:``,isDirectory:!0,children:[]};e.forEach(e=>{let n=e.path.split(`/`),r=t;for(let t=0;t<n.length;t++){let i=n[t];if(!i)continue;let a=t===n.length-1,o=n.slice(0,t+1).join(`/`);r.children||=[];let s=r.children.find(e=>e.name===i);s||(s={name:i,path:o,isDirectory:!a,children:a?void 0:[],file:a?e:void 0},r.children.push(s)),r=s}});let n=e=>{if(!e.isDirectory||!e.children)return e;if(e.children=e.children.map(n),e.children.length===1&&e.children[0]?.isDirectory&&e.children[0]?.children){let t=e.children[0];if(t)return e.name?{...e,name:`${e.name}/${t.name}`,path:t.path,children:t.children}:e}return e};return n(t)}var ax=(0,F.memo)(function({files:e,onScrollToFile:t,onFileSelected:n,comments:r,reviewedFiles:i,onToggleReviewed:a,selectedFileIndex:o}){let s=(0,F.useMemo)(()=>ix(e),[e]),c=(0,F.useMemo)(()=>!Qb(typeof navigator>`u`?``:navigator.userAgent),[]),l=(0,F.useRef)(null),u=(0,F.useRef)(new Map),d={"--dir-row-height":`calc(var(--spacing, 0.25rem) * 9)`},[f,p]=(0,F.useState)(()=>new Set(nx(s))),[m,h]=(0,F.useState)(``),g=(0,F.useMemo)(()=>{let e=new Map;return r.forEach(t=>{e.set(t.file,(e.get(t.file)??0)+1)}),e},[r]),_=(0,F.useMemo)(()=>{let t=new Map;return e.forEach((e,n)=>{t.set(e.path,n)}),t},[e]),v=(0,F.useMemo)(()=>e.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}),[e]),y=(0,F.useMemo)(()=>rx(s,i),[s,i]),b=(0,F.useMemo)(()=>{let e=m.trim().toLowerCase(),t=n=>{if(!e)return n;if(n.isDirectory&&n.children){let e=n.children.map(e=>t(e)).filter(e=>e!==null);return e.length>0?{...n,children:e}:null}else if(n.file)return n.file.path.toLowerCase().includes(e)?n:null;return null};return t(s)||{...s,children:[]}},[s,m]),x=e=>{switch(e){case`added`:return(0,I.jsx)(tt,{size:16,className:`text-github-accent`});case`deleted`:return(0,I.jsx)(nt,{size:16,className:`text-github-danger`});case`renamed`:return(0,I.jsx)(et,{size:16,className:`text-github-warning`});default:return(0,I.jsx)($e,{size:16,className:`text-github-text-secondary`})}},S=e=>{p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},C=(0,F.useMemo)(()=>nx(s),[s]),w=f.size===C.length&&C.length>0,T=()=>{p(w?new Set:new Set(C))},E=(e,t)=>{if(!c){S(t);return}let n=l.current,r=e.currentTarget;if(!n){S(t);return}let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=Number.parseFloat(getComputedStyle(r).top||`0`);if(a.top-i.top<=o+1){let e=u.current.get(t)?.querySelector(`[data-tree-row="true"]:not([data-dir-header="true"])`),i=r.getBoundingClientRect().height||0,a=e??r,o=i*Number.parseInt(a.dataset.depth||r.dataset.depth||`0`,10),s=Math.max(0,a.offsetTop-o);if(Math.abs(n.scrollTop-s)<=1){S(t);return}n.scrollTo({top:s});return}S(t)},D=(e,r=0)=>{if(e.isDirectory&&e.children){let t=f.has(e.path),n=y.has(e.path);return(0,I.jsxs)(`div`,{"data-dir-container":e.path||void 0,ref:t=>{e.path&&(t?u.current.set(e.path,t):u.current.delete(e.path))},children:[e.name&&(0,I.jsxs)(`div`,{className:`${c?`sticky `:``}flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer ${n?`opacity-70`:``}`,"data-dir-header":`true`,"data-tree-row":`true`,"data-depth":r,style:{paddingLeft:tx(r),top:c?`calc(${r} * var(--dir-row-height))`:void 0,zIndex:c?1e3-r:void 0},onClick:t=>E(t,e.path),children:[t?(0,I.jsx)(He,{size:16}):(0,I.jsx)(We,{size:16}),t?(0,I.jsx)(rt,{size:16,className:`text-github-text-secondary`}):(0,I.jsx)(it,{size:16,className:`text-github-text-secondary`}),(0,I.jsx)(`span`,{className:`text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${n?`line-through text-github-text-muted`:``}`,title:e.name,children:e.name})]}),(t||!e.name)&&e.children.map(t=>D(t,e.name?r+1:r))]},e.path)}else if(e.file){let s=e.file,c=g.get(s.path)??0,l=i.has(s.path),u=_.get(s.path)??-1;return(0,I.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${l?`opacity-70`:``} ${o!==null&&o===u?`bg-github-bg-tertiary`:``}`,"data-file-row":`true`,"data-tree-row":`true`,"data-depth":r,style:{paddingLeft:tx(r)},onClick:()=>{t(s.path),n?.()},children:[(0,I.jsx)($t,{checked:l,onChange:()=>{a(s.path)},title:l?`Mark as not reviewed`:`Mark as reviewed`,className:`z-10`}),x(e.file.status),(0,I.jsx)(`span`,{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${l?`line-through text-github-text-muted`:``}`,title:e.file.path,children:e.name}),c>0&&(0,I.jsxs)(`span`,{className:`text-github-warning text-sm font-medium ml-auto flex items-center gap-1`,children:[(0,I.jsx)(ut,{size:14}),c]})]},s.path)}return null};return(0,I.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,I.jsxs)(`div`,{className:`px-4 py-3 border-b border-github-border bg-github-bg-tertiary`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,I.jsxs)(`h3`,{className:`text-sm font-semibold text-github-text-primary m-0`,children:[`Files changed (`,e.length,`)`]}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,I.jsxs)(`span`,{className:`inline-flex gap-1 text-right text-xs font-medium whitespace-nowrap`,title:`Total additions and deletions`,"aria-label":`${v.additions} additions and ${v.deletions} deletions`,children:[(0,I.jsxs)(`span`,{className:`text-github-accent`,children:[`+`,v.additions]}),(0,I.jsxs)(`span`,{className:`text-github-danger`,children:[`-`,v.deletions]})]}),(0,I.jsx)(`button`,{onClick:T,className:`p-1 hover:bg-github-bg-primary rounded transition-colors`,title:w?`Collapse all`:`Expand all`,children:w?(0,I.jsx)(Ge,{size:16,className:`text-github-text-secondary`}):(0,I.jsx)(Ke,{size:16,className:`text-github-text-secondary`})})]})]}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(ht,{size:16,className:`absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted`}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Filter files...`,value:m,onChange:e=>h(e.target.value),className:`w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted`})]})]}),(0,I.jsx)(`div`,{className:`flex-1 overflow-y-auto relative z-0`,style:d,ref:l,children:b.children?.map(e=>D(e))})]})});function ox({style:e}){return(0,I.jsx)(`svg`,{width:`98`,height:`96`,viewBox:`0, 0, 98, 96`,style:e,xmlns:`http://www.w3.org/2000/svg`,"aria-label":`GitHub`,role:`img`,children:(0,I.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z`,fill:`currentColor`})})}function sx({isOpen:e,onClose:t}){let{enableScope:n,disableScope:r}=we();return z(`escape`,()=>t(),{enabled:e},[t,e]),(0,F.useEffect)(()=>(e?r(`navigation`):n(`navigation`),()=>{n(`navigation`)}),[e,n,r]),e?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,I.jsxs)(`div`,{className:`relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto`,children:[(0,I.jsxs)(`div`,{className:`sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between`,children:[(0,I.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`Keyboard Shortcuts`}),(0,I.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary transition-colors`,"aria-label":`Close help modal`,children:(0,I.jsx)(xt,{size:20})})]}),(0,I.jsxs)(`div`,{className:`px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Line Navigation`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`j`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`↓`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next line`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`k`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`↑`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous line`})]})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`File Navigation`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`]`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next file`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`[`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous file`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`[`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Jump to first file`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`]`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Jump to last file`})]})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Chunk Navigation`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`n`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next change chunk (added/deleted lines)`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`p`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous change chunk (added/deleted lines)`})]})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Comment Navigation`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`N`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next comment`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`P`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous comment`})]})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Side Navigation (Side-by-side mode)`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`h`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`←`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Focus left side`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`l`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`→`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Focus right side`})]})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Comment Management`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`L`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`View all comments list`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`C`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Copy all comments prompt`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`D`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Delete all comments`})]})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Actions`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`v`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Toggle viewed state of current file`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`R`})]}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Refresh diff when changes detected`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`c`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Add comment at current line`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`.`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Move cursor to center of viewport`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,I.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`?`}),(0,I.jsx)(`span`,{className:`text-github-text-secondary`,children:`Show/hide this help`})]})]})]}),(0,I.jsx)(`div`,{className:`pt-4 border-t border-github-border lg:col-span-2`,children:(0,I.jsx)(`p`,{className:`text-xs text-github-text-secondary`,children:`Shortcuts are disabled when typing in input fields.`})})]})]})]}):null}function cx({style:e}){return(0,I.jsxs)(`svg`,{style:e,viewBox:`0 0 720 190`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-label":`difit`,role:`img`,children:[(0,I.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z`,fill:`currentColor`}),(0,I.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z`,fill:`currentColor`})]})}function lx({shouldReload:e,isReloading:t,onReload:n,changeType:r,className:i=``,compact:a=!1}){return e?(0,I.jsxs)(`button`,{onClick:n,disabled:t,className:`
|
|
64
|
+
flex items-center gap-1.5 text-xs rounded-md border ${i} ${a?`px-2 py-2`:`px-3 py-1.5`}
|
|
65
|
+
${t?`bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed`:`bg-github-text-primary text-github-bg-primary border-github-text-primary`}
|
|
66
|
+
`,title:`${(()=>{switch(r){case`commit`:return`New commits available`;case`staging`:return`Staging changes detected`;case`file`:return`File changes detected`;default:return`Changes detected`}})()} - Click to refresh`,"aria-label":a?`Refresh`:void 0,children:[(0,I.jsx)(mt,{size:12,className:`${t?`animate-spin`:``}`}),a?(0,I.jsx)(`span`,{className:`sr-only`,children:`Refresh`}):`Refresh`]}):null}var ux=new Set([`merge-base`]);function dx({label:e,value:t,resolvedValue:n,onChange:r,options:i,disabledValues:a=[]}){let[o,s]=(0,F.useState)(!1),{refs:c,floatingStyles:l,context:u}=xc({open:o,onOpenChange:s,middleware:[is(4),os(),as({padding:8})],whileElementsMounted:qo}),{getReferenceProps:d,getFloatingProps:f}=Tc([Ms(u,{handleClose:Ic()}),hc(u),Cc(u),yc(u),Dc(u)]),p=t===`working`&&a.includes(`staged`)||t===`staged`&&a.includes(`working`),m=i.specialOptions.filter(e=>!ux.has(e.value)),h=()=>{let e=m.find(e=>e.value===t);if(e)return e.label;let n=i.branches.find(e=>e.name===t);if(n)return`${n.name}${n.current?` (current)`:``}`;let r=i.commits.find(e=>e.shortHash===t||e.hash===t);return r?`${r.shortHash} - ${r.message}`:t||`Select...`},g=e=>{r(e),s(!1)},_=e=>a.includes(e),v=(e,t)=>[`w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors`,e?`hover:bg-diff-selected-bg focus:bg-diff-selected-bg`:`hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary`,e?`bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2`:``,t?`opacity-50 cursor-not-allowed`:`cursor-pointer`].join(` `),y=(e,r)=>e===t||r===t?!0:n?e===n||r===n:!1,b=()=>{let e=0,n=m.findIndex(e=>e.value===t);if(n!==-1)return n;if(e+=m.length,!p){let n=i.commits.findIndex(e=>e.shortHash===t);if(n!==-1)return e+n;e+=i.commits.length;let r=i.branches.findIndex(e=>e.name===t);if(r!==-1)return e+r}return 0};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{ref:c.setReference,type:`button`,className:`flex items-center gap-1.5 cursor-pointer group`,"aria-haspopup":`listbox`,"aria-expanded":o,...d(),children:[(0,I.jsxs)(`span`,{className:`text-xs text-github-text-secondary`,children:[e,`:`]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors`,children:[(0,I.jsx)(`code`,{className:`text-xs text-github-text-primary max-w-[150px] truncate`,children:h()}),(0,I.jsx)(He,{size:12,className:`text-github-text-secondary group-hover:text-github-text-primary transition-colors`})]})]}),o&&(0,I.jsx)(ec,{children:(0,I.jsx)(dc,{context:u,modal:!1,initialFocus:b(),children:(0,I.jsxs)(`div`,{ref:c.setFloating,style:l,className:`bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto`,...f(),children:[m.length>0&&(0,I.jsxs)(`div`,{className:`border-b border-github-border`,children:[(0,I.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Special`}),m.map(e=>(0,I.jsx)(`button`,{onClick:()=>g(e.value),disabled:_(e.value),className:v(e.value===t,_(e.value)),children:e.label},e.value))]}),!p&&i.commits.length>0&&(0,I.jsxs)(`div`,{className:`border-b border-github-border`,children:[(0,I.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Recent Commits`}),i.commits.map(e=>(0,I.jsx)(`button`,{onClick:()=>g(e.shortHash),disabled:_(e.shortHash),className:v(y(e.shortHash,e.hash),_(e.shortHash)),children:(0,I.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,I.jsx)(`code`,{className:`text-xs text-github-text-primary font-mono whitespace-nowrap`,children:e.shortHash}),(0,I.jsx)(`span`,{className:`text-xs text-github-text-secondary flex-1 break-words`,children:e.message})]})},e.hash))]}),!p&&i.branches.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Branches`}),i.branches.map(e=>(0,I.jsx)(`button`,{onClick:()=>g(e.name),disabled:_(e.name),className:v(e.name===t,_(e.name)),children:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-github-text-primary`,children:e.name}),e.current&&(0,I.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`(current)`})]})},e.name))]})]})})})]})}function fx({isOpen:e,onClose:t,options:n,selection:r,resolvedBaseRevision:i,resolvedTargetRevision:a,onApply:o}){let[s,c]=(0,F.useState)(r),{enableScope:l,disableScope:u}=we(),d=s.baseCommitish,f=s.targetCommitish;(0,F.useEffect)(()=>{c(r)},[r]),(0,F.useEffect)(()=>(e?u(`navigation`):l(`navigation`),()=>{l(`navigation`)}),[e,l,u]);let p=(0,F.useMemo)(()=>{let e=a||f,t=n.commits.findIndex(t=>t.shortHash===e||t.hash===e);if(t===-1)return f?[f]:[];let r=n.commits.slice(0,t+1).map(e=>e.shortHash);return f&&!r.includes(f)&&r.push(f),r.includes(`working`)||r.push(`working`),r},[f,a,n.commits]),m=(0,F.useMemo)(()=>{let e=i||d,t=n.commits.findIndex(t=>t.shortHash===e||t.hash===e);if(t===-1)return d?[d]:[];let r=n.commits.slice(t).map(e=>e.shortHash);return d&&!r.includes(d)&&r.push(d),r},[d,i,n.commits]);return e?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:t}),(0,I.jsxs)(`div`,{className:`relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b border-github-border`,children:[(0,I.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`Detailed Diff`}),(0,I.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary p-1`,"aria-label":`Close detailed diff`,children:(0,I.jsx)(xt,{size:18})})]}),(0,I.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-center gap-3`,children:[(0,I.jsx)(dx,{label:`Base`,value:d,resolvedValue:i,onChange:e=>c(Xt(e,s.targetCommitish)),options:n,disabledValues:p}),(0,I.jsx)(`span`,{className:`text-github-text-muted`,children:`...`}),(0,I.jsx)(dx,{label:`Target`,value:f,resolvedValue:a,onChange:e=>c(Xt(s.baseCommitish,e)),options:n,disabledValues:m})]}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,I.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors`,type:`button`,children:`Cancel`}),(0,I.jsx)(`button`,{onClick:()=>{o(Xt(s.baseCommitish,s.targetCommitish)),t()},className:`px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors`,type:`button`,children:`Apply`})]})]})]})]}):null}var px=[{id:`vscode`,label:`VS Code`,command:`code`,argsTemplate:`-g %file:%line`},{id:`cursor`,label:`Cursor`,command:`cursor`,argsTemplate:`-g %file:%line`},{id:`zed`,label:`Zed`,command:`zed`,argsTemplate:`%file:%line`},{id:`textmate`,label:`TextMate`,command:`mate`,argsTemplate:`-l %line %file`},{id:`bbedit`,label:`BBEdit`,command:`bbedit`,argsTemplate:`+%line %file`},{id:`emacs`,label:`Emacs`,command:`emacsclient`,argsTemplate:`--no-wait +%line %file`},{id:`macvim`,label:`MacVim`,command:`mvim`,argsTemplate:`--remote-silent +%line %file`},{id:`sublime`,label:`Sublime Text`,command:`subl`,argsTemplate:`%file:%line`},{id:`nova`,label:`Nova`,command:`nova`,argsTemplate:`open %file -l %line`},{id:`custom`,label:`Custom…`,command:``,argsTemplate:``},{id:`none`,label:`Hide “Open in editor” button`,command:``,argsTemplate:``}],mx=px.find(e=>e.id===`vscode`)??px[0],hx=e=>{let t=(e??`vscode`).toLowerCase();return px.find(e=>e.id===t)??mx};function gx(e){return e.replaceAll(`\\`,`/`).replace(/^\.\/+/,``)}function _x(e){return e.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`)}function vx(e){let t=new Set;return e.forEach(e=>{let n=e.trim();n&&t.add(gx(n))}),[...t]}function yx(e){return gx(e).split(`/`).filter(e=>e.length>0)}function bx(e,t){let n=`^`;for(let e of t){if(e===`*`){n+=`.*`;continue}if(e===`?`){n+=`.`;continue}n+=_x(e)}return n+=`$`,new RegExp(n).test(e)}function xx(e,t,n=0,r=0){if(r>=t.length)return n>=e.length;let i=t[r];if(!i)return n>=e.length;if(i===`**`){let i=r+1;if(i>=t.length)return!0;for(let r=n;r<=e.length;r+=1)if(xx(e,t,r,i))return!0;return!1}let a=e[n];return!a||!bx(a,i)?!1:xx(e,t,n+1,r+1)}function Sx(e){return Array.isArray(e)?vx(e.filter(e=>typeof e==`string`)):[]}function Cx(e){return vx(e.split(/\r?\n/))}function wx(e){return Sx(e).join(`
|
|
67
|
+
`)}function Tx(e,t){let n=gx(t.trim());if(!n)return!1;let r=gx(e);return n.includes(`/`)?xx(yx(r),yx(n)):bx(r.split(`/`).pop()??r,n)}function Ex(e,t){return Sx(t).some(t=>Tx(e,t))}var Dx=[{id:`github`,label:`GitHub Light`},{id:`vsLight`,label:`VS Light`},{id:`oneLight`,label:`One Light`},{id:`gruvboxMaterialLight`,label:`Gruvbox Material Light`},{id:`nightOwlLight`,label:`Night Owl Light`}],Ox=[{id:`vsDark`,label:`VS Dark`},{id:`oneDark`,label:`One Dark`},{id:`gruvboxMaterialDark`,label:`Gruvbox Material Dark`},{id:`nightOwl`,label:`Night Owl`},{id:`dracula`,label:`Dracula`},{id:`okaidia`,label:`Okaidia`}],kx=e=>e===`light`?Dx:Ox,Ax=(e,t)=>kx(t).some(t=>t.id===e),jx=e=>kx(e)[0],Mx=e=>e===`top`?`translateY(4px)`:e===`bottom`?`translateY(-4px)`:e===`left`?`translateX(4px)`:`translateX(-4px)`,Nx=(e,t)=>{if(typeof e==`function`){e(t);return}e&&`current`in e&&(e.current=t)};function Px({content:e,children:t,placement:n=`top`,className:r=``}){let[i,a]=(0,F.useState)(!1),o=(0,F.useId)(),{refs:s,floatingStyles:c,context:l}=xc({open:i,onOpenChange:a,placement:n,middleware:[is(8),os(),as({padding:8})],whileElementsMounted:qo}),u=Ms(l,{move:!1}),d=Cc(l),f=yc(l),p=Dc(l,{role:`tooltip`}),{isMounted:m,styles:h}=Mc(l,{duration:{open:180,close:120},initial:({side:e})=>({opacity:0,transform:Mx(e)}),open:{opacity:1,transform:`translate(0, 0)`},close:({side:e})=>({opacity:0,transform:Mx(e)}),common:{willChange:`opacity, transform`}}),{getReferenceProps:g,getFloatingProps:_}=Tc([u,d,f,p]),v=t.props,y=g({...v,"aria-describedby":i?o:void 0}),b=[`w-64 rounded-md border border-github-border bg-github-bg-primary px-3 py-2 text-xs text-github-text-primary`,r].filter(Boolean).join(` `);return(0,I.jsxs)(I.Fragment,{children:[(0,F.cloneElement)(t,{...y,ref:e=>{Nx(v.ref,e),s.setReference(e)}}),m?(0,I.jsx)(ec,{children:(0,I.jsx)(`div`,{ref:s.setFloating,..._(),id:o,style:c,className:`z-[60]`,children:(0,I.jsx)(`div`,{style:h,className:b,children:e})})}):null]})}var Fx={fontSize:14,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,theme:`dark`,syntaxTheme:`vsDark`,editor:{id:mx.id,command:mx.command,argsTemplate:mx.argsTemplate},colorVision:`normal`,autoViewedPatterns:[]},Ix=[{name:`System Font`,value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`},{name:`Menlo`,value:`Menlo, Monaco, "Courier New", monospace`},{name:`SF Mono`,value:`SF Mono, Consolas, "Liberation Mono", monospace`},{name:`Fira Code`,value:`"Fira Code", "Courier New", monospace`},{name:`JetBrains Mono`,value:`"JetBrains Mono", "Courier New", monospace`}],Lx=[{id:`normal`,label:`Normal`},{id:`deuteranopia`,label:`Deuteranopia`,tooltip:`Deuteranopia mode uses blue/orange instead of green/red for diffs.`}],Rx=[{id:`appearance`,label:`Appearance`},{id:`system`,label:`System`}];function zx({isOpen:e,onClose:t,settings:n,onSettingsChange:r}){let[i,a]=(0,F.useState)(wx(n.autoViewedPatterns)),[o,s]=(0,F.useState)(`appearance`),{enableScope:c,disableScope:l}=we();(0,F.useEffect)(()=>(e?l(`navigation`):c(`navigation`),()=>{c(`navigation`)}),[e,c,l]);let u=()=>n.theme===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:n.theme,d=()=>kx(u()),f=e=>{let t={...n,theme:e},i=e===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e;if(!Ax(n.syntaxTheme,i)){let e=jx(i);e&&(t.syntaxTheme=e.id)}r(t)};return e?(0,I.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center z-50 pointer-events-none`,children:(0,I.jsxs)(`div`,{className:`bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-3xl mx-4 pointer-events-auto overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b border-github-border`,children:[(0,I.jsxs)(`h2`,{className:`text-lg font-semibold text-github-text-primary flex items-center gap-2`,children:[(0,I.jsx)(gt,{size:20}),`Settings`]}),(0,I.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary p-1`,children:(0,I.jsx)(xt,{size:18})})]}),(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row min-h-[420px]`,children:[(0,I.jsx)(`nav`,{"aria-label":`Settings sections`,className:`sm:w-40 border-b sm:border-b-0 sm:border-r border-github-border px-3 py-2`,children:(0,I.jsx)(`div`,{className:`flex sm:flex-col gap-1`,children:Rx.map(e=>{let t=e.id===o;return(0,I.jsx)(`button`,{type:`button`,onClick:()=>s(e.id),"aria-pressed":t,className:`flex-1 sm:flex-none text-left px-3 py-2 text-sm font-medium transition-colors border-b-2 sm:border-b-0 sm:border-l-2 ${t?`text-github-text-primary border-github-accent`:`text-github-text-secondary border-transparent hover:text-github-text-primary`}`,children:e.label},e.id)})})}),(0,I.jsxs)(`div`,{className:`flex-1 p-4 sm:p-6 overflow-y-auto`,children:[o===`appearance`&&(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Font Size`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`input`,{type:`range`,min:`10`,max:`20`,step:`1`,value:n.fontSize,onChange:e=>r({...n,fontSize:Number.parseInt(e.target.value,10)}),className:`flex-1 accent-github-accent`}),(0,I.jsxs)(`span`,{className:`text-sm text-github-text-secondary w-8 text-right`,children:[n.fontSize,`px`]})]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Font Family`}),(0,I.jsx)(`select`,{value:n.fontFamily,onChange:e=>r({...n,fontFamily:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:Ix.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.name},e.value))})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Theme`}),(0,I.jsx)(`div`,{className:`flex gap-2`,children:[`light`,`dark`,`auto`].map(e=>(0,I.jsx)(`button`,{type:`button`,onClick:()=>f(e),className:`px-3 py-2 text-sm rounded border transition-colors ${n.theme===e?`bg-github-accent text-white border-github-accent`:`bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary`}`,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Color Vision`}),(0,I.jsx)(`div`,{className:`flex gap-2`,children:Lx.map(e=>{let t=(0,I.jsx)(`button`,{type:`button`,onClick:()=>r({...n,colorVision:e.id}),className:`px-3 py-2 text-sm rounded border transition-colors ${(n.colorVision??`normal`)===e.id?`bg-github-accent text-white border-github-accent`:`bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary`}`,children:e.label},e.id);return`tooltip`in e?(0,I.jsx)(Px,{content:e.tooltip,children:t},e.id):t})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Syntax Highlighting Theme`}),(0,I.jsx)(`select`,{value:n.syntaxTheme,onChange:e=>r({...n,syntaxTheme:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:d().map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.label},e.id))})]})]}),o===`system`&&(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{htmlFor:`auto-viewed-patterns`,className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Auto-Mark Viewed Patterns`}),(0,I.jsx)(`p`,{className:`text-sm text-github-text-secondary mb-2`,children:`Files matching these glob patterns are marked as Viewed automatically. Enter one pattern per line.`}),(0,I.jsx)(`textarea`,{id:`auto-viewed-patterns`,value:i,onChange:e=>{a(e.target.value),r({...n,autoViewedPatterns:Cx(e.target.value)})},rows:6,spellCheck:!1,placeholder:`*.test.ts
|
|
68
|
+
*.stories.tsx
|
|
69
|
+
src/generated/**`,className:`w-full p-3 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm font-mono`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Open In Editor`}),(0,I.jsx)(`select`,{value:n.editor.id,onChange:e=>{let t=e.target.value,i=px.find(e=>e.id===t);r({...n,editor:{id:t,command:i?.command??``,argsTemplate:i?.argsTemplate??``}})},className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:px.map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.label},e.id))}),n.editor.id!==`none`&&(()=>{let e=n.editor.id===`custom`,t=e&&n.editor.command.trim()===``,i=e&&n.editor.argsTemplate.trim()===``,a=e?``:` opacity-60 cursor-not-allowed`;return(0,I.jsxs)(`div`,{"aria-label":`Editor command configuration`,className:`mt-3 p-3 bg-github-bg-tertiary border border-github-border rounded space-y-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{htmlFor:`editor-command`,className:`block text-sm font-medium text-github-text-primary mb-1`,children:`Command`}),(0,I.jsx)(`input`,{id:`editor-command`,type:`text`,value:n.editor.command,disabled:!e,required:e,"aria-invalid":t||void 0,onChange:e=>r({...n,editor:{...n.editor,command:e.target.value}}),placeholder:`e.g. mate`,spellCheck:!1,autoComplete:`off`,className:`w-full p-2 bg-github-bg-secondary border rounded text-github-text-primary text-sm font-mono${t?` border-red-500`:` border-github-border`}${a}`}),t&&(0,I.jsx)(`p`,{className:`mt-1 text-xs text-red-400`,children:`Command is required.`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{htmlFor:`editor-args`,className:`block text-sm font-medium text-github-text-primary mb-1`,children:`Arguments`}),(0,I.jsx)(`input`,{id:`editor-args`,type:`text`,value:n.editor.argsTemplate,disabled:!e,required:e,"aria-invalid":i||void 0,onChange:e=>r({...n,editor:{...n.editor,argsTemplate:e.target.value}}),placeholder:`-l %line %file`,spellCheck:!1,autoComplete:`off`,className:`w-full p-2 bg-github-bg-secondary border rounded text-github-text-primary text-sm font-mono${i?` border-red-500`:` border-github-border`}${a}`}),i&&(0,I.jsx)(`p`,{className:`mt-1 text-xs text-red-400`,children:`Arguments are required.`}),(0,I.jsx)(`p`,{className:`mt-2 text-xs text-github-text-secondary`,children:e?`Use %file and %line as placeholders. Wrap arguments containing spaces in single or double quotes. Arguments are passed directly to the command without a shell.`:`Select Custom… above to edit these fields.`})]})]})})()]})]})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-t border-github-border`,children:[(0,I.jsx)(`button`,{onClick:()=>{if(o===`appearance`){r({...n,fontSize:Fx.fontSize,fontFamily:Fx.fontFamily,theme:Fx.theme,syntaxTheme:Fx.syntaxTheme,colorVision:Fx.colorVision});return}r({...n,editor:{...Fx.editor},autoViewedPatterns:Fx.autoViewedPatterns}),a(wx(Fx.autoViewedPatterns))},className:`px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary`,children:o===`appearance`?`Reset Appearance Defaults`:`Reset System Defaults`}),(0,I.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600`,children:`Close`})]})]})}):null}var Bx={position:`absolute`,fontSize:`16px`,pointerEvents:`none`,zIndex:100,transform:`translateY(20px) scale(0.5)`,opacity:0},Vx=({isActive:e})=>e?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`animate-sparkle-rise`,style:{...Bx,left:`-12px`,animationDelay:`0s`},children:`✨`}),(0,I.jsx)(`div`,{className:`animate-sparkle-rise`,style:{...Bx,right:`-12px`,animationDelay:`0.3s`},children:`✨`})]}):null,Hx={fontSize:14,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,theme:`dark`,syntaxTheme:`vsDark`,editor:{id:mx.id,command:mx.command,argsTemplate:mx.argsTemplate},colorVision:`normal`,autoViewedPatterns:[]},Ux=e=>{if(typeof e==`string`){let t=hx(e);return{id:t.id,command:t.command,argsTemplate:t.argsTemplate}}if(e&&typeof e==`object`){let t=e,n=hx(typeof t.id==`string`?t.id:void 0);return{id:n.id,command:typeof t.command==`string`?t.command:n.command,argsTemplate:typeof t.argsTemplate==`string`?t.argsTemplate:n.argsTemplate}}return Hx.editor};function Wx(){let[e,t]=(0,F.useState)(()=>{try{let e=localStorage.getItem(f);if(e){let t=JSON.parse(e);return{...Hx,...t,editor:Ux(t.editor),autoViewedPatterns:Sx(t.autoViewedPatterns)}}}catch(e){console.warn(`Failed to load appearance settings from localStorage:`,e)}return Hx}),n=(0,F.useCallback)((e,t=`normal`)=>{C(e,t)},[]),r=(0,F.useCallback)(e=>{try{localStorage.setItem(f,JSON.stringify(e))}catch(e){console.warn(`Failed to save appearance settings to localStorage:`,e)}},[]),i=(0,F.useCallback)((e,t)=>{if(Ax(e.syntaxTheme,t))return e;let n=jx(t);return n?{...e,syntaxTheme:n.id}:e},[]);(0,F.useEffect)(()=>{let a=document.documentElement;a.style.setProperty(`--app-font-size`,`${e.fontSize}px`),a.style.setProperty(`--app-font-family`,e.fontFamily);let o=e.colorVision??`normal`,s=a=>{n(a,o);let s=i(e,a);s!==e&&(t(s),r(s))};if(e.theme===`auto`){let e=window.matchMedia(`(prefers-color-scheme: dark)`);s(b(`auto`,e.matches?`dark`:`light`));let t=e=>{s(b(`auto`,e.matches?`dark`:`light`))};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}else{s(e.theme);return}},[e,n,i,r]);let a=(0,F.useCallback)(e=>{t(e),r(e)},[r]);return(0,F.useMemo)(()=>({settings:e,updateSettings:a}),[e,a])}function Gx(e){return typeof e==`number`?`L${e}`:`L${e[0]}-L${e[1]}`}function Kx(e,t){if(rn(e)){let n=an(e);if(n.length>0){let r=``,i=0;for(let a of n){let n=e.slice(i,a.startIndex).trim();n&&(r+=`${r?`
|
|
70
|
+
`:``}${n}`),t&&(r+=`${r?`
|
|
71
|
+
`:``}ORIGINAL:\n\`\`\`\n${t}\n\`\`\``),r+=`${r?`
|
|
72
|
+
`:``}SUGGESTED:\n\`\`\`\n${a.suggestedCode}\n\`\`\``,i=a.endIndex}let a=e.slice(i).trim();return a&&(r+=`${r?`
|
|
73
|
+
`:``}${a}`),r}}return e}function qx(e){let t=[`${e.file||`<unknown file>`}:${Gx(e.line)}`];return e.messages.forEach((n,r)=>{if(r===0){t.push(Kx(n.body,e.codeContent));return}let i=r,a=n.author?.trim()||`Unknown`;t.push(`Reply ${i} (${a})`),t.push(Kx(n.body,e.codeContent))}),t.filter(Boolean).join(`
|
|
74
|
+
`)}function Jx(e){return e.length===0?``:e.map(e=>qx(e)).join(`
|
|
75
|
+
=====
|
|
76
|
+
`)}var Yx=`difit-storage-v1`,Xx=`difit-viewed-index-v1`,Zx=`__default__`,Qx=5e3;function $x(e,t){return`${e} ${t}`}function eS(e){return{id:e.id,filePath:e.filePath,createdAt:e.createdAt,updatedAt:e.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id,body:e.body,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt}]}}function tS(e){let t=e.messages[0];return t?{id:e.id,filePath:e.filePath,body:t.body,author:t.author,createdAt:t.createdAt,updatedAt:t.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}var nS=new class{generateStorageKey(e,t,n){let r=e=>e.replace(/[^a-zA-Z0-9-_]/g,e=>`_${e.charCodeAt(0).toString(16)}_`),i=`${r(e)}-${r(t)}`;return Yt(n)===`merge-base`?`${i}-merge-base`:i}getFullStorageKey(e,t){return e?`${Yx}/${e}/${t}`:`${Yx}/${t}`}normalizeCommitish(e,t,n){if(e===`.`||e===`working`)return`WORKING`;if(e===`staged`)return`STAGED`;if((e===`HEAD`||e===`@`)&&t)return t;if(n?.has(e)){let t=n.get(e);if(t)return t}return(e.startsWith(`@`)||e.includes(`^`)||e.includes(`~`)||e.includes(`HEAD`))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${e}' - may cause key collision. currentCommitHash=${t}`),e}getStorageKey(e,t,n,r,i,a){let o=this.normalizeStorageBase(e,t,n,r),s=this.normalizeStorageTarget(e,t,n,r),c=this.generateStorageKey(o,s,a);return this.getFullStorageKey(i,c)}getDiffContextData(e,t,n,r,i,a){try{let o=this.getStorageKey(e,t,n,r,i,a),s=localStorage.getItem(o);if(!s)return null;let c=JSON.parse(s);return c.version===2&&`threads`in c?c:c.version===1&&`comments`in c?{version:2,baseCommitish:c.baseCommitish,targetCommitish:c.targetCommitish,createdAt:c.createdAt,lastModifiedAt:c.lastModifiedAt,threads:c.comments.map(eS),viewedFiles:c.viewedFiles,appliedCommentImportIds:[]}:(console.warn(`Unknown storage version: ${String(c.version)}`),null)}catch(e){return console.error(`Error reading diff context data:`,e),null}}normalizeStorageBase(e,t,n,r){return t===`.`||t===`working`||t===`staged`?n||e:this.normalizeCommitish(e,n,r)}normalizeStorageTarget(e,t,n,r){return t===`.`||t===`working`?`WORKING`:t===`staged`?`STAGED`:this.normalizeCommitish(t,n,r)}saveDiffContextData(e,t,n,r,i,a,o){try{let s=this.getStorageKey(e,t,r,i,a,o),c={...n,version:2,baseCommitish:e,targetCommitish:t,baseMode:o,lastModifiedAt:new Date().toISOString(),appliedCommentImportIds:n.appliedCommentImportIds||[]};localStorage.setItem(s,JSON.stringify(c))}catch(e){e instanceof DOMException&&e.name===`QuotaExceededError`?console.error(`localStorage quota exceeded`):console.error(`Error saving diff context data:`,e)}}getCommentThreads(e,t,n,r,i,a){return this.getDiffContextData(e,t,n,r,i,a)?.threads||[]}getComments(e,t,n,r,i,a){return this.getCommentThreads(e,t,n,r,i,a).map(e=>tS(e)).filter(e=>e!==null)}saveCommentThreads(e,t,n,r,i,a,o){let s=this.getDiffContextData(e,t,r,i,a,o)||{version:2,baseCommitish:e,targetCommitish:t,baseMode:o,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};s.threads=n,this.saveDiffContextData(e,t,s,r,i,a,o)}saveComments(e,t,n,r,i,a,o){this.saveCommentThreads(e,t,n.map(eS),r,i,a,o)}getViewedFiles(e,t,n,r,i,a){return this.getDiffContextData(e,t,n,r,i,a)?.viewedFiles||[]}saveViewedFiles(e,t,n,r,i,a,o){let s=this.getDiffContextData(e,t,r,i,a,o)||{version:2,baseCommitish:e,targetCommitish:t,baseMode:o,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};s.viewedFiles=n,this.saveDiffContextData(e,t,s,r,i,a,o)}getViewedHashIndexKey(e){return`${Xx}/${e??Zx}`}getViewedHashIndex(e){let t={version:1,lastModifiedAt:new Date(0).toISOString(),entries:[]};try{let n=localStorage.getItem(this.getViewedHashIndexKey(e));if(!n)return t;let r=JSON.parse(n);return r.version!==1||!Array.isArray(r.entries)?t:r}catch(e){return console.error(`Error reading viewed hash index:`,e),t}}writeViewedHashIndex(e,t){try{localStorage.setItem(this.getViewedHashIndexKey(e),JSON.stringify({...t,lastModifiedAt:new Date().toISOString()}))}catch(e){e instanceof DOMException&&e.name===`QuotaExceededError`?console.error(`localStorage quota exceeded while writing viewed hash index`):console.error(`Error saving viewed hash index:`,e)}}recordViewedHashes(e,t){if(t.length===0)return;let n=this.getViewedHashIndex(e),r=new Map(n.entries.map(e=>[$x(e.filePath,e.diffContentHash),e]));for(let e of t)r.set($x(e.filePath,e.diffContentHash),e);let i=Array.from(r.values());i.length>Qx&&(i.sort((e,t)=>e.viewedAt<t.viewedAt?1:-1),i=i.slice(0,Qx)),this.writeViewedHashIndex(e,{version:1,lastModifiedAt:n.lastModifiedAt,entries:i})}removeViewedHashes(e,t){if(t.length===0)return;let n=this.getViewedHashIndex(e),r=new Set(t.map(e=>$x(e.filePath,e.diffContentHash))),i=n.entries.filter(e=>!r.has($x(e.filePath,e.diffContentHash)));i.length!==n.entries.length&&this.writeViewedHashIndex(e,{version:1,lastModifiedAt:n.lastModifiedAt,entries:i})}clearViewedHashIndex(e){try{localStorage.removeItem(this.getViewedHashIndexKey(e))}catch(e){console.error(`Error clearing viewed hash index:`,e)}}cleanupOldData(e){let t=new Date;t.setDate(t.getDate()-e);let n=t.getTime(),r=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(!t)continue;let i=t.startsWith(Yx),a=t.startsWith(Xx);if(!(!i&&!a))try{let e=localStorage.getItem(t);if(!e)continue;let i=JSON.parse(e).lastModifiedAt;if(!i)continue;let a=new Date(i).getTime();Number.isFinite(a)&&a<n&&r.push(t)}catch{}}r.forEach(e=>localStorage.removeItem(e))}getStorageSize(){let e=0;for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(!n||!n.startsWith(Yx)&&!n.startsWith(Xx))continue;let r=localStorage.getItem(n);r&&(e+=(n.length+r.length)*2)}return e}};async function rS(e){try{let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{return console.warn(`Crypto API not available, using fallback hash`),iS(e)}}function iS(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t).toString(16)}function aS(e){let t=e.chunks.map(e=>{let t=e.lines.filter(e=>e.type!==`hunk`&&e.type!==`header`).map(e=>`${e.type}:${e.content}`).join(`
|
|
77
|
+
`);return`${e.header}\n${t}`}).join(`
|
|
78
|
+
|
|
79
|
+
`);return`${e.path}\n${e.status}\n${t}`}function oS(e){return{id:e.id,file:e.filePath,line:typeof e.position.line==`number`?e.position.line:[e.position.line.start,e.position.line.end],side:e.position.side,createdAt:e.createdAt,updatedAt:e.updatedAt,codeContent:e.codeSnapshot?.content,messages:e.messages}}function sS(e){let t=e.messages[0];return t?{id:e.id,filePath:e.filePath,body:t.body,author:t.author,createdAt:t.createdAt,updatedAt:t.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}function cS(e,t,n,r,i,a){let[o,s]=(0,F.useState)([]),[c,l]=(0,F.useState)(!1),u=(0,F.useCallback)(()=>!e||!t?null:nS.getDiffContextData(e,t,n,r,i,a),[e,t,n,r,i,a]),d=(0,F.useCallback)(()=>{if(!e||!t)return null;let n=new Date().toISOString();return{version:2,baseCommitish:e,targetCommitish:t,baseMode:a,createdAt:n,lastModifiedAt:n,threads:[],viewedFiles:[],appliedCommentImportIds:[]}},[e,t,a]);(0,F.useEffect)(()=>{if(!e||!t){s([]),l(!1);return}s(u()?.threads||nS.getCommentThreads(e,t,n,r,i,a)),l(!0)},[e,t,n,r,i,a,u]);let f=(0,F.useCallback)(o=>{!e||!t||(nS.saveCommentThreads(e,t,o,n,r,i,a),s(o),l(!0))},[e,t,n,r,i,a]),p=(0,F.useCallback)(e=>{f(e)},[f]),m=(0,F.useCallback)(e=>{let t=new Date().toISOString(),n=Et(),r={id:n,filePath:e.filePath,createdAt:t,updatedAt:t,position:{side:e.side,line:e.line},codeSnapshot:e.codeSnapshot||{content:``,language:Ar(e.filePath)},messages:[{id:n,body:e.body,author:`User`,createdAt:t,updatedAt:t}]};return f([...o,r]),r},[f,o]),h=(0,F.useCallback)(e=>{let t=sS(m(e));if(!t)throw Error(`Failed to create root comment`);return t},[m]),g=(0,F.useCallback)(({threadId:e,body:t})=>{let n=new Date().toISOString();f(o.map(r=>r.id===e?{...r,updatedAt:n,messages:[...r.messages,{id:Et(),body:t,author:`User`,createdAt:n,updatedAt:n}]}:r))},[f,o]),_=(0,F.useCallback)(e=>{f(o.filter(t=>t.id!==e))},[f,o]),v=(0,F.useCallback)(e=>{_(e)},[_]),y=(0,F.useCallback)((e,t)=>{let n=o.find(t=>t.id===e);if(!n)return;let r=n.messages.findIndex(e=>e.id===t);if(r<0)return;if(r===0){_(e);return}let i=new Date().toISOString();f(o.map(n=>n.id===e?{...n,updatedAt:i,messages:n.messages.filter(e=>e.id!==t)}:n))},[_,f,o]),b=(0,F.useCallback)((e,t,n)=>{let r=new Date().toISOString();f(o.map(i=>i.id===e?{...i,updatedAt:r,messages:i.messages.map(e=>e.id===t?{...e,body:n,updatedAt:r}:e)}:i))},[f,o]),x=(0,F.useCallback)((e,t)=>{b(e,e,t)},[b]),S=(0,F.useCallback)(()=>{f([])},[f]),C=(0,F.useCallback)(o=>{if(!o?.resetAppliedCommentImportIds){S();return}let c=u()||d();if(!c||!e||!t)return;let l={...c,threads:[],appliedCommentImportIds:[]};nS.saveDiffContextData(e,t,l,n,r,i,a),s([])},[e,t,r,S,d,n,u,i,a]),w=(0,F.useCallback)((o,c)=>{if(!e||!t||o.length===0||c.length===0)return[];let l=u()||d();if(!l)return[];if(l.appliedCommentImportIds.includes(c))return s(l.threads),[];let f=Jt(l.threads,o),p={...l,threads:f.threads,appliedCommentImportIds:[...l.appliedCommentImportIds,c]};return nS.saveDiffContextData(e,t,p,n,r,i,a),s(f.threads),f.warnings},[e,t,r,d,n,u,i,a]),T=(0,F.useCallback)(e=>{let t=o.find(t=>t.id===e);return t?qx(oS(t)):``},[o]),E=(0,F.useCallback)(e=>T(e),[T]),D=(0,F.useCallback)(()=>Jx(o.map(oS)),[o]);return{hasLoadedComments:c,comments:o.map(e=>sS(e)).filter(e=>e!==null),threads:o,replaceThreads:p,addComment:h,addThread:m,removeComment:v,replyToThread:g,removeThread:_,updateComment:x,removeMessage:y,updateMessage:b,clearAllComments:C,applyCommentImports:w,generatePrompt:E,generateThreadPrompt:T,generateAllCommentsPrompt:D}}var lS=20;async function uS(e,t){let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);if(!n.ok)throw Error(`Failed to fetch file content: ${n.statusText}`);let r=(await n.text()).split(`
|
|
80
|
+
`);return r.length>0&&r[r.length-1]===``&&r.pop(),{lines:r,totalLines:r.length}}async function dS(e,t,n,r){let i=encodeURIComponent(e),a=new URLSearchParams;t&&a.set(`oldRef`,t),n&&a.set(`newRef`,n),r&&r!==e&&a.set(`oldPath`,r);let o=await fetch(`/api/line-count/${i}?${a}`);if(!o.ok)throw Error(`Failed to fetch line count: ${o.statusText}`);return o.json()}function fS({baseCommitish:e,targetCommitish:t,diffIdentity:n}){let[r,i]=(0,F.useState)({}),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(null),[l,u]=(0,F.useState)(0),d=(0,F.useRef)(new Map),f=(0,F.useRef)({});f.current=r;let p=(0,F.useRef)(0);(0,F.useEffect)(()=>{p.current+=1,d.current.clear(),f.current={},i({}),o(!1),c(null),u(0)},[e,t,n]);let m=(0,F.useCallback)(async n=>{let r=p.current,i=`${r}:${n.path}`,a=d.current.get(i);if(a)return a;let o=(async()=>{let i=f.current[n.path];if(i?.oldContent&&i?.newContent)return i;let a={...i,expandedRanges:i?.expandedRanges||[]};if(n.status!==`added`&&e){let t=n.oldPath||n.path;try{let{lines:n,totalLines:i}=await uS(t,e);if(p.current!==r)return null;a.oldContent=n,a.oldTotalLines=i}catch(e){console.error(`Failed to fetch old file content:`,e),a.oldContent=[],a.oldTotalLines=0}}if(n.status!==`deleted`&&t)try{let{lines:e,totalLines:i}=await uS(n.path,t);if(p.current!==r)return null;a.newContent=e,a.newTotalLines=i}catch(e){console.error(`Failed to fetch new file content:`,e),a.newContent=[],a.newTotalLines=0}return a})();d.current.set(i,o);try{return await o}finally{d.current.delete(i)}},[e,t]),h=(0,F.useCallback)(e=>{c(e),u(e=>e+1)},[]),g=(0,F.useCallback)(async(e,t,n,r=lS)=>{let a=p.current;o(!0);try{let o=await m(e);if(!o||p.current!==a)return;i(i=>{let a=i[e.path],s=a?.expandedRanges||o.expandedRanges||[],c=s.findIndex(e=>e.chunkIndex===t&&e.direction===n),l=[...s];if(c>=0&&l[c]){let e=l[c];l[c]={chunkIndex:e.chunkIndex,direction:e.direction,count:e.count+r}}else l.push({chunkIndex:t,direction:n,count:r});return{...i,[e.path]:{oldContent:a?.oldContent??o.oldContent,newContent:a?.newContent??o.newContent,oldTotalLines:a?.oldTotalLines??o.oldTotalLines,newTotalLines:a?.newTotalLines??o.newTotalLines,expandedRanges:l}}}),h(e.path)}finally{o(!1)}},[m,h]),_=(0,F.useCallback)(async(e,t,n)=>{let r=p.current;o(!0);try{let a=await m(e);if(!a||p.current!==r)return;i(r=>{let i=r[e.path],o=[...i?.expandedRanges||a.expandedRanges||[]],s=o.findIndex(e=>e.chunkIndex===t&&e.direction===`up`),c=o.findIndex(e=>e.chunkIndex===t-1&&e.direction===`down`),l=0,u=0;s>=0&&o[s]&&(l=o[s].count),c>=0&&o[c]&&(u=o[c].count);let d=l+u+n,f=o.filter(e=>!(e.chunkIndex===t-1&&e.direction===`down`)),p=f.findIndex(e=>e.chunkIndex===t&&e.direction===`up`);return p>=0&&f[p]?f[p]={chunkIndex:t,direction:`up`,count:d}:f.push({chunkIndex:t,direction:`up`,count:d}),{...r,[e.path]:{oldContent:i?.oldContent??a.oldContent,newContent:i?.newContent??a.newContent,oldTotalLines:i?.oldTotalLines??a.oldTotalLines,newTotalLines:i?.newTotalLines??a.newTotalLines,expandedRanges:f}}}),h(e.path)}finally{o(!1)}},[m,h]),v=(0,F.useCallback)(async n=>{let r=p.current,a=f.current[n.path];if(a?.oldTotalLines!==void 0||a?.newTotalLines!==void 0)return;let o=n.status===`added`?void 0:e,s=n.status===`deleted`?void 0:t;if(!(!o&&!s))try{let{oldLineCount:e,newLineCount:t}=await dS(n.path,o,s,n.oldPath);if(p.current!==r)return;i(r=>{let i=r[n.path];return i?.oldTotalLines!==void 0||i?.newTotalLines!==void 0?r:{...r,[n.path]:{...i,expandedRanges:i?.expandedRanges||[],oldTotalLines:e,newTotalLines:t}}}),h(n.path)}catch(e){console.error(`Failed to prefetch line count:`,e)}},[e,t,h]),y=(0,F.useCallback)((e,t,n)=>{let i=r[e];return i&&i.expandedRanges.find(e=>e.chunkIndex===t&&e.direction===n)?.count||0},[r]),b=(0,F.useCallback)((e,t,n)=>{if(e.status===`added`||e.status===`deleted`)return 0;let r=e.chunks[n-1],i;if(!r)i=t.oldStart-1;else{let e=r.oldStart+r.oldLines;i=t.oldStart-e}let a=y(e.path,n,`up`),o=n>0?y(e.path,n-1,`down`):0;return Math.max(0,i-a-o)},[y]),x=(0,F.useCallback)((e,t,n)=>{if(e.status===`added`||e.status===`deleted`)return 0;let i=r[e.path],a=i?.oldTotalLines||i?.newTotalLines;if(a===void 0)return e.chunks[n+1]?0:-1;if(e.chunks[n+1])return 0;let o=a-(t.oldStart+t.oldLines-1),s=y(e.path,n,`down`);return Math.max(0,o-s)},[r,y]),S=(0,F.useCallback)((e,t,n)=>{let i=r[e.path];if(!i)return t;let a=y(e.path,n,`up`),o=y(e.path,n,`down`);if(a===0&&o===0)return t;let s=i.oldContent||[],c=i.newContent||[],l=[];if(a>0){let r=e.chunks[n-1],i;i=r?r.oldStart+r.oldLines-1:Math.max(0,t.oldStart-1-a);let o=t.oldStart-1,u=t.newStart-1,d=Math.min(a,o-i),f=o-d,p=u-d;for(let e=0;e<d;e++){let t=f+e+1,n=p+e+1,r=s[t-1]??c[n-1]??``;l.push({type:`normal`,content:r,oldLineNumber:t,newLineNumber:n,isExpanded:!0})}}if(l.push(...t.lines),o>0){let r=t.oldStart+t.oldLines-1,a=t.newStart+t.newLines-1,u=e.chunks[n+1],d=u?u.oldStart-1:i.oldTotalLines||r,f=Math.min(o,d-r);for(let e=0;e<f;e++){let t=r+e+1,n=a+e+1,i=s[t-1]??c[n-1]??``;l.push({type:`normal`,content:i,oldLineNumber:t,newLineNumber:n,isExpanded:!0})}}let u=l[0],d=l[l.length-1];return{...t,lines:l,oldStart:u?.oldLineNumber??t.oldStart,newStart:u?.newLineNumber??t.newStart,oldLines:(d?.oldLineNumber??t.oldStart+t.oldLines-1)-(u?.oldLineNumber??t.oldStart)+1,newLines:(d?.newLineNumber??t.newStart+t.newLines-1)-(u?.newLineNumber??t.newStart)+1}},[r,y]);return{expandedState:r,isLoading:a,lastUpdatedFilePath:s,lastUpdatedAt:l,expandLines:g,expandAllBetweenChunks:_,prefetchFileContent:v,getMergedChunks:(0,F.useCallback)(e=>{let t=[];for(let n=0;n<e.chunks.length;n++){let r=e.chunks[n];if(!r)continue;let i=S(e,r,n),a=b(e,r,n),o=x(e,r,n),s=t[t.length-1];if(s&&a===0){s.lines=[...s.lines,...i.lines],s.originalIndices.push(n),s.hiddenLinesAfter=o;let e=s.lines[s.lines.length-1];s.oldLines=(e?.oldLineNumber??s.oldStart+s.oldLines-1)-s.oldStart+1,s.newLines=(e?.newLineNumber??s.newStart+s.newLines-1)-s.newStart+1}else t.push({...i,originalIndices:[n],hiddenLinesBefore:a,hiddenLinesAfter:o})}return t},[S,b,x]),getHiddenLinesBefore:b,getHiddenLinesAfter:x}}var pS=function(e){return e.DEFAULT=`default`,e.WORKING=`working`,e.STAGED=`staged`,e.DOT=`dot`,e.SPECIFIC=`specific`,e}({});function mS(e){let t=(void 0)?.trim();if(!t)return e;try{return new URL(e,t).toString()}catch{return e}}function hS(e,t){let n=(0,F.useRef)(null),r=(0,F.useRef)(null),i=(0,F.useRef)(0),a=3e3,[o,s]=(0,F.useState)({isWatchEnabled:!1,diffMode:pS.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:`disconnected`}),[c,l]=(0,F.useState)(null),u=(0,F.useCallback)(()=>{if(!n.current)try{let e=new EventSource(mS(`/api/watch`));n.current=e,e.onopen=()=>{console.log(`Connected to file watch service`),s(e=>({...e,connectionStatus:`connected`})),i.current=0,l(null)},e.onmessage=e=>{try{let n=JSON.parse(e.data);switch(n.type){case`connected`:s(e=>({...e,isWatchEnabled:!0,diffMode:n.diffMode,connectionStatus:`connected`}));break;case`reload`:console.log(`File changes detected, showing reload button:`,n.changeType),s(e=>({...e,shouldReload:!0,lastChangeTime:new Date,lastChangeType:n.changeType}));break;case`error`:console.error(`File watch error:`,n.message),l(n.message||`File watch error occurred`);break;case`commentsChanged`:t&&t();break}}catch(e){console.error(`Error parsing watch event:`,e)}},e.onerror=()=>{console.log(`File watch connection lost`),s(e=>({...e,connectionStatus:`disconnected`})),n.current&&=(n.current.close(),null),i.current<5?(s(e=>({...e,connectionStatus:`reconnecting`})),i.current+=1,r.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${i.current}/5)...`),u()},a)):(console.error(`Max reconnection attempts reached`),l(`Lost connection to file watch service`))}}catch(e){console.error(`Failed to connect to file watch service:`,e),l(`Failed to connect to file watch service`)}},[5,t,a]),d=(0,F.useCallback)(async()=>{if(!o.isReloading){s(e=>({...e,isReloading:!0}));try{e&&await e(),s(e=>({...e,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(e){console.error(`Reload failed:`,e),l(`Failed to reload diff data`),s(e=>({...e,isReloading:!1}))}}},[e,o.isReloading]),f=()=>{n.current&&=(n.current.close(),null),r.current&&=(clearTimeout(r.current),null)};return(0,F.useEffect)(()=>(u(),f),[u]),(0,F.useEffect)(()=>f,[]),{shouldReload:o.shouldReload,isConnected:o.connectionStatus===`connected`,error:c,reload:d,watchState:o}}var gS={SCROLL_CONTAINER:`main.overflow-y-auto`};function _S(e,t){let n=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return t===`split`?`${n}-${e.side}`:n}function vS(e,t,n){return`${e}:${t}:${n??`any`}`}function yS(e,t){let n=t[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return n&&(n.type===`add`||n.type===`delete`||n.type===`normal`)?n.type:null}function bS(e,t){let n=yS(e,t);return n?n===`normal`?!0:n===`delete`?e.side===`left`:n===`add`?e.side===`right`:!1:!1}function xS(e,t){return bS(e,t)?e:{...e,side:e.side===`left`?`right`:`left`}}var SS={VIEWPORT_OFFSET_RATIO:1/3};function CS(e,t,n){let r=[];return t.oldLineNumber!==void 0&&(r.push(vS(e,t.oldLineNumber,`old`)),r.push(vS(e,t.oldLineNumber))),t.newLineNumber!==void 0&&(r.push(vS(e,t.newLineNumber,`new`)),r.push(vS(e,t.newLineNumber))),r.some(e=>n.has(e))}function wS(e,t,n,r){return{line:t=>{let i=e[t.fileIndex];return!i||r?.has(i.path)?!1:n===`unified`||bS(t,e)},chunk:t=>{let n=e[t.fileIndex];if(!n||r?.has(n.path))return!1;let i=n.chunks[t.chunkIndex]?.lines[t.lineIndex];if(!i||i.type===`normal`)return!1;if(t.lineIndex===0)return!0;let a=n.chunks[t.chunkIndex]?.lines[t.lineIndex-1];return!a||a.type===`normal`},comment:n=>{let i=e[n.fileIndex];if(!i||r?.has(i.path))return!1;let a=i.chunks[n.chunkIndex]?.lines[n.lineIndex];return a?CS(i.path,a,t):!1},file:e=>e.chunkIndex===0&&e.lineIndex===0}}function TS(){return e=>{let t=document.getElementById(e);if(!t)return;let n=document.querySelector(gS.SCROLL_CONTAINER);if(!n)throw Error(`Scrollable container (${gS.SCROLL_CONTAINER}) not found`);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=n.clientHeight,o=n.scrollTop,s=Math.max(i.top,0),c=Math.min(i.bottom,window.innerHeight);if(!(r.top>=s&&r.bottom<=c)){let e=ES(t,n)-a*SS.VIEWPORT_OFFSET_RATIO;n.scrollTop=Math.max(0,e);return}let l=r.bottom>Math.min(i.bottom,window.innerHeight),u=t.offsetTop-n.offsetTop-a*SS.VIEWPORT_OFFSET_RATIO;l&&u>o&&(n.scrollTop=Math.max(0,u))}}function ES(e,t){let n=e,r=0;for(;n&&n!==t&&n.offsetParent;)r+=n.offsetTop,n=n.offsetParent;return n&&n!==t&&(r+=n.offsetTop),r}function DS(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:`right`}}function OS(e,t,n){return n&&e.fileIndex===t.fileIndex&&e.chunkIndex===t.chunkIndex&&e.lineIndex===t.lineIndex}function kS(e,t,n){let{fileIndex:r,chunkIndex:i,lineIndex:a}=e,o=n.length,s=0;if(t===`next`)for(a++;s<o;){if(n[r]?.chunks[i]?.lines[a])return{...e,fileIndex:r,chunkIndex:i,lineIndex:a};i++,a=0,n[r]?.chunks[i]||(r++,i=0,a=0,r>=o&&(r=0,s++))}else for(a--;s<o;){if(a<0)if(i--,i<0){r--,r<0&&(r=o-1,s++);let e=n[r];if(e&&e.chunks.length>0){i=e.chunks.length-1;let t=e.chunks[i];a=t&&t.lines.length>0?t.lines.length-1:-1}else i=-1,a=-1}else{let e=n[r]?.chunks[i];a=e&&e.lines.length>0?e.lines.length-1:-1}if(a>=0&&n[r]?.chunks[i]?.lines[a])return{...e,fileIndex:r,chunkIndex:i,lineIndex:a};a<0||a--}return null}function AS(e,t,n,r,i){let a=e,o=!1;for(;a;){let s=kS(a,t,r);if(!s||(a=s,OS(a,e,o)))break;if(o=!0,n(a,r)){let e=xS(a,r);return{position:e,scrollTarget:_S(e,i)}}}return{position:null,scrollTarget:null}}function jS({files:e,comments:t,viewMode:n=St,reviewedFiles:r,onToggleReviewed:i,onCreateComment:a,onCopyAllComments:o,onDeleteAllComments:s,onShowCommentsList:c,onRefresh:l}){let[u,d]=(0,F.useState)(null),[f,p]=(0,F.useState)(!1),m=(0,F.useMemo)(()=>TS(),[]),h=(0,F.useMemo)(()=>{let e=new Map;return t.forEach(t=>{let n=Array.isArray(t.line)?t.line[0]:t.line,r=vS(t.file,n,t.side);e.has(r)||e.set(r,[]),e.get(r)?.push(t)}),e},[t]),g=(0,F.useMemo)(()=>wS(e,h,n,r),[e,h,n,r]),_=(0,F.useCallback)((t,r)=>e.length===0?{position:null,scrollTarget:null}:AS(DS(u),t,r,e,n),[u,e,n]),v=(0,F.useCallback)(e=>t=>{let n=_(t,e);n.position&&(d(n.position),n.scrollTarget&&m(n.scrollTarget))},[_,m]),y=(0,F.useMemo)(()=>v(g.line),[v,g.line]),b=(0,F.useMemo)(()=>v(g.chunk),[v,g.chunk]),x=(0,F.useMemo)(()=>v(g.file),[v,g.file]),S=(0,F.useMemo)(()=>v(g.comment),[v,g.comment]),C=(0,F.useCallback)(t=>{if(!u||n!==`split`)return;let r={...u,side:t},i=e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex];if(i){if(t===`left`&&i.type===`add`&&u.lineIndex>0){if(e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex-1]?.type===`delete`){r={...r,lineIndex:u.lineIndex-1},d(r),m(_S(r,n));return}}else if(t===`right`&&i.type===`delete`&&e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex+1]?.type===`add`){r={...r,lineIndex:u.lineIndex+1},d(r),m(_S(r,n));return}}if(!bS(r,e)){let t=e[u.fileIndex];if(!t)return;let n=t.chunks[u.chunkIndex];if(n){for(let t=u.lineIndex+1;t<n.lines.length;t++){let n={...r,lineIndex:t};if(bS(n,e)){r=n;break}}if(!bS(r,e))for(let t=u.lineIndex-1;t>=0;t--){let n={...r,lineIndex:t};if(bS(n,e)){r=n;break}}}if(!bS(r,e)){for(let n=u.chunkIndex+1;n<t.chunks.length;n++){let i=t.chunks[n];if(i){for(let t=0;t<i.lines.length;t++){let i={...r,chunkIndex:n,lineIndex:t};if(bS(i,e)){r=i;break}}if(bS(r,e))break}}if(!bS(r,e))for(let n=u.chunkIndex-1;n>=0;n--){let i=t.chunks[n];if(i){for(let t=i.lines.length-1;t>=0;t--){let i={...r,chunkIndex:n,lineIndex:t};if(bS(i,e)){r=i;break}}if(bS(r,e))break}}}}d(r),m(_S(r,n))},[u,n,m,e]),w=(0,F.useCallback)(()=>{let t=document.querySelector(gS.SCROLL_CONTAINER);if(!t)return;let r=t.getBoundingClientRect(),i=r.top+r.height/2,a=1/0,o=null;e.forEach((t,s)=>{t.chunks.forEach((t,c)=>{t.lines.forEach((t,l)=>{let u=n===`split`?[`left`,`right`]:[`right`];for(let t of u){let u={fileIndex:s,chunkIndex:c,lineIndex:l,side:t};if(n===`split`&&!bS(u,e))continue;let d=_S(u,n),f=document.getElementById(d);if(f){let e=f.getBoundingClientRect(),t=e.top+e.height/2,n=Math.abs(t-i);e.top<r.bottom&&e.bottom>r.top&&n<a&&(a=n,o=u)}}})})}),o&&d(o)},[e,n,d]),T=(0,F.useCallback)(t=>{if(!t){d(null);return}let r=xS(t,e);d(r),m(_S(r,n))},[e,n,m]),E={scopes:`navigation`,enableOnFormTags:!1,preventDefault:!0};return z(`j, down`,()=>y(`next`),E,[y]),z(`k, up`,()=>y(`prev`),E,[y]),z(`n`,()=>b(`next`),E,[b]),z(`p`,()=>b(`prev`),E,[b]),z(`shift+n`,()=>S(`next`),E,[S]),z(`shift+p`,()=>S(`prev`),E,[S]),z(`]`,()=>x(`next`),{...E,useKey:!0},[x]),z(`[`,()=>x(`prev`),{...E,useKey:!0},[x]),z(`{`,()=>{e.length>0&&(d({fileIndex:0,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`}),m(_S({fileIndex:0,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`},n)))},{...E,useKey:!0},[e,n,m]),z(`}`,()=>{if(e.length>0){let t=e.length-1,r=e[t];r&&r.chunks.length>0&&(d({fileIndex:t,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`}),m(_S({fileIndex:t,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`},n)))}},{...E,useKey:!0},[e,n,m]),z(`h, left`,()=>C(`left`),{...E,enabled:n===`split`},[C,n]),z(`l, right`,()=>C(`right`),{...E,enabled:n===`split`},[C,n]),z(`v`,()=>{if(u){let t=e[u.fileIndex];t&&i(t.path)}},E,[u,e,i]),z(`shift+r`,()=>{l&&l()},E,[l]),z(`c`,()=>{if(u&&a){let t=e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex];t&&t.type!==`delete`&&a()}},E,[u,e,a]),z(`?`,()=>p(!f),{...E,useKey:!0},[f]),z(`.`,e=>{e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(w(),e.preventDefault())},{...E,useKey:!0,preventDefault:!1},[w]),z(`shift+c`,()=>{o&&o()},{...E,scopes:[`navigation`,`comments-list`]},[o]),z(`shift+d`,()=>{s&&s()},{...E,scopes:[`navigation`,`comments-list`]},[s]),z(`shift+l`,()=>{c&&c()},E,[c]),{cursor:u,isHelpOpen:f,setIsHelpOpen:p,setCursorPosition:T}}var MS=new Map,NS=0;function PS(e){return MS.has(e)||MS.set(e,`file-${++NS}`),MS.get(e)??``}var FS=8,IS=`1200px 0px`,LS=60,RS=180;function zS({diffData:e,diffScrollContainerRef:t,setDiffData:n}){let[r,i]=(0,F.useState)(new Set),a=(0,F.useRef)(new Set),o=(0,F.useRef)(null),s=(0,F.useRef)(new Map),c=(0,F.useRef)(new Set),l=(0,F.useRef)(null),u=(0,F.useRef)(0);(0,F.useEffect)(()=>{if(!e){let e=new Set;a.current=e,i(e),c.current.clear(),l.current=null;return}let t=`${e.requestedBaseCommitish??``}:${e.requestedTargetCommitish??``}:${e.requestedBaseMode??`direct`}`;if(l.current===t)return;l.current=t;let n=e.files.slice(0,FS).map(e=>e.path),r=new Set(n);a.current=r,i(r),c.current.clear()},[e]);let d=(0,F.useCallback)(e=>{let t=s.current.get(e);t&&o.current&&o.current.unobserve(t),i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),a.current=n,n})},[]),f=(0,F.useCallback)((e,t)=>{let n=o.current,r=s.current.get(e);if(r&&n&&n.unobserve(r),!t){s.current.delete(e);return}s.current.set(e,t),!(a.current.has(e)||!n)&&n.observe(t)},[]);(0,F.useEffect)(()=>{if(o.current&&o.current.disconnect(),!e){o.current=null;return}let n=new IntersectionObserver(e=>{i(t=>{let r=!1,i=new Set(t);return e.forEach(e=>{if(!e.isIntersecting)return;let t=e.target.dataset.filePath;!t||i.has(t)||(i.add(t),n.unobserve(e.target),r=!0)}),r&&(a.current=i),r?i:t})},{root:t.current,rootMargin:IS});return o.current=n,s.current.forEach((e,t)=>{a.current.has(t)||n.observe(e)}),()=>{n.disconnect(),o.current=null}},[e,t]);let p=(0,F.useCallback)(t=>{if(!e)return;let n=e.files.findIndex(e=>e.path===t);if(n<0)return;let r=o.current;i(t=>{let i=!1,o=new Set(t);for(let t=0;t<=n;t++){let n=e.files[t]?.path;if(n&&!o.has(n)){o.add(n),i=!0;let e=s.current.get(n);e&&r&&r.unobserve(e)}}return i&&(a.current=o),i?o:t})},[e]),m=(0,F.useCallback)(n=>{p(n);let r=e?.files.findIndex(e=>e.path===n)??-1,i=e&&r>=0?e.files.slice(0,r+1).map(e=>PS(e.path)):[PS(n)],a=u.current+1;u.current=a;let o=()=>{for(let e of i){let t=document.getElementById(e);if(!t||t.dataset.rendered!==`true`)return!1}return!0},s=()=>{let e=t.current,r=document.getElementById(PS(n));if(!e||!r)return!1;let i=e.getBoundingClientRect(),a=r.getBoundingClientRect(),o=e.scrollTop+(a.top-i.top);return e.scrollTo({top:Math.max(0,o)}),!0},c=0,l=()=>{requestAnimationFrame(()=>{if(u.current===a){if(!o()){c<LS&&(c++,l());return}if(!s()){c<LS&&(c++,l());return}window.setTimeout(()=>{u.current===a&&s()},RS)}})};l()},[e,t,p]);return(0,F.useEffect)(()=>{if(!e||e.targetCommitish===`stdin`)return;let t=e.targetCommitish||`HEAD`,i=`${e.requestedBaseCommitish??``}...${e.requestedTargetCommitish??``}:${e.requestedBaseMode??`direct`}`;e.files.forEach(a=>{if(!r.has(a.path)||a.isGenerated!==!1||a.status===`deleted`)return;let o=`${i}:${t}:${a.path}`;if(c.current.has(o))return;c.current.add(o);let s=encodeURIComponent(a.path);fetch(`/api/generated-status/${s}?ref=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():null).then(t=>{!t||t.isGenerated!==!0||n(t=>{if(!t||t.requestedBaseCommitish!==e.requestedBaseCommitish||t.requestedTargetCommitish!==e.requestedTargetCommitish||t.requestedBaseMode!==e.requestedBaseMode)return t;let n=!1,r=t.files.map(e=>e.path!==a.path||e.isGenerated?e:(n=!0,{...e,isGenerated:!0}));return n?{...t,files:r}:t})}).catch(()=>{})})},[e,r,n]),{renderedFilePaths:r,ensureFileRendered:d,ensureFilesRenderedUpTo:p,registerLazyFileContainer:f,scrollFileIntoDiffContainer:m}}function BS(e,t,n,r,i,a,o=[],s){let[c,l]=(0,F.useState)([]),[u,d]=(0,F.useState)(null),[f,p]=(0,F.useState)(new Map),[m,h]=(0,F.useState)(new Set),g=e&&t?`${a??`default`}:${Qt({baseCommitish:e,targetCommitish:t,baseMode:s})}:${n??`no-commit`}`:null,_=g!==null&&u===g;(0,F.useEffect)(()=>{if(!e||!t||!g)return;let c=!1,u=nS.getViewedFiles(e,t,n,r,a,s);return(async()=>{let f=[];if(i&&i.length>0){let e=new Set(u.map(e=>e.filePath)),t=new Map;await Promise.all(i.map(async e=>{try{let n=await rS(aS(e));t.set(e.path,n)}catch(t){console.error(`Failed to generate hash for file:`,e.path,t)}}));for(let n of i){if(e.has(n.path)||!(n.isGenerated||n.status===`deleted`||Ex(n.path,o)))continue;let r=t.get(n.path);r&&(f.push({filePath:n.path,viewedAt:new Date().toISOString(),diffContentHash:r}),e.add(n.path))}let n=nS.getViewedHashIndex(a),r=new Map,s=new Set;for(let e of n.entries)e.hashVersion===1&&(r.set(`${e.filePath} ${e.diffContentHash}`,e),s.add(e.filePath));for(let n of i){if(e.has(n.path))continue;let i=t.get(n.path);if(!i)continue;let a=r.get(`${n.path} ${i}`);a&&(f.push({filePath:n.path,viewedAt:a.viewedAt,diffContentHash:i}),e.add(n.path))}let l=new Set;for(let n of i){if(!s.has(n.path)||e.has(n.path))continue;let i=t.get(n.path);i&&(r.has(`${n.path} ${i}`)||l.add(n.path))}c||h(l)}else c||h(new Set);if(f.length>0){let i=[...u,...f];nS.saveViewedFiles(e,t,i,n,r,a,s),c||(l(i),d(g));return}c||(l(u),d(g))})(),()=>{c=!0}},[e,t,n,r,a,g,s]);let v=(0,F.useCallback)(i=>{!e||!t||(nS.saveViewedFiles(e,t,i,n,r,a,s),l(i))},[e,t,n,r,a,s]),y=(0,F.useMemo)(()=>new Set(c.map(e=>e.filePath)),[c]),b=(0,F.useCallback)(e=>c.find(t=>t.filePath===e),[c]),x=(0,F.useCallback)(async e=>{let t=f.get(e.path);if(t)return t;let n=await rS(aS(e));return p(t=>new Map(t).set(e.path,n)),n},[f]),S=(0,F.useCallback)(async(e,t)=>{let n=b(e);if(!n)return!1;let r=await x(t);return n.diffContentHash!==r},[b,x]);return{viewedFiles:y,changedSinceViewedFiles:m,hasLoadedInitialViewedFiles:_,toggleFileViewed:(0,F.useCallback)(async(e,t)=>{let n=b(e);if(n)v(c.filter(t=>t.filePath!==e)),nS.removeViewedHashes(a,[{filePath:e,diffContentHash:n.diffContentHash}]);else{let n=await x(t),r=new Date().toISOString(),i={filePath:e,viewedAt:r,diffContentHash:n};v([...c,i]);let o={filePath:e,diffContentHash:n,hashVersion:1,viewedAt:r};nS.recordViewedHashes(a,[o])}},[c,b,x,v,a]),isFileContentChanged:S,getViewedFileRecord:b,clearViewedFiles:(0,F.useCallback)(()=>{v([]),p(new Map),h(new Set),nS.clearViewedHashIndex(a)},[v,a])}}var VS={mobileMax:767,desktopMin:1024},HS={mobile:`(max-width: ${VS.mobileMax}px)`,desktop:`(min-width: ${VS.desktopMin}px)`},US=()=>typeof window>`u`?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(HS.mobile).matches,isDesktop:window.matchMedia(HS.desktop).matches};function WS(){let[e,t]=(0,F.useState)(()=>US());return(0,F.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(HS.mobile),n=window.matchMedia(HS.desktop),r=()=>{t({isMobile:e.matches,isDesktop:n.matches})};return r(),e.addEventListener(`change`,r),n.addEventListener(`change`,r),()=>{e.removeEventListener(`change`,r),n.removeEventListener(`change`,r)}},[]),e}function GS(e){let t=new Set;return e.forEach(e=>{let n=e.author?.trim();n&&t.add(n)}),[...t]}function KS(e){return GS(e).length>=2}function qS(e,t,n,r){for(let i=0;i<e.chunks.length;i++){let a=e.chunks[i];if(a)for(let e=0;e<a.lines.length;e++){let o=a.lines[e];if(o&&(r===`old`?o.oldLineNumber:r===`new`?o.newLineNumber:o.newLineNumber??o.oldLineNumber)===n)return{fileIndex:t,chunkIndex:i,lineIndex:e,side:r===`old`?`left`:r===`new`||o.newLineNumber?`right`:`left`}}}return null}function JS(e,t){let n=t.findIndex(t=>t.path===e.file);if(n===-1)return null;let r=t[n];if(!r)return null;let i=Array.isArray(e.line)?e.line[1]:e.line,a=e.side;return qS(r,n,i,a)||qS(r,n,i,`new`)||qS(r,n,i,`old`)}var YS={diffVersion:null,byFile:new Map};function XS(e,t,n,r){let i=new Map;return t.forEach(e=>{let t=n.get(e);t&&i.set(e,r(t))}),{diffVersion:e,byFile:i}}function ZS(e,t,n){if(e.diffVersion===t)return e.byFile.get(n)}function QS(e){return e.replace(/[ \t]+$/,``)}function $S(e){return e.replace(/\r\n/g,`
|
|
81
|
+
`).split(`
|
|
82
|
+
`).map(QS)}function eC(e){let t=new Map,n=new Map;for(let r of e.chunks)for(let e of r.lines)e.oldLineNumber!==void 0&&t.set(e.oldLineNumber,e.content),e.newLineNumber!==void 0&&n.set(e.newLineNumber,e.content);return{old:t,new:n}}function tC(e,t){let n=e.codeSnapshot?.content;if(n===void 0)return!1;if(!t)return!0;let r=e.position.side===`old`?t.old:t.new,i=typeof e.position.line==`number`?{start:e.position.line,end:e.position.line}:e.position.line,a=$S(n);for(let e=0;e<=i.end-i.start;e++){let t=r.get(i.start+e);if(t===void 0)continue;let n=a[e]??``;if(QS(t)!==n)return!0}return!1}var nC=[],rC=[],iC=`difit.diffViewMode`,aC=`difit.sidebarWidth`,oC=`difit.sidebarOpen`,sC=200,cC=600,lC=280,uC=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(iC);if(e===null)return null;switch(e){case`split`:case`side-by-side`:case`unified`:case`inline`:return Ct(e);default:return null}}catch{return null}},dC=()=>uC()??`split`,fC=()=>{if(typeof window>`u`)return lC;let e=window.localStorage.getItem(aC);if(!e)return lC;let t=Number.parseInt(e,10);return Number.isFinite(t)?Math.min(cC,Math.max(sC,t)):lC},pC=()=>{if(typeof window>`u`)return!0;let e=window.localStorage.getItem(oC);return e===null||e===`true`?!0:e!==`false`};function mC(){let[e,t]=(0,F.useState)(null),[n,r]=(0,F.useState)(0),[i,a]=(0,F.useState)(dC),[o,s]=(0,F.useState)(!0),[c,l]=(0,F.useState)(!0),[u,d]=(0,F.useState)(null),[f,p]=(0,F.useState)(!1),[m,h]=(0,F.useState)(fC),[g,_]=(0,F.useState)(!1),[v,y]=(0,F.useState)(pC),[b,x]=(0,F.useState)(!1),[S,C]=(0,F.useState)(!1),[w,T]=(0,F.useState)(!1),[E,D]=(0,F.useState)(!1),[O,k]=(0,F.useState)(!1),[A,j]=(0,F.useState)(new Set),M=(0,F.useRef)(!1),N=(0,F.useRef)(null),[P,ee]=(0,F.useState)(null),[te,ne]=(0,F.useState)(Xt(``,``)),[re,L]=(0,F.useState)(``),[ie,R]=(0,F.useState)(``),ae=(0,F.useRef)(!1),oe=(0,F.useRef)(te.baseMode);oe.current=e?.requestedBaseMode??te.baseMode;let se=(0,F.useRef)(te);se.current=te;let ce=(0,F.useRef)(0),le=(0,F.useRef)(null),ue=(0,F.useMemo)(()=>!e?.baseCommitish||!e?.targetCommitish?null:Xt(e.baseCommitish,e.targetCommitish,e.requestedBaseMode),[e]),de=(0,F.useMemo)(()=>ue?Qt(ue):null,[ue]),{settings:fe,updateSettings:pe}=Wx(),{isMobile:me,isDesktop:he}=WS(),{hasLoadedComments:ge,threads:_e,replaceThreads:ve,addThread:ye,replyToThread:be,removeThread:xe,removeMessage:Se,updateMessage:Ce,clearAllComments:we,generateThreadPrompt:Te,generateAllCommentsPrompt:Ee}=cS(ue?.baseCommitish,ue?.targetCommitish,e?.commit,void 0,e?.repositoryId,ue?.baseMode),De=me&&_e.length>0,Oe=(0,F.useMemo)(()=>de?`${e?.repositoryId??`default`}:${de}`:null,[e?.repositoryId,de]),ke=(0,F.useMemo)(()=>{if(!ue)return null;let e=new URLSearchParams({base:ue.baseCommitish,target:ue.targetCommitish});return ue.baseMode===`merge-base`&&e.set(`baseMode`,ue.baseMode),e.toString()},[ue]),z=(0,F.useCallback)(e=>ke?`${e}?${ke}`:e,[ke]),[Ae,je]=(0,F.useState)(null),Me=Oe!==null&&Oe===Ae,Ne=(0,F.useRef)(null),Pe=(0,F.useRef)(!1),Fe=(0,F.useRef)(null),Ie=(0,F.useRef)(!1);(0,F.useEffect)(()=>{Oe!==Ae&&(Pe.current=!1)},[Ae,Oe]);let Le=(0,F.useCallback)(async()=>{let e=await fetch(z(`/api/comments-json`));if(!e.ok)throw Error(`Failed to fetch comments: ${e.status} ${e.statusText}`);let t=await e.json();return typeof t.version==`number`&&(Fe.current=t.version),Array.isArray(t.threads)?t.threads:[]},[z]),Re=(0,F.useCallback)(async e=>{let t=await fetch(z(`/api/comments`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({threads:e,baseVersion:Fe.current??void 0})});if(!t.ok)return;let n=await t.json();typeof n.version==`number`&&(Fe.current=n.version),n.merged&&Array.isArray(n.threads)&&(Pe.current=!0,ve(n.threads))},[z,ve]),{viewedFiles:B,changedSinceViewedFiles:ze,hasLoadedInitialViewedFiles:Be,toggleFileViewed:Ve,clearViewedFiles:He}=BS(ue?.baseCommitish,ue?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId,fe.autoViewedPatterns,ue?.baseMode);(0,F.useEffect)(()=>{M.current=!1},[e?.repositoryId,de,e?.commit]),(0,F.useEffect)(()=>{!M.current&&Be&&(j(new Set(B)),M.current=!0)},[B,Be]);let{renderedFilePaths:Ue,ensureFileRendered:We,ensureFilesRenderedUpTo:Ge,registerLazyFileContainer:Ke,scrollFileIntoDiffContainer:qe}=zS({diffData:e,diffScrollContainerRef:N,setDiffData:t}),Ye=(0,F.useCallback)(async t=>{if(!e)return;let n=e.files.find(e=>e.path===t);if(!n)return;let r=B.has(t);await Ve(t,n),j(e=>{let n=new Set(e);return r?n.delete(t):n.add(t),n}),r||setTimeout(()=>{qe(t)},100)},[e,qe,Ve,B]),Xe=(0,F.useCallback)(e=>{j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Ze=(0,F.useCallback)(t=>{e&&j(t?new Set(e.files.map(e=>e.path)):new Set)},[e]),Qe=(0,F.useCallback)(()=>{y(!1)},[]),$e=(0,F.useCallback)(e=>{a(e);try{window.localStorage.setItem(iC,e)}catch{}},[]),{isLoading:et,expandLines:tt,expandAllBetweenChunks:nt,prefetchFileContent:rt,getMergedChunks:it,lastUpdatedAt:at}=fS({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish,diffIdentity:n}),st=(0,F.useRef)(it);(0,F.useEffect)(()=>{st.current=it},[it]);let[ct,lt]=(0,F.useState)(YS),ut=(0,F.useMemo)(()=>{let t=new Map;return e?.files.forEach(e=>{t.set(e.path,e)}),t},[e]);(0,F.useEffect)(()=>{if(!e){lt(YS);return}lt(XS(n,Ue,ut,e=>st.current(e)))},[e,n,ut,Ue,at]);let pt=(0,F.useMemo)(()=>e?e.files.map(e=>({...e,chunks:ZS(ct,n,e.path)||e.chunks})):[],[e,n,ct]),mt=(0,F.useMemo)(()=>{let e=new Map;return pt.forEach(t=>{e.set(t.path,eC(t))}),e},[pt]),ht=(0,F.useMemo)(()=>_e.map(e=>({id:e.id,file:e.filePath,line:typeof e.position.line==`number`?e.position.line:[e.position.line.start,e.position.line.end],side:e.position.side,createdAt:e.createdAt,updatedAt:e.updatedAt,codeContent:e.codeSnapshot?.content,isOutdated:tC(e,mt.get(e.filePath)),messages:e.messages})),[_e,mt]),_t=(0,F.useMemo)(()=>KS(ht.flatMap(e=>e.messages)),[ht]),yt=(0,F.useMemo)(()=>{let e=new Map;return ht.forEach(t=>{let n=e.get(t.file);n?n.push(t):e.set(t.file,[t])}),e},[ht]),[bt,xt]=(0,F.useState)(null),St=(0,F.useRef)(null),{shouldReload:Ct,reload:wt,watchState:Tt}=hS((0,F.useCallback)(async()=>{await St.current?.()},[]),(0,F.useCallback)(async()=>{try{let e=await Le();Pe.current=!0,ve(e),Oe&&je(Oe)}catch(e){console.error(`Failed to refresh comments from server:`,e)}},[Oe,Le,ve])),{cursor:Et,isHelpOpen:Dt,setIsHelpOpen:Ot,setCursorPosition:kt}=jS({files:pt,comments:ht,viewMode:i,reviewedFiles:B,onToggleReviewed:Ye,onCreateComment:()=>{Et&&xt({fileIndex:Et.fileIndex,chunkIndex:Et.chunkIndex,lineIndex:Et.lineIndex})},onCopyAllComments:()=>{_e.length>0&&Rt()},onDeleteAllComments:()=>{_e.length>0&&confirm(`Delete all comments?`)&&we()},onShowCommentsList:()=>{D(!0)},onRefresh:()=>{wt()}});(0,F.useEffect)(()=>{if(!e||!Et)return;let t=e.files[Et.fileIndex]?.path;!t||Ue.has(t)||(Ge(t),requestAnimationFrame(()=>{kt(Et)}))},[Et,e,Ge,Ue,kt]);let At=(0,F.useCallback)((e,t,n,r)=>{kt({fileIndex:e,chunkIndex:t,lineIndex:n,side:r})},[kt]),jt=(0,F.useCallback)(()=>{xt(null)},[xt]),Mt=(0,F.useCallback)(e=>Te(e.id),[Te]),Nt=e=>{e.preventDefault(),x(!0);let t=e.clientX,n=m,r=e=>{h(Math.max(sC,Math.min(cC,n+(e.clientX-t))))},i=()=>{x(!1),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},Pt=(0,F.useCallback)(async e=>{let n=ce.current+1;ce.current=n,le.current?.abort();let i=new AbortController;le.current=i;try{let a=e??(ae.current?se.current:void 0),s=new URLSearchParams({ignoreWhitespace:String(o)});a?.baseCommitish&&s.set(`base`,a.baseCommitish),a?.targetCommitish&&s.set(`target`,a.targetCommitish),a?.baseMode===`merge-base`&&s.set(`baseMode`,a.baseMode);let c=await fetch(`/api/diff?${s}`,{signal:i.signal});if(!c.ok)throw Error(`Failed to fetch diff data`);let l=await c.json();if(ce.current!==n)return;if(t(l),r(e=>e+1),L(l.baseCommitish&&l.requestedBaseMode!==`merge-base`?l.baseCommitish:``),l.targetCommitish&&R(l.targetCommitish),!ae.current){let e=l.requestedBaseCommitish??l.baseCommitish,t=l.requestedTargetCommitish??l.targetCommitish;e&&t&&ne(Xt(e,t,l.requestedBaseMode))}}catch(e){if(e?.name===`AbortError`||ce.current!==n)return;d(e instanceof Error?e.message:`Unknown error`)}finally{le.current===i&&(le.current=null),ce.current===n&&l(!1)}},[o]);St.current=Pt,(0,F.useEffect)(()=>{Pt()},[Pt]),(0,F.useEffect)(()=>()=>{le.current?.abort()},[]),(0,F.useEffect)(()=>{me&&i!==`unified`&&a(`unified`)},[i,me]),(0,F.useEffect)(()=>{try{window.localStorage.setItem(aC,String(m))}catch{}},[m]),(0,F.useEffect)(()=>{try{window.localStorage.setItem(oC,String(v))}catch{}},[v]),(0,F.useEffect)(()=>{fetch(`/api/revisions`).then(e=>e.ok?e.json():null).then(e=>{ee(e),e?.resolvedBase&&Yt(oe.current)!==`merge-base`&&L(t=>t||e.resolvedBase||``),e?.resolvedTarget&&R(t=>t||e.resolvedTarget||``)}).catch(()=>ee(null))},[]);let Ft=(0,F.useCallback)(async e=>{Zt(e,te)||(ae.current=!0,se.current=e,ne(e),l(!0),d(null),await Pt(e))},[Pt,te]),It=(0,F.useRef)(!1);(0,F.useEffect)(()=>{e?.clearComments&&!It.current&&(It.current=!0,Ie.current=!0,we({resetAppliedCommentImportIds:!0}),He(),console.log(`✅ All existing comments and viewed files cleared as requested via --clean flag`))},[e?.clearComments,we,He]),(0,F.useEffect)(()=>{if(!Oe||!ge||Ae===Oe||Ne.current===Oe)return;let e=Ie.current;Ie.current=!1,Ne.current=Oe;let t=!1;return(async()=>{try{let n=await Le(),r=e?n:qt(n,_e).threads;if(t)return;Pe.current=!0,ve(r),!e&&JSON.stringify(n)!==JSON.stringify(r)&&await Re(r)}catch(e){t||console.error(`Failed to bootstrap comments from server:`,e)}finally{t||je(Oe),Ne.current===Oe&&(Ne.current=null)}})(),()=>{t=!0,Ne.current===Oe&&(Ne.current=null)}},[Ae,Oe,Le,ge,ve,Re,_e]),(0,F.useEffect)(()=>{e&&(B.size<e.files.length?T(!1):B.size===e.files.length&&!w&&(C(!0),T(!0),setTimeout(()=>{C(!1)},1e3)))},[B.size,e,w]),(0,F.useEffect)(()=>{if(!Me)return;let e=JSON.stringify({threads:_e,baseVersion:Fe.current??void 0}),t=z(`/api/comments`),n=()=>{navigator.sendBeacon(t,e)};return window.addEventListener(`beforeunload`,n),Pe.current?(Pe.current=!1,()=>{window.removeEventListener(`beforeunload`,n)}):(Re(_e).catch(e=>{console.error(`Failed to sync comments:`,e)}),()=>{window.removeEventListener(`beforeunload`,n)})},[z,Me,Re,_e]),(0,F.useEffect)(()=>{let e=new EventSource(mS(`/api/heartbeat`));return e.onopen=()=>{console.log(`Connected to server heartbeat`)},e.onerror=()=>{console.log(`Server connection lost`),e.close()},()=>{e.close()}},[]);let Lt=(0,F.useCallback)((e,t,n,r,i)=>(ye({filePath:e,body:n,side:i||`new`,line:typeof t==`number`?t:{start:t[0],end:t[1]},codeSnapshot:r===void 0?void 0:{content:r,language:void 0}}),Promise.resolve()),[ye]),Rt=async()=>{try{await nn(Ee()),p(!0),setTimeout(()=>p(!1),2e3)}catch(e){console.error(`Failed to copy all comments prompt:`,e)}},zt=(0,F.useCallback)((e,t)=>(be({threadId:e,body:t}),Promise.resolve()),[be]),Bt=t=>{if(!e)return;let n=JS(t,e.files);n&&kt(n)},Vt=(0,F.useCallback)(async(e,t)=>{try{let n=await fetch(`/api/open-in-editor`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:e,line:t,editor:fe.editor})});if(!n.ok){let e=await n.json().catch(()=>null),t=n.statusText;e&&typeof e==`object`&&`error`in e&&typeof e.error==`string`&&(t=e.error),console.error(`Failed to open file in editor:`,t)}}catch(e){console.error(`Failed to open file in editor:`,e)}},[fe.editor]),Ht=e=>{kt(null);let t=e.target,n=t.closest(`[data-comment-button="true"]`),r=t.closest(`[data-open-in-editor-button="true"]`);!n&&!r&&Ut(e)},Ut=e=>{document.querySelectorAll(`form[data-empty="true"]`).forEach(t=>{t.contains(e.target)||t.querySelector(`button[type="button"]`)?.click()})};if(c)return(0,I.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-github-bg-primary`,children:(0,I.jsx)(`div`,{className:`text-github-text-secondary text-base`,children:`Loading diff...`})});if(u)return(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2`,children:[(0,I.jsx)(`h2`,{className:`text-github-danger text-2xl mb-2`,children:`Error`}),(0,I.jsx)(`p`,{className:`text-github-text-secondary text-base`,children:u})]});if(!e)return(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2`,children:[(0,I.jsx)(`h2`,{className:`text-github-danger text-2xl mb-2`,children:`No data`}),(0,I.jsx)(`p`,{className:`text-github-text-secondary text-base`,children:`No diff data available`})]});let Wt=e.openInEditorAvailable!==!1&&fe.editor.id!==`none`&&fe.editor.command.trim()!==``&&fe.editor.argsTemplate.trim()!==``;return(0,I.jsx)(_n,{children:(0,I.jsxs)(`div`,{className:`h-screen flex flex-col`,onClickCapture:Ht,children:[(0,I.jsxs)(`header`,{className:`bg-github-bg-secondary border-b border-github-border flex ${me?`flex-col`:`flex-row items-center`}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between w-full ${me?`px-3 py-2 gap-3`:`px-4 py-3 gap-4 w-auto`} ${b?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:me?`100%`:v?`${m}px`:`auto`,minWidth:me?`0px`:v?`200px`:`auto`,maxWidth:me?`none`:v?`600px`:`none`},children:[(0,I.jsx)(`h1`,{children:(0,I.jsx)(cx,{style:{height:`18px`,color:`var(--color-github-text-secondary)`}})}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`button`,{onClick:()=>y(!v),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:v?`Collapse file tree`:`Expand file tree`,"aria-expanded":v,"aria-controls":`file-tree-panel`,"aria-label":`Toggle file tree panel`,children:v?(0,I.jsx)(dt,{size:18}):(0,I.jsx)(ft,{size:18})}),(0,I.jsx)(`button`,{onClick:()=>_(!0),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:`Settings`,children:(0,I.jsx)(gt,{size:18})})]})]}),!me&&(0,I.jsx)(`div`,{className:`border-r border-github-border ${b?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:v?`4px`:`0px`,height:`calc(100% - 16px)`,margin:`8px 0`,transform:`translateX(-2px)`}}),(0,I.jsxs)(`div`,{className:`flex-1 flex flex-wrap items-center justify-between ${me?`px-3 pb-2 gap-3`:`px-4 py-3 gap-4`}`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center ${me?`gap-2`:`gap-3`}`,children:[!me&&(0,I.jsxs)(`div`,{className:`flex bg-github-bg-tertiary border border-github-border rounded-md p-1`,children:[(0,I.jsxs)(`button`,{onClick:()=>$e(`split`),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i===`split`?`bg-github-bg-primary text-github-text-primary shadow-sm`:`text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,I.jsx)(Je,{size:14}),`Split`]}),(0,I.jsxs)(`button`,{onClick:()=>$e(`unified`),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i===`unified`?`bg-github-bg-primary text-github-text-primary shadow-sm`:`text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,I.jsx)(vt,{size:14}),`Unified`]})]}),(0,I.jsx)($t,{checked:o,onChange:s,label:`Ignore Whitespace`,title:o?`Show whitespace changes`:`Ignore whitespace changes`}),(0,I.jsx)(lx,{shouldReload:Ct,isReloading:Tt.isReloading,onReload:wt,changeType:Tt.lastChangeType,compact:me})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${me?`gap-3`:`gap-4`}`,children:[!me&&_e.length>0&&(0,I.jsx)(en,{commentsCount:_e.length,isCopiedAll:f,onCopyAll:Rt,onDeleteAll:we,onViewAll:()=>D(!0)}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 items-center`,children:[(0,I.jsxs)(`div`,{className:`text-xs relative`,children:[B.size===e.files.length?`All diffs difit-ed!`:`${B.size} / ${e.files.length} files viewed`,(0,I.jsx)(Vx,{isActive:S})]}),(0,I.jsx)(`div`,{className:`relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden`,style:{width:`90px`,border:`1px solid var(--color-github-border)`},children:(0,I.jsx)(`div`,{className:`absolute top-0 right-0 h-full transition-all duration-300 ease-out`,style:{width:`${(e.files.length-B.size)/e.files.length*100}%`,backgroundColor:(()=>{let t=(e.files.length-B.size)/e.files.length*100;return t>50?`var(--color-github-accent)`:t>20?`var(--color-github-warning)`:`var(--color-github-danger)`})()}})})]}),P?(0,I.jsx)(Wc,{options:P,selection:te,resolvedBaseRevision:re,resolvedTargetRevision:ie,onSelectDiff:e=>void Ft(e),onOpenAdvanced:()=>k(!0),compact:!he}):(0,I.jsxs)(`span`,{className:`text-xs`,children:[`Reviewing:`,` `,(0,I.jsx)(`code`,{className:`bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary`,children:e.commit.includes(`...`)?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`text-github-text-secondary font-medium`,children:[e.commit.split(`...`)[0],`...`]}),(0,I.jsx)(`span`,{className:`font-medium`,children:e.commit.split(`...`)[1]})]}):e.commit})]})]})]})]}),P&&(0,I.jsx)(fx,{isOpen:O,onClose:()=>k(!1),options:P,selection:te,resolvedBaseRevision:re,resolvedTargetRevision:ie,onApply:e=>void Ft(e)},O?Qt(te):`closed`),me&&v&&(0,I.jsx)(`button`,{type:`button`,"aria-label":`Close file tree`,className:`fixed inset-0 bg-black/40 z-30`,onClick:()=>y(!1)}),(0,I.jsxs)(`div`,{className:`flex flex-1 overflow-hidden relative`,children:[(0,I.jsx)(`div`,{className:`relative overflow-hidden ${b?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:me?`0px`:v?`${m}px`:`0px`},children:(0,I.jsxs)(`aside`,{id:`file-tree-panel`,className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${me?`fixed inset-y-0 right-0 z-40 w-[min(85vw,360px)] border-l border-github-border transition-transform duration-300 ease-out`:`relative border-r border-github-border`}`,style:{width:me?`min(85vw, 360px)`:`${m}px`,minWidth:me?`0px`:`200px`,maxWidth:me?`none`:`600px`,height:`100%`,transform:me?v?`translateX(0)`:`translateX(100%)`:void 0},children:[(0,I.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,I.jsx)(ax,{files:e.files,onScrollToFile:qe,onFileSelected:me?Qe:void 0,comments:ht,reviewedFiles:B,onToggleReviewed:Ye,selectedFileIndex:Et?.fileIndex??null})}),!me&&(0,I.jsxs)(`div`,{className:`p-4 border-t border-github-border flex justify-between items-center`,children:[(0,I.jsxs)(`button`,{onClick:()=>Ot(!0),className:`flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors`,title:`Keyboard shortcuts (Shift+?)`,children:[(0,I.jsx)(ot,{size:16}),(0,I.jsx)(`span`,{className:`text-sm`,children:`Shortcuts`})]}),(0,I.jsxs)(`a`,{href:`https://github.com/yoshiko-pg/difit`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors`,title:`View on GitHub`,children:[(0,I.jsx)(`span`,{className:`text-sm`,children:`Star on GitHub`}),(0,I.jsx)(ox,{style:{height:`18px`,width:`18px`}})]})]})]})}),!me&&(0,I.jsx)(`div`,{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${b?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:v?`4px`:`0px`},onMouseDown:Nt,title:`Drag to resize file list`}),(0,I.jsx)(`main`,{ref:N,className:`flex-1 overflow-y-auto ${De?`pb-16`:``}`,children:e.files.map((t,r)=>{let a=yt.get(t.path)??nC,o=ZS(ct,n,t.path)??rC,s=Ue.has(t.path);return(0,I.jsx)(`div`,{id:PS(t.path),"data-file-path":t.path,"data-rendered":s?`true`:`false`,ref:e=>Ke(t.path,e),className:`mb-6`,children:s?(0,I.jsx)(Zb,{file:t,threads:a,showAuthorBadges:_t,diffMode:i,reviewedFiles:B,isChangedSinceViewed:ze.has(t.path),onToggleReviewed:Ye,collapsedFiles:A,onToggleCollapsed:Xe,onToggleAllCollapsed:Ze,onAddComment:Lt,onGenerateThreadPrompt:Mt,onRemoveThread:xe,onReplyToThread:zt,onRemoveMessage:Se,onUpdateMessage:Ce,onOpenInEditor:Wt?Vt:void 0,syntaxTheme:fe.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:Et?.fileIndex===r?Et:null,fileIndex:r,onLineClick:At,commentTrigger:bt?.fileIndex===r?bt:null,onCommentTriggerHandled:jt,mergedChunks:o,expandLines:tt,expandAllBetweenChunks:nt,prefetchFileContent:rt,isExpandLoading:et,diffVersion:n}):(0,I.jsx)(`div`,{className:`bg-github-bg-secondary border border-github-border rounded-md px-4 py-3`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-github-text-muted`,children:`Deferred Rendering`}),(0,I.jsx)(`div`,{className:`text-sm font-mono text-github-text-primary truncate`,children:t.path})]}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>We(t.path),className:`px-3 py-1.5 text-xs rounded border border-github-border text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary`,children:`Load now`})]})})},t.path)})})]}),De&&(0,I.jsx)(`div`,{className:`fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end`,children:(0,I.jsx)(en,{commentsCount:_e.length,isCopiedAll:f,onCopyAll:Rt,onDeleteAll:we,onViewAll:()=>D(!0),direction:`up`,compact:!0})}),g&&(0,I.jsx)(zx,{isOpen:g,onClose:()=>_(!1),settings:fe,onSettingsChange:pe}),(0,I.jsx)(sx,{isOpen:Dt,onClose:()=>Ot(!1)}),(0,I.jsx)(Qr,{isOpen:E,onClose:()=>D(!1),onNavigate:Bt,comments:ht,showAuthorBadges:_t,onRemoveThread:xe,onGenerateThreadPrompt:Mt,onReplyToThread:zt,onRemoveMessage:Se,onUpdateMessage:Ce,syntaxTheme:fe.syntaxTheme})]})})}var hC=document.getElementById(`root`);if(!hC)throw Error(`Root element not found`);ee.createRoot(hC).render((0,I.jsx)(F.StrictMode,{children:(0,I.jsx)(Te,{initiallyActiveScopes:[`navigation`],children:(0,I.jsx)(mC,{})})}));export{o as n,l as r,H as t};
|