docs-i18n 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/app/lib/auth-client.ts +1 -1
- package/admin/app/lib/auth.server.ts +51 -1
- package/admin/app/server.ts +4 -1
- package/admin/dist/client/assets/{auth-client-DqJZaFZR.js → auth-client-ChAoRxRf.js} +1 -1
- package/admin/dist/client/assets/{login-CQjkiBAF.js → login-DpI70f1L.js} +1 -1
- package/admin/dist/client/assets/{main-bc5tcdGg.js → main-HccfHTVt.js} +2 -2
- package/admin/dist/client/assets/{routes-CTPOG_v1.js → routes-D1wZzUqP.js} +1 -1
- package/admin/dist/server/assets/Match-BeWrYoSG.js +3236 -0
- package/admin/dist/server/assets/{__tanstack-start-server-fn-resolver-D1Ni2lpa.js → __tanstack-start-server-fn-resolver-SG4WUVWE.js} +27 -27
- package/admin/dist/server/assets/{_tanstack-start-manifest_v-BgMVPPt2.js → _tanstack-start-manifest_v-CZNmyv5h.js} +4 -4
- package/admin/dist/server/assets/{adapter-DjXlUL1J.js → adapter-Btzrjxp2.js} +1 -1
- package/admin/dist/server/assets/auth-Hlc_ErDZ.js +40 -0
- package/admin/dist/server/assets/{auth-client-CoUpyQIM.js → auth-client-DZADgYlJ.js} +3 -3
- package/admin/dist/server/assets/auth.server-C-Ece-zJ.js +2 -0
- package/admin/dist/server/assets/{auth.server-BLVDnTCZ.js → auth.server-C5kH0jex.js} +53 -12
- package/admin/dist/server/assets/{bun-sqlite-dialect-C8OaCWSL-BNNY-FoT.js → bun-sqlite-dialect-C8OaCWSL-kcfNhLVL.js} +2 -2
- package/admin/dist/server/assets/{compiled-query-CnFG_BVV.js → compiled-query-BniCsfyw.js} +1 -1
- package/admin/dist/server/assets/createServerFn-CAF9Kl7K.js +370 -0
- package/admin/dist/server/assets/{createServerRpc-Cyyxq9HQ.js → createServerRpc-D1Slsi4e.js} +1 -1
- package/admin/dist/server/assets/{d1-sqlite-dialect-sYHNqBte-Bjz-cybU.js → d1-sqlite-dialect-sYHNqBte-DH7CDIkk.js} +2 -2
- package/admin/dist/server/assets/{dist-BnKtYOU0.js → dist-3sjmTS6w.js} +1 -6
- package/admin/dist/server/assets/{dist-CUzFWZag.js → dist-B_54zSkq.js} +8 -8
- package/admin/dist/server/assets/dist-CaR9v9w1.js +2 -0
- package/admin/dist/server/assets/{dist-C3-e8E2B.js → dist-D3NMliQC.js} +2 -2
- package/admin/dist/server/assets/{error-codes-BhMTGvV6.js → error-codes-Dw4P_cJu.js} +1 -1
- package/admin/dist/server/assets/init-CSXxGq7r.js +2 -0
- package/admin/dist/server/assets/{init-SZW7wW3l.js → init-QOUAlWr8.js} +3 -3
- package/admin/dist/server/assets/{jobs-DVAdIxgN.js → jobs-CcwecqaK.js} +5 -5
- package/admin/dist/server/assets/{kysely-adapter-YC8RFPyc.js → kysely-adapter-DZDLFHLq.js} +1 -1
- package/admin/dist/server/assets/{login-SqzTMYOZ.js → login-BMn8hY2z.js} +2 -2
- package/admin/dist/server/assets/{misc-D0n9L-9D.js → misc-leinq0id.js} +5 -5
- package/admin/dist/server/assets/{models-CoviNHUP.js → models-DTJbdHu7.js} +2 -2
- package/admin/dist/server/assets/{node-sqlite-dialect-BJIaP6lL.js → node-sqlite-dialect-CTaKW6AP.js} +2 -2
- package/admin/dist/server/assets/request-response-Bj40K48O.js +589 -0
- package/admin/dist/server/assets/{router-noqexgr0.js → router-B4k1eDGl.js} +4 -4
- package/admin/dist/server/assets/{routes-CLdSUfb7.js → routes-D0bCl8P2.js} +4 -8
- package/admin/dist/server/assets/{routes-BG89QZ0_.js → routes-ef6kOTX8.js} +4 -4
- package/admin/dist/server/assets/{sqlite-adapter-CL2EidjD.js → sqlite-adapter-C24CHMIE.js} +1 -1
- package/admin/dist/server/assets/{status-BYF_y9fT.js → status-Bdrqzx_H.js} +2 -2
- package/admin/dist/server/assets/status-C_h82YTJ.js +2 -0
- package/admin/dist/server/assets/{status-C-jmHj1T.js → status-VBCTGlIL.js} +4 -4
- package/admin/dist/server/server.js +77 -4234
- package/admin/server/functions/auth.ts +0 -48
- package/admin/vite.config.ts +9 -5
- package/dist/{assemble-S3MWVLBI.js → assemble-FKIKC5I4.js} +3 -3
- package/dist/{chunk-JHBSHTXC.js → chunk-HUBYJOX7.js} +1 -1
- package/dist/{chunk-CLYUAWZE.js → chunk-KC3IKBKF.js} +1 -1
- package/dist/{chunk-PNKVD2UK.js → chunk-KFQGP6VL.js} +7 -0
- package/dist/cli.js +16 -21
- package/dist/{pipeline-3XGFR4QL.js → pipeline-6F7CLVOH.js} +5 -5
- package/dist/{rescan-7XDHUNH5.js → rescan-RQQNQJPE.js} +2 -2
- package/dist/{runner-KUGSO4CL.js → runner-SO4OYQWW.js} +1 -1
- package/dist/{status-NX47XZIU.js → status-AVK3JWVT.js} +1 -1
- package/dist/{translate-AGUNMZMQ.js → translate-AMKKSZ63.js} +3 -3
- package/dist/{upload-KYKJVERO.js → upload-7XWK5UTZ.js} +86 -4
- package/package.json +1 -1
- package/template/dist/client/assets/{Doc-CbmLeLjl.js → Doc-BKO69_nz.js} +1 -1
- package/template/dist/client/assets/{DocsLayout-ERG7nrAc.js → DocsLayout-BGugXxEQ.js} +1 -1
- package/template/dist/client/assets/{FileTabs-CCynw0nL.js → FileTabs-4fZriOj4.js} +1 -1
- package/template/dist/client/assets/{Footer-l6Y8-ltB.js → Footer-DYh1AfWA.js} +1 -1
- package/template/dist/client/assets/{FrameworkContent-pNf68F7f.js → FrameworkContent-rVvjxASn.js} +1 -1
- package/template/dist/client/assets/{MarkdownHeadingContext-6I862CKH.js → MarkdownHeadingContext-CdvUDZFU.js} +4 -4
- package/template/dist/client/assets/{PostNotFound-ScC0039d.js → PostNotFound-WoSYGsGu.js} +1 -1
- package/template/dist/client/assets/{_basePickBy-B-GcvGxW.js → _basePickBy-Dd7GuR7A.js} +1 -1
- package/template/dist/client/assets/{_baseUniq-C1WySGZQ.js → _baseUniq-DMxQLGFI.js} +1 -1
- package/template/dist/client/assets/_lang-3AqGszEy.js +1 -0
- package/template/dist/client/assets/_lang._project-COkrIqzH.js +1 -0
- package/template/dist/client/assets/_lang._project._version-B8vRZczu.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs-aw08dKvN.js → _lang._project._version.docs-DokNGgvU.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs._-B4Vb_S0V.js → _lang._project._version.docs._-CXCNZzOb.js} +1 -1
- package/template/dist/client/assets/_lang._project._version.docs._-DR0WSQEb.js +1 -0
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-C_Grro8r.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs.framework._framework.index-DInYPTXM.js → _lang._project._version.docs.framework._framework.index-DsYjXRdj.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs.framework.index-B7EvJmBI.js → _lang._project._version.docs.framework.index-DQX1lBi3.js} +1 -1
- package/template/dist/client/assets/{_lang._project.docs-4oX3ADgu.js → _lang._project.docs-DsYQj9jI.js} +1 -1
- package/template/dist/client/assets/_lang._project.docs._-DlM_D6DD.js +1 -0
- package/template/dist/client/assets/{_lang._project.docs._-emq0IsQw.js → _lang._project.docs._-l2tTjx80.js} +1 -1
- package/template/dist/client/assets/_lang.blog-CEwEtalL.js +1 -0
- package/template/dist/client/assets/_lang.blog-D6YGC3tK.js +1 -0
- package/template/dist/client/assets/_lang.blog._-DgHu4oLy.js +1 -0
- package/template/dist/client/assets/{_lang.blog._-DErizs7q.js → _lang.blog._-Umz18sQE.js} +1 -1
- package/template/dist/client/assets/_lang.blog.index-C8LKUFtD.js +1 -0
- package/template/dist/client/assets/{_lang.blog.index-DZDuDkQr.js → _lang.blog.index-DzUqpOBE.js} +1 -1
- package/template/dist/client/assets/{_lang.docs-CQK0rfqt.js → _lang.docs-CUh3R7DD.js} +1 -1
- package/template/dist/client/assets/{_lang.docs._-BiCvgeV1.js → _lang.docs._-DlgTPy3s.js} +1 -1
- package/template/dist/client/assets/_lang.docs._-DmaQE7lx.js +1 -0
- package/template/dist/client/assets/_lang.docs.framework._framework._-B4C4uDFp.js +1 -0
- package/template/dist/client/assets/{_lang.docs.framework._framework.index-Bu5p5Q_r.js → _lang.docs.framework._framework.index-DTg6Xd3p.js} +1 -1
- package/template/dist/client/assets/{_lang.docs.framework.index-uTDFLagP.js → _lang.docs.framework.index-BQ2enasl.js} +1 -1
- package/template/dist/client/assets/{arc-C16C7aa3.js → arc-DGPgC_QF.js} +1 -1
- package/template/dist/client/assets/{architectureDiagram-2XIMDMQ5-DgSSDH9Z.js → architectureDiagram-2XIMDMQ5-yI53_GAi.js} +1 -1
- package/template/dist/client/assets/{blockDiagram-WCTKOSBZ-Bs8e58Or.js → blockDiagram-WCTKOSBZ-C3tr24zy.js} +1 -1
- package/template/dist/client/assets/{c4Diagram-IC4MRINW-DsGaAPtm.js → c4Diagram-IC4MRINW-DOA-mowm.js} +1 -1
- package/template/dist/client/assets/channel-DzZD7dUQ.js +1 -0
- package/template/dist/client/assets/{chunk-4BX2VUAB-BQdq93Vq.js → chunk-4BX2VUAB-B6NSnNJJ.js} +1 -1
- package/template/dist/client/assets/{chunk-55IACEB6-zjp4uUiZ.js → chunk-55IACEB6-CWYwArBH.js} +1 -1
- package/template/dist/client/assets/{chunk-FMBD7UC4-CEdYlBOF.js → chunk-FMBD7UC4-DSyn2wIW.js} +1 -1
- package/template/dist/client/assets/{chunk-JSJVCQXG-CVkDw9ls.js → chunk-JSJVCQXG-D83nm5W0.js} +1 -1
- package/template/dist/client/assets/{chunk-KX2RTZJC--1vKv-mr.js → chunk-KX2RTZJC-DD7fN9e9.js} +1 -1
- package/template/dist/client/assets/{chunk-NQ4KR5QH-Cpo-W18l.js → chunk-NQ4KR5QH-C3YlYiU5.js} +1 -1
- package/template/dist/client/assets/{chunk-QZHKN3VN-BizWJuB4.js → chunk-QZHKN3VN-B7wBEuCG.js} +1 -1
- package/template/dist/client/assets/{chunk-WL4C6EOR-6lLYa9R1.js → chunk-WL4C6EOR-ByA1FloT.js} +1 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-CRozKaUD.js +1 -0
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-CRozKaUD.js +1 -0
- package/template/dist/client/assets/clone-CGnOEl4E.js +1 -0
- package/template/dist/client/assets/{cose-bilkent-S5V4N54A-CaD0EGPJ.js → cose-bilkent-S5V4N54A-nt_sXfWc.js} +1 -1
- package/template/dist/client/assets/{dagre-KLK3FWXG-h4F9WtDQ.js → dagre-KLK3FWXG-DUsyMTPd.js} +1 -1
- package/template/dist/client/assets/{diagram-E7M64L7V-CBUSWzH5.js → diagram-E7M64L7V-D5SAypX0.js} +1 -1
- package/template/dist/client/assets/{diagram-IFDJBPK2-C5oMubv0.js → diagram-IFDJBPK2-WhP5c8Vz.js} +1 -1
- package/template/dist/client/assets/{diagram-P4PSJMXO-DdPwwhHR.js → diagram-P4PSJMXO-AMrwIlhf.js} +1 -1
- package/template/dist/client/assets/{erDiagram-INFDFZHY-0U5A-RF0.js → erDiagram-INFDFZHY-BxifSpCV.js} +1 -1
- package/template/dist/client/assets/{flowDiagram-PKNHOUZH-CXN3pvSW.js → flowDiagram-PKNHOUZH-BMAowE9I.js} +1 -1
- package/template/dist/client/assets/{ganttDiagram-A5KZAMGK-DlovlSO7.js → ganttDiagram-A5KZAMGK-Bay-0iRq.js} +1 -1
- package/template/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-Bo-Jjy7v.js → gitGraphDiagram-K3NZZRJ6-Va91W3gw.js} +1 -1
- package/template/dist/client/assets/{graph-C0TauvuO.js → graph-CbBYObK_.js} +1 -1
- package/template/dist/client/assets/{index-iATq4LEm.js → index-CF6qz2tX.js} +1 -1
- package/template/dist/client/assets/{infoDiagram-LFFYTUFH-BbvPzztn.js → infoDiagram-LFFYTUFH-Byd5C-4U.js} +1 -1
- package/template/dist/client/assets/{ishikawaDiagram-PHBUUO56-DKCMONMO.js → ishikawaDiagram-PHBUUO56-DxOKnE1v.js} +1 -1
- package/template/dist/client/assets/{journeyDiagram-4ABVD52K-D9NP_vvu.js → journeyDiagram-4ABVD52K-IRmt7RI4.js} +1 -1
- package/template/dist/client/assets/{kanban-definition-K7BYSVSG-X-u_nWxK.js → kanban-definition-K7BYSVSG-BjTVXn-R.js} +1 -1
- package/template/dist/client/assets/{layout-IeRzBrUX.js → layout-Bbx6A0bC.js} +1 -1
- package/template/dist/client/assets/{linear-DEzVUeiK.js → linear-Df2eAW4A.js} +1 -1
- package/template/dist/client/assets/{main-Csj9i19C.js → main-DqZtiCro.js} +2 -2
- package/template/dist/client/assets/{mermaid.core-CCnh2DG0.js → mermaid.core-BIoiBcAA.js} +4 -4
- package/template/dist/client/assets/{mindmap-definition-YRQLILUH-DgyN4Ft-.js → mindmap-definition-YRQLILUH-Btzz0iIP.js} +1 -1
- package/template/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/template/dist/client/assets/{pieDiagram-SKSYHLDU-DDVqU_2Q.js → pieDiagram-SKSYHLDU-C2amrGtU.js} +1 -1
- package/template/dist/client/assets/{quadrantDiagram-337W2JSQ-BeUxMqle.js → quadrantDiagram-337W2JSQ-EVgH9VuN.js} +1 -1
- package/template/dist/client/assets/{react-os8EX6z1.js → react-qvbbiZob.js} +1 -1
- package/template/dist/client/assets/{requirementDiagram-Z7DCOOCP-CpzdlyEd.js → requirementDiagram-Z7DCOOCP-BkYPbRis.js} +1 -1
- package/template/dist/client/assets/{sankeyDiagram-WA2Y5GQK-CmSWF6XU.js → sankeyDiagram-WA2Y5GQK-B5EIaP-h.js} +1 -1
- package/template/dist/client/assets/{sequenceDiagram-2WXFIKYE-DarofLka.js → sequenceDiagram-2WXFIKYE-BC33VGOc.js} +1 -1
- package/template/dist/client/assets/{stateDiagram-RAJIS63D-CEio2h-7.js → stateDiagram-RAJIS63D-DiKvWUYb.js} +1 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-DjKMPYGe.js +1 -0
- package/template/dist/client/assets/{timeline-definition-YZTLITO2-By_Wk6uc.js → timeline-definition-YZTLITO2-QiFlgbRA.js} +1 -1
- package/template/dist/client/assets/{treemap-KZPCXAKY-mKcaMbv9.js → treemap-KZPCXAKY-BOYbyS9G.js} +1 -1
- package/template/dist/client/assets/{vennDiagram-LZ73GAT5-Dx_Fh7nH.js → vennDiagram-LZ73GAT5-CqmW7j4r.js} +1 -1
- package/template/dist/client/assets/{xychartDiagram-JWTSCODW-DSAwWbBw.js → xychartDiagram-JWTSCODW-gj6oWX8l.js} +1 -1
- package/template/dist/server/assets/{Doc-B8TJBEmx.js → Doc-9tJiX5y6.js} +3 -3
- package/template/dist/server/assets/{DocsLayout-CnWgvk8u.js → DocsLayout-BTjhU_W5.js} +2 -2
- package/template/dist/server/assets/{Footer-WapWK45U.js → Footer-CefTi2yh.js} +1 -1
- package/template/dist/server/assets/{FrameworkContent-gzqT-Q1n.js → FrameworkContent-BkJvuP04.js} +2 -2
- package/template/dist/server/assets/{MarkdownHeadingContext-Iyk66Y4x.js → MarkdownHeadingContext-37oQpb36.js} +3 -3
- package/template/dist/server/assets/{PostNotFound-GKdNuzsX.js → PostNotFound-BqBZf83v.js} +1 -1
- package/template/dist/server/assets/{_basePickBy-DJ9gzwF8.js → _basePickBy-DZ3TPUta.js} +2 -2
- package/template/dist/server/assets/{_baseUniq-CezmbvU2.js → _baseUniq-DKicWTQT.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs-BOZ34yW7.js → _lang._project._version.docs-U-t4mk5_.js} +3 -3
- package/template/dist/server/assets/{_lang._project._version.docs._-5W2jN7Re.js → _lang._project._version.docs._-DMgnElWM.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework._-DeN_oA8l.js → _lang._project._version.docs.framework._framework._-kBw_9L-F.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework.index-jWKDCQSE.js → _lang._project._version.docs.framework._framework.index-Bsyj0DD5.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework.index-DOT4MtjZ.js → _lang._project._version.docs.framework.index-CmLAP_Io.js} +1 -1
- package/template/dist/server/assets/{_lang._project.docs-r4V9TXuu.js → _lang._project.docs-Bb4ZZ_jr.js} +3 -3
- package/template/dist/server/assets/{_lang._project.docs._-Bge7JaYE.js → _lang._project.docs._-ChrpJ61j.js} +5 -5
- package/template/dist/server/assets/{_lang.blog-DJOfiyA8.js → _lang.blog-8j6IvzvQ.js} +2 -2
- package/template/dist/server/assets/{_lang.blog._-yJSqbX08.js → _lang.blog._-BPzP97Ac.js} +2 -2
- package/template/dist/server/assets/{_lang.blog.index-CrdyROhK.js → _lang.blog._-DNX8UglA.js} +2 -2
- package/template/dist/server/assets/{_lang.blog.index-Df_6_IKx.js → _lang.blog.index-CeZnMJBi.js} +1 -1
- package/template/dist/server/assets/{_lang.blog._-C7iqMj9O.js → _lang.blog.index-DzVKqoC4.js} +2 -2
- package/template/dist/server/assets/{_lang.docs-Jwt4deTW.js → _lang.docs-B4StnHMb.js} +3 -3
- package/template/dist/server/assets/{_lang.docs._-D_DdKLAV.js → _lang.docs._--c0In1AT.js} +5 -5
- package/template/dist/server/assets/{_lang.docs.framework._framework._-BkQaZ_1f.js → _lang.docs.framework._framework._-Be0U7cDg.js} +5 -5
- package/template/dist/server/assets/{_lang.docs.framework._framework.index-BLx8p8IS.js → _lang.docs.framework._framework.index-BZ512aSk.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework.index-BytQ_q8T.js → _lang.docs.framework.index-U8z3j4kz.js} +1 -1
- package/template/dist/server/assets/{_tanstack-start-manifest_v-RX6ItZ5S.js → _tanstack-start-manifest_v-DXpQ8503.js} +1 -1
- package/template/dist/server/assets/{arc-BwftnT5H.js → arc-B4h6h_n6.js} +1 -1
- package/template/dist/server/assets/{architecture-PBZL5I3N-KbDVC6gM.js → architecture-PBZL5I3N-CUwqLXkR.js} +6 -6
- package/template/dist/server/assets/{architectureDiagram-2XIMDMQ5-BoLvWxb3.js → architectureDiagram-2XIMDMQ5-CuCoxdBe.js} +6 -6
- package/template/dist/server/assets/{blockDiagram-WCTKOSBZ-GPFcXs-f.js → blockDiagram-WCTKOSBZ-D5PsUOim.js} +6 -6
- package/template/dist/server/assets/{c4Diagram-IC4MRINW-EQwQCspo.js → c4Diagram-IC4MRINW-CXy5xO3o.js} +2 -2
- package/template/dist/server/assets/{channel-CxvwuPH7.js → channel-D0l-mWaF.js} +1 -1
- package/template/dist/server/assets/{chunk-4BX2VUAB-DUgcw5ei.js → chunk-4BX2VUAB-M7FVHMss.js} +1 -1
- package/template/dist/server/assets/{chunk-55IACEB6-Cn15uD91.js → chunk-55IACEB6-D_gDAje5.js} +1 -1
- package/template/dist/server/assets/{chunk-FMBD7UC4-Ck3iyLPu.js → chunk-FMBD7UC4-B5Bebx-Y.js} +1 -1
- package/template/dist/server/assets/{chunk-JSJVCQXG-VAT8yncE.js → chunk-JSJVCQXG-DxBkq-uB.js} +1 -1
- package/template/dist/server/assets/{chunk-KX2RTZJC-B1bd2VmA.js → chunk-KX2RTZJC-BMHm1EGi.js} +1 -1
- package/template/dist/server/assets/{chunk-NQ4KR5QH-CR67GG9C.js → chunk-NQ4KR5QH-Cp28pTwT.js} +3 -3
- package/template/dist/server/assets/{chunk-QZHKN3VN-B9SSazM4.js → chunk-QZHKN3VN-Bq5GZqaR.js} +1 -1
- package/template/dist/server/assets/{chunk-WL4C6EOR-DZ4Pjuao.js → chunk-WL4C6EOR-C9Nj5GdW.js} +5 -5
- package/template/dist/server/assets/{classDiagram-VBA2DB6C-CA6_4Wb2.js → classDiagram-VBA2DB6C-CUchv9T5.js} +6 -6
- package/template/dist/server/assets/{classDiagram-v2-RAHNMMFH-CA6_4Wb2.js → classDiagram-v2-RAHNMMFH-CUchv9T5.js} +6 -6
- package/template/dist/server/assets/{clone-DJHP_iVy.js → clone-CJcTi58S.js} +1 -1
- package/template/dist/server/assets/{cose-bilkent-S5V4N54A-DtU-cN6W.js → cose-bilkent-S5V4N54A-CxvCMhN_.js} +1 -1
- package/template/dist/server/assets/{dagre-KLK3FWXG-yZYrVU4p.js → dagre-KLK3FWXG-B5bQP7FL.js} +6 -6
- package/template/dist/server/assets/{diagram-E7M64L7V-8Yyz0aw0.js → diagram-E7M64L7V-NjHca90S.js} +8 -8
- package/template/dist/server/assets/{diagram-IFDJBPK2-DcxFYI3M.js → diagram-IFDJBPK2-CoTCfBKd.js} +6 -6
- package/template/dist/server/assets/{diagram-P4PSJMXO-CehxUcI0.js → diagram-P4PSJMXO-DHvGgYjH.js} +6 -6
- package/template/dist/server/assets/{erDiagram-INFDFZHY-Bu2p1_Pj.js → erDiagram-INFDFZHY-01crajKr.js} +4 -4
- package/template/dist/server/assets/{flowDiagram-PKNHOUZH-B_eKR7I0.js → flowDiagram-PKNHOUZH-BkUQ_vxg.js} +6 -6
- package/template/dist/server/assets/{ganttDiagram-A5KZAMGK-DP6YEZof.js → ganttDiagram-A5KZAMGK-DvrO-w2P.js} +2 -2
- package/template/dist/server/assets/{gitGraph-HDMCJU4V-Bt0qhVL4.js → gitGraph-HDMCJU4V-h9JNaxB7.js} +6 -6
- package/template/dist/server/assets/{gitGraphDiagram-K3NZZRJ6-DwvkdYrg.js → gitGraphDiagram-K3NZZRJ6-BoKm6Fm-.js} +7 -7
- package/template/dist/server/assets/{graph-BVFNe_k5.js → graph-BoxbfI7Z.js} +2 -2
- package/template/dist/server/assets/{index-DvBGSZeA.js → index-Jfzi6SZW.js} +2 -2
- package/template/dist/server/assets/{info-3K5VOQVL-CFejRnvB.js → info-3K5VOQVL-DgaSHqkS.js} +6 -6
- package/template/dist/server/assets/{infoDiagram-LFFYTUFH-D0v9uyXI.js → infoDiagram-LFFYTUFH-DgV5W8-I.js} +5 -5
- package/template/dist/server/assets/{ishikawaDiagram-PHBUUO56-DZumspL4.js → ishikawaDiagram-PHBUUO56-CqlMQ0Fq.js} +1 -1
- package/template/dist/server/assets/{journeyDiagram-4ABVD52K-nRp_-qZp.js → journeyDiagram-4ABVD52K-D6ySTub8.js} +4 -4
- package/template/dist/server/assets/{kanban-definition-K7BYSVSG-BMKyyzjt.js → kanban-definition-K7BYSVSG-BT8m7Cwk.js} +2 -2
- package/template/dist/server/assets/{layout-mpiN5R-5.js → layout-CkYcErfn.js} +4 -4
- package/template/dist/server/assets/{linear-CqNYgjEx.js → linear-F_0dWGZL.js} +1 -1
- package/template/dist/server/assets/{mermaid-parser.core-B8Uu3QZY.js → mermaid-parser.core-q5MdUJuo.js} +11 -11
- package/template/dist/server/assets/{mermaid.core-BI3nMhNO.js → mermaid.core-DOWTODR1.js} +31 -31
- package/template/dist/server/assets/{mindmap-definition-YRQLILUH-DCoFqLPh.js → mindmap-definition-YRQLILUH-BQxlQqn-.js} +3 -3
- package/template/dist/server/assets/{ordinal-Bcam90FY.js → ordinal-CxptdPJm.js} +1 -1
- package/template/dist/server/assets/{packet-RMMSAZCW-djgonfKN.js → packet-RMMSAZCW-D8FkLZuP.js} +6 -6
- package/template/dist/server/assets/{pie-UPGHQEXC-Dug2t-PE.js → pie-UPGHQEXC-Diw2fHLk.js} +6 -6
- package/template/dist/server/assets/{pieDiagram-SKSYHLDU-CS0_hW4w.js → pieDiagram-SKSYHLDU-B1J4UJZ7.js} +8 -8
- package/template/dist/server/assets/{quadrantDiagram-337W2JSQ-BpQNM0zu.js → quadrantDiagram-337W2JSQ-BvjKLapg.js} +2 -2
- package/template/dist/server/assets/{radar-KQ55EAFF-3ir2W9Wi.js → radar-KQ55EAFF-CcBdPU3n.js} +6 -6
- package/template/dist/server/assets/{requirementDiagram-Z7DCOOCP-D92RyjV4.js → requirementDiagram-Z7DCOOCP-Bgr_wnAs.js} +3 -3
- package/template/dist/server/assets/{router-DPPgDicW.js → router-DxwPl-Dc.js} +18 -18
- package/template/dist/server/assets/{sankeyDiagram-WA2Y5GQK-DCPRB-xO.js → sankeyDiagram-WA2Y5GQK-B0UwtyW3.js} +2 -2
- package/template/dist/server/assets/{sequenceDiagram-2WXFIKYE-C1ab2VvU.js → sequenceDiagram-2WXFIKYE-BbxQJHjO.js} +3 -3
- package/template/dist/server/assets/{stateDiagram-RAJIS63D-GhG1G3ff.js → stateDiagram-RAJIS63D-Cg-uJ_UO.js} +8 -8
- package/template/dist/server/assets/{stateDiagram-v2-FVOUBMTO-C-KtMadV.js → stateDiagram-v2-FVOUBMTO-BWVPrqfa.js} +4 -4
- package/template/dist/server/assets/{timeline-definition-YZTLITO2-DyfAQCd4.js → timeline-definition-YZTLITO2-DCSJT2WT.js} +2 -2
- package/template/dist/server/assets/{treemap-KZPCXAKY-Cn0Cw4Cl.js → treemap-KZPCXAKY-a0nhlKgx.js} +6 -6
- package/template/dist/server/assets/{vennDiagram-LZ73GAT5-D2Ak5JUa.js → vennDiagram-LZ73GAT5-Bk2HQEQq.js} +1 -1
- package/template/dist/server/assets/{xychartDiagram-JWTSCODW-DqoBOs1L.js → xychartDiagram-JWTSCODW-C4svHkt_.js} +3 -3
- package/template/dist/server/server.js +9 -9
- package/admin/dist/server/assets/auth-dSAIPjBw.js +0 -72
- package/template/dist/client/assets/_lang-B3tRf7os.js +0 -1
- package/template/dist/client/assets/_lang._project-CH0inpmY.js +0 -1
- package/template/dist/client/assets/_lang._project._version-CESvrqds.js +0 -1
- package/template/dist/client/assets/_lang._project._version.docs._-BexMyJr9.js +0 -1
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-BbQgUWTH.js +0 -1
- package/template/dist/client/assets/_lang._project.docs._-R9bOn492.js +0 -1
- package/template/dist/client/assets/_lang.blog-BViCs72M.js +0 -1
- package/template/dist/client/assets/_lang.blog-DhVkwYEk.js +0 -1
- package/template/dist/client/assets/_lang.blog._-BHdaHDBU.js +0 -1
- package/template/dist/client/assets/_lang.blog.index-CELEUrkj.js +0 -1
- package/template/dist/client/assets/_lang.docs._-axvS_dfl.js +0 -1
- package/template/dist/client/assets/_lang.docs.framework._framework._-D2FAQ0gW.js +0 -1
- package/template/dist/client/assets/channel-Clrp6Lr4.js +0 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-Beq6_jEy.js +0 -1
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-Beq6_jEy.js +0 -1
- package/template/dist/client/assets/clone-BbBu6MzK.js +0 -1
- package/template/dist/client/assets/ordinal-BENe2yWM.js +0 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-CbfK0_BD.js +0 -1
- /package/admin/dist/server/assets/{error-CASJ5tIm.js → error-CxLURp5B.js} +0 -0
- /package/admin/dist/server/assets/{job-manager-D9Ab9hgu.js → job-manager-3L0YHdRR.js} +0 -0
- /package/admin/dist/server/assets/{migrator-ZpVZslbq.js → migrator-6o36lk3A.js} +0 -0
- /package/admin/dist/server/assets/{start-BiybVoR2.js → start-BYRsG6Vf.js} +0 -0
- /package/admin/dist/server/assets/{string-B4XlckmJ.js → string-Dgr41sRK.js} +0 -0
- /package/admin/dist/server/assets/{useNavigate-0H08s_Q2.js → useNavigate-CDLfQmZd.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-DpI70f1L.js","assets/useNavigate-CEOVvMjz.js","assets/auth-client-ChAoRxRf.js","assets/routes-D1wZzUqP.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./useNavigate-CEOVvMjz.js";var f=n((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,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}var S=!1,C=-1,ee=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<ee)}function re(){if(g=!1,S){var t=e.unstable_now();te=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&&ne());){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&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(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`):ee=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,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=n(((e,t)=>{t.exports=f()})),m=n((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);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.4`})),h=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=n((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},pe=[],me=-1;function he(e){return{current:e}}function D(e){0>me||(e.current=pe[me],pe[me]=null,me--)}function O(e,t){me++,pe[me]=e.current,e.current=t}var ge=he(null),_e=he(null),ve=he(null),ye=he(null);function be(e,t){switch(O(ve,t),O(_e,e),O(ge,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}D(ge),O(ge,e)}function xe(){D(ge),D(_e),D(ve)}function Se(e){e.memoizedState!==null&&O(ye,e);var t=ge.current,n=Ud(t,e.type);t!==n&&(O(_e,e),O(ge,n))}function Ce(e){_e.current===e&&(D(ge),D(_e)),ye.current===e&&(D(ye),$f._currentValue=fe)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+we+e+Te}var De=!1;function Oe(e,t){if(!e||De)return``;De=!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(`
|
|
@@ -15,4 +15,4 @@ Error generating stack: `+e.message+`
|
|
|
15
15
|
`)}else{let e=i.indexOf(`
|
|
16
16
|
`);if(e>=0){let t=i.slice(0,e).trim();i=i.slice(e+1),t.length>0&&(o=JSON.parse(t),a=!0)}}}return(async()=>{try{for(;;){let{value:e,done:a}=await r.read();e&&(i+=e);let o=i.lastIndexOf(`
|
|
17
17
|
`);if(o>=0){let e=i.slice(0,o);i=i.slice(o+1);let r=e.split(`
|
|
18
|
-
`).filter(Boolean);for(let e of r)try{t(JSON.parse(e))}catch(t){n?.(`Invalid JSON line: ${e}`,t)}}if(a)break}}catch(e){n?.(`Stream processing error:`,e)}})(),t(o)}async function Ko({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i);return(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{t(JSON.parse(e))}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){n?.(`Stream processing error:`,e)}})(),t(o)}function qo(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=ne()?.serverFns?.fetch;return Bo(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[y]:!0})}var Jo=lo({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(y in e)?!1:!!e[y],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>qo(e)});function Yo(e){if(Array.isArray(e))return e.flatMap(e=>Yo(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},l=()=>(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.slice(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.slice(r))}return t}function Xo(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function Zo(...e){return e.reduce((e,t)=>{let n=Xo(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?Yo(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}function Qo(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function $o(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function es(e){window.$_TSR||Te();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||Te();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Qo(e.i)}),n.lastMatchId&&=Qo(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o};let s=e.matchRoutes(e.stores.location.state),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=me();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}$o(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setActiveMatches(s),await e.options.hydrate?.(i);let f=e.stores.activeMatchesSnapshot.state,p=e.stores.location.state;await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:p,navigate:t=>e.navigate({...t,_fromLocation:p}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(st(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let m=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!m)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),c;let h=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(m){let t=s[1];t||Te(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=h,h.then(()=>{e.batch(()=>{e.stores.status.state===`pending`&&e.batch(()=>{e.stores.status.setState(()=>`idle`),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var B=r(d(),1),V=i();function ts({promise:t}){if(e)return e(t);let n=On(t);if(n[Dn].status===`pending`)throw n;if(n[Dn].status===`error`)throw n[Dn].error;return n[Dn].data}function ns(e){let t=(0,V.jsx)(rs,{...e});return e.fallback?(0,V.jsx)(B.Suspense,{fallback:e.fallback,children:t}):t}function rs(e){let t=ts(e);return e.children(t)}function is(e){let t=e.errorComponent??os;return(0,V.jsx)(as,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?B.createElement(t,{error:n,reset:r}):e.children})}var as=class extends B.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function os({error:e}){let[t,n]=B.useState(!1);return(0,V.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,V.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,V.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,V.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,V.jsx)(`div`,{children:(0,V.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,V.jsx)(`code`,{children:e.message}):null})}):null]})}function ss({children:e,fallback:t=null}){return cs()?(0,V.jsx)(B.Fragment,{children:e}):(0,V.jsx)(B.Fragment,{children:t})}function cs(){return B.useSyncExternalStore(ls,()=>!0,()=>!1)}function ls(){return()=>{}}var us=B.createContext(void 0),ds=B.createContext(void 0),H=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(H||{});function fs({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}var ps=0,ms=0,hs=0,gs=[],{link:_s,unlink:vs,propagate:ys,checkDirty:bs,shallowPropagate:xs}=fs({update(e){return e.depsTail===void 0?Es(e):Ts(e)},notify(e){let t=hs,n=t;do if(gs[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(hs=t;n<--t;){let e=gs[n];gs[n++]=gs[t],gs[t]=e}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,As(e)):ks.call(e)}});function Ss(){return ps}function Cs(){++ps}function ws(){--ps||Os()}function Ts(e){e.depsTail=void 0,e.flags=5;try{let t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,As(e)}}function Es(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function Ds(e){let t=e.flags;if(t&16||t&32&&bs(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,As(e)}}else e.flags=2}function Os(){try{for(;ms<hs;){let e=gs[ms];gs[ms++]=void 0,Ds(e)}}finally{for(;ms<hs;){let e=gs[ms];gs[ms++]=void 0,e.flags|=10}ms=0,hs=0}}function ks(){this.depsTail=void 0,this.flags=0,As(this);let e=this.subs;e!==void 0&&vs(e)}function As(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=vs(n,e)}function js(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ms=[],Ns=0,{link:Ps,unlink:Fs,propagate:Is,checkDirty:Ls,shallowPropagate:Rs}=fs({update(e){return e._update()},notify(e){Ms[Bs++]=e,e.flags&=~H.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=H.Mutable|H.Dirty,Hs(e))}}),zs=0,Bs=0,Vs;function Hs(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Fs(n,e)}function Us(){if(!(Ss()>0)){for(;zs<Bs;){let e=Ms[zs];Ms[zs++]=void 0,e.notify()}zs=0,Bs=0}}function Ws(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?H.None:H.Mutable,get(){return Vs!==void 0&&Ps(i,Vs,Ns),i._snapshot},subscribe(e){let t=js(e),n={current:!1},r=Gs(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Vs,o=t?.compare??Object.is;if(n)Vs=i,++Ns,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=H.Mutable|H.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Vs=a,n&&(i.flags&=~H.RecursedCheck),Hs(i)}}};return n?(i.flags=H.Mutable|H.Dirty,i.get=function(){let e=i.flags;if(e&H.Dirty||e&H.Pending&&Ls(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Rs(e)}}else e&H.Pending&&(i.flags=e&~H.Pending);return Vs!==void 0&&Ps(i,Vs,Ns),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Is(e),Rs(e),Us())}},i}function Gs(e){let t=()=>{let t=Vs;Vs=n,++Ns,n.depsTail=void 0,n.flags=H.Watching|H.RecursedCheck;try{return e()}finally{Vs=t,n.flags&=~H.RecursedCheck,Hs(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:H.Watching|H.RecursedCheck,notify(){let e=this.flags;e&H.Dirty||e&H.Pending&&Ls(this.deps,this)?t():this.flags=H.Watching},stop(){this.flags=H.None,this.depsTail=void 0,Hs(this)}};return t(),n}var Ks=class{constructor(e){this.atom=Ws(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(js(e))}},qs=class{constructor(e){this.atom=Ws(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(js(e))}};function Js(e){return typeof e==`function`?new qs(e):new Ks(e)}function Ys(e){try{Cs(),e()}finally{ws(),Us()}}var Xs=n((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Zs=n(((e,t)=>{t.exports=Xs()})),Qs=n((e=>{var t=d(),n=Zs();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),$s=n(((e,t)=>{t.exports=Qs()}))();function ec(e,t){return e===t}function tc(e,t,n=ec){let r=(0,B.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,B.useCallback)(()=>e?.get(),[e]);return(0,$s.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var nc={state:void 0,get:()=>void 0,subscribe:()=>()=>{}};function rc(e){let t=o(),n=B.useContext(e.from?ds:us),r=e.from??n,i=r?e.from?t.stores.getMatchStoreByRouteId(r):t.stores.activeMatchStoresById.get(r):void 0,a=B.useRef(void 0);return tc(i??nc,n=>{if((e.shouldThrow??!0)&&!n&&Te(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=ue(a.current,r);return a.current=e,e}return r})}function ic(e){return rc({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ac(e){let{select:t,...n}=e;return rc({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function oc(e){return rc({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function sc(e){return rc({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function cc(e){return rc({...e,select:t=>e.select?e.select(t.context):t.context})}var lc=h();function uc(e,t){let n=o(),r=s(t),{activeProps:i,inactiveProps:a,activeOptions:c,to:u,preload:d,preloadDelay:f,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:C,onBlur:ee,onFocus:te,onMouseEnter:ne,onMouseLeave:re,onTouchStart:ie,ignoreBlocker:oe,params:se,search:ce,hash:le,state:ue,mask:de,reloadDocument:w,unsafeRelative:E,from:fe,_fromLocation:me,...he}=e,D=cs(),O=B.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ge=tc(n.stores.location,e=>e,(e,t)=>e.href===t.href),_e=B.useMemo(()=>{let e={_fromLocation:ge,...O};return n.buildLocation(e)},[n,ge,O]),ye=_e.maskedLocation?_e.maskedLocation.publicHref:_e.publicHref,be=_e.maskedLocation?_e.maskedLocation.external:_e.external,xe=B.useMemo(()=>yc(ye,be,n.history,b),[b,be,ye,n.history]),Se=B.useMemo(()=>{if(xe?.external)return ve(xe.href,n.protocolAllowlist)?void 0:xe.href;if(!bc(u)&&!(typeof u!=`string`||u.indexOf(`:`)===-1))try{return new URL(u),ve(u,n.protocolAllowlist)?void 0:u}catch{}},[u,xe,n.protocolAllowlist]),Ce=B.useMemo(()=>{if(Se)return!1;if(c?.exact){if(!tt(ge.pathname,_e.pathname,n.basepath))return!1}else{let e=et(ge.pathname,n.basepath),t=et(_e.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(c?.includeSearch??!0)&&!pe(ge.search,_e.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?D&&ge.hash===_e.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,ge,Se,D,_e.hash,_e.pathname,_e.search,n.basepath]),we=Ce?ae(i,{})??fc:dc,Te=Ce?dc:ae(a,{})??dc,Ee=[S,we.className,Te.className].filter(Boolean).join(` `),De=(x||we.style||Te.style)&&{...x,...we.style,...Te.style},[Oe,ke]=B.useState(!1),Ae=B.useRef(!1),je=e.reloadDocument||Se?!1:d??n.options.defaultPreload,Me=f??n.options.defaultPreloadDelay??0,Ne=B.useCallback(()=>{n.preloadRoute({...O,_builtLocation:_e}).catch(e=>{console.warn(e),console.warn(kn)})},[n,O,_e]);l(r,B.useCallback(e=>{e?.isIntersecting&&Ne()},[Ne]),_c,{disabled:!!b||je!==`viewport`}),B.useEffect(()=>{Ae.current||!b&&je===`render`&&(Ne(),Ae.current=!0)},[b,Ne,je]);let Pe=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Sc(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,lc.flushSync)(()=>{ke(!0)});let t=n.subscribe(`onResolved`,()=>{t(),ke(!1)});n.navigate({...O,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:oe})}};if(Se)return{...he,ref:r,href:Se,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...ee&&{onBlur:ee},...te&&{onFocus:te},...ne&&{onMouseEnter:ne},...re&&{onMouseLeave:re},...ie&&{onTouchStart:ie}};let Fe=e=>{if(b||je!==`intent`)return;if(!Me){Ne();return}let t=e.currentTarget;if(gc.has(t))return;let n=setTimeout(()=>{gc.delete(t),Ne()},Me);gc.set(t,n)},Ie=e=>{b||je!==`intent`||Ne()},Le=e=>{if(b||!je||!Me)return;let t=e.currentTarget,n=gc.get(t);n&&(clearTimeout(n),gc.delete(t))};return{...he,...we,...Te,href:xe?.href,ref:r,onClick:vc([C,Pe]),onBlur:vc([ee,Le]),onFocus:vc([te,Fe]),onMouseEnter:vc([ne,Fe]),onMouseLeave:vc([re,Le]),onTouchStart:vc([ie,Ie]),disabled:!!b,target:y,...De&&{style:De},...Ee&&{className:Ee},...b&&pc,...Ce&&mc,...D&&Oe&&hc}}var dc={},fc={className:`active`},pc={role:`link`,"aria-disabled":!0},mc={"data-status":`active`,"aria-current":`page`},hc={"data-transitioning":`transitioning`},gc=new WeakMap,_c={rootMargin:`100px`},vc=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function yc(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function bc(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var xc=B.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=uc(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return B.createElement(`a`,t,o)}return B.createElement(n,a,o)});function Sc(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Cc=class extends Mn{constructor(e){super(e),this.useMatch=e=>rc({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>cc({...e,from:this.id}),this.useSearch=e=>sc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>oc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ac({...e,from:this.id}),this.useLoaderData=e=>ic({...e,from:this.id}),this.useNavigate=()=>u({from:this.fullPath}),this.Link=B.forwardRef((e,t)=>(0,V.jsx)(xc,{ref:t,from:this.fullPath,...e}))}};function wc(e){return new Cc(e)}function Tc(){return e=>Dc(e)}var Ec=class extends Nn{constructor(e){super(e),this.useMatch=e=>rc({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>cc({...e,from:this.id}),this.useSearch=e=>sc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>oc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ac({...e,from:this.id}),this.useLoaderData=e=>ic({...e,from:this.id}),this.useNavigate=()=>u({from:this.fullPath}),this.Link=B.forwardRef((e,t)=>(0,V.jsx)(xc,{ref:t,from:this.fullPath,...e}))}};function Dc(e){return new Ec(e)}function Oc(e){return typeof e==`object`?new kc(e,{silent:!0}).createRoute(e):new kc(e,{silent:!0}).createRoute}var kc=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=wc(e);return t.isRoot=!1,t},this.silent=t?.silent}},Ac=class{constructor(e){this.useMatch=e=>rc({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>cc({...e,from:this.options.id}),this.useSearch=e=>sc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>oc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ac({...e,from:this.options.id}),this.useLoaderData=e=>ic({...e,from:this.options.id}),this.useNavigate=()=>u({from:o().routesById[this.options.id].fullPath}),this.options=e}};function jc(e){return typeof e==`object`?new Ac(e):t=>new Ac({id:e,...t})}function Mc(t,n){let r,i,a,o,s=()=>(r||=t().then(e=>{r=void 0,i=e[n??`default`]}).catch(e=>{if(a=e,he(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),r),c=function(t){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(e)e(s());else throw s();return B.createElement(i,t)};return c.preload=s,c}function Nc(e){let t=o(),n=`not-found-${tc(t.stores.location,e=>e.pathname)}-${tc(t.stores.status,e=>e)}`;return(0,V.jsx)(is,{getResetKey:()=>n,onCatch:(t,n)=>{if(st(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(st(t))return e.fallback?.(t);throw t},children:e.children})}function Pc(){return(0,V.jsx)(`p`,{children:`Not Found`})}function Fc({children:e}){return o(),null}function Ic(e){return(0,V.jsx)(V.Fragment,{children:e.children})}function Lc(e,t,n){return t.options.notFoundComponent?(0,V.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,V.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,V.jsx)(Pc,{})}function Rc(){let e=o();if(!e.isScrollRestoring||!0)return null;let t=(e.options.getScrollRestorationKey||pt)(e.latestLocation),n=t===pt(e.latestLocation)?void 0:t,r={storageKey:lt,shouldScrollRestoration:!0};return n&&(r.key=n),(0,V.jsx)(Fc,{children:`(${gt.toString()})(${xe(JSON.stringify(r))})`})}var zc=B.memo(function({matchId:e}){let t=o(),n=t.stores.activeMatchStoresById.get(e);n||Te();let r=tc(t.stores.loadedAt,e=>e),i=tc(n,e=>e);return(0,V.jsx)(U,{router:t,matchId:e,resetKey:r,matchState:B.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function U({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,V.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?B.Suspense:Ic,f=s?is:Ic,p=l?Nc:Ic;return(0,V.jsxs)(i.isRoot?i.options.shellComponent??Ic:Ic,{children:[(0,V.jsx)(us.Provider,{value:t,children:(0,V.jsx)(d,{fallback:o,children:(0,V.jsx)(f,{getResetKey:()=>n,errorComponent:s||os,onCatch:(e,t)=>{if(st(e))throw e;c?.(e,t)},children:(0,V.jsx)(p,{fallback:e=>{if(!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return B.createElement(l,e)},children:u||r._displayPending?(0,V.jsx)(ss,{fallback:o,children:(0,V.jsx)(Vc,{matchId:t})}):(0,V.jsx)(Vc,{matchId:t})})})})}),r.parentRouteId===`__root__`&&e.options.scrollRestoration?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Bc,{}),(0,V.jsx)(Rc,{})]}):null]})}function Bc(){let e=o(),t=B.useRef(void 0);return(0,V.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...gn(e.stores.location.state,e.stores.resolvedLocation.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var Vc=B.memo(function({matchId:e}){let t=o(),n=t.stores.activeMatchStoresById.get(e);n||Te();let r=tc(n,e=>e),i=r.routeId,a=t.routesById[i],s=B.useMemo(()=>{let e=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return e?JSON.stringify(e):void 0},[i,r.loaderDeps,r._strictParams,r._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=B.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,V.jsx)(e,{},s):(0,V.jsx)(Hc,{})},[s,a.options.component,t.options.defaultComponent]);if(r._displayPending)throw t.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw t.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(r.id);if(n&&!n._nonReactive.minPendingPromise){let t=me();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(r.id)?._nonReactive.loadPromise}if(r.status===`notFound`)return st(r.error)||Te(),Lc(t,a,r.error);if(r.status===`redirected`)throw Ot(r.error)||Te(),t.getMatch(r.id)?._nonReactive.loadPromise;if(r.status===`error`)throw r.error;return c}),Hc=B.memo(function(){let e=o(),t=B.useContext(us),n,r=!1,i;{let a=t?e.stores.activeMatchStoresById.get(t):void 0;[n,r]=tc(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=tc(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,V.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||Te(),Lc(e,a,void 0);if(!i)return null;let c=(0,V.jsx)(zc,{matchId:i});return n===`__root__`?(0,V.jsx)(B.Suspense,{fallback:s,children:c}):c});function Uc(){let e=o(),n=B.useRef({router:e,mounted:!1}),[r,i]=B.useState(!1),s=tc(e.stores.isLoading,e=>e),c=tc(e.stores.hasPendingMatches,e=>e),l=a(s),u=s||r||c,d=a(u),f=s||c,p=a(f);return e.startTransition=e=>{i(!0),B.startTransition(()=>{e(),i(!1)})},B.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Qe(e.latestLocation.publicHref)!==Qe(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),t(()=>{typeof window<`u`&&e.ssr||n.current.router===e&&n.current.mounted||(n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),t(()=>{l&&!s&&e.emit({type:`onLoad`,...gn(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,s]),t(()=>{p&&!f&&e.emit({type:`onBeforeRouteMount`,...gn(e.stores.location.state,e.stores.resolvedLocation.state)})},[f,p,e]),t(()=>{if(d&&!u){let t=gn(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:`onResolved`,...t}),Ys(()=>{e.stores.status.setState(()=>`idle`),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),t.hrefChanged&&vt(e)}},[u,d,e]),null}function Wc(){let e=o(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,V.jsx)(t,{}):null,r=(0,V.jsxs)(typeof document<`u`&&e.ssr?Ic:B.Suspense,{fallback:n,children:[(0,V.jsx)(Uc,{}),(0,V.jsx)(Gc,{})]});return e.options.InnerWrap?(0,V.jsx)(e.options.InnerWrap,{children:r}):r}function Gc(){let e=o(),t=tc(e.stores.firstMatchId,e=>e),n=tc(e.stores.loadedAt,e=>e),r=t?(0,V.jsx)(zc,{matchId:t}):null;return(0,V.jsx)(us.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,V.jsx)(is,{getResetKey:()=>n,errorComponent:os,onCatch:void 0,children:r})})}var Kc=e=>({createMutableStore:Js,createReadonlyStore:Js,batch:Ys}),qc=e=>new Jc(e),Jc=class extends _n{constructor(e){super(e,Kc)}};typeof globalThis<`u`?(globalThis.createFileRoute=Oc,globalThis.createLazyFileRoute=jc):typeof window<`u`&&(window.createFileRoute=Oc,window.createLazyFileRoute=jc);function Yc({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,V.jsx)(c.Provider,{value:e,children:t});return e.options.Wrap?(0,V.jsx)(e.options.Wrap,{children:r}):r}function Xc({router:e,...t}){return(0,V.jsx)(Yc,{router:e,...t,children:(0,V.jsx)(Wc,{})})}function Zc({tag:e,attrs:t,children:n,nonce:r}){switch(e){case`title`:return(0,V.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,V.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,V.jsx)(`link`,{...t,nonce:r,suppressHydrationWarning:!0});case`style`:return(0,V.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,V.jsx)(Qc,{attrs:t,children:n});default:return null}}function Qc({attrs:e,children:t}){o();let n=cs(),r=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(B.useEffect(()=>{if(!r){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();if(Array.from(document.querySelectorAll(`script[src]`)).find(e=>e.src===t))return;let n=document.createElement(`script`);for(let[t,r]of Object.entries(e))t!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&n.setAttribute(t,typeof r==`boolean`?``:String(r));return document.head.appendChild(n),()=>{n.parentNode&&n.parentNode.removeChild(n)}}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;if(Array.from(document.querySelectorAll(`script:not([src])`)).find(e=>{if(!(e instanceof HTMLScriptElement))return!1;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;return e.textContent===t&&i===n&&a===r}))return;let i=document.createElement(`script`);if(i.textContent=t,e)for(let[t,n]of Object.entries(e))t!==`suppressHydrationWarning`&&n!==void 0&&n!==!1&&i.setAttribute(t,typeof n==`boolean`?``:String(n));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}}},[e,t,r]),r&&typeof t==`string`)return(0,V.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!n){if(e?.src)return(0,V.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,V.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var $c=e=>{let t=o(),n=t.options.ssr?.nonce,r=tc(t.stores.activeMatchesSnapshot,e=>e.map(e=>e.meta).filter(Boolean),pe),i=B.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:xe(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=tc(t.stores.activeMatchesSnapshot,r=>{let i=r.map(e=>e.links).filter(Boolean).flat(1).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),a=t.ssr?.manifest,o=r.map(e=>a?.routes[e.routeId]?.assets??[]).filter(Boolean).flat(1).filter(e=>e.tag===`link`).map(t=>({tag:`link`,attrs:{...t.attrs,crossOrigin:An(e,`stylesheet`)??t.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:n}}));return[...i,...o]},pe),s=tc(t.stores.activeMatchesSnapshot,r=>{let i=[];return r.map(e=>t.looseRoutesById[e.routeId]).forEach(r=>t.ssr?.manifest?.routes[r.id]?.preloads?.filter(Boolean).forEach(t=>{let r=jn(t);i.push({tag:`link`,attrs:{rel:`modulepreload`,href:r.href,crossOrigin:An(e,`modulepreload`)??r.crossOrigin,nonce:n}})})),i},pe),c=tc(t.stores.activeMatchesSnapshot,e=>e.map(e=>e.styles).flat(1).filter(Boolean).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),pe),l=tc(t.stores.activeMatchesSnapshot,e=>e.map(e=>e.headScripts).flat(1).filter(Boolean).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),pe);return el([...i,...s,...a,...c,...l],e=>JSON.stringify(e))};function el(e,t){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function tl(e){let t=$c(e.assetCrossOrigin),n=o().options.ssr?.nonce;return(0,V.jsx)(V.Fragment,{children:t.map(e=>(0,B.createElement)(Zc,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var nl=()=>{let e=o(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;return i?(n.map(t=>e.looseRoutesById[t.routeId]).forEach(e=>i.routes[e.id]?.assets?.filter(e=>e.tag===`script`).forEach(e=>{r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children})})),r):[]},r=e=>e.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),i=tc(e.stores.activeMatchesSnapshot,n,pe);return rl(e,tc(e.stores.activeMatchesSnapshot,r,pe),i)};function rl(e,t,n){let r;e.serverSsr&&(r=e.serverSsr.takeBufferedScripts());let i=[...t,...n];return r&&i.unshift(r),(0,V.jsx)(V.Fragment,{children:i.map((e,t)=>(0,B.createElement)(Zc,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var il=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},al=new class extends il{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ol={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sl=new class{#e=ol;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function cl(e){setTimeout(e,0)}var ll=typeof window>`u`||`Deno`in globalThis;function W(){}function ul(e,t){return typeof e==`function`?e(t):e}function dl(e){return typeof e==`number`&&e>=0&&e!==1/0}function fl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pl(e,t){return typeof e==`function`?e(t):e}function ml(e,t){return typeof e==`function`?e(t):e}function hl(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==_l(o,t.options))return!1}else if(!yl(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function gl(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(vl(t.options.mutationKey)!==vl(a))return!1}else if(!yl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function _l(e,t){return(t?.queryKeyHashFn||vl)(e)}function vl(e){return JSON.stringify(e,(e,t)=>wl(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function yl(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>yl(e[n],t[n])):!1}var bl=Object.prototype.hasOwnProperty;function xl(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Cl(e)&&Cl(t);if(!r&&!(wl(e)&&wl(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:bl.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=xl(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Sl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Cl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wl(e){if(!Tl(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Tl(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Tl(e){return Object.prototype.toString.call(e)===`[object Object]`}function El(e){return new Promise(t=>{sl.setTimeout(t,e)})}function Dl(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:xl(e,t)}function Ol(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function kl(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Al=Symbol();function jl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Al?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ml(e,t){return typeof e==`function`?e(...t):!!e}function Nl(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Pl=(()=>{let e=()=>ll;return{isServer(){return e()},setIsServer(t){e=t}}})();function Fl(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Il=cl;function Ll(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Il,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Rl=Ll(),zl=new class extends il{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Bl(e){return Math.min(1e3*2**e,3e4)}function G(e){return(e??`online`)===`online`?zl.isOnline():!0}var K=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function q(e){let t=!1,n=0,r,i=Fl(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new K(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>al.isFocused()&&(e.networkMode===`always`||zl.isOnline())&&e.canRun(),u=()=>G(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Pl.isServer()?0:3),o=e.retryDelay??Bl,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),El(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var J=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dl(this.gcTime)&&(this.#e=sl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pl.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(sl.clearTimeout(this.#e),void 0)}},Y=class extends J{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ul(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ul(this.options);e.data!==void 0&&(this.setState(Hl(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Dl(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(W).catch(W):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ml(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Al||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pl(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!fl(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=jl(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=q({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof K&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof K){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Vl(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Hl(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Rl.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Vl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:G(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Hl(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ul(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}function Wl(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Nl(e,()=>t.signal,()=>n=!0)},u=jl(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?kl:Ol;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?X:Gl,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Gl(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Gl(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function X(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Kl=class extends J{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ql(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=q({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Rl.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ql(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jl=class extends il{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Kl({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Yl(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Yl(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Yl(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Yl(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Rl.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>gl(t,e))}findAll(e={}){return this.getAll().filter(t=>gl(e,t))}notify(e){Rl.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Rl.batch(()=>Promise.all(e.map(e=>e.continue().catch(W))))}};function Yl(e){return e.options.scope?.id}var Xl=class extends il{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??_l(r,t),a=this.get(i);return a||(a=new Y({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Rl.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>hl(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>hl(e,t)):t}notify(e){Rl.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Rl.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Rl.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Zl=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Xl,this.#t=e.mutationCache||new Jl,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=al.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=zl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ul(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Rl.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Rl.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Rl.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Rl.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(W).catch(W)}invalidateQueries(e,t={}){return Rl.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Rl.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(W)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(W)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(pl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(W).catch(W)}fetchInfiniteQuery(e){return e.behavior=Wl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(W).catch(W)}ensureInfiniteQueryData(e){return e.behavior=Wl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(vl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{yl(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(vl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{yl(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=_l(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Al&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ql=B.createContext(void 0),$l=e=>{let t=B.useContext(Ql);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},eu=({client:e,children:t})=>(B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,V.jsx)(Ql.Provider,{value:e,children:t})),tu=`/assets/styles-zS0BbO7e.css`,nu=Tc()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`}],links:[{rel:`stylesheet`,href:tu}]}),component:ru,notFoundComponent:()=>(0,V.jsx)(`div`,{style:{padding:20},children:`Page not found`})});function ru(){let{queryClient:e}=nu.useRouteContext();return(0,V.jsx)(iu,{children:(0,V.jsx)(eu,{client:e,children:(0,V.jsx)(Hc,{})})})}function iu({children:e}){return(0,V.jsxs)(`html`,{lang:`en`,"data-theme":`dark`,suppressHydrationWarning:!0,children:[(0,V.jsx)(`head`,{children:(0,V.jsx)(tl,{})}),(0,V.jsxs)(`body`,{children:[(0,V.jsx)(`script`,{dangerouslySetInnerHTML:{__html:`document.documentElement.dataset.theme=localStorage.getItem('theme')||'dark'`}}),e,(0,V.jsx)(nl,{})]})]})}var au=`modulepreload`,ou=function(e){return`/`+e},su={},cu=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=ou(t,n),t in su)return;su[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`:au,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)})},lu=Oc(`/login`)({component:Mc(()=>cu(()=>import(`./login-CQjkiBAF.js`),__vite__mapDeps([0,1,2])),`component`)});function uu(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function du(e,t){let n=Object.create(null);if(e)for(let t of Object.keys(e))uu(t)&&(n[t]=e[t]);if(t&&typeof t==`object`)for(let e of Object.keys(t))uu(e)&&(n[e]=t[e]);return n}function fu(e){if(!e)return Object.create(null);let t=Object.create(null);for(let n of Object.keys(e))uu(n)&&(t[n]=e[n]);return t}var pu=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},mu=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>mu(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.map(e=>{b in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=mu(void 0,{...n,middleware:t});return r[b]=!0,r},inputValidator:e=>mu(void 0,{...n,inputValidator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],vu(i)];return t.method=n.method,Object.assign(async e=>{let n=await hu(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:fu()}),r=kt(n.error);if(r)throw r;if(n.error)throw n.error;return n.result},{...t,method:n.method,__executeServer:async e=>{let n=pu(),r=n.contextAfterGlobalMiddlewares;return await hu(a,`server`,{...t,...e,serverFnMeta:t.serverFnMeta,context:du(r,e.context),request:n.request}).then(e=>({result:e.result,error:e.error,context:e.sendContext}))}})}})};async function hu(e,t,n){let r=gu([...ne()?.functionMiddleware||[],...e]);if(t===`server`){let e=pu({throwIfNotFound:!1});e?.executedRequestMiddlewares&&(r=r.filter(t=>!e.executedRequestMiddlewares.has(t)))}let i=async e=>{let n=r.shift();if(!n)return e;try{`inputValidator`in n.options&&n.options.inputValidator&&t===`server`&&(e.data=await _u(n.options.inputValidator,e.data));let r;if(t===`client`?`client`in n.options&&(r=n.options.client):`server`in n.options&&(r=n.options.server),r){let t=async(t={})=>{let n=await i({...e,...t,context:du(e.context,t.context),sendContext:du(e.sendContext,t.sendContext),headers:Zo(e.headers,t.headers),_callSiteFetch:e._callSiteFetch,fetch:e._callSiteFetch??t.fetch??e.fetch,result:t.result===void 0?t instanceof Response?t:e.result:t.result,error:t.error??e.error});if(n.error)throw n.error;return n},n=await r({...e,next:t});if(Ot(n))return{...e,error:n};if(n instanceof Response)return{...e,result:n};if(!n)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);return n}return i(e)}catch(t){return{...e,error:t}}};return i({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||fu(),_callSiteFetch:n.fetch})}function gu(e,t=100){let n=new Set,r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function _u(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function vu(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:async({next:t,...n})=>{let r=await e.serverFn?.(n);return t({...n,result:r})}}}}var yu=mu({method:`GET`}).handler(qo(`539c27f871f75647d981e1ed4d82b5ee620e9e557722641a4a57c5a5818760c9`)),bu=Oc(`/`)({validateSearch:e=>({project:e.project||void 0,v:e.v||void 0,lang:e.lang||void 0,file:e.file||void 0,files:e.files||void 0,view:e.view||void 0,toc:e.toc||void 0,nodes:e.nodes||void 0,status:e.status||void 0,section:e.section||void 0}),beforeLoad:async()=>{let e=await yu();if(!e)throw Dt({to:`/login`});return{session:e}},component:Mc(()=>cu(()=>import(`./routes-CTPOG_v1.js`),__vite__mapDeps([3,1,2])),`component`)}),xu=lu.update({id:`/login`,path:`/login`,getParentRoute:()=>nu}),Su={IndexRoute:bu.update({id:`/`,path:`/`,getParentRoute:()=>nu}),LoginRoute:xu},Cu=nu._addFileChildren(Su);function wu(){return qc({routeTree:Cu,context:{queryClient:new Zl({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}})},scrollRestoration:!0})}async function Tu(){let e=await wu(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Jo),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.state.length||await es(e),e}async function Eu(){let e=await Tu();return window.$_TSR?.h(),e}var Du;function Ou(){return Du||=Eu(),(0,V.jsx)(ns,{promise:Du,children:e=>(0,V.jsx)(Xc,{router:e})})}var ku=_();(0,B.startTransition)(()=>{(0,ku.hydrateRoot)(document,(0,V.jsx)(B.StrictMode,{children:(0,V.jsx)(Ou,{})}))});export{fl as _,Vl as a,il as b,Pl as c,W as d,Dl as f,Ml as g,Sl as h,ql as i,vl as l,pl as m,mu as n,Rl as o,ml as p,$l as r,Fl as s,bu as t,dl as u,sl as v,qo as x,al as y};
|
|
18
|
+
`).filter(Boolean);for(let e of r)try{t(JSON.parse(e))}catch(t){n?.(`Invalid JSON line: ${e}`,t)}}if(a)break}}catch(e){n?.(`Stream processing error:`,e)}})(),t(o)}async function Ko({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i);return(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{t(JSON.parse(e))}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){n?.(`Stream processing error:`,e)}})(),t(o)}function qo(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=ne()?.serverFns?.fetch;return Bo(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[y]:!0})}var Jo=lo({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(y in e)?!1:!!e[y],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>qo(e)});function Yo(e){if(Array.isArray(e))return e.flatMap(e=>Yo(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},l=()=>(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.slice(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.slice(r))}return t}function Xo(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function Zo(...e){return e.reduce((e,t)=>{let n=Xo(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?Yo(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}function Qo(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function $o(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function es(e){window.$_TSR||Te();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||Te();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Qo(e.i)}),n.lastMatchId&&=Qo(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o};let s=e.matchRoutes(e.stores.location.state),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=me();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}$o(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setActiveMatches(s),await e.options.hydrate?.(i);let f=e.stores.activeMatchesSnapshot.state,p=e.stores.location.state;await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:p,navigate:t=>e.navigate({...t,_fromLocation:p}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(st(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let m=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!m)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),c;let h=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(m){let t=s[1];t||Te(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=h,h.then(()=>{e.batch(()=>{e.stores.status.state===`pending`&&e.batch(()=>{e.stores.status.setState(()=>`idle`),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var B=r(d(),1),V=i();function ts({promise:t}){if(e)return e(t);let n=On(t);if(n[Dn].status===`pending`)throw n;if(n[Dn].status===`error`)throw n[Dn].error;return n[Dn].data}function ns(e){let t=(0,V.jsx)(rs,{...e});return e.fallback?(0,V.jsx)(B.Suspense,{fallback:e.fallback,children:t}):t}function rs(e){let t=ts(e);return e.children(t)}function is(e){let t=e.errorComponent??os;return(0,V.jsx)(as,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?B.createElement(t,{error:n,reset:r}):e.children})}var as=class extends B.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function os({error:e}){let[t,n]=B.useState(!1);return(0,V.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,V.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,V.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,V.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,V.jsx)(`div`,{children:(0,V.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,V.jsx)(`code`,{children:e.message}):null})}):null]})}function ss({children:e,fallback:t=null}){return cs()?(0,V.jsx)(B.Fragment,{children:e}):(0,V.jsx)(B.Fragment,{children:t})}function cs(){return B.useSyncExternalStore(ls,()=>!0,()=>!1)}function ls(){return()=>{}}var us=B.createContext(void 0),ds=B.createContext(void 0),H=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(H||{});function fs({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}var ps=0,ms=0,hs=0,gs=[],{link:_s,unlink:vs,propagate:ys,checkDirty:bs,shallowPropagate:xs}=fs({update(e){return e.depsTail===void 0?Es(e):Ts(e)},notify(e){let t=hs,n=t;do if(gs[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(hs=t;n<--t;){let e=gs[n];gs[n++]=gs[t],gs[t]=e}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,As(e)):ks.call(e)}});function Ss(){return ps}function Cs(){++ps}function ws(){--ps||Os()}function Ts(e){e.depsTail=void 0,e.flags=5;try{let t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,As(e)}}function Es(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function Ds(e){let t=e.flags;if(t&16||t&32&&bs(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,As(e)}}else e.flags=2}function Os(){try{for(;ms<hs;){let e=gs[ms];gs[ms++]=void 0,Ds(e)}}finally{for(;ms<hs;){let e=gs[ms];gs[ms++]=void 0,e.flags|=10}ms=0,hs=0}}function ks(){this.depsTail=void 0,this.flags=0,As(this);let e=this.subs;e!==void 0&&vs(e)}function As(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=vs(n,e)}function js(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ms=[],Ns=0,{link:Ps,unlink:Fs,propagate:Is,checkDirty:Ls,shallowPropagate:Rs}=fs({update(e){return e._update()},notify(e){Ms[Bs++]=e,e.flags&=~H.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=H.Mutable|H.Dirty,Hs(e))}}),zs=0,Bs=0,Vs;function Hs(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Fs(n,e)}function Us(){if(!(Ss()>0)){for(;zs<Bs;){let e=Ms[zs];Ms[zs++]=void 0,e.notify()}zs=0,Bs=0}}function Ws(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?H.None:H.Mutable,get(){return Vs!==void 0&&Ps(i,Vs,Ns),i._snapshot},subscribe(e){let t=js(e),n={current:!1},r=Gs(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Vs,o=t?.compare??Object.is;if(n)Vs=i,++Ns,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=H.Mutable|H.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Vs=a,n&&(i.flags&=~H.RecursedCheck),Hs(i)}}};return n?(i.flags=H.Mutable|H.Dirty,i.get=function(){let e=i.flags;if(e&H.Dirty||e&H.Pending&&Ls(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Rs(e)}}else e&H.Pending&&(i.flags=e&~H.Pending);return Vs!==void 0&&Ps(i,Vs,Ns),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Is(e),Rs(e),Us())}},i}function Gs(e){let t=()=>{let t=Vs;Vs=n,++Ns,n.depsTail=void 0,n.flags=H.Watching|H.RecursedCheck;try{return e()}finally{Vs=t,n.flags&=~H.RecursedCheck,Hs(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:H.Watching|H.RecursedCheck,notify(){let e=this.flags;e&H.Dirty||e&H.Pending&&Ls(this.deps,this)?t():this.flags=H.Watching},stop(){this.flags=H.None,this.depsTail=void 0,Hs(this)}};return t(),n}var Ks=class{constructor(e){this.atom=Ws(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(js(e))}},qs=class{constructor(e){this.atom=Ws(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(js(e))}};function Js(e){return typeof e==`function`?new qs(e):new Ks(e)}function Ys(e){try{Cs(),e()}finally{ws(),Us()}}var Xs=n((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Zs=n(((e,t)=>{t.exports=Xs()})),Qs=n((e=>{var t=d(),n=Zs();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),$s=n(((e,t)=>{t.exports=Qs()}))();function ec(e,t){return e===t}function tc(e,t,n=ec){let r=(0,B.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,B.useCallback)(()=>e?.get(),[e]);return(0,$s.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var nc={state:void 0,get:()=>void 0,subscribe:()=>()=>{}};function rc(e){let t=o(),n=B.useContext(e.from?ds:us),r=e.from??n,i=r?e.from?t.stores.getMatchStoreByRouteId(r):t.stores.activeMatchStoresById.get(r):void 0,a=B.useRef(void 0);return tc(i??nc,n=>{if((e.shouldThrow??!0)&&!n&&Te(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=ue(a.current,r);return a.current=e,e}return r})}function ic(e){return rc({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ac(e){let{select:t,...n}=e;return rc({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function oc(e){return rc({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function sc(e){return rc({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function cc(e){return rc({...e,select:t=>e.select?e.select(t.context):t.context})}var lc=h();function uc(e,t){let n=o(),r=s(t),{activeProps:i,inactiveProps:a,activeOptions:c,to:u,preload:d,preloadDelay:f,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:C,onBlur:ee,onFocus:te,onMouseEnter:ne,onMouseLeave:re,onTouchStart:ie,ignoreBlocker:oe,params:se,search:ce,hash:le,state:ue,mask:de,reloadDocument:w,unsafeRelative:E,from:fe,_fromLocation:me,...he}=e,D=cs(),O=B.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ge=tc(n.stores.location,e=>e,(e,t)=>e.href===t.href),_e=B.useMemo(()=>{let e={_fromLocation:ge,...O};return n.buildLocation(e)},[n,ge,O]),ye=_e.maskedLocation?_e.maskedLocation.publicHref:_e.publicHref,be=_e.maskedLocation?_e.maskedLocation.external:_e.external,xe=B.useMemo(()=>yc(ye,be,n.history,b),[b,be,ye,n.history]),Se=B.useMemo(()=>{if(xe?.external)return ve(xe.href,n.protocolAllowlist)?void 0:xe.href;if(!bc(u)&&!(typeof u!=`string`||u.indexOf(`:`)===-1))try{return new URL(u),ve(u,n.protocolAllowlist)?void 0:u}catch{}},[u,xe,n.protocolAllowlist]),Ce=B.useMemo(()=>{if(Se)return!1;if(c?.exact){if(!tt(ge.pathname,_e.pathname,n.basepath))return!1}else{let e=et(ge.pathname,n.basepath),t=et(_e.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(c?.includeSearch??!0)&&!pe(ge.search,_e.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?D&&ge.hash===_e.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,ge,Se,D,_e.hash,_e.pathname,_e.search,n.basepath]),we=Ce?ae(i,{})??fc:dc,Te=Ce?dc:ae(a,{})??dc,Ee=[S,we.className,Te.className].filter(Boolean).join(` `),De=(x||we.style||Te.style)&&{...x,...we.style,...Te.style},[Oe,ke]=B.useState(!1),Ae=B.useRef(!1),je=e.reloadDocument||Se?!1:d??n.options.defaultPreload,Me=f??n.options.defaultPreloadDelay??0,Ne=B.useCallback(()=>{n.preloadRoute({...O,_builtLocation:_e}).catch(e=>{console.warn(e),console.warn(kn)})},[n,O,_e]);l(r,B.useCallback(e=>{e?.isIntersecting&&Ne()},[Ne]),_c,{disabled:!!b||je!==`viewport`}),B.useEffect(()=>{Ae.current||!b&&je===`render`&&(Ne(),Ae.current=!0)},[b,Ne,je]);let Pe=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Sc(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,lc.flushSync)(()=>{ke(!0)});let t=n.subscribe(`onResolved`,()=>{t(),ke(!1)});n.navigate({...O,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:oe})}};if(Se)return{...he,ref:r,href:Se,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...ee&&{onBlur:ee},...te&&{onFocus:te},...ne&&{onMouseEnter:ne},...re&&{onMouseLeave:re},...ie&&{onTouchStart:ie}};let Fe=e=>{if(b||je!==`intent`)return;if(!Me){Ne();return}let t=e.currentTarget;if(gc.has(t))return;let n=setTimeout(()=>{gc.delete(t),Ne()},Me);gc.set(t,n)},Ie=e=>{b||je!==`intent`||Ne()},Le=e=>{if(b||!je||!Me)return;let t=e.currentTarget,n=gc.get(t);n&&(clearTimeout(n),gc.delete(t))};return{...he,...we,...Te,href:xe?.href,ref:r,onClick:vc([C,Pe]),onBlur:vc([ee,Le]),onFocus:vc([te,Fe]),onMouseEnter:vc([ne,Fe]),onMouseLeave:vc([re,Le]),onTouchStart:vc([ie,Ie]),disabled:!!b,target:y,...De&&{style:De},...Ee&&{className:Ee},...b&&pc,...Ce&&mc,...D&&Oe&&hc}}var dc={},fc={className:`active`},pc={role:`link`,"aria-disabled":!0},mc={"data-status":`active`,"aria-current":`page`},hc={"data-transitioning":`transitioning`},gc=new WeakMap,_c={rootMargin:`100px`},vc=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function yc(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function bc(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var xc=B.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=uc(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return B.createElement(`a`,t,o)}return B.createElement(n,a,o)});function Sc(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Cc=class extends Mn{constructor(e){super(e),this.useMatch=e=>rc({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>cc({...e,from:this.id}),this.useSearch=e=>sc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>oc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ac({...e,from:this.id}),this.useLoaderData=e=>ic({...e,from:this.id}),this.useNavigate=()=>u({from:this.fullPath}),this.Link=B.forwardRef((e,t)=>(0,V.jsx)(xc,{ref:t,from:this.fullPath,...e}))}};function wc(e){return new Cc(e)}function Tc(){return e=>Dc(e)}var Ec=class extends Nn{constructor(e){super(e),this.useMatch=e=>rc({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>cc({...e,from:this.id}),this.useSearch=e=>sc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>oc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ac({...e,from:this.id}),this.useLoaderData=e=>ic({...e,from:this.id}),this.useNavigate=()=>u({from:this.fullPath}),this.Link=B.forwardRef((e,t)=>(0,V.jsx)(xc,{ref:t,from:this.fullPath,...e}))}};function Dc(e){return new Ec(e)}function Oc(e){return typeof e==`object`?new kc(e,{silent:!0}).createRoute(e):new kc(e,{silent:!0}).createRoute}var kc=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=wc(e);return t.isRoot=!1,t},this.silent=t?.silent}},Ac=class{constructor(e){this.useMatch=e=>rc({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>cc({...e,from:this.options.id}),this.useSearch=e=>sc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>oc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ac({...e,from:this.options.id}),this.useLoaderData=e=>ic({...e,from:this.options.id}),this.useNavigate=()=>u({from:o().routesById[this.options.id].fullPath}),this.options=e}};function jc(e){return typeof e==`object`?new Ac(e):t=>new Ac({id:e,...t})}function Mc(t,n){let r,i,a,o,s=()=>(r||=t().then(e=>{r=void 0,i=e[n??`default`]}).catch(e=>{if(a=e,he(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),r),c=function(t){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(e)e(s());else throw s();return B.createElement(i,t)};return c.preload=s,c}function Nc(e){let t=o(),n=`not-found-${tc(t.stores.location,e=>e.pathname)}-${tc(t.stores.status,e=>e)}`;return(0,V.jsx)(is,{getResetKey:()=>n,onCatch:(t,n)=>{if(st(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(st(t))return e.fallback?.(t);throw t},children:e.children})}function Pc(){return(0,V.jsx)(`p`,{children:`Not Found`})}function Fc({children:e}){return o(),null}function Ic(e){return(0,V.jsx)(V.Fragment,{children:e.children})}function Lc(e,t,n){return t.options.notFoundComponent?(0,V.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,V.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,V.jsx)(Pc,{})}function Rc(){let e=o();if(!e.isScrollRestoring||!0)return null;let t=(e.options.getScrollRestorationKey||pt)(e.latestLocation),n=t===pt(e.latestLocation)?void 0:t,r={storageKey:lt,shouldScrollRestoration:!0};return n&&(r.key=n),(0,V.jsx)(Fc,{children:`(${gt.toString()})(${xe(JSON.stringify(r))})`})}var zc=B.memo(function({matchId:e}){let t=o(),n=t.stores.activeMatchStoresById.get(e);n||Te();let r=tc(t.stores.loadedAt,e=>e),i=tc(n,e=>e);return(0,V.jsx)(U,{router:t,matchId:e,resetKey:r,matchState:B.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function U({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,V.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?B.Suspense:Ic,f=s?is:Ic,p=l?Nc:Ic;return(0,V.jsxs)(i.isRoot?i.options.shellComponent??Ic:Ic,{children:[(0,V.jsx)(us.Provider,{value:t,children:(0,V.jsx)(d,{fallback:o,children:(0,V.jsx)(f,{getResetKey:()=>n,errorComponent:s||os,onCatch:(e,t)=>{if(st(e))throw e;c?.(e,t)},children:(0,V.jsx)(p,{fallback:e=>{if(!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return B.createElement(l,e)},children:u||r._displayPending?(0,V.jsx)(ss,{fallback:o,children:(0,V.jsx)(Vc,{matchId:t})}):(0,V.jsx)(Vc,{matchId:t})})})})}),r.parentRouteId===`__root__`&&e.options.scrollRestoration?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Bc,{}),(0,V.jsx)(Rc,{})]}):null]})}function Bc(){let e=o(),t=B.useRef(void 0);return(0,V.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...gn(e.stores.location.state,e.stores.resolvedLocation.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var Vc=B.memo(function({matchId:e}){let t=o(),n=t.stores.activeMatchStoresById.get(e);n||Te();let r=tc(n,e=>e),i=r.routeId,a=t.routesById[i],s=B.useMemo(()=>{let e=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return e?JSON.stringify(e):void 0},[i,r.loaderDeps,r._strictParams,r._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=B.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,V.jsx)(e,{},s):(0,V.jsx)(Hc,{})},[s,a.options.component,t.options.defaultComponent]);if(r._displayPending)throw t.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw t.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(r.id);if(n&&!n._nonReactive.minPendingPromise){let t=me();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(r.id)?._nonReactive.loadPromise}if(r.status===`notFound`)return st(r.error)||Te(),Lc(t,a,r.error);if(r.status===`redirected`)throw Ot(r.error)||Te(),t.getMatch(r.id)?._nonReactive.loadPromise;if(r.status===`error`)throw r.error;return c}),Hc=B.memo(function(){let e=o(),t=B.useContext(us),n,r=!1,i;{let a=t?e.stores.activeMatchStoresById.get(t):void 0;[n,r]=tc(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=tc(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,V.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||Te(),Lc(e,a,void 0);if(!i)return null;let c=(0,V.jsx)(zc,{matchId:i});return n===`__root__`?(0,V.jsx)(B.Suspense,{fallback:s,children:c}):c});function Uc(){let e=o(),n=B.useRef({router:e,mounted:!1}),[r,i]=B.useState(!1),s=tc(e.stores.isLoading,e=>e),c=tc(e.stores.hasPendingMatches,e=>e),l=a(s),u=s||r||c,d=a(u),f=s||c,p=a(f);return e.startTransition=e=>{i(!0),B.startTransition(()=>{e(),i(!1)})},B.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Qe(e.latestLocation.publicHref)!==Qe(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),t(()=>{typeof window<`u`&&e.ssr||n.current.router===e&&n.current.mounted||(n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),t(()=>{l&&!s&&e.emit({type:`onLoad`,...gn(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,s]),t(()=>{p&&!f&&e.emit({type:`onBeforeRouteMount`,...gn(e.stores.location.state,e.stores.resolvedLocation.state)})},[f,p,e]),t(()=>{if(d&&!u){let t=gn(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:`onResolved`,...t}),Ys(()=>{e.stores.status.setState(()=>`idle`),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),t.hrefChanged&&vt(e)}},[u,d,e]),null}function Wc(){let e=o(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,V.jsx)(t,{}):null,r=(0,V.jsxs)(typeof document<`u`&&e.ssr?Ic:B.Suspense,{fallback:n,children:[(0,V.jsx)(Uc,{}),(0,V.jsx)(Gc,{})]});return e.options.InnerWrap?(0,V.jsx)(e.options.InnerWrap,{children:r}):r}function Gc(){let e=o(),t=tc(e.stores.firstMatchId,e=>e),n=tc(e.stores.loadedAt,e=>e),r=t?(0,V.jsx)(zc,{matchId:t}):null;return(0,V.jsx)(us.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,V.jsx)(is,{getResetKey:()=>n,errorComponent:os,onCatch:void 0,children:r})})}var Kc=e=>({createMutableStore:Js,createReadonlyStore:Js,batch:Ys}),qc=e=>new Jc(e),Jc=class extends _n{constructor(e){super(e,Kc)}};typeof globalThis<`u`?(globalThis.createFileRoute=Oc,globalThis.createLazyFileRoute=jc):typeof window<`u`&&(window.createFileRoute=Oc,window.createLazyFileRoute=jc);function Yc({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,V.jsx)(c.Provider,{value:e,children:t});return e.options.Wrap?(0,V.jsx)(e.options.Wrap,{children:r}):r}function Xc({router:e,...t}){return(0,V.jsx)(Yc,{router:e,...t,children:(0,V.jsx)(Wc,{})})}function Zc({tag:e,attrs:t,children:n,nonce:r}){switch(e){case`title`:return(0,V.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,V.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,V.jsx)(`link`,{...t,nonce:r,suppressHydrationWarning:!0});case`style`:return(0,V.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,V.jsx)(Qc,{attrs:t,children:n});default:return null}}function Qc({attrs:e,children:t}){o();let n=cs(),r=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(B.useEffect(()=>{if(!r){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();if(Array.from(document.querySelectorAll(`script[src]`)).find(e=>e.src===t))return;let n=document.createElement(`script`);for(let[t,r]of Object.entries(e))t!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&n.setAttribute(t,typeof r==`boolean`?``:String(r));return document.head.appendChild(n),()=>{n.parentNode&&n.parentNode.removeChild(n)}}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;if(Array.from(document.querySelectorAll(`script:not([src])`)).find(e=>{if(!(e instanceof HTMLScriptElement))return!1;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;return e.textContent===t&&i===n&&a===r}))return;let i=document.createElement(`script`);if(i.textContent=t,e)for(let[t,n]of Object.entries(e))t!==`suppressHydrationWarning`&&n!==void 0&&n!==!1&&i.setAttribute(t,typeof n==`boolean`?``:String(n));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}}},[e,t,r]),r&&typeof t==`string`)return(0,V.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!n){if(e?.src)return(0,V.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,V.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var $c=e=>{let t=o(),n=t.options.ssr?.nonce,r=tc(t.stores.activeMatchesSnapshot,e=>e.map(e=>e.meta).filter(Boolean),pe),i=B.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:xe(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=tc(t.stores.activeMatchesSnapshot,r=>{let i=r.map(e=>e.links).filter(Boolean).flat(1).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),a=t.ssr?.manifest,o=r.map(e=>a?.routes[e.routeId]?.assets??[]).filter(Boolean).flat(1).filter(e=>e.tag===`link`).map(t=>({tag:`link`,attrs:{...t.attrs,crossOrigin:An(e,`stylesheet`)??t.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:n}}));return[...i,...o]},pe),s=tc(t.stores.activeMatchesSnapshot,r=>{let i=[];return r.map(e=>t.looseRoutesById[e.routeId]).forEach(r=>t.ssr?.manifest?.routes[r.id]?.preloads?.filter(Boolean).forEach(t=>{let r=jn(t);i.push({tag:`link`,attrs:{rel:`modulepreload`,href:r.href,crossOrigin:An(e,`modulepreload`)??r.crossOrigin,nonce:n}})})),i},pe),c=tc(t.stores.activeMatchesSnapshot,e=>e.map(e=>e.styles).flat(1).filter(Boolean).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),pe),l=tc(t.stores.activeMatchesSnapshot,e=>e.map(e=>e.headScripts).flat(1).filter(Boolean).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),pe);return el([...i,...s,...a,...c,...l],e=>JSON.stringify(e))};function el(e,t){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function tl(e){let t=$c(e.assetCrossOrigin),n=o().options.ssr?.nonce;return(0,V.jsx)(V.Fragment,{children:t.map(e=>(0,B.createElement)(Zc,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var nl=()=>{let e=o(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;return i?(n.map(t=>e.looseRoutesById[t.routeId]).forEach(e=>i.routes[e.id]?.assets?.filter(e=>e.tag===`script`).forEach(e=>{r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children})})),r):[]},r=e=>e.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),i=tc(e.stores.activeMatchesSnapshot,n,pe);return rl(e,tc(e.stores.activeMatchesSnapshot,r,pe),i)};function rl(e,t,n){let r;e.serverSsr&&(r=e.serverSsr.takeBufferedScripts());let i=[...t,...n];return r&&i.unshift(r),(0,V.jsx)(V.Fragment,{children:i.map((e,t)=>(0,B.createElement)(Zc,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var il=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},al=new class extends il{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ol={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sl=new class{#e=ol;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function cl(e){setTimeout(e,0)}var ll=typeof window>`u`||`Deno`in globalThis;function W(){}function ul(e,t){return typeof e==`function`?e(t):e}function dl(e){return typeof e==`number`&&e>=0&&e!==1/0}function fl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pl(e,t){return typeof e==`function`?e(t):e}function ml(e,t){return typeof e==`function`?e(t):e}function hl(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==_l(o,t.options))return!1}else if(!yl(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function gl(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(vl(t.options.mutationKey)!==vl(a))return!1}else if(!yl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function _l(e,t){return(t?.queryKeyHashFn||vl)(e)}function vl(e){return JSON.stringify(e,(e,t)=>wl(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function yl(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>yl(e[n],t[n])):!1}var bl=Object.prototype.hasOwnProperty;function xl(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Cl(e)&&Cl(t);if(!r&&!(wl(e)&&wl(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:bl.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=xl(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Sl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Cl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wl(e){if(!Tl(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Tl(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Tl(e){return Object.prototype.toString.call(e)===`[object Object]`}function El(e){return new Promise(t=>{sl.setTimeout(t,e)})}function Dl(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:xl(e,t)}function Ol(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function kl(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Al=Symbol();function jl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Al?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ml(e,t){return typeof e==`function`?e(...t):!!e}function Nl(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Pl=(()=>{let e=()=>ll;return{isServer(){return e()},setIsServer(t){e=t}}})();function Fl(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Il=cl;function Ll(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Il,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Rl=Ll(),zl=new class extends il{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Bl(e){return Math.min(1e3*2**e,3e4)}function G(e){return(e??`online`)===`online`?zl.isOnline():!0}var K=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function q(e){let t=!1,n=0,r,i=Fl(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new K(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>al.isFocused()&&(e.networkMode===`always`||zl.isOnline())&&e.canRun(),u=()=>G(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Pl.isServer()?0:3),o=e.retryDelay??Bl,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),El(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var J=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dl(this.gcTime)&&(this.#e=sl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pl.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(sl.clearTimeout(this.#e),void 0)}},Y=class extends J{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ul(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ul(this.options);e.data!==void 0&&(this.setState(Hl(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Dl(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(W).catch(W):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ml(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Al||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pl(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!fl(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=jl(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=q({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof K&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof K){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Vl(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Hl(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Rl.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Vl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:G(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Hl(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ul(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}function Wl(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Nl(e,()=>t.signal,()=>n=!0)},u=jl(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?kl:Ol;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?X:Gl,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Gl(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Gl(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function X(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Kl=class extends J{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ql(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=q({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Rl.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ql(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jl=class extends il{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Kl({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Yl(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Yl(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Yl(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Yl(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Rl.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>gl(t,e))}findAll(e={}){return this.getAll().filter(t=>gl(e,t))}notify(e){Rl.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Rl.batch(()=>Promise.all(e.map(e=>e.continue().catch(W))))}};function Yl(e){return e.options.scope?.id}var Xl=class extends il{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??_l(r,t),a=this.get(i);return a||(a=new Y({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Rl.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>hl(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>hl(e,t)):t}notify(e){Rl.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Rl.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Rl.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Zl=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Xl,this.#t=e.mutationCache||new Jl,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=al.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=zl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ul(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Rl.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Rl.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Rl.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Rl.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(W).catch(W)}invalidateQueries(e,t={}){return Rl.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Rl.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(W)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(W)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(pl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(W).catch(W)}fetchInfiniteQuery(e){return e.behavior=Wl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(W).catch(W)}ensureInfiniteQueryData(e){return e.behavior=Wl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(vl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{yl(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(vl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{yl(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=_l(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Al&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ql=B.createContext(void 0),$l=e=>{let t=B.useContext(Ql);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},eu=({client:e,children:t})=>(B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,V.jsx)(Ql.Provider,{value:e,children:t})),tu=`/assets/styles-zS0BbO7e.css`,nu=Tc()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`}],links:[{rel:`stylesheet`,href:tu}]}),component:ru,notFoundComponent:()=>(0,V.jsx)(`div`,{style:{padding:20},children:`Page not found`})});function ru(){let{queryClient:e}=nu.useRouteContext();return(0,V.jsx)(iu,{children:(0,V.jsx)(eu,{client:e,children:(0,V.jsx)(Hc,{})})})}function iu({children:e}){return(0,V.jsxs)(`html`,{lang:`en`,"data-theme":`dark`,suppressHydrationWarning:!0,children:[(0,V.jsx)(`head`,{children:(0,V.jsx)(tl,{})}),(0,V.jsxs)(`body`,{children:[(0,V.jsx)(`script`,{dangerouslySetInnerHTML:{__html:`document.documentElement.dataset.theme=localStorage.getItem('theme')||'dark'`}}),e,(0,V.jsx)(nl,{})]})]})}var au=`modulepreload`,ou=function(e){return`/`+e},su={},cu=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=ou(t,n),t in su)return;su[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`:au,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)})},lu=Oc(`/login`)({component:Mc(()=>cu(()=>import(`./login-DpI70f1L.js`),__vite__mapDeps([0,1,2])),`component`)});function uu(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function du(e,t){let n=Object.create(null);if(e)for(let t of Object.keys(e))uu(t)&&(n[t]=e[t]);if(t&&typeof t==`object`)for(let e of Object.keys(t))uu(e)&&(n[e]=t[e]);return n}function fu(e){if(!e)return Object.create(null);let t=Object.create(null);for(let n of Object.keys(e))uu(n)&&(t[n]=e[n]);return t}var pu=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},mu=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>mu(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.map(e=>{b in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=mu(void 0,{...n,middleware:t});return r[b]=!0,r},inputValidator:e=>mu(void 0,{...n,inputValidator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],vu(i)];return t.method=n.method,Object.assign(async e=>{let n=await hu(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:fu()}),r=kt(n.error);if(r)throw r;if(n.error)throw n.error;return n.result},{...t,method:n.method,__executeServer:async e=>{let n=pu(),r=n.contextAfterGlobalMiddlewares;return await hu(a,`server`,{...t,...e,serverFnMeta:t.serverFnMeta,context:du(r,e.context),request:n.request}).then(e=>({result:e.result,error:e.error,context:e.sendContext}))}})}})};async function hu(e,t,n){let r=gu([...ne()?.functionMiddleware||[],...e]);if(t===`server`){let e=pu({throwIfNotFound:!1});e?.executedRequestMiddlewares&&(r=r.filter(t=>!e.executedRequestMiddlewares.has(t)))}let i=async e=>{let n=r.shift();if(!n)return e;try{`inputValidator`in n.options&&n.options.inputValidator&&t===`server`&&(e.data=await _u(n.options.inputValidator,e.data));let r;if(t===`client`?`client`in n.options&&(r=n.options.client):`server`in n.options&&(r=n.options.server),r){let t=async(t={})=>{let n=await i({...e,...t,context:du(e.context,t.context),sendContext:du(e.sendContext,t.sendContext),headers:Zo(e.headers,t.headers),_callSiteFetch:e._callSiteFetch,fetch:e._callSiteFetch??t.fetch??e.fetch,result:t.result===void 0?t instanceof Response?t:e.result:t.result,error:t.error??e.error});if(n.error)throw n.error;return n},n=await r({...e,next:t});if(Ot(n))return{...e,error:n};if(n instanceof Response)return{...e,result:n};if(!n)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);return n}return i(e)}catch(t){return{...e,error:t}}};return i({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||fu(),_callSiteFetch:n.fetch})}function gu(e,t=100){let n=new Set,r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function _u(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function vu(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:async({next:t,...n})=>{let r=await e.serverFn?.(n);return t({...n,result:r})}}}}var yu=mu({method:`GET`}).handler(qo(`539c27f871f75647d981e1ed4d82b5ee620e9e557722641a4a57c5a5818760c9`)),bu=Oc(`/`)({validateSearch:e=>({project:e.project||void 0,v:e.v||void 0,lang:e.lang||void 0,file:e.file||void 0,files:e.files||void 0,view:e.view||void 0,toc:e.toc||void 0,nodes:e.nodes||void 0,status:e.status||void 0,section:e.section||void 0}),beforeLoad:async()=>{let e=await yu();if(!e)throw Dt({to:`/login`});return{session:e}},component:Mc(()=>cu(()=>import(`./routes-D1wZzUqP.js`),__vite__mapDeps([3,1,2])),`component`)}),xu=lu.update({id:`/login`,path:`/login`,getParentRoute:()=>nu}),Su={IndexRoute:bu.update({id:`/`,path:`/`,getParentRoute:()=>nu}),LoginRoute:xu},Cu=nu._addFileChildren(Su);function wu(){return qc({routeTree:Cu,context:{queryClient:new Zl({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}})},scrollRestoration:!0})}async function Tu(){let e=await wu(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Jo),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.state.length||await es(e),e}async function Eu(){let e=await Tu();return window.$_TSR?.h(),e}var Du;function Ou(){return Du||=Eu(),(0,V.jsx)(ns,{promise:Du,children:e=>(0,V.jsx)(Xc,{router:e})})}var ku=_();(0,B.startTransition)(()=>{(0,ku.hydrateRoot)(document,(0,V.jsx)(B.StrictMode,{children:(0,V.jsx)(Ou,{})}))});export{fl as _,Vl as a,il as b,Pl as c,W as d,Dl as f,Ml as g,Sl as h,ql as i,vl as l,pl as m,mu as n,Rl as o,ml as p,$l as r,Fl as s,bu as t,dl as u,sl as v,qo as x,al as y};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{f as e,i as t,t as n,u as r}from"./useNavigate-CEOVvMjz.js";import{_ as i,a,b as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,m,n as h,o as g,p as _,r as v,s as y,t as b,u as x,v as S,x as C,y as w}from"./main-bc5tcdGg.js";import{t as T}from"./auth-client-DqJZaFZR.js";var E=class extends o{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=y(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),O(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return k(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return k(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof _(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!d(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&A(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||_(this.options.enabled,this.#t)!==_(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||_(this.options.enabled,this.#t)!==_(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return M(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(s.isServer()||this.#r.isStale||!x(e))return;let t=i(this.#r.dataUpdatedAt,e)+1;this.#d=S.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(s.isServer()||_(this.options.enabled,this.#t)===!1||!x(this.#p)||this.#p===0)&&(this.#f=S.setInterval(()=>{(this.options.refetchIntervalInBackground||w.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(S.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(S.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,o=this.#i,s=this.#a,c=e===n?this.#n:e.state,{state:u}=e,d={...u},f=!1,p;if(t._optimisticResults){let i=this.hasListeners(),o=!i&&O(e,t),s=i&&A(e,n,t,r);(o||s)&&(d={...d,...a(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:h,status:g}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&g===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=i.data,v=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(g=`success`,p=l(i?.data,e,t),f=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===o?.data&&t.select===this.#c)p=this.#l;else try{this.#c=t.select,p=t.select(p),p=l(i?.data,p,t),this.#l=p,this.#s=null}catch(e){this.#s=e}this.#s&&(m=this.#s,p=this.#l,h=Date.now(),g=`error`);let b=d.fetchStatus===`fetching`,x=g===`pending`,S=g===`error`,C=x&&b,w=p!==void 0,T={status:g,fetchStatus:d.fetchStatus,isPending:x,isSuccess:g===`success`,isError:S,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!w,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:S&&w,isStale:j(e,t),refetch:this.refetch,promise:this.#o,isEnabled:_(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=T.data!==void 0,r=T.status===`error`&&!t,i=e=>{r?e.reject(T.error):t&&e.resolve(T.data)},a=()=>{i(this.#o=T.promise=y())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||T.data!==o.value)&&a();break;case`rejected`:(!r||T.error!==o.reason)&&a();break}}return T}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!d(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){g.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function D(e,t){return _(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function O(e,t){return D(e,t)||e.state.data!==void 0&&k(e,t,t.refetchOnMount)}function k(e,t,n){if(_(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&j(e,t)}return!1}function A(e,t,n,r){return(e!==t||_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&j(e,n)}function j(e,t){return _(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function M(e,t){return!d(e.getCurrentResult(),t)}var N=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),d(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&p(t.mutationKey)!==p(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??f();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){g.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},P=e(r(),1),F=P.createContext(!1),I=()=>P.useContext(F);F.Provider;var L=t();function R(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z=P.createContext(R()),B=()=>P.useContext(z),V=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?u(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ee=e=>{P.useEffect(()=>{e.clearReset()},[e])},te=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||u(n,[e.error,r])),H=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ne=(e,t)=>e.isLoading&&e.isFetching&&!t,U=(e,t)=>e?.suspense&&t.isPending,W=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function G(e,t,n){let r=I(),i=B(),a=v(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,H(o),V(o,i,l),ee(i);let u=!a.getQueryCache().get(o.queryHash),[d]=P.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(e=>{let t=p?d.subscribe(g.batchCalls(e)):c;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setOptions(o)},[o,d]),U(o,f))throw W(o,d,i);if(te({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!s.isServer()&&ne(f,r)&&(u?W(o,d,i):l?.promise)?.catch(c).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function K(e,t){return G(e,E,t)}function q(e,t){let n=v(t),[r]=P.useState(()=>new N(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);let i=P.useSyncExternalStore(P.useCallback(e=>r.subscribe(g.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=P.useCallback((e,t)=>{r.mutate(e,t).catch(c)},[r]);if(i.error&&u(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var J={en:`🇺🇸`,"zh-hans":`🇨🇳`,"zh-hant":`🇭🇰`,ja:`🇯🇵`,ar:`🇸🇦`,de:`🇩🇪`,es:`🇪🇸`,fr:`🇫🇷`,ru:`🇷🇺`};function re(e){return e>=95?`var(--green)`:e>50?`var(--yellow)`:`var(--red)`}function Y(e){return e>=100?`🟢`:e>0?`🟡`:`🔴`}function ie(e){return e.startsWith(`docs/`)?`docs`:e.startsWith(`blog/`)?`blog`:e.startsWith(`learn/`)?`learn`:`other`}function X(e){return e.total>0?e.translated/e.total*100:100}function ae(e){let t=X(e);return t>=100?`complete`:t>0?`partial`:`missing`}function oe(e){let t={name:``,path:``,children:new Map};for(let n of e){let e=n.file.split(`/`),r=t;for(let t=0;t<e.length;t++){let n=e[t];r.children.has(n)||r.children.set(n,{name:n,path:e.slice(0,t+1).join(`/`),children:new Map}),r=r.children.get(n)}r.file=n}return t}function se(e){let t=0,n=0;e.file&&(t+=e.file.translated,n+=e.file.total);for(let r of e.children.values()){let e=se(r);t+=e.translated,n+=e.total}return{translated:t,total:n}}function ce({node:e,depth:t,activeFile:n,selected:r,isEn:i,collapsed:a,onToggleCollapse:o,onSelect:s,onToggle:c}){let l=e.children.size>0&&!e.file,u=a.has(e.path),d=[...e.children.values()].sort((e,t)=>{let n=e.children.size>0&&!e.file;return n===(t.children.size>0&&!t.file)?e.name.localeCompare(t.name):n?-1:1});if(l){let{translated:l,total:f}=se(e),p=f>0?l/f*100:100,m=p>=100?`var(--green)`:p>0?`var(--yellow)`:`var(--red)`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`file-row tree-dir`,style:{paddingLeft:`${t+.25}rem`},onClick:()=>o(e.path),children:[(0,L.jsx)(`span`,{className:`tree-arrow`,children:u?`▶`:`▼`}),(0,L.jsx)(`span`,{className:`icon`,children:`📁`}),(0,L.jsxs)(`span`,{className:`path`,title:e.path,children:[e.name,`/`]}),(0,L.jsxs)(`span`,{className:`pct`,children:[p.toFixed(0),`%`]}),(0,L.jsx)(`div`,{className:`mini-bar`,children:(0,L.jsx)(`div`,{className:`mini-fill`,style:{width:`${p}%`,background:m}})})]}),!u&&d.map(e=>(0,L.jsx)(ce,{node:e,depth:t+1,activeFile:n,selected:r,isEn:i,collapsed:a,onToggleCollapse:o,onSelect:s,onToggle:c},e.path))]})}let f=e.file;if(!f)return null;f.total-f.translated;let p=f.status===`complete`?`var(--green)`:f.status===`partial`?`var(--yellow)`:`var(--red)`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`file-row${n===f.file?` active`:``}`,style:{paddingLeft:`${t+.25}rem`},onClick:()=>s(f.file),children:[!i&&(0,L.jsx)(`input`,{type:`checkbox`,checked:r.has(f.file),onChange:e=>{e.stopPropagation(),c(f.file)},onClick:e=>e.stopPropagation()}),(0,L.jsx)(`span`,{className:`icon`,children:Y(f.pct)}),(0,L.jsx)(`span`,{className:`path`,title:f.file,children:e.name}),(0,L.jsxs)(`span`,{className:`pct`,children:[f.pct.toFixed(0),`%`]}),(0,L.jsx)(`div`,{className:`mini-bar`,children:(0,L.jsx)(`div`,{className:`mini-fill`,style:{width:`${f.pct}%`,background:p}})})]}),!u&&d.map(e=>(0,L.jsx)(ce,{node:e,depth:t+1,activeFile:n,selected:r,isEn:i,collapsed:a,onToggleCollapse:o,onSelect:s,onToggle:c},e.path))]})}function le({files:e,lang:t,activeFile:n,selected:r,statusFilter:i,sectionFilter:a,onStatusFilter:o,onSectionFilter:s,onSelect:c,onToggle:l,onSelectAll:u,onClear:d,onTranslateSelected:f}){let[p,m]=(0,P.useState)(`tree`),[h,g]=(0,P.useState)(new Set),[_,v]=(0,P.useState)(``),y=(0,P.useMemo)(()=>{let t=e.map(e=>({...e,pct:X(e),status:ae(e),section:ie(e.file)}));if(i!==`all`&&(t=t.filter(e=>e.status===i)),a!==`all`&&(t=t.filter(e=>e.section===a)),_.trim()){let e=_.trim().toLowerCase();t=t.filter(t=>t.file.toLowerCase().includes(e))}return t},[e,i,a,_]),b=(0,P.useMemo)(()=>oe(y),[y]),x=e=>{g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=t===`en`;return(0,L.jsxs)(`div`,{className:`file-list-wrap`,children:[!S&&r.size>0&&(0,L.jsxs)(`div`,{className:`sel-bar`,children:[(0,L.jsxs)(`span`,{children:[r.size,` selected`]}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm`,onClick:f,children:`Translate Selected`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-outline`,onClick:d,children:`Clear`})]}),(0,L.jsxs)(`div`,{className:`file-search`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Search files...`,value:_,onChange:e=>v(e.target.value)}),_&&(0,L.jsx)(`button`,{type:`button`,className:`file-search-clear`,onClick:()=>v(``),children:`✕`})]}),(0,L.jsxs)(`div`,{className:`file-list-hdr`,children:[!S&&(0,L.jsx)(`input`,{type:`checkbox`,checked:y.length>0&&y.every(e=>r.has(e.file)),onChange:e=>{e.target.checked?u(y.map(e=>e.file)):d()},title:`Select all visible`}),(0,L.jsxs)(`strong`,{children:[t,` · `,y.length,` files`]}),(0,L.jsx)(`span`,{className:`spacer`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-xs${p===`list`?` active`:``}`,onClick:()=>m(`list`),title:`List view`,children:`☰`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-xs${p===`tree`?` active`:``}`,onClick:()=>m(`tree`),title:`Tree view`,children:`🌲`}),(0,L.jsxs)(`select`,{value:i,onChange:e=>o(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),(0,L.jsx)(`option`,{value:`complete`,children:`✅ Complete`}),(0,L.jsx)(`option`,{value:`partial`,children:`🟡 Partial`}),(0,L.jsx)(`option`,{value:`missing`,children:`🔴 Missing`})]}),(0,L.jsxs)(`select`,{value:a,onChange:e=>s(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All sections`}),(0,L.jsx)(`option`,{value:`docs`,children:`docs`}),(0,L.jsx)(`option`,{value:`blog`,children:`blog`}),(0,L.jsx)(`option`,{value:`learn`,children:`learn`})]})]}),(0,L.jsxs)(`div`,{className:`file-list-body`,children:[y.length===0&&(0,L.jsx)(`div`,{className:`loading`,children:`No files match filter`}),p===`list`&&y.map(e=>{e.total-e.translated;let t=e.status===`complete`?`var(--green)`:e.status===`partial`?`var(--yellow)`:`var(--red)`;return(0,L.jsxs)(`div`,{className:`file-row${n===e.file?` active`:``}`,onClick:()=>c(e.file),children:[!S&&(0,L.jsx)(`input`,{type:`checkbox`,checked:r.has(e.file),onChange:t=>{t.stopPropagation(),l(e.file)},onClick:e=>e.stopPropagation()}),(0,L.jsx)(`span`,{className:`icon`,children:Y(e.pct)}),(0,L.jsx)(`span`,{className:`path`,title:e.file,children:e.file}),(0,L.jsxs)(`span`,{className:`pct`,children:[e.pct.toFixed(0),`%`]}),(0,L.jsx)(`div`,{className:`mini-bar`,children:(0,L.jsx)(`div`,{className:`mini-fill`,style:{width:`${e.pct}%`,background:t}})})]},e.file)}),p===`tree`&&[...b.children.values()].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>(0,L.jsx)(ce,{node:e,depth:0,activeFile:n,selected:r,isEn:S,collapsed:h,onToggleCollapse:x,onSelect:c,onToggle:l},e.path))]})]})}var ue=h({method:`GET`}).handler(C(`4e218d79545765572808c7eab33b7663d4496209c15406d0b449366905b6b83f`)),de=h({method:`GET`}).handler(C(`843cd8b59095708a5ae78198708db9850f89fd3dd3830ab236f0bd924417692f`)),fe=h({method:`GET`}).handler(C(`e1e7281e45375c67dbe408c58452e7482b139da60e9e361615553227dce95ee0`)),pe=h({method:`POST`}).handler(C(`e1d13d8602339a95f559345ccfc82e9f843dd375ce8e9f580637c241e7e44774`));h({method:`POST`}).handler(C(`1d8e3916f992485c62e62c3693083850b773fdff4ec54277de5a01eb98dab664`));var me=h({method:`GET`}).handler(C(`421de02ce39dde6e27cf4689e837ec072cbd01e63f8cdd5c2a3f42f0bd5ca613`)),he=h({method:`POST`}).handler(C(`c08559ac758aa0d315deaca7a0d7d923a9a44d997c8cb811151417c1f221ddd6`));h({method:`GET`}).handler(C(`8a56694c9d7b29422a3e7d2f6b803be100d79d3853d92d465cb55ed572781e62`));var ge=h({method:`POST`}).handler(C(`88c2855c84e91504070bfecc50ddfa50339d22c305626800b6d9b05d79385d71`)),_e=h({method:`GET`}).handler(C(`5080dc3f2f2309ec6981b94c431969637130c657e8a1dfb10400b4614eecc1ea`)),ve=h({method:`GET`}).handler(C(`a3d81974aeece150d4b02be5b91590b8187442ebea56be4a89dcbf053626d22b`)),ye=h({method:`GET`}).handler(C(`3bf4ba50ca8ccc3c8c60d8f2e53307a320940d68c478df494552066904c5cd74`));h({method:`GET`}).handler(C(`e0b4116f6b2c8d096830102e36458acf9c616a056fcdddda956a4d66984ef58c`));var be=h({method:`POST`}).handler(C(`a054a04356fe9987891efee8b7a11cd2dedb00f6b2e8f26d1c642e001e553d53`)),Z={version:()=>ve(),llmConfig:()=>ye(),status:()=>ue(),fileCoverage:(e,t)=>de({data:{version:e,lang:t}}),fileBlocks:(e,t,n)=>fe({data:{version:e,lang:t,path:n}}),deleteCache:(e,t,n)=>pe({data:{version:e,lang:t,key:n}}),models:()=>_e(),jobs:()=>me(),createJob:e=>he({data:e}),deleteJob:e=>ge({data:{id:e}})};function Q(e){return e===0?`Free`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function $(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:`${(e/1e3).toFixed(0)}k`}var xe=[0,8,16,32,64,128,200,512,1024,2048];function Se({langs:e,versions:t,defaultLang:n,defaultVersion:r,files:i,onClose:a,onSuccess:o}){let[s,c]=(0,P.useState)(n||e[0]),[l,u]=(0,P.useState)(r||t[0]),[d,f]=(0,P.useState)(i?.length||999),[p,m]=(0,P.useState)(3),[h,g]=(0,P.useState)(null),[_,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(``),[S,C]=(0,P.useState)(`context-desc`),[w,T]=(0,P.useState)(0),[E,D]=(0,P.useState)(!0),[O,k]=(0,P.useState)(!1),A=xe[w]*1e3,{data:j}=K({queryKey:[`llmConfig`],queryFn:Z.llmConfig,staleTime:60*1e3}),{data:M,isLoading:N}=K({queryKey:[`models`],queryFn:Z.models,staleTime:300*1e3}),F=(0,P.useMemo)(()=>{if(!M)return[];let e=M.filter(e=>{if(b){let t=b.toLowerCase();if(!e.id.toLowerCase().includes(t)&&!e.name.toLowerCase().includes(t))return!1}return!(E&&!e.isFree||A>0&&e.contextLength<A||O&&!e.supportsJson)});switch(e=[...e],S){case`price-asc`:e.sort((e,t)=>e.promptPrice-t.promptPrice);break;case`price-desc`:e.sort((e,t)=>t.promptPrice-e.promptPrice);break;case`context-desc`:e.sort((e,t)=>t.contextLength-e.contextLength);break;case`name`:e.sort((e,t)=>e.name.localeCompare(t.name));break}return e},[M,b,E,A,O,S]),I=v(),R=q({mutationFn:()=>Z.createJob({lang:s,version:l,max:d,concurrency:p,model:_||void 0,md5:!0,files:i?.length?i:void 0}),onSuccess:()=>{I.invalidateQueries({queryKey:[`jobs`]}),o?o(`✅ Job started: ${s} / ${l}${i?.length?` (${i.length} files)`:``}`):a()},onError:e=>g(e.message)}),z=e.filter(e=>e!==`en`),B=_?M?.find(e=>e.id===_):null;return(0,L.jsx)(`div`,{className:`dialog-overlay`,onClick:e=>{e.target===e.currentTarget&&a()},children:(0,L.jsxs)(`div`,{className:`dialog dialog-wide`,children:[(0,L.jsx)(`h3`,{children:`Start Translation Job`}),h&&(0,L.jsx)(`div`,{className:`dialog-error`,children:h}),j&&!j.hasApiKey&&(0,L.jsxs)(`div`,{className:`dialog-error`,children:[`⚠ No API key found. Set `,(0,L.jsx)(`code`,{children:`OPENROUTER_API_KEY`}),` in `,(0,L.jsx)(`code`,{children:`.env`}),` or configure `,(0,L.jsx)(`code`,{children:`llm.apiKey`}),` in config.`]}),j?.model&&(0,L.jsxs)(`div`,{className:`dialog-mode-hint`,children:[`Default model: `,(0,L.jsx)(`strong`,{children:j.model}),j.provider&&(0,L.jsxs)(`span`,{children:[` (`,j.provider,`)`]})]}),i?.length&&(0,L.jsxs)(`div`,{className:`dialog-mode-hint`,children:[`Translating `,i.length,` selected file`,i.length>1?`s`:``]}),(0,L.jsxs)(`div`,{className:`dialog-grid`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Language`}),(0,L.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),children:z.map(e=>(0,L.jsxs)(`option`,{value:e,children:[J[e],` `,e]},e))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Version`}),(0,L.jsx)(`select`,{value:l,onChange:e=>u(e.target.value),children:t.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Max API calls`}),(0,L.jsx)(`input`,{type:`number`,value:d,onChange:e=>f(Number(e.target.value))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Concurrency`}),(0,L.jsx)(`input`,{type:`number`,value:p,onChange:e=>m(Number(e.target.value))})]})]}),(0,L.jsx)(`div`,{className:`dialog-section-hdr`,children:(0,L.jsx)(`span`,{children:`Model`})}),(0,L.jsxs)(`div`,{className:`model-filters`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Search models...`,value:b,onChange:e=>x(e.target.value),className:`model-search-input`}),(0,L.jsxs)(`select`,{value:S,onChange:e=>C(e.target.value),children:[(0,L.jsx)(`option`,{value:`context-desc`,children:`Context ↓`}),(0,L.jsx)(`option`,{value:`price-asc`,children:`Price ↑`}),(0,L.jsx)(`option`,{value:`price-desc`,children:`Price ↓`}),(0,L.jsx)(`option`,{value:`name`,children:`Name A-Z`})]}),(0,L.jsxs)(`label`,{className:`model-filter-check`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:E,onChange:e=>D(e.target.checked)}),`Free`]}),(0,L.jsxs)(`label`,{className:`model-filter-check`,title:`Structured JSON output — required for best translation quality`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:O,onChange:e=>k(e.target.checked)}),`JSON mode`]})]}),(0,L.jsxs)(`div`,{className:`model-slider-row`,children:[(0,L.jsxs)(`span`,{className:`model-slider-label`,children:[`Context ≥ `,A===0?`any`:$(A)]}),(0,L.jsx)(`input`,{type:`range`,min:0,max:xe.length-1,value:w,onChange:e=>T(Number(e.target.value)),className:`model-slider`})]}),(0,L.jsxs)(`div`,{className:`model-list`,children:[(0,L.jsx)(`div`,{className:`model-item${_===``?` active`:``}`,onClick:()=>y(``),children:(0,L.jsx)(`span`,{className:`model-name`,children:`Default (from .env)`})}),N&&(0,L.jsx)(`div`,{className:`model-item disabled`,children:`Loading models...`}),F.map(e=>(0,L.jsx)(Ce,{m:e,mode:`single`,active:_===e.id,onClick:()=>y(e.id)},e.id)),!N&&F.length===0&&(0,L.jsx)(`div`,{className:`model-item disabled`,children:`No models match filters`})]}),(0,L.jsxs)(`div`,{className:`model-count`,children:[F.length,` model`,F.length===1?``:`s`,M?` / ${M.length} total`:``]}),B&&(0,L.jsxs)(`div`,{className:`model-info`,children:[(0,L.jsx)(`strong`,{children:B.name}),B.isFree&&(0,L.jsx)(`span`,{className:`badge-free`,children:`FREE`}),B.supportsJson&&(0,L.jsx)(`span`,{className:`badge-json`,children:`JSON`}),(0,L.jsx)(`br`,{}),`In: `,Q(B.promptPrice),`/M · Out:`,` `,Q(B.completionPrice),`/M · Ctx:`,` `,$(B.contextLength),B.maxOutput>0&&` · Max out: ${$(B.maxOutput)}`]}),i&&i.length>0&&(0,L.jsxs)(`div`,{className:`file-list-preview`,children:[(0,L.jsxs)(`strong`,{children:[i.length,` files selected:`]}),i.map(e=>(0,L.jsx)(`div`,{children:e},e))]}),(0,L.jsxs)(`div`,{className:`actions`,children:[(0,L.jsx)(`button`,{type:`button`,className:`btn btn-outline`,onClick:a,children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,className:`btn`,disabled:R.isPending||j&&!j.hasApiKey,onClick:()=>R.mutate(),children:R.isPending?`Starting...`:j&&!j.hasApiKey?`No API Key`:`Start Job →`})]})]})})}function Ce({m:e,mode:t,active:n,onClick:r}){return(0,L.jsxs)(`div`,{className:`model-item${n?` active`:``}`,onClick:r,children:[t===`rotate`&&(0,L.jsx)(`input`,{type:`checkbox`,checked:n,readOnly:!0,className:`model-check`}),(0,L.jsxs)(`span`,{className:`model-name`,children:[e.isFree&&`🆓 `,e.name]}),(0,L.jsxs)(`span`,{className:`model-meta`,children:[e.supportsJson?`✓ `:``,$(e.contextLength),` ·`,` `,e.isFree?`Free`:`${Q(e.promptPrice)}/${Q(e.completionPrice)}`]})]})}function we(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Te({job:e}){let t=v(),n=q({mutationFn:()=>Z.deleteJob(e.id),onSuccess:()=>t.invalidateQueries({queryKey:[`jobs`]})}),r=e.toTranslate>0?e.translatedFiles/e.toTranslate*100:e.status===`completed`?100:0,i=``;e.toTranslate>0?(i=`${e.translatedFiles}/${e.toTranslate} translated`,e.totalFiles&&(i+=` (${e.totalFiles} total)`)):e.totalFiles>0&&(i=`scanning ${e.totalFiles} files...`),e.errorFiles>0&&(i+=` · ${e.errorFiles} errors`);let a=e.status===`running`;return(0,L.jsxs)(`div`,{className:`job-item`,children:[(0,L.jsxs)(`div`,{className:`hdr`,children:[(0,L.jsx)(`span`,{className:`status-badge ${e.status}`,children:e.status}),(0,L.jsxs)(`strong`,{children:[e.lang,`/`,e.version]}),e.currentFile&&(0,L.jsx)(`span`,{style:{color:`var(--fg2)`},children:e.currentFile}),(0,L.jsx)(`span`,{className:`spacer`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-outline`,onClick:()=>n.mutate(),children:a?`⏹`:`🗑`})]}),(0,L.jsx)(`div`,{className:`progress-bar`,children:(0,L.jsx)(`div`,{className:`progress-fill`,style:{width:`${Math.min(100,r)}%`}})}),(0,L.jsxs)(`div`,{className:`job-meta`,children:[i,` · `,new Date(e.startedAt).toLocaleTimeString(),e.finishedAt&&` · done ${new Date(e.finishedAt).toLocaleTimeString()}`,e.exitCode!=null&&e.exitCode!==0&&` · exit ${e.exitCode}`]}),e.logLines&&e.logLines.length>0&&(0,L.jsxs)(`div`,{className:`log-viewer`,children:[(0,L.jsx)(`button`,{type:`button`,className:`log-copy`,title:`Copy logs`,onClick:()=>{navigator.clipboard.writeText(e.logLines.join(`
|
|
1
|
+
import{f as e,i as t,t as n,u as r}from"./useNavigate-CEOVvMjz.js";import{_ as i,a,b as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,m,n as h,o as g,p as _,r as v,s as y,t as b,u as x,v as S,x as C,y as w}from"./main-HccfHTVt.js";import{t as T}from"./auth-client-ChAoRxRf.js";var E=class extends o{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=y(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),O(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return k(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return k(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof _(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!d(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&A(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||_(this.options.enabled,this.#t)!==_(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||_(this.options.enabled,this.#t)!==_(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return M(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(s.isServer()||this.#r.isStale||!x(e))return;let t=i(this.#r.dataUpdatedAt,e)+1;this.#d=S.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(s.isServer()||_(this.options.enabled,this.#t)===!1||!x(this.#p)||this.#p===0)&&(this.#f=S.setInterval(()=>{(this.options.refetchIntervalInBackground||w.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(S.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(S.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,o=this.#i,s=this.#a,c=e===n?this.#n:e.state,{state:u}=e,d={...u},f=!1,p;if(t._optimisticResults){let i=this.hasListeners(),o=!i&&O(e,t),s=i&&A(e,n,t,r);(o||s)&&(d={...d,...a(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:h,status:g}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&g===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=i.data,v=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(g=`success`,p=l(i?.data,e,t),f=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===o?.data&&t.select===this.#c)p=this.#l;else try{this.#c=t.select,p=t.select(p),p=l(i?.data,p,t),this.#l=p,this.#s=null}catch(e){this.#s=e}this.#s&&(m=this.#s,p=this.#l,h=Date.now(),g=`error`);let b=d.fetchStatus===`fetching`,x=g===`pending`,S=g===`error`,C=x&&b,w=p!==void 0,T={status:g,fetchStatus:d.fetchStatus,isPending:x,isSuccess:g===`success`,isError:S,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!w,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:S&&w,isStale:j(e,t),refetch:this.refetch,promise:this.#o,isEnabled:_(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=T.data!==void 0,r=T.status===`error`&&!t,i=e=>{r?e.reject(T.error):t&&e.resolve(T.data)},a=()=>{i(this.#o=T.promise=y())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||T.data!==o.value)&&a();break;case`rejected`:(!r||T.error!==o.reason)&&a();break}}return T}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!d(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){g.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function D(e,t){return _(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function O(e,t){return D(e,t)||e.state.data!==void 0&&k(e,t,t.refetchOnMount)}function k(e,t,n){if(_(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&j(e,t)}return!1}function A(e,t,n,r){return(e!==t||_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&j(e,n)}function j(e,t){return _(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function M(e,t){return!d(e.getCurrentResult(),t)}var N=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),d(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&p(t.mutationKey)!==p(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??f();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){g.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},P=e(r(),1),F=P.createContext(!1),I=()=>P.useContext(F);F.Provider;var L=t();function R(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z=P.createContext(R()),B=()=>P.useContext(z),V=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?u(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ee=e=>{P.useEffect(()=>{e.clearReset()},[e])},te=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||u(n,[e.error,r])),H=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ne=(e,t)=>e.isLoading&&e.isFetching&&!t,U=(e,t)=>e?.suspense&&t.isPending,W=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function G(e,t,n){let r=I(),i=B(),a=v(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,H(o),V(o,i,l),ee(i);let u=!a.getQueryCache().get(o.queryHash),[d]=P.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(e=>{let t=p?d.subscribe(g.batchCalls(e)):c;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setOptions(o)},[o,d]),U(o,f))throw W(o,d,i);if(te({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!s.isServer()&&ne(f,r)&&(u?W(o,d,i):l?.promise)?.catch(c).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function K(e,t){return G(e,E,t)}function q(e,t){let n=v(t),[r]=P.useState(()=>new N(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);let i=P.useSyncExternalStore(P.useCallback(e=>r.subscribe(g.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=P.useCallback((e,t)=>{r.mutate(e,t).catch(c)},[r]);if(i.error&&u(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var J={en:`🇺🇸`,"zh-hans":`🇨🇳`,"zh-hant":`🇭🇰`,ja:`🇯🇵`,ar:`🇸🇦`,de:`🇩🇪`,es:`🇪🇸`,fr:`🇫🇷`,ru:`🇷🇺`};function re(e){return e>=95?`var(--green)`:e>50?`var(--yellow)`:`var(--red)`}function Y(e){return e>=100?`🟢`:e>0?`🟡`:`🔴`}function ie(e){return e.startsWith(`docs/`)?`docs`:e.startsWith(`blog/`)?`blog`:e.startsWith(`learn/`)?`learn`:`other`}function X(e){return e.total>0?e.translated/e.total*100:100}function ae(e){let t=X(e);return t>=100?`complete`:t>0?`partial`:`missing`}function oe(e){let t={name:``,path:``,children:new Map};for(let n of e){let e=n.file.split(`/`),r=t;for(let t=0;t<e.length;t++){let n=e[t];r.children.has(n)||r.children.set(n,{name:n,path:e.slice(0,t+1).join(`/`),children:new Map}),r=r.children.get(n)}r.file=n}return t}function se(e){let t=0,n=0;e.file&&(t+=e.file.translated,n+=e.file.total);for(let r of e.children.values()){let e=se(r);t+=e.translated,n+=e.total}return{translated:t,total:n}}function ce({node:e,depth:t,activeFile:n,selected:r,isEn:i,collapsed:a,onToggleCollapse:o,onSelect:s,onToggle:c}){let l=e.children.size>0&&!e.file,u=a.has(e.path),d=[...e.children.values()].sort((e,t)=>{let n=e.children.size>0&&!e.file;return n===(t.children.size>0&&!t.file)?e.name.localeCompare(t.name):n?-1:1});if(l){let{translated:l,total:f}=se(e),p=f>0?l/f*100:100,m=p>=100?`var(--green)`:p>0?`var(--yellow)`:`var(--red)`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`file-row tree-dir`,style:{paddingLeft:`${t+.25}rem`},onClick:()=>o(e.path),children:[(0,L.jsx)(`span`,{className:`tree-arrow`,children:u?`▶`:`▼`}),(0,L.jsx)(`span`,{className:`icon`,children:`📁`}),(0,L.jsxs)(`span`,{className:`path`,title:e.path,children:[e.name,`/`]}),(0,L.jsxs)(`span`,{className:`pct`,children:[p.toFixed(0),`%`]}),(0,L.jsx)(`div`,{className:`mini-bar`,children:(0,L.jsx)(`div`,{className:`mini-fill`,style:{width:`${p}%`,background:m}})})]}),!u&&d.map(e=>(0,L.jsx)(ce,{node:e,depth:t+1,activeFile:n,selected:r,isEn:i,collapsed:a,onToggleCollapse:o,onSelect:s,onToggle:c},e.path))]})}let f=e.file;if(!f)return null;f.total-f.translated;let p=f.status===`complete`?`var(--green)`:f.status===`partial`?`var(--yellow)`:`var(--red)`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`file-row${n===f.file?` active`:``}`,style:{paddingLeft:`${t+.25}rem`},onClick:()=>s(f.file),children:[!i&&(0,L.jsx)(`input`,{type:`checkbox`,checked:r.has(f.file),onChange:e=>{e.stopPropagation(),c(f.file)},onClick:e=>e.stopPropagation()}),(0,L.jsx)(`span`,{className:`icon`,children:Y(f.pct)}),(0,L.jsx)(`span`,{className:`path`,title:f.file,children:e.name}),(0,L.jsxs)(`span`,{className:`pct`,children:[f.pct.toFixed(0),`%`]}),(0,L.jsx)(`div`,{className:`mini-bar`,children:(0,L.jsx)(`div`,{className:`mini-fill`,style:{width:`${f.pct}%`,background:p}})})]}),!u&&d.map(e=>(0,L.jsx)(ce,{node:e,depth:t+1,activeFile:n,selected:r,isEn:i,collapsed:a,onToggleCollapse:o,onSelect:s,onToggle:c},e.path))]})}function le({files:e,lang:t,activeFile:n,selected:r,statusFilter:i,sectionFilter:a,onStatusFilter:o,onSectionFilter:s,onSelect:c,onToggle:l,onSelectAll:u,onClear:d,onTranslateSelected:f}){let[p,m]=(0,P.useState)(`tree`),[h,g]=(0,P.useState)(new Set),[_,v]=(0,P.useState)(``),y=(0,P.useMemo)(()=>{let t=e.map(e=>({...e,pct:X(e),status:ae(e),section:ie(e.file)}));if(i!==`all`&&(t=t.filter(e=>e.status===i)),a!==`all`&&(t=t.filter(e=>e.section===a)),_.trim()){let e=_.trim().toLowerCase();t=t.filter(t=>t.file.toLowerCase().includes(e))}return t},[e,i,a,_]),b=(0,P.useMemo)(()=>oe(y),[y]),x=e=>{g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=t===`en`;return(0,L.jsxs)(`div`,{className:`file-list-wrap`,children:[!S&&r.size>0&&(0,L.jsxs)(`div`,{className:`sel-bar`,children:[(0,L.jsxs)(`span`,{children:[r.size,` selected`]}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm`,onClick:f,children:`Translate Selected`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-outline`,onClick:d,children:`Clear`})]}),(0,L.jsxs)(`div`,{className:`file-search`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Search files...`,value:_,onChange:e=>v(e.target.value)}),_&&(0,L.jsx)(`button`,{type:`button`,className:`file-search-clear`,onClick:()=>v(``),children:`✕`})]}),(0,L.jsxs)(`div`,{className:`file-list-hdr`,children:[!S&&(0,L.jsx)(`input`,{type:`checkbox`,checked:y.length>0&&y.every(e=>r.has(e.file)),onChange:e=>{e.target.checked?u(y.map(e=>e.file)):d()},title:`Select all visible`}),(0,L.jsxs)(`strong`,{children:[t,` · `,y.length,` files`]}),(0,L.jsx)(`span`,{className:`spacer`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-xs${p===`list`?` active`:``}`,onClick:()=>m(`list`),title:`List view`,children:`☰`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-xs${p===`tree`?` active`:``}`,onClick:()=>m(`tree`),title:`Tree view`,children:`🌲`}),(0,L.jsxs)(`select`,{value:i,onChange:e=>o(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),(0,L.jsx)(`option`,{value:`complete`,children:`✅ Complete`}),(0,L.jsx)(`option`,{value:`partial`,children:`🟡 Partial`}),(0,L.jsx)(`option`,{value:`missing`,children:`🔴 Missing`})]}),(0,L.jsxs)(`select`,{value:a,onChange:e=>s(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All sections`}),(0,L.jsx)(`option`,{value:`docs`,children:`docs`}),(0,L.jsx)(`option`,{value:`blog`,children:`blog`}),(0,L.jsx)(`option`,{value:`learn`,children:`learn`})]})]}),(0,L.jsxs)(`div`,{className:`file-list-body`,children:[y.length===0&&(0,L.jsx)(`div`,{className:`loading`,children:`No files match filter`}),p===`list`&&y.map(e=>{e.total-e.translated;let t=e.status===`complete`?`var(--green)`:e.status===`partial`?`var(--yellow)`:`var(--red)`;return(0,L.jsxs)(`div`,{className:`file-row${n===e.file?` active`:``}`,onClick:()=>c(e.file),children:[!S&&(0,L.jsx)(`input`,{type:`checkbox`,checked:r.has(e.file),onChange:t=>{t.stopPropagation(),l(e.file)},onClick:e=>e.stopPropagation()}),(0,L.jsx)(`span`,{className:`icon`,children:Y(e.pct)}),(0,L.jsx)(`span`,{className:`path`,title:e.file,children:e.file}),(0,L.jsxs)(`span`,{className:`pct`,children:[e.pct.toFixed(0),`%`]}),(0,L.jsx)(`div`,{className:`mini-bar`,children:(0,L.jsx)(`div`,{className:`mini-fill`,style:{width:`${e.pct}%`,background:t}})})]},e.file)}),p===`tree`&&[...b.children.values()].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>(0,L.jsx)(ce,{node:e,depth:0,activeFile:n,selected:r,isEn:S,collapsed:h,onToggleCollapse:x,onSelect:c,onToggle:l},e.path))]})]})}var ue=h({method:`GET`}).handler(C(`4e218d79545765572808c7eab33b7663d4496209c15406d0b449366905b6b83f`)),de=h({method:`GET`}).handler(C(`843cd8b59095708a5ae78198708db9850f89fd3dd3830ab236f0bd924417692f`)),fe=h({method:`GET`}).handler(C(`e1e7281e45375c67dbe408c58452e7482b139da60e9e361615553227dce95ee0`)),pe=h({method:`POST`}).handler(C(`e1d13d8602339a95f559345ccfc82e9f843dd375ce8e9f580637c241e7e44774`));h({method:`POST`}).handler(C(`1d8e3916f992485c62e62c3693083850b773fdff4ec54277de5a01eb98dab664`));var me=h({method:`GET`}).handler(C(`421de02ce39dde6e27cf4689e837ec072cbd01e63f8cdd5c2a3f42f0bd5ca613`)),he=h({method:`POST`}).handler(C(`c08559ac758aa0d315deaca7a0d7d923a9a44d997c8cb811151417c1f221ddd6`));h({method:`GET`}).handler(C(`8a56694c9d7b29422a3e7d2f6b803be100d79d3853d92d465cb55ed572781e62`));var ge=h({method:`POST`}).handler(C(`88c2855c84e91504070bfecc50ddfa50339d22c305626800b6d9b05d79385d71`)),_e=h({method:`GET`}).handler(C(`5080dc3f2f2309ec6981b94c431969637130c657e8a1dfb10400b4614eecc1ea`)),ve=h({method:`GET`}).handler(C(`a3d81974aeece150d4b02be5b91590b8187442ebea56be4a89dcbf053626d22b`)),ye=h({method:`GET`}).handler(C(`3bf4ba50ca8ccc3c8c60d8f2e53307a320940d68c478df494552066904c5cd74`));h({method:`GET`}).handler(C(`e0b4116f6b2c8d096830102e36458acf9c616a056fcdddda956a4d66984ef58c`));var be=h({method:`POST`}).handler(C(`a054a04356fe9987891efee8b7a11cd2dedb00f6b2e8f26d1c642e001e553d53`)),Z={version:()=>ve(),llmConfig:()=>ye(),status:()=>ue(),fileCoverage:(e,t)=>de({data:{version:e,lang:t}}),fileBlocks:(e,t,n)=>fe({data:{version:e,lang:t,path:n}}),deleteCache:(e,t,n)=>pe({data:{version:e,lang:t,key:n}}),models:()=>_e(),jobs:()=>me(),createJob:e=>he({data:e}),deleteJob:e=>ge({data:{id:e}})};function Q(e){return e===0?`Free`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function $(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:`${(e/1e3).toFixed(0)}k`}var xe=[0,8,16,32,64,128,200,512,1024,2048];function Se({langs:e,versions:t,defaultLang:n,defaultVersion:r,files:i,onClose:a,onSuccess:o}){let[s,c]=(0,P.useState)(n||e[0]),[l,u]=(0,P.useState)(r||t[0]),[d,f]=(0,P.useState)(i?.length||999),[p,m]=(0,P.useState)(3),[h,g]=(0,P.useState)(null),[_,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(``),[S,C]=(0,P.useState)(`context-desc`),[w,T]=(0,P.useState)(0),[E,D]=(0,P.useState)(!0),[O,k]=(0,P.useState)(!1),A=xe[w]*1e3,{data:j}=K({queryKey:[`llmConfig`],queryFn:Z.llmConfig,staleTime:60*1e3}),{data:M,isLoading:N}=K({queryKey:[`models`],queryFn:Z.models,staleTime:300*1e3}),F=(0,P.useMemo)(()=>{if(!M)return[];let e=M.filter(e=>{if(b){let t=b.toLowerCase();if(!e.id.toLowerCase().includes(t)&&!e.name.toLowerCase().includes(t))return!1}return!(E&&!e.isFree||A>0&&e.contextLength<A||O&&!e.supportsJson)});switch(e=[...e],S){case`price-asc`:e.sort((e,t)=>e.promptPrice-t.promptPrice);break;case`price-desc`:e.sort((e,t)=>t.promptPrice-e.promptPrice);break;case`context-desc`:e.sort((e,t)=>t.contextLength-e.contextLength);break;case`name`:e.sort((e,t)=>e.name.localeCompare(t.name));break}return e},[M,b,E,A,O,S]),I=v(),R=q({mutationFn:()=>Z.createJob({lang:s,version:l,max:d,concurrency:p,model:_||void 0,md5:!0,files:i?.length?i:void 0}),onSuccess:()=>{I.invalidateQueries({queryKey:[`jobs`]}),o?o(`✅ Job started: ${s} / ${l}${i?.length?` (${i.length} files)`:``}`):a()},onError:e=>g(e.message)}),z=e.filter(e=>e!==`en`),B=_?M?.find(e=>e.id===_):null;return(0,L.jsx)(`div`,{className:`dialog-overlay`,onClick:e=>{e.target===e.currentTarget&&a()},children:(0,L.jsxs)(`div`,{className:`dialog dialog-wide`,children:[(0,L.jsx)(`h3`,{children:`Start Translation Job`}),h&&(0,L.jsx)(`div`,{className:`dialog-error`,children:h}),j&&!j.hasApiKey&&(0,L.jsxs)(`div`,{className:`dialog-error`,children:[`⚠ No API key found. Set `,(0,L.jsx)(`code`,{children:`OPENROUTER_API_KEY`}),` in `,(0,L.jsx)(`code`,{children:`.env`}),` or configure `,(0,L.jsx)(`code`,{children:`llm.apiKey`}),` in config.`]}),j?.model&&(0,L.jsxs)(`div`,{className:`dialog-mode-hint`,children:[`Default model: `,(0,L.jsx)(`strong`,{children:j.model}),j.provider&&(0,L.jsxs)(`span`,{children:[` (`,j.provider,`)`]})]}),i?.length&&(0,L.jsxs)(`div`,{className:`dialog-mode-hint`,children:[`Translating `,i.length,` selected file`,i.length>1?`s`:``]}),(0,L.jsxs)(`div`,{className:`dialog-grid`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Language`}),(0,L.jsx)(`select`,{value:s,onChange:e=>c(e.target.value),children:z.map(e=>(0,L.jsxs)(`option`,{value:e,children:[J[e],` `,e]},e))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Version`}),(0,L.jsx)(`select`,{value:l,onChange:e=>u(e.target.value),children:t.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Max API calls`}),(0,L.jsx)(`input`,{type:`number`,value:d,onChange:e=>f(Number(e.target.value))})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{children:`Concurrency`}),(0,L.jsx)(`input`,{type:`number`,value:p,onChange:e=>m(Number(e.target.value))})]})]}),(0,L.jsx)(`div`,{className:`dialog-section-hdr`,children:(0,L.jsx)(`span`,{children:`Model`})}),(0,L.jsxs)(`div`,{className:`model-filters`,children:[(0,L.jsx)(`input`,{type:`text`,placeholder:`Search models...`,value:b,onChange:e=>x(e.target.value),className:`model-search-input`}),(0,L.jsxs)(`select`,{value:S,onChange:e=>C(e.target.value),children:[(0,L.jsx)(`option`,{value:`context-desc`,children:`Context ↓`}),(0,L.jsx)(`option`,{value:`price-asc`,children:`Price ↑`}),(0,L.jsx)(`option`,{value:`price-desc`,children:`Price ↓`}),(0,L.jsx)(`option`,{value:`name`,children:`Name A-Z`})]}),(0,L.jsxs)(`label`,{className:`model-filter-check`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:E,onChange:e=>D(e.target.checked)}),`Free`]}),(0,L.jsxs)(`label`,{className:`model-filter-check`,title:`Structured JSON output — required for best translation quality`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:O,onChange:e=>k(e.target.checked)}),`JSON mode`]})]}),(0,L.jsxs)(`div`,{className:`model-slider-row`,children:[(0,L.jsxs)(`span`,{className:`model-slider-label`,children:[`Context ≥ `,A===0?`any`:$(A)]}),(0,L.jsx)(`input`,{type:`range`,min:0,max:xe.length-1,value:w,onChange:e=>T(Number(e.target.value)),className:`model-slider`})]}),(0,L.jsxs)(`div`,{className:`model-list`,children:[(0,L.jsx)(`div`,{className:`model-item${_===``?` active`:``}`,onClick:()=>y(``),children:(0,L.jsx)(`span`,{className:`model-name`,children:`Default (from .env)`})}),N&&(0,L.jsx)(`div`,{className:`model-item disabled`,children:`Loading models...`}),F.map(e=>(0,L.jsx)(Ce,{m:e,mode:`single`,active:_===e.id,onClick:()=>y(e.id)},e.id)),!N&&F.length===0&&(0,L.jsx)(`div`,{className:`model-item disabled`,children:`No models match filters`})]}),(0,L.jsxs)(`div`,{className:`model-count`,children:[F.length,` model`,F.length===1?``:`s`,M?` / ${M.length} total`:``]}),B&&(0,L.jsxs)(`div`,{className:`model-info`,children:[(0,L.jsx)(`strong`,{children:B.name}),B.isFree&&(0,L.jsx)(`span`,{className:`badge-free`,children:`FREE`}),B.supportsJson&&(0,L.jsx)(`span`,{className:`badge-json`,children:`JSON`}),(0,L.jsx)(`br`,{}),`In: `,Q(B.promptPrice),`/M · Out:`,` `,Q(B.completionPrice),`/M · Ctx:`,` `,$(B.contextLength),B.maxOutput>0&&` · Max out: ${$(B.maxOutput)}`]}),i&&i.length>0&&(0,L.jsxs)(`div`,{className:`file-list-preview`,children:[(0,L.jsxs)(`strong`,{children:[i.length,` files selected:`]}),i.map(e=>(0,L.jsx)(`div`,{children:e},e))]}),(0,L.jsxs)(`div`,{className:`actions`,children:[(0,L.jsx)(`button`,{type:`button`,className:`btn btn-outline`,onClick:a,children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,className:`btn`,disabled:R.isPending||j&&!j.hasApiKey,onClick:()=>R.mutate(),children:R.isPending?`Starting...`:j&&!j.hasApiKey?`No API Key`:`Start Job →`})]})]})})}function Ce({m:e,mode:t,active:n,onClick:r}){return(0,L.jsxs)(`div`,{className:`model-item${n?` active`:``}`,onClick:r,children:[t===`rotate`&&(0,L.jsx)(`input`,{type:`checkbox`,checked:n,readOnly:!0,className:`model-check`}),(0,L.jsxs)(`span`,{className:`model-name`,children:[e.isFree&&`🆓 `,e.name]}),(0,L.jsxs)(`span`,{className:`model-meta`,children:[e.supportsJson?`✓ `:``,$(e.contextLength),` ·`,` `,e.isFree?`Free`:`${Q(e.promptPrice)}/${Q(e.completionPrice)}`]})]})}function we(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Te({job:e}){let t=v(),n=q({mutationFn:()=>Z.deleteJob(e.id),onSuccess:()=>t.invalidateQueries({queryKey:[`jobs`]})}),r=e.toTranslate>0?e.translatedFiles/e.toTranslate*100:e.status===`completed`?100:0,i=``;e.toTranslate>0?(i=`${e.translatedFiles}/${e.toTranslate} translated`,e.totalFiles&&(i+=` (${e.totalFiles} total)`)):e.totalFiles>0&&(i=`scanning ${e.totalFiles} files...`),e.errorFiles>0&&(i+=` · ${e.errorFiles} errors`);let a=e.status===`running`;return(0,L.jsxs)(`div`,{className:`job-item`,children:[(0,L.jsxs)(`div`,{className:`hdr`,children:[(0,L.jsx)(`span`,{className:`status-badge ${e.status}`,children:e.status}),(0,L.jsxs)(`strong`,{children:[e.lang,`/`,e.version]}),e.currentFile&&(0,L.jsx)(`span`,{style:{color:`var(--fg2)`},children:e.currentFile}),(0,L.jsx)(`span`,{className:`spacer`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-outline`,onClick:()=>n.mutate(),children:a?`⏹`:`🗑`})]}),(0,L.jsx)(`div`,{className:`progress-bar`,children:(0,L.jsx)(`div`,{className:`progress-fill`,style:{width:`${Math.min(100,r)}%`}})}),(0,L.jsxs)(`div`,{className:`job-meta`,children:[i,` · `,new Date(e.startedAt).toLocaleTimeString(),e.finishedAt&&` · done ${new Date(e.finishedAt).toLocaleTimeString()}`,e.exitCode!=null&&e.exitCode!==0&&` · exit ${e.exitCode}`]}),e.logLines&&e.logLines.length>0&&(0,L.jsxs)(`div`,{className:`log-viewer`,children:[(0,L.jsx)(`button`,{type:`button`,className:`log-copy`,title:`Copy logs`,onClick:()=>{navigator.clipboard.writeText(e.logLines.join(`
|
|
2
2
|
`))},children:`📋`}),e.logLines.map((e,t)=>(0,L.jsx)(`div`,{className:e.includes(`stderr`)||e.includes(`rror`)?`err`:void 0,dangerouslySetInnerHTML:{__html:we(e)}},t))]})]})}function Ee(){let e=v(),t=(0,P.useRef)(new Set),{data:n=[]}=K({queryKey:[`jobs`],queryFn:Z.jobs,refetchInterval:3e3});return(0,P.useEffect)(()=>{let r=new Set(n.filter(e=>e.status===`running`).map(e=>e.id));[...t.current].filter(e=>!r.has(e)).length>0&&(e.invalidateQueries({queryKey:[`files`]}),e.invalidateQueries({queryKey:[`fileBlocks`]}),e.invalidateQueries({queryKey:[`status`]})),t.current=r},[n,e]),(0,L.jsxs)(`div`,{className:`jobs-panel`,children:[(0,L.jsx)(`h3`,{children:`Jobs`}),n.length===0?(0,L.jsx)(`span`,{style:{color:`var(--fg2)`,fontSize:`0.85rem`},children:`No jobs`}):n.map(e=>(0,L.jsx)(Te,{job:e},e.id))]})}function De({value:e,color:t,height:n=4}){return(0,L.jsx)(`div`,{className:`bar-bg`,style:{height:n},children:(0,L.jsx)(`div`,{className:`bar-fill`,style:{width:`${Math.min(100,e)}%`,background:t||`var(--accent)`}})})}function Oe({data:e,version:t,selectedLang:n,onSelect:r}){let i=e.data[t];return i?(0,L.jsx)(`div`,{className:`lang-grid`,children:e.langs.map(e=>{if(e===`en`)return(0,L.jsxs)(`div`,{className:`lang-card is-en${n===`en`?` selected`:``}`,onClick:()=>r(`en`),children:[(0,L.jsxs)(`div`,{className:`name`,children:[J.en,` en (source)`]}),(0,L.jsxs)(`div`,{className:`stats`,children:[i.enFileCount,` files`]}),(0,L.jsx)(De,{value:100,color:`var(--green)`})]},`en`);let t=i.langs[e];if(!t)return null;let a=t.totalNodes>0?t.translatedNodes/t.totalNodes*100:0;return(0,L.jsxs)(`div`,{className:`lang-card${n===e?` selected`:``}`,onClick:()=>r(e),children:[(0,L.jsxs)(`div`,{className:`name`,children:[J[e],` `,e]}),(0,L.jsxs)(`div`,{className:`stats`,children:[a.toFixed(1),`%`]}),(0,L.jsx)(De,{value:a,color:re(a)})]},e)})}):null}function ke(e,t,n){let r=e.split(`
|
|
3
3
|
`)[0].match(/^(#{1,6})\s+(.+)/);if(!r)return null;let i=r[2].replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[]\(#[^)]*\)/g,``).replace(/[`*[\]]/g,``).trim();return{id:`${t}-h-${n}`,level:r[1].length,text:i}}function Ae(e,t,n=!1){let r=[];for(let i=0;i<e.length;i++){let a=ke(n&&e[i].translation!=null?e[i].translation:e[i].source,t,i);a&&r.push(a)}return r}function je({version:e,lang:t,file:n,viewMode:r,onViewMode:i,showToc:a,onToggleToc:o,showNodes:s,onToggleNodes:c,onClose:l}){let u=(0,P.useRef)(null),d=t===`en`,f=d?`en`:r,[p,m]=(0,P.useState)(null),[h,g]=(0,P.useState)(null),_=v(),y=q({mutationFn:n=>Z.deleteCache(e,t,n),onSuccess:()=>{_.invalidateQueries({queryKey:[`fileBlocks`,e,t,n]}),_.invalidateQueries({queryKey:[`files`]}),_.invalidateQueries({queryKey:[`status`]}),g(null)}});(0,P.useEffect)(()=>{if(!h)return;let e=()=>g(null);return window.addEventListener(`click`,e),()=>window.removeEventListener(`click`,e)},[h]);let{data:b}=K({queryKey:[`fileBlocks`,e,t,n],queryFn:()=>Z.fileBlocks(e,t,n)}),x=b?.blocks??[],S=f===`split`||f===`en`,C=!d&&(f===`split`||f===`lang`),w=(0,P.useMemo)(()=>Ae(x,`b`),[x]),T=(0,P.useMemo)(()=>Ae(x,`b`,!0),[x]),E=C?T:w,D=s&&x.length>0,O=(0,P.useMemo)(()=>x.filter(e=>e.md5),[x]),k=O.filter(e=>e.translation!=null).length,A=O.length;function j(e){let t=E[e];t&&document.getElementById(t.id)?.scrollIntoView({behavior:`smooth`,block:`start`})}let M=[];D&&M.push(`4.5rem`),S&&M.push(`1fr`),C&&M.push(`1fr`);let N=M.join(` `);return(0,L.jsxs)(`div`,{className:`preview-wrap`,children:[(0,L.jsxs)(`div`,{className:`preview-hdr`,children:[(0,L.jsx)(`a`,{className:`preview-filename`,href:`#`,title:`Click to open in editor`,onClick:t=>{t.preventDefault(),be({data:{file:`content/${e}/${n}`}})},children:n}),!d&&A>0&&(0,L.jsxs)(`span`,{className:`preview-stats`,children:[k,`/`,A,` (`,Math.round(k/A*100),`%)`]}),l&&(0,L.jsx)(`button`,{type:`button`,className:`preview-close`,onClick:l,title:`Close preview`,children:`✕`}),(0,L.jsxs)(`div`,{className:`preview-toggle`,children:[!d&&(0,L.jsx)(`button`,{type:`button`,className:s?`active`:``,onClick:c,title:`Toggle MD5`,children:`#`}),!d&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,className:f===`split`?`active`:``,onClick:()=>i(`split`),title:`Side by side`,children:`◫`}),(0,L.jsx)(`button`,{type:`button`,className:f===`en`?`active`:``,onClick:()=>i(`en`),title:`EN only`,children:J.en}),(0,L.jsx)(`button`,{type:`button`,className:f===`lang`?`active`:``,onClick:()=>i(`lang`),title:`${t} only`,children:J[t]})]}),(0,L.jsx)(`button`,{type:`button`,className:a?`active`:``,onClick:o,title:`Toggle TOC`,children:`☰`})]})]}),(0,L.jsxs)(`div`,{className:`preview-content-area`,children:[(0,L.jsxs)(`div`,{className:`preview-body-blocks`,ref:u,children:[D&&(0,L.jsxs)(`div`,{className:`block-header`,style:{gridTemplateColumns:N},children:[(0,L.jsx)(`span`,{className:`col-hdr gutter-hdr`,children:`MD5`}),S&&(0,L.jsx)(`span`,{className:`col-hdr`,children:`EN`}),C&&(0,L.jsx)(`span`,{className:`col-hdr`,children:t})]}),x.length===0&&(0,L.jsx)(`div`,{className:`preview-loading`,children:`Loading...`}),x.map((e,t)=>{let n=!e.md5,r=n&&!e.source.trim(),i=e.md5&&e.md5===p,a=ke(e.source,`b`,t);return(0,L.jsxs)(`div`,{id:e.md5?`block-${e.md5.slice(0,8)}`:void 0,className:`block-row${i?` block-highlight`:``}${r?` block-blank`:``}${n&&!r?` block-gap`:``}`,style:{gridTemplateColumns:N},children:[D&&(0,L.jsx)(`span`,{className:`block-gutter`,children:e.md5?(0,L.jsx)(`code`,{className:`gutter-md5 ${e.translation==null?`miss`:`done`}`,title:`${e.type} · ${e.md5}`,children:e.md5.slice(0,6)}):r?(0,L.jsx)(`span`,{className:`gutter-blank`}):(0,L.jsx)(`span`,{className:`gutter-gap`,children:e.type})}),S&&(0,L.jsx)(`pre`,{className:`block-cell${a?` block-heading`:``}`,id:a?.id,children:e.source}),C&&(0,L.jsx)(`pre`,{className:`block-cell${a?` block-heading`:``}${e.md5&&e.translation==null?` block-missing`:``}`,onContextMenu:t=>{!e.md5||d||(t.preventDefault(),g({x:t.clientX,y:t.clientY,md5:e.md5,type:e.type}))},children:e.translation==null?e.source:e.translation})]},t)})]}),a&&E.length>0&&(0,L.jsxs)(`div`,{className:`preview-toc`,children:[(0,L.jsx)(`div`,{className:`preview-toc-title`,children:`On this page`}),E.map((e,t)=>(0,L.jsx)(`a`,{href:`#${e.id}`,className:`h${e.level}`,onClick:e=>{e.preventDefault(),j(t)},children:e.text},e.id))]})]}),h&&(0,L.jsxs)(`div`,{className:`ctx-menu`,style:{left:h.x,top:h.y},onClick:e=>e.stopPropagation(),children:[(0,L.jsxs)(`div`,{className:`ctx-menu-header`,children:[(0,L.jsxs)(`code`,{children:[h.md5.slice(0,12),`…`]}),(0,L.jsx)(`span`,{className:`ctx-menu-type`,children:h.type})]}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(h.md5),g(null)},children:`📋 Copy MD5`}),(0,L.jsx)(`button`,{type:`button`,className:`ctx-menu-danger`,onClick:()=>y.mutate(h.md5),children:`🗑️ Delete cache`})]})]})}function Me(e){if(!e.some(e=>e.includes(`/`)))return{projects:[{id:`_default`,versions:e}],isMultiProject:!1};let t=new Map;for(let n of e){let e=n.indexOf(`/`),r=e>=0?n.slice(0,e):`_default`,i=e>=0?n.slice(e+1):n;t.has(r)||t.set(r,[]),t.get(r).push(i)}return{projects:Array.from(t.entries()).map(([e,t])=>({id:e,versions:t})),isMultiProject:!0}}function Ne(e){return!e?.user||e.user.isAnonymous?`guest`:e.user.role===`admin`?`admin`:`user`}function Pe(e){if(!e?.user)return`Guest`;let t=e.user;return t.isAnonymous?`Guest`:t.displayName||t.name||t.username||t.email||`User`}function Fe(){let e=b.useSearch(),{session:t}=b.useRouteContext(),r=n({from:`/`}),i=Ne(t),a=Pe(t),o=i===`admin`,s=e.lang||null,c=e.file||null,l=e.files!==`0`,u=e.view||`lang`,d=e.toc!==`0`,f=e.nodes===`1`,p=e.status||`all`,m=e.section||`all`,[h,g]=(0,P.useState)(()=>typeof window>`u`?`dark`:localStorage.getItem(`theme`)===`light`?`light`:`dark`),[_,v]=(0,P.useState)(null);(0,P.useEffect)(()=>{document.documentElement.dataset.theme=h},[h]),(0,P.useEffect)(()=>{if(!_)return;let e=setTimeout(()=>v(null),3e3);return()=>clearTimeout(e)},[_]);let y=(0,P.useCallback)(e=>{r({search:t=>{let n={...t};for(let[t,r]of Object.entries(e))r==null||r===``?delete n[t]:n[t]=r;return n},replace:!0})},[r]),x=(0,P.useCallback)(e=>y({project:e||void 0,v:void 0,lang:void 0,file:void 0}),[y]),S=(0,P.useCallback)(e=>y({v:e||void 0,lang:void 0,file:void 0}),[y]),C=(0,P.useCallback)(e=>y({lang:e||void 0}),[y]),w=(0,P.useCallback)(e=>y({file:e||void 0}),[y]),E=(0,P.useCallback)(e=>y({files:e?void 0:`0`}),[y]),D=(0,P.useCallback)(e=>y({view:e===`lang`?void 0:e}),[y]),O=(0,P.useCallback)(e=>y({nodes:e?`1`:void 0}),[y]),k=(0,P.useCallback)(e=>y({toc:e?void 0:`0`}),[y]),A=(0,P.useCallback)(e=>y({status:e===`all`?void 0:e}),[y]),j=(0,P.useCallback)(e=>y({section:e===`all`?void 0:e}),[y]),[M,N]=(0,P.useState)(new Set),[F,I]=(0,P.useState)(!1),[R,z]=(0,P.useState)(),{data:B}=K({queryKey:[`status`],queryFn:Z.status}),{data:V}=K({queryKey:[`version`],queryFn:Z.version,staleTime:1/0}),{projectList:ee,isMultiProject:te,activeProject:H,activeVersions:ne,version:U}=(0,P.useMemo)(()=>{if(!B)return{projectList:[],isMultiProject:!1,activeProject:null,activeVersions:[],version:`latest`};let t=Me(B.versions),n=t.projects,r=t.isMultiProject,i=r&&(e.project||n[0]?.id)||null;r&&i&&!n.find(e=>e.id===i)&&(i=n[0]?.id||null);let a=r?n.find(e=>e.id===i)?.versions||[]:B.versions,o=e.v||a[0]||`latest`,s=r&&i?`${i}/${o}`:o;return{projectList:n,isMultiProject:r,activeProject:i,activeVersions:a,version:s}},[B,e.project,e.v]),W=te&&H&&U.startsWith(`${H}/`)?U.slice(H.length+1):U,{data:G}=K({queryKey:[`files`,U,s],queryFn:()=>Z.fileCoverage(U,s),enabled:!!s}),q=(0,P.useCallback)(e=>{x(e),N(new Set)},[x]),J=(0,P.useCallback)(e=>{S(e),N(new Set)},[S]),re=(0,P.useCallback)(e=>{C(e),N(new Set)},[C]),Y=(0,P.useCallback)(e=>{N(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ie=(0,P.useCallback)(e=>N(new Set(e)),[]),X=(0,P.useCallback)(()=>N(new Set),[]),ae=(0,P.useCallback)(()=>{if(!o){v(`Only admin users can start translation jobs`);return}z([...M]),I(!0)},[M,o]),oe=(0,P.useCallback)(()=>{if(!o){v(`Only admin users can start translation jobs`);return}z(void 0),I(!0)},[o]),se=(0,P.useCallback)(async()=>{await T.signOut(),r({to:`/login`})},[r]);return B?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`nav`,{children:[(0,L.jsxs)(`h1`,{children:[`Translation Admin `,V?.version&&(0,L.jsxs)(`span`,{className:`version-badge`,children:[`v`,V.version]})]}),(0,L.jsx)(`span`,{className:`spacer`}),o&&(0,L.jsx)(`button`,{type:`button`,className:`btn`,onClick:oe,children:`+ New Job`}),(0,L.jsxs)(`div`,{className:`user-info`,children:[(0,L.jsx)(`span`,{children:a}),(0,L.jsx)(`span`,{className:`user-role ${i}`,children:i})]}),(0,L.jsx)(`button`,{type:`button`,className:`btn-signout`,onClick:se,title:`Sign out`,children:`Sign Out`}),(0,L.jsx)(`button`,{type:`button`,className:`btn btn-icon`,onClick:()=>{let e=h===`light`?`dark`:`light`;g(e),localStorage.setItem(`theme`,e)},title:`Toggle theme`,children:h===`light`?`🌙`:`☀️`})]}),(0,L.jsxs)(`div`,{className:`container`,children:[te&&(0,L.jsx)(`div`,{className:`project-tabs`,children:ee.map(e=>(0,L.jsx)(`button`,{type:`button`,className:`project-tab${e.id===H?` active`:``}`,onClick:()=>q(e.id),children:e.id},e.id))}),(0,L.jsx)(`div`,{className:`tabs`,children:ne.map(e=>(0,L.jsx)(`button`,{type:`button`,className:`tab${e===W?` active`:``}`,onClick:()=>J(e),children:e},e))}),(0,L.jsx)(Oe,{data:B,version:U,selectedLang:s,onSelect:re}),(0,L.jsx)(Ee,{}),s&&G&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`file-panel-toolbar`,children:[(0,L.jsx)(`button`,{type:`button`,className:`btn btn-sm${l?` active`:``}`,onClick:()=>E(!l),children:l?`◀ Hide files`:`▶ Show files`}),c&&(0,L.jsx)(`span`,{className:`file-panel-current`,children:c})]}),(0,L.jsxs)(`div`,{className:`file-panel${l?``:` no-list`}${c?``:` no-preview`}`,children:[l&&(0,L.jsx)(le,{files:G,lang:s,activeFile:c,selected:M,statusFilter:p,sectionFilter:m,onStatusFilter:A,onSectionFilter:j,onSelect:w,onToggle:Y,onSelectAll:ie,onClear:X,onTranslateSelected:ae}),c&&(0,L.jsx)(je,{version:U,lang:s,file:c,viewMode:u,onViewMode:D,showToc:d,onToggleToc:()=>k(!d),showNodes:f,onToggleNodes:()=>O(!f),onClose:()=>w(null)})]})]})]}),_&&(0,L.jsx)(`div`,{className:`toast`,children:_}),F&&o&&(0,L.jsx)(Se,{langs:B.langs,versions:B.versions,defaultLang:s||void 0,defaultVersion:U,files:R,onClose:()=>I(!1),onSuccess:e=>{I(!1),v(e)}})]}):(0,L.jsx)(`div`,{className:`loading`,children:`Loading...`})}export{Fe as component};
|