agent-tower 0.5.4-beta.0 → 0.5.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +15 -1
- package/dist/app.js.map +1 -1
- package/dist/app.test.js +12 -0
- package/dist/app.test.js.map +1 -1
- package/dist/cli.js +18 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/event-bus.d.ts +3 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/executors/__tests__/base.executor.test.js +29 -1
- package/dist/executors/__tests__/base.executor.test.js.map +1 -1
- package/dist/executors/__tests__/codex.executor.test.js +13 -0
- package/dist/executors/__tests__/codex.executor.test.js.map +1 -1
- package/dist/executors/base.executor.d.ts.map +1 -1
- package/dist/executors/base.executor.js +4 -0
- package/dist/executors/base.executor.js.map +1 -1
- package/dist/executors/execution-env.d.ts +1 -1
- package/dist/executors/execution-env.d.ts.map +1 -1
- package/dist/executors/execution-env.js +7 -0
- package/dist/executors/execution-env.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/http-client.d.ts +2 -0
- package/dist/mcp/http-client.d.ts.map +1 -1
- package/dist/mcp/http-client.js +7 -0
- package/dist/mcp/http-client.js.map +1 -1
- package/dist/mcp/index.js +4 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/server.d.ts +3 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +2 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/middleware/__tests__/access-auth.test.d.ts +2 -0
- package/dist/middleware/__tests__/access-auth.test.d.ts.map +1 -0
- package/dist/middleware/__tests__/access-auth.test.js +249 -0
- package/dist/middleware/__tests__/access-auth.test.js.map +1 -0
- package/dist/middleware/access-auth.d.ts +3 -0
- package/dist/middleware/access-auth.d.ts.map +1 -0
- package/dist/middleware/access-auth.js +110 -0
- package/dist/middleware/access-auth.js.map +1 -0
- package/dist/routes/__tests__/files.test.d.ts +2 -0
- package/dist/routes/__tests__/files.test.d.ts.map +1 -0
- package/dist/routes/__tests__/files.test.js +101 -0
- package/dist/routes/__tests__/files.test.js.map +1 -0
- package/dist/routes/__tests__/previews.integration.test.d.ts +2 -0
- package/dist/routes/__tests__/previews.integration.test.d.ts.map +1 -0
- package/dist/routes/__tests__/previews.integration.test.js +269 -0
- package/dist/routes/__tests__/previews.integration.test.js.map +1 -0
- package/dist/routes/__tests__/previews.test.js +103 -1
- package/dist/routes/__tests__/previews.test.js.map +1 -1
- package/dist/routes/access-auth.d.ts +3 -0
- package/dist/routes/access-auth.d.ts.map +1 -0
- package/dist/routes/access-auth.js +89 -0
- package/dist/routes/access-auth.js.map +1 -0
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/files.js +46 -0
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +3 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/previews.d.ts +7 -2
- package/dist/routes/previews.d.ts.map +1 -1
- package/dist/routes/previews.js +106 -32
- package/dist/routes/previews.js.map +1 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +9 -0
- package/dist/routes/projects.js.map +1 -1
- package/dist/services/__tests__/access-auth.service.test.d.ts +2 -0
- package/dist/services/__tests__/access-auth.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/access-auth.service.test.js +316 -0
- package/dist/services/__tests__/access-auth.service.test.js.map +1 -0
- package/dist/services/__tests__/member-heartbeat.test.d.ts +2 -0
- package/dist/services/__tests__/member-heartbeat.test.d.ts.map +1 -0
- package/dist/services/__tests__/member-heartbeat.test.js +344 -0
- package/dist/services/__tests__/member-heartbeat.test.js.map +1 -0
- package/dist/services/__tests__/project.service.test.js +29 -0
- package/dist/services/__tests__/project.service.test.js.map +1 -1
- package/dist/services/__tests__/session-manager.team-run.test.js +69 -0
- package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
- package/dist/services/__tests__/task.service.test.js +34 -0
- package/dist/services/__tests__/task.service.test.js.map +1 -1
- package/dist/services/__tests__/team-reconciler.service.test.js +180 -3
- package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
- package/dist/services/__tests__/team-run.service.test.js +196 -2
- package/dist/services/__tests__/team-run.service.test.js.map +1 -1
- package/dist/services/__tests__/team-scheduler.service.test.js +12 -5
- package/dist/services/__tests__/team-scheduler.service.test.js.map +1 -1
- package/dist/services/__tests__/workspace.service.test.js +32 -0
- package/dist/services/__tests__/workspace.service.test.js.map +1 -1
- package/dist/services/access-auth.service.d.ts +82 -0
- package/dist/services/access-auth.service.d.ts.map +1 -0
- package/dist/services/access-auth.service.js +385 -0
- package/dist/services/access-auth.service.js.map +1 -0
- package/dist/services/mcp-config.service.d.ts.map +1 -1
- package/dist/services/mcp-config.service.js +8 -2
- package/dist/services/mcp-config.service.js.map +1 -1
- package/dist/services/mcp-config.service.test.js +18 -3
- package/dist/services/mcp-config.service.test.js.map +1 -1
- package/dist/services/member-heartbeat-scheduler.d.ts +33 -0
- package/dist/services/member-heartbeat-scheduler.d.ts.map +1 -0
- package/dist/services/member-heartbeat-scheduler.js +83 -0
- package/dist/services/member-heartbeat-scheduler.js.map +1 -0
- package/dist/services/project-guards.d.ts +5 -0
- package/dist/services/project-guards.d.ts.map +1 -1
- package/dist/services/project-guards.js +47 -0
- package/dist/services/project-guards.js.map +1 -1
- package/dist/services/project.service.d.ts +6 -4
- package/dist/services/project.service.d.ts.map +1 -1
- package/dist/services/project.service.js +16 -7
- package/dist/services/project.service.js.map +1 -1
- package/dist/services/session-manager.d.ts +11 -0
- package/dist/services/session-manager.d.ts.map +1 -1
- package/dist/services/session-manager.js +60 -0
- package/dist/services/session-manager.js.map +1 -1
- package/dist/services/task.service.d.ts +11 -9
- package/dist/services/task.service.d.ts.map +1 -1
- package/dist/services/task.service.js +17 -12
- package/dist/services/task.service.js.map +1 -1
- package/dist/services/team-reconciler.service.d.ts +39 -0
- package/dist/services/team-reconciler.service.d.ts.map +1 -1
- package/dist/services/team-reconciler.service.js +234 -3
- package/dist/services/team-reconciler.service.js.map +1 -1
- package/dist/services/team-run.service.d.ts +2 -0
- package/dist/services/team-run.service.d.ts.map +1 -1
- package/dist/services/team-run.service.js +35 -7
- package/dist/services/team-run.service.js.map +1 -1
- package/dist/services/team-scheduler.service.d.ts.map +1 -1
- package/dist/services/team-scheduler.service.js +22 -7
- package/dist/services/team-scheduler.service.js.map +1 -1
- package/dist/services/terminal-manager.d.ts.map +1 -1
- package/dist/services/terminal-manager.js +1 -0
- package/dist/services/terminal-manager.js.map +1 -1
- package/dist/services/workspace.service.d.ts.map +1 -1
- package/dist/services/workspace.service.js +5 -5
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/socket/__tests__/socket-gateway.test.d.ts +2 -0
- package/dist/socket/__tests__/socket-gateway.test.d.ts.map +1 -0
- package/dist/socket/__tests__/socket-gateway.test.js +119 -0
- package/dist/socket/__tests__/socket-gateway.test.js.map +1 -0
- package/dist/socket/middleware/__tests__/auth.test.js +102 -2
- package/dist/socket/middleware/__tests__/auth.test.js.map +1 -1
- package/dist/socket/middleware/auth.d.ts +1 -0
- package/dist/socket/middleware/auth.d.ts.map +1 -1
- package/dist/socket/middleware/auth.js +22 -2
- package/dist/socket/middleware/auth.js.map +1 -1
- package/dist/socket/socket-gateway.d.ts +6 -2
- package/dist/socket/socket-gateway.d.ts.map +1 -1
- package/dist/socket/socket-gateway.js +78 -15
- package/dist/socket/socket-gateway.js.map +1 -1
- package/dist/utils/internal-api-token.d.ts +9 -0
- package/dist/utils/internal-api-token.d.ts.map +1 -0
- package/dist/utils/internal-api-token.js +74 -0
- package/dist/utils/internal-api-token.js.map +1 -0
- package/dist/utils/preview-path.d.ts +11 -0
- package/dist/utils/preview-path.d.ts.map +1 -0
- package/dist/utils/preview-path.js +46 -0
- package/dist/utils/preview-path.js.map +1 -0
- package/dist/utils/process-launch.test.js +14 -0
- package/dist/utils/process-launch.test.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-DMLw4xpg.js → AgentDemoPage-UmBBXiZq.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-NgRdouLu.js → AgentEnvironmentSettingsPage-DeMVC_O2.js} +1 -1
- package/dist/web/assets/{AgentLogo-ThhvSi7G.js → AgentLogo-sxp-yGLB.js} +1 -1
- package/dist/web/assets/{ConversationPage-B1ZcyF_h.js → ConversationPage-ykUuKcMG.js} +2 -2
- package/dist/web/assets/CreateTaskInput-WmNhRnVp.js +1 -0
- package/dist/web/assets/{DemoPage-CN2OBKzu.js → DemoPage-Cx-F46PV.js} +3 -3
- package/dist/web/assets/GeneralSettingsPage-DM4iy6dp.js +1 -0
- package/dist/web/assets/{Icons-DIZBOtuC.js → Icons-CO02_BMI.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-CRBcypeY.js → LoadingPreviewPage-C58uR8H7.js} +1 -1
- package/dist/web/assets/McpSettingsPage-CTe-SNfY.js +1 -0
- package/dist/web/assets/{MemberAvatar-Y_pJlw-N.js → MemberAvatar-CZegYpYl.js} +1 -1
- package/dist/web/assets/NotificationSettingsPage-D17SAmMK.js +1 -0
- package/dist/web/assets/ProfileSettingsPage-B2rHV2eU.js +3 -0
- package/dist/web/assets/{ProjectKanbanPage-CBfocvKp.js → ProjectKanbanPage-SpCqpcZ0.js} +31 -32
- package/dist/web/assets/ProjectSettingsPage-2dD_ahm-.js +2 -0
- package/dist/web/assets/{ProviderSettingsPage-D-1Fyh5B.js → ProviderSettingsPage-D9vu3rO0.js} +6 -6
- package/dist/web/assets/{SettingsMasterDetail-CZfVaFo2.js → SettingsMasterDetail-CwRB1WBt.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-DysTmOGE.js → TeamSettingsPage-QXwc1AJE.js} +1 -1
- package/dist/web/assets/{arc-CgLBAHTH.js → arc-BRCC5BeU.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-CP9eQfdk.js → architectureDiagram-3BPJPVTR-7lTGsSu5.js} +1 -1
- package/dist/web/assets/{arrow-left-y1LwO7sB.js → arrow-left-CNgpy5r6.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-BURZnUwn.js → blockDiagram-GPEHLZMM-CnscyQkX.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-Dzgp3z3S.js → c4Diagram-AAUBKEIU-DDhuPTLZ.js} +1 -1
- package/dist/web/assets/channel-S-3oxkZZ.js +1 -0
- package/dist/web/assets/check-DRdZLPss.js +1 -0
- package/dist/web/assets/{chevron-down--B7iZqBL.js → chevron-down-CqZBsPeR.js} +1 -1
- package/dist/web/assets/{chevron-right-7PShDIwg.js → chevron-right-YWciNkox.js} +1 -1
- package/dist/web/assets/{chevron-up-3n_vHdrD.js → chevron-up-BJ4i5iAn.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-CIpasa01.js → chunk-2J33WTMH-B96XJhZG.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-DeSe2m1y.js → chunk-4BX2VUAB-IUZUHtbw.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-BkJ6ogdn.js → chunk-55IACEB6-DcO4xSOO.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-Bkbv-knP.js → chunk-727SXJPM-DuQwKkk-.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-BG9wGFIo.js → chunk-AQP2D5EJ-QotCqjAo.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-Cvl_2za9.js → chunk-FMBD7UC4-C7hUbfZh.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-B_zdzkWX.js → chunk-ND2GUHAM-B_C5eChQ.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-Ch6dvKNw.js → chunk-QZHKN3VN-DRgZY4LJ.js} +1 -1
- package/dist/web/assets/{circle-alert-W13JkYj3.js → circle-alert-Ch4pQ3zT.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-C00aPgpD.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-C00aPgpD.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-CYhJ9OPu.js → code-block-OCS4YCEC-h5zD4EvJ.js} +1 -1
- package/dist/web/assets/confirm-dialog-DG0L1v-9.js +1 -0
- package/dist/web/assets/{copy-bJ2sut_L.js → copy-JHS-5tjr.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-DWlnxyfH.js → cose-bilkent-S5V4N54A-6Gv8U8Cj.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-Bt3QI02a.js → dagre-BM42HDAG-Cf4rsmyS.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-EaJBYSnS.js → diagram-2AECGRRQ-DW3DQ8NA.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-BGyRb-_h.js → diagram-5GNKFQAL-C5cQ_MTX.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-CZhDTMfm.js → diagram-KO2AKTUF-Dcs4NTfn.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-Be8BAxmL.js → diagram-LMA3HP47-lLI-OolH.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-DEdQ7Cml.js → diagram-OG6HWLK6-BTdMG1u6.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-CG9SNlbz.js → erDiagram-TEJ5UH35-BrKfSMWb.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-BUpx5PVX.js → flowDiagram-I6XJVG4X-BFT9EHqo.js} +1 -1
- package/dist/web/assets/folder-picker--V79noua.js +1 -0
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-D7vRxMpE.js → ganttDiagram-6RSMTGT7-D_44EJ_y.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-3lhH-RcD.js → gitGraphDiagram-PVQCEYII-COrCr27e.js} +1 -1
- package/dist/web/assets/index-BC5stA77.js +122 -0
- package/dist/web/assets/{index-CGMjRoF7.js → index-Cjaho2ST.js} +4 -4
- package/dist/web/assets/index-DRJLGAPR.css +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-C5SNbJpO.js → infoDiagram-5YYISTIA-Derwhgw-.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-Ca7tX9_0.js → ishikawaDiagram-YF4QCWOH-Dv_SKfKy.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-B2oo6nxY.js → journeyDiagram-JHISSGLW-BvL0Myto.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-D1CzIzX9.js → kanban-definition-UN3LZRKU-D9iCCF7g.js} +1 -1
- package/dist/web/assets/{layers-BbLzQqyy.js → layers-D-OLv40U.js} +1 -1
- package/dist/web/assets/{linear-BWowtcGw.js → linear-DLebIyPZ.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-B42ziicV.js → mermaid-NOHMQCX5-CyA4Kmm7.js} +40 -40
- package/dist/web/assets/{message-square-Bd_m34OX.js → message-square-ByVmnBN0.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-CYbO6QCk.js → mindmap-definition-RKZ34NQL-CJXkujXD.js} +1 -1
- package/dist/web/assets/{modal-CxOKWOjZ.js → modal-KKPLseLk.js} +1 -1
- package/dist/web/assets/{pencil-h5kxwbcu.js → pencil-B7ylaB7k.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-DXQghKRy.js → pieDiagram-4H26LBE5-C8DfXjYu.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-C6lAMMQB.js → quadrantDiagram-W4KKPZXB-BxaUhA-J.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-Di9Le7Wy.js → requirementDiagram-4Y6WPE33-CkP381y3.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-BGpnptvR.js → sankeyDiagram-5OEKKPKP-Ciot-1f1.js} +1 -1
- package/dist/web/assets/{select-DFuN9DX8.js → select-CLvHC1t4.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DjfkfaQL.js → sequenceDiagram-3UESZ5HK-ZrO6aulq.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-DsELotm9.js → stateDiagram-AJRCARHV-BDC3J_xT.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-C_4zupNH.js +1 -0
- package/dist/web/assets/{switch-gL7lBFj6.js → switch-DqXAu8pW.js} +1 -1
- package/dist/web/assets/{textarea-Lr4GZaYW.js → textarea-ByV2n54w.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-Cq1BWC0T.js → timeline-definition-PNZ67QCA-CG898aCW.js} +1 -1
- package/dist/web/assets/{trash-2-B7GFt5Wl.js → trash-2-D-MBxpK4.js} +1 -1
- package/dist/web/assets/{upload-L8hpDFoO.js → upload-CkkorsYk.js} +1 -1
- package/dist/web/assets/{use-profiles-zIsoigD8.js → use-profiles-B62R9Kbn.js} +1 -1
- package/dist/web/assets/use-projects-JMhtZFd6.js +1 -0
- package/dist/web/assets/{use-providers-erJ2iHLz.js → use-providers-Cg1RDnUJ.js} +1 -1
- package/dist/web/assets/{useNormalizedLogs-CXAn7xj_.js → useNormalizedLogs-BMa5-cCl.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-DdOfNtRo.js → vennDiagram-CIIHVFJN-CNRNbGoo.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-BeKcEIgK.js → wardley-L42UT6IY-Fm0b_w6O.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-DPKOxABd.js → wardleyDiagram-YWT4CUSO-C_xf1EWg.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-olIy_aaY.js → xychartDiagram-2RQKCTM6-D9yke6dF.js} +1 -1
- package/dist/web/index.html +2 -2
- package/node_modules/@agent-tower/shared/dist/types.d.ts +30 -1
- package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
- package/node_modules/@prisma/client/.prisma/client/edge.js +18 -5
- package/node_modules/@prisma/client/.prisma/client/index-browser.js +13 -0
- package/node_modules/@prisma/client/.prisma/client/index.d.ts +1450 -215
- package/node_modules/@prisma/client/.prisma/client/index.js +18 -5
- package/node_modules/@prisma/client/.prisma/client/package.json +1 -1
- package/node_modules/@prisma/client/.prisma/client/schema.prisma +13 -0
- package/node_modules/@prisma/client/.prisma/client/wasm.js +13 -0
- package/package.json +1 -1
- package/prisma/migrations/20260701000000_add_access_auth_settings/migration.sql +9 -0
- package/prisma/schema.prisma +13 -0
- package/dist/web/assets/CreateTaskInput-Cb3aRHr3.js +0 -1
- package/dist/web/assets/GeneralSettingsPage-CE7P3t_v.js +0 -1
- package/dist/web/assets/McpSettingsPage-gp1XDMUd.js +0 -1
- package/dist/web/assets/NotificationSettingsPage-BhZeHEef.js +0 -1
- package/dist/web/assets/ProfileSettingsPage-D_y3ePFs.js +0 -3
- package/dist/web/assets/ProjectSettingsPage-V38j8T61.js +0 -2
- package/dist/web/assets/channel-CWEYGfCJ.js +0 -1
- package/dist/web/assets/check-D2WWIhwV.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-CcU8zfK8.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CcU8zfK8.js +0 -1
- package/dist/web/assets/confirm-dialog-BAqfLDT8.js +0 -1
- package/dist/web/assets/folder-picker-DFB9_pv4.js +0 -1
- package/dist/web/assets/folder-u7fKAtz_.js +0 -1
- package/dist/web/assets/index-7nw4fV42.js +0 -122
- package/dist/web/assets/index-YCjjSSLC.css +0 -1
- package/dist/web/assets/input-CKwRYuUJ.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CudtEyHd.js +0 -1
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-
|
|
2
|
-
import{g as Xs,a7 as Zs,r as C,j as g,aU as fc,aV as pc,aD as Js,h as eu,u as mc,J as gi,$ as gc,X as Ec,i as bc,m as Tc,aW as xc}from"./index-7nw4fV42.js";import{C as er}from"./chevron-right-7PShDIwg.js";import{C as tu}from"./chevron-down--B7iZqBL.js";const _c=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ac=Xs("file-text",_c);const kc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],yc=Xs("image",kc);var ua;(function(e){e.TODO="TODO",e.IN_PROGRESS="IN_PROGRESS",e.IN_REVIEW="IN_REVIEW",e.DONE="DONE",e.CANCELLED="CANCELLED"})(ua||(ua={}));var oa;(function(e){e.ACTIVE="ACTIVE",e.MERGED="MERGED",e.ABANDONED="ABANDONED",e.HIBERNATED="HIBERNATED"})(oa||(oa={}));var la;(function(e){e.WORKTREE="WORKTREE",e.MAIN_DIRECTORY="MAIN_DIRECTORY"})(la||(la={}));var ze;(function(e){e.CLAUDE_CODE="CLAUDE_CODE",e.GEMINI_CLI="GEMINI_CLI",e.CURSOR_AGENT="CURSOR_AGENT",e.CODEX="CODEX"})(ze||(ze={}));var ca;(function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED"})(ca||(ca={}));var ha;(function(e){e.CHAT="CHAT",e.COMMIT_MSG="COMMIT_MSG"})(ha||(ha={}));var da;(function(e){e.WORKSPACE="WORKSPACE",e.CONVERSATION="CONVERSATION"})(da||(da={}));var fa;(function(e){e.REBASE="REBASE",e.MERGE="MERGE"})(fa||(fa={}));var re;(function(e){e.Action="Action",e.Assistant="Assistant",e.Info="Info",e.Tool="Tool",e.User="User",e.Cursor="Cursor",e.Error="Error"})(re||(re={}));function Cc(e){const t=e.metadata?.toolName||"Tool",n=e.metadata?.action,r=e.metadata?.status,a=n?{file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"}[n]:t;return r==="success"?`${a} ✓`:r==="failed"?`${a} ✗`:r==="pending_approval"?`${a} (待审批)`:a}function Nc(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,type:re.User,content:e.content};case"assistant_message":return{id:e.id,type:re.Assistant,content:e.content};case"next_action":return{id:e.id,type:re.Action,content:e.content};case"thinking":return{id:e.id,type:re.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,type:re.Tool,title:Cc(e),content:e.content,isCollapsed:e.metadata?.status==="success",tool:{action:e.metadata?.action,name:e.metadata?.toolName,id:e.metadata?.toolId,status:e.metadata?.status}};case"error_message":return{id:e.id,type:re.Error,content:e.content};case"system_message":return{id:e.id,type:re.Info,content:e.content};case"loading":return{id:e.id,type:re.Cursor,content:""};case"token_usage_info":if(e.metadata?.tokenUsage){const{totalTokens:t=0,modelContextWindow:n}=e.metadata.tokenUsage;return{id:e.id,type:re.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}function Kx(e){return e.map(Nc).filter(t=>t!==null)}function Xx(){return{id:`cursor-${Date.now()}`,type:re.Cursor,content:""}}const tr=(function(e){if(e==null)return Lc;if(typeof e=="function")return nr(e);if(typeof e=="object")return Array.isArray(e)?Ic(e):Sc(e);if(typeof e=="string")return wc(e);throw new Error("Expected function, string, or object as test")});function Ic(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return nr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Sc(e){const t=e;return nr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function wc(e){return nr(t);function t(n){return n&&n.type===e}}function nr(e){return t;function t(n,r,i){return!!(Oc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Lc(){return!0}function Oc(e){return e!==null&&typeof e=="object"&&"type"in e}const nu=[],Jt=!0,Ur=!1,zn="skip";function Ei(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=tr(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=nu,b,A,N;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=Rc(n(o,h)),p[0]===Ur))return p;if("children"in o&&o.children){const y=o;if(y.children&&p[0]!==zn)for(A=(r?y.children.length:-1)+s,N=h.concat(y);A>-1&&A<y.children.length;){const R=y.children[A];if(b=u(R,A,N)(),b[0]===Ur)return b;A=typeof b[1]=="number"?b[1]:A+s}}return p}}}function Rc(e){return Array.isArray(e)?e:typeof e=="number"?[Jt,e]:e==null?nu:[e]}function at(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Ei(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Dc({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Bc(e,t,n,r,i,a,s);at(c,h)}}function pa(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Pc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Mc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),vc=new Set(["javascript:","data:","file:","vbscript:"]);function ma(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=pa(e,n);if(!s||vc.has(s.protocol)||!(Mc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Pc(e);return s&&t.some(c=>{const h=pa(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const br=Symbol("node-seen"),Bc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[br])return Jt;if(o.tagName==="a"){const d=ma(o.properties.href,t,e,!1,!1,i);return d===null?(o[br]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),zn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",Jt)}if(o.tagName==="img"){const d=ma(o.properties.src,n,e,r,!0,i);return d===null?(o[br]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),zn):(o.properties.src=d,Jt)}return Jt};return u},ru=-1,rr=0,nn=1,$n=2,bi=3,Ti=4,xi=5,_i=6,iu=7,au=8,ga=typeof self=="object"?self:globalThis,Fc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case rr:case ru:return n(s,i);case nn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case $n:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case bi:return n(new Date(s),i);case Ti:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case xi:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case _i:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case iu:{const{name:u,message:o}=s;return n(new ga[u](o),i)}case au:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new ga[a](s),i)};return r},Ea=e=>Fc(new Map,e)(0),St="",{toString:Hc}={},{keys:Uc}=Object,qt=e=>{const t=typeof e;if(t!=="object"||!e)return[rr,t];const n=Hc.call(e).slice(8,-1);switch(n){case"Array":return[nn,St];case"Object":return[$n,St];case"Date":return[bi,St];case"RegExp":return[Ti,St];case"Map":return[xi,St];case"Set":return[_i,St];case"DataView":return[nn,n]}return n.includes("Array")?[nn,n]:n.includes("Error")?[iu,n]:[$n,n]},Ln=([e,t])=>e===rr&&(t==="function"||t==="symbol"),jc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=qt(s);switch(u){case rr:{let h=s;switch(o){case"bigint":u=au,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([ru],s)}return i([u,h],s)}case nn:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case $n:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Uc(s))(e||!Ln(qt(s[f])))&&h.push([a(f),a(s[f])]);return d}case bi:return i([u,s.toISOString()],s);case Ti:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case xi:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Ln(qt(f))||Ln(qt(p))))&&h.push([a(f),a(p)]);return d}case _i:{const h=[],d=i([u,h],s);for(const f of s)(e||!Ln(qt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},ba=(e,{json:t,lossy:n}={})=>{const r=[];return jc(!(t||n),!!t,new Map,r)(e),r},Et=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ea(ba(e,t)):structuredClone(e):(e,t)=>Ea(ba(e,t));class _n{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_n.prototype.normal={};_n.prototype.property={};_n.prototype.space=void 0;function su(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new _n(n,r,t)}function mn(e){return e.toLowerCase()}class Ne{constructor(t,n){this.attribute=n,this.property=t}}Ne.prototype.attribute="";Ne.prototype.booleanish=!1;Ne.prototype.boolean=!1;Ne.prototype.commaOrSpaceSeparated=!1;Ne.prototype.commaSeparated=!1;Ne.prototype.defined=!1;Ne.prototype.mustUseProperty=!1;Ne.prototype.number=!1;Ne.prototype.overloadedBoolean=!1;Ne.prototype.property="";Ne.prototype.spaceSeparated=!1;Ne.prototype.space=void 0;let zc=0;const Q=_t(),pe=_t(),jr=_t(),M=_t(),oe=_t(),Dt=_t(),Le=_t();function _t(){return 2**++zc}const zr=Object.freeze(Object.defineProperty({__proto__:null,boolean:Q,booleanish:pe,commaOrSpaceSeparated:Le,commaSeparated:Dt,number:M,overloadedBoolean:jr,spaceSeparated:oe},Symbol.toStringTag,{value:"Module"})),Tr=Object.keys(zr);class Ai extends Ne{constructor(t,n,r,i){let a=-1;if(super(t,n),Ta(this,"space",i),typeof r=="number")for(;++a<Tr.length;){const s=Tr[a];Ta(this,Tr[a],(r&zr[s])===zr[s])}}}Ai.prototype.defined=!0;function Ta(e,t,n){n&&(e[t]=n)}function Bt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ai(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[mn(r)]=r,n[mn(a.attribute)]=r}return new _n(t,n,e.space)}const uu=Bt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:oe,ariaCurrent:null,ariaDescribedBy:oe,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:oe,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:oe,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oe,ariaLevel:M,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:oe,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:oe,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:pe,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ou(e,t){return t in e?e[t]:t}function lu(e,t){return ou(e,t.toLowerCase())}const $c=Bt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dt,acceptCharset:oe,accessKey:oe,action:null,allow:null,allowFullScreen:Q,allowPaymentRequest:Q,allowUserMedia:Q,alt:null,as:null,async:Q,autoCapitalize:null,autoComplete:oe,autoFocus:Q,autoPlay:Q,blocking:oe,capture:null,charSet:null,checked:Q,cite:null,className:oe,cols:M,colSpan:null,content:null,contentEditable:pe,controls:Q,controlsList:oe,coords:M|Dt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Q,defer:Q,dir:null,dirName:null,disabled:Q,download:jr,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Q,formTarget:null,headers:oe,height:M,hidden:jr,high:M,href:null,hrefLang:null,htmlFor:oe,httpEquiv:oe,id:null,imageSizes:null,imageSrcSet:null,inert:Q,inputMode:null,integrity:null,is:null,isMap:Q,itemId:null,itemProp:oe,itemRef:oe,itemScope:Q,itemType:oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Q,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:Q,muted:Q,name:null,nonce:null,noModule:Q,noValidate:Q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Q,optimum:M,pattern:null,ping:oe,placeholder:null,playsInline:Q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Q,referrerPolicy:null,rel:oe,required:Q,reversed:Q,rows:M,rowSpan:M,sandbox:oe,scope:null,scoped:Q,seamless:Q,selected:Q,shadowRootClonable:Q,shadowRootDelegatesFocus:Q,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:Q,useMap:null,value:pe,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:oe,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Q,declare:Q,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:Q,noHref:Q,noShade:Q,noWrap:Q,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Q,disableRemotePlayback:Q,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:lu}),Yc=Bt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Le,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:Q,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dt,g2:Dt,glyphName:Dt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ou}),cu=Bt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),hu=Bt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lu}),du=Bt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Vc=/[A-Z]/g,xa=/-[a-z]/g,Wc=/^data[-\w.:]+$/i;function ir(e,t){const n=mn(t);let r=t,i=Ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Wc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(xa,Qc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!xa.test(a)){let s=a.replace(Vc,Gc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ai}return new i(r,t)}function Gc(e){return"-"+e.toLowerCase()}function Qc(e){return e.charAt(1).toUpperCase()}const An=su([uu,$c,cu,hu,du],"html"),ut=su([uu,Yc,cu,hu,du],"svg");function _a(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function fu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Aa=/[#.]/g;function Kc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Aa.lastIndex=i;const u=Aa.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function ka(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pu(e){return e.join(" ").trim()}function mu(e,t,n){const r=n?eh(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Kc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Xc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))Zc(e,o.properties,d,f)}for(const c of u)$r(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Xc(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Zc(e,t,n,r){const i=ir(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=ka(r):i.commaSeparated?a=_a(r):i.commaOrSpaceSeparated?a=ka(_a(r).join(" ")):a=ya(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Jc(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(ya(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function $r(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)$r(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?$r(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ya(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||mn(n)===mn(t)))return!0}return n}function Jc(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function eh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const th=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],nh=mu(An,"div"),rh=mu(ut,"g",th);function ih(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=Ca(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=Ca(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ca(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const pt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},gu={}.hasOwnProperty,ah=Object.prototype;function sh(e,t){const n=t||{};return ki({file:n.file||void 0,location:!1,schema:n.space==="svg"?ut:An,verbose:n.verbose||!1},e)}function ki(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Fn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Eu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=ih(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Fn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Fn(e,r,n),n}default:return n=uh(e,t),n}}function Eu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=ki(e,t[n]);r.push(i)}return r}function uh(e,t){const n=e.schema;e.schema=t.namespaceURI===pt.svg?ut:An;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;gu.call(ah,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?rh:nh)(t.tagName,i,Eu(e,t.childNodes));if(Fn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Ot(o.startTag),h=o&&o.endTag&&Ot(o.endTag),d=ki(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function Fn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=oh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function oh(e,t,n){const r=Ot(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)gu.call(n.attrs,s)&&(a[ir(e.schema,s).property]=Ot(n.attrs[s]));n.startTag;const u=Ot(n.startTag),o=n.endTag?Ot(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Ot(e){const t=Na({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Na({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Na(e){return e.line&&e.column?e:void 0}const Ia={}.hasOwnProperty;function bu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Ia.call(i,e)){const o=String(i[e]);s=Ia.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const lh={},ch={}.hasOwnProperty,Tu=bu("type",{handlers:{root:dh,element:Eh,text:mh,comment:gh,doctype:ph}});function hh(e,t){const r=(t||lh).space;return Tu(e,r==="svg"?ut:An)}function dh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yi(e.children,n,t),Ft(e,n),n}function fh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yi(e.children,n,t),Ft(e,n),n}function ph(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ft(e,t),t}function mh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ft(e,t),t}function gh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ft(e,t),t}function Eh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ut);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&ch.call(e.properties,a)){const o=bh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:pt[s],childNodes:[],parentNode:null};return u.childNodes=yi(e.children,u,r),Ft(e,u),e.tagName==="template"&&e.content&&(u.content=fh(e.content,r)),u}function bh(e,t,n){const r=ir(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?fu(n):pu(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=pt[r.space]}return i}function yi(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Tu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ft(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Th=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],xh=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),le="�";var m;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(m||(m={}));const ye={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function xu(e){return e>=55296&&e<=57343}function _h(e){return e>=56320&&e<=57343}function Ah(e,t){return(e-55296)*1024+9216+t}function _u(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Au(e){return e>=64976&&e<=65007||xh.has(e)}var S;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(S||(S={}));const kh=65536;class yh{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=kh,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(_h(n))return this.pos++,this._addGap(),Ah(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(S.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,xu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){_u(t)?this._err(S.controlCharacterInInputStream):Au(t)&&this._err(S.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var X;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(X||(X={}));function ku(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Ch=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Nh=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Ih(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Nh.get(e))!==null&&t!==void 0?t:e}var ge;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ge||(ge={}));const Sh=32;var it;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(it||(it={}));function Yr(e){return e>=ge.ZERO&&e<=ge.NINE}function wh(e){return e>=ge.UPPER_A&&e<=ge.UPPER_F||e>=ge.LOWER_A&&e<=ge.LOWER_F}function Lh(e){return e>=ge.UPPER_A&&e<=ge.UPPER_Z||e>=ge.LOWER_A&&e<=ge.LOWER_Z||Yr(e)}function Oh(e){return e===ge.EQUALS||Lh(e)}var me;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(me||(me={}));var Xe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xe||(Xe={}));class Rh{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=me.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xe.Strict}startEntity(t){this.decodeMode=t,this.state=me.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case me.EntityStart:return t.charCodeAt(n)===ge.NUM?(this.state=me.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=me.NamedEntity,this.stateNamedEntity(t,n));case me.NumericStart:return this.stateNumericStart(t,n);case me.NumericDecimal:return this.stateNumericDecimal(t,n);case me.NumericHex:return this.stateNumericHex(t,n);case me.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Sh)===ge.LOWER_X?(this.state=me.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=me.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Yr(i)||wh(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Yr(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ge.SEMI)this.consumed+=1;else if(this.decodeMode===Xe.Strict)return 0;return this.emitCodePoint(Ih(this.result),this.consumed),this.errors&&(t!==ge.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&it.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Dh(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Xe.Attribute&&(a===0||Oh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&it.VALUE_LENGTH)>>14,a!==0){if(s===ge.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&it.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~it.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case me.NamedEntity:return this.result!==0&&(this.decodeMode!==Xe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case me.NumericDecimal:return this.emitNumericEntity(0,2);case me.NumericHex:return this.emitNumericEntity(0,3);case me.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case me.EntityStart:return 0}}}function Dh(e,t,n,r){const i=(t&it.BRANCH_LENGTH)>>7,a=t&it.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var mt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(mt||(mt={}));var De;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(De||(De={}));var k;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(k||(k={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const Ph=new Map([[k.A,l.A],[k.ADDRESS,l.ADDRESS],[k.ANNOTATION_XML,l.ANNOTATION_XML],[k.APPLET,l.APPLET],[k.AREA,l.AREA],[k.ARTICLE,l.ARTICLE],[k.ASIDE,l.ASIDE],[k.B,l.B],[k.BASE,l.BASE],[k.BASEFONT,l.BASEFONT],[k.BGSOUND,l.BGSOUND],[k.BIG,l.BIG],[k.BLOCKQUOTE,l.BLOCKQUOTE],[k.BODY,l.BODY],[k.BR,l.BR],[k.BUTTON,l.BUTTON],[k.CAPTION,l.CAPTION],[k.CENTER,l.CENTER],[k.CODE,l.CODE],[k.COL,l.COL],[k.COLGROUP,l.COLGROUP],[k.DD,l.DD],[k.DESC,l.DESC],[k.DETAILS,l.DETAILS],[k.DIALOG,l.DIALOG],[k.DIR,l.DIR],[k.DIV,l.DIV],[k.DL,l.DL],[k.DT,l.DT],[k.EM,l.EM],[k.EMBED,l.EMBED],[k.FIELDSET,l.FIELDSET],[k.FIGCAPTION,l.FIGCAPTION],[k.FIGURE,l.FIGURE],[k.FONT,l.FONT],[k.FOOTER,l.FOOTER],[k.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[k.FORM,l.FORM],[k.FRAME,l.FRAME],[k.FRAMESET,l.FRAMESET],[k.H1,l.H1],[k.H2,l.H2],[k.H3,l.H3],[k.H4,l.H4],[k.H5,l.H5],[k.H6,l.H6],[k.HEAD,l.HEAD],[k.HEADER,l.HEADER],[k.HGROUP,l.HGROUP],[k.HR,l.HR],[k.HTML,l.HTML],[k.I,l.I],[k.IMG,l.IMG],[k.IMAGE,l.IMAGE],[k.INPUT,l.INPUT],[k.IFRAME,l.IFRAME],[k.KEYGEN,l.KEYGEN],[k.LABEL,l.LABEL],[k.LI,l.LI],[k.LINK,l.LINK],[k.LISTING,l.LISTING],[k.MAIN,l.MAIN],[k.MALIGNMARK,l.MALIGNMARK],[k.MARQUEE,l.MARQUEE],[k.MATH,l.MATH],[k.MENU,l.MENU],[k.META,l.META],[k.MGLYPH,l.MGLYPH],[k.MI,l.MI],[k.MO,l.MO],[k.MN,l.MN],[k.MS,l.MS],[k.MTEXT,l.MTEXT],[k.NAV,l.NAV],[k.NOBR,l.NOBR],[k.NOFRAMES,l.NOFRAMES],[k.NOEMBED,l.NOEMBED],[k.NOSCRIPT,l.NOSCRIPT],[k.OBJECT,l.OBJECT],[k.OL,l.OL],[k.OPTGROUP,l.OPTGROUP],[k.OPTION,l.OPTION],[k.P,l.P],[k.PARAM,l.PARAM],[k.PLAINTEXT,l.PLAINTEXT],[k.PRE,l.PRE],[k.RB,l.RB],[k.RP,l.RP],[k.RT,l.RT],[k.RTC,l.RTC],[k.RUBY,l.RUBY],[k.S,l.S],[k.SCRIPT,l.SCRIPT],[k.SEARCH,l.SEARCH],[k.SECTION,l.SECTION],[k.SELECT,l.SELECT],[k.SOURCE,l.SOURCE],[k.SMALL,l.SMALL],[k.SPAN,l.SPAN],[k.STRIKE,l.STRIKE],[k.STRONG,l.STRONG],[k.STYLE,l.STYLE],[k.SUB,l.SUB],[k.SUMMARY,l.SUMMARY],[k.SUP,l.SUP],[k.TABLE,l.TABLE],[k.TBODY,l.TBODY],[k.TEMPLATE,l.TEMPLATE],[k.TEXTAREA,l.TEXTAREA],[k.TFOOT,l.TFOOT],[k.TD,l.TD],[k.TH,l.TH],[k.THEAD,l.THEAD],[k.TITLE,l.TITLE],[k.TR,l.TR],[k.TRACK,l.TRACK],[k.TT,l.TT],[k.U,l.U],[k.UL,l.UL],[k.SVG,l.SVG],[k.VAR,l.VAR],[k.WBR,l.WBR],[k.XMP,l.XMP]]);function Ht(e){var t;return(t=Ph.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,Mh={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},qr=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);k.STYLE,k.SCRIPT,k.XMP,k.IFRAME,k.NOEMBED,k.NOFRAMES,k.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function vh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function en(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Bh(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function tt(e){return Bh(e)||en(e)}function Sa(e){return tt(e)||vh(e)}function On(e){return e+32}function yu(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function wa(e){return yu(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Fh(e){return e===m.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:xu(e)?S.surrogateCharacterReference:Au(e)?S.noncharacterCharacterReference:_u(e)||e===m.CARRIAGE_RETURN?S.controlCharacterReference:null}class Hh{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Rh(Ch,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(S.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(S.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Fh(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:X.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:X.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:X.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:X.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(ku(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(S.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ht(t.tagName),t.type===X.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case X.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case X.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case X.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:X.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=yu(t)?X.WHITESPACE_CHARACTER:t===m.NULL?X.NULL_CHARACTER:X.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(X.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xe.Attribute:Xe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(tt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(tt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(S.missingEndTagName),this.state=E.DATA;break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.tagName+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(en(t)?On(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){tt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){tt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){tt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:tt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){tt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ye.SCRIPT,!1)&&wa(this.preprocessor.peek(ye.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ye.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ye.SCRIPT,!1)&&wa(this.preprocessor.peek(ye.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ye.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(S.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.name+=le;break}default:this.currentAttr.name+=String.fromCodePoint(en(t)?On(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=le;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ye.DASH_DASH,!0)?(this._createCommentToken(ye.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(ye.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ye.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(ye.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(ye.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=le;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(S.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(en(t))this._createDoctypeToken(String.fromCharCode(On(t))),this.state=E.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(S.unexpectedNullCharacter),this._createDoctypeToken(le),this.state=E.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.name+=le;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(en(t)?On(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ye.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ye.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.NULL:{this._err(S.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(S.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Sa(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Sa(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Cu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),La=new Set([...Cu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Yn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Uh=new Set([...Yn,l.OL,l.UL]),jh=new Set([...Yn,l.BUTTON]),Oa=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ra=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),zh=new Set([l.TR,l.TEMPLATE,l.HTML]),$h=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Yh=new Set([l.TABLE,l.TEMPLATE,l.HTML]),qh=new Set([l.TD,l.TH]);class Vh{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==D.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(qr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qh,D.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Yh,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo($h,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(zh,D.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(Ra.has(i))return!1;break}case D.MATHML:{if(Oa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Yn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Uh)}hasInButtonScope(t){return this.hasInDynamicScope(t,jh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(qr.has(n))return!0;if(Yn.has(n))return!1;break}case D.SVG:{if(Ra.has(n))return!1;break}case D.MATHML:{if(Oa.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Cu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&La.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&La.has(this.currentTagId);)this.pop()}}const xr=3;var Ye;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ye||(Ye={}));const Da={type:Ye.Marker};class Wh{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Ye.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=xr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Da)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ye.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ye.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Da);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ye.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ye.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ye.Element&&n.element===t)}}const nt={createDocument(){return{nodeName:"#document",mode:De.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};nt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(nt.isTextNode(n)){n.value+=t;return}}nt.appendChild(e,nt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&nt.isTextNode(r)?r.value+=t:nt.insertBefore(e,nt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Nu="html",Gh="about:legacy-compat",Qh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Iu=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Kh=[...Iu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Xh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Su=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Zh=[...Su,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Pa(e,t){return t.some(n=>e.startsWith(n))}function Jh(e){return e.name===Nu&&e.publicId===null&&(e.systemId===null||e.systemId===Gh)}function ed(e){if(e.name!==Nu)return De.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Qh)return De.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Xh.has(n))return De.QUIRKS;let r=t===null?Kh:Iu;if(Pa(n,r))return De.QUIRKS;if(r=t===null?Su:Zh,Pa(n,r))return De.LIMITED_QUIRKS}return De.NO_QUIRKS}const Ma={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},td="definitionurl",nd="definitionURL",rd=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),id=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),ad=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),sd=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function ud(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===mt.COLOR||r===mt.SIZE||r===mt.FACE)||sd.has(t)}function wu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===td){e.attrs[t].name=nd;break}}function Lu(e){for(let t=0;t<e.attrs.length;t++){const n=rd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ci(e){for(let t=0;t<e.attrs.length;t++){const n=id.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function od(e){const t=ad.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ht(e.tagName))}function ld(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function cd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mt.ENCODING){const i=n[r].value.toLowerCase();return i===Ma.TEXT_HTML||i===Ma.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function hd(e,t,n,r){return(!r||r===D.HTML)&&cd(e,t,n)||(!r||r===D.MATHML)&&ld(e,t)}const dd="hidden",fd=8,pd=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const md={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ou=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),va={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:nt,onParseError:null};class Ba{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...va,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Hh(this.options,this),this.activeFormattingElements=new Wh(this.treeAdapter),this.fragmentContextID=r?Ht(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Vh(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...va,...n};t??(t=r.treeAdapter.createElement(k.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:md,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=fe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===k.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=fe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(k.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===X.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===k.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case X.CHARACTER:{this.onCharacter(t);break}case X.NULL_CHARACTER:{this.onNullCharacter(t);break}case X.COMMENT:{this.onComment(t);break}case X.DOCTYPE:{this.onDoctype(t);break}case X.START_TAG:{this._processStartTag(t);break}case X.END_TAG:{this.onEndTag(t);break}case X.EOF:{this.onEof(t);break}case X.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return hd(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ye.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Ou.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Mh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Vf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{rn(this,t);break}case T.BEFORE_HEAD:{an(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{un(this,t);break}case T.AFTER_HEAD:{on(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Du(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{_r(this,t);break}case T.IN_TABLE_TEXT:{Hu(this,t);break}case T.IN_COLUMN_GROUP:{qn(this,t);break}case T.AFTER_BODY:{Vn(this,t);break}case T.AFTER_AFTER_BODY:{Hn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{rn(this,t);break}case T.BEFORE_HEAD:{an(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{un(this,t);break}case T.AFTER_HEAD:{on(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{_r(this,t);break}case T.IN_COLUMN_GROUP:{qn(this,t);break}case T.AFTER_BODY:{Vn(this,t);break}case T.AFTER_AFTER_BODY:{Hn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Vr(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.AFTER_BODY:{Ad(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{kd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{yd(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,S.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,S.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Wf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{Cd(this,t);break}case T.BEFORE_HEAD:{Id(this,t);break}case T.IN_HEAD:{je(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Ld(this,t);break}case T.AFTER_HEAD:{Rd(this,t);break}case T.IN_BODY:{Te(this,t);break}case T.IN_TABLE:{Mt(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.IN_CAPTION:{wf(this,t);break}case T.IN_COLUMN_GROUP:{Si(this,t);break}case T.IN_TABLE_BODY:{ur(this,t);break}case T.IN_ROW:{or(this,t);break}case T.IN_CELL:{Rf(this,t);break}case T.IN_SELECT:{zu(this,t);break}case T.IN_SELECT_IN_TABLE:{Pf(this,t);break}case T.IN_TEMPLATE:{vf(this,t);break}case T.AFTER_BODY:{Ff(this,t);break}case T.IN_FRAMESET:{Hf(this,t);break}case T.AFTER_FRAMESET:{jf(this,t);break}case T.AFTER_AFTER_BODY:{$f(this,t);break}case T.AFTER_AFTER_FRAMESET:{Yf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Gf(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{Nd(this,t);break}case T.BEFORE_HEAD:{Sd(this,t);break}case T.IN_HEAD:{wd(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Od(this,t);break}case T.AFTER_HEAD:{Dd(this,t);break}case T.IN_BODY:{sr(this,t);break}case T.TEXT:{Tf(this,t);break}case T.IN_TABLE:{gn(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.IN_CAPTION:{Lf(this,t);break}case T.IN_COLUMN_GROUP:{Of(this,t);break}case T.IN_TABLE_BODY:{Wr(this,t);break}case T.IN_ROW:{ju(this,t);break}case T.IN_CELL:{Df(this,t);break}case T.IN_SELECT:{$u(this,t);break}case T.IN_SELECT_IN_TABLE:{Mf(this,t);break}case T.IN_TEMPLATE:{Bf(this,t);break}case T.AFTER_BODY:{qu(this,t);break}case T.IN_FRAMESET:{Uf(this,t);break}case T.AFTER_FRAMESET:{zf(this,t);break}case T.AFTER_AFTER_BODY:{Hn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{rn(this,t);break}case T.BEFORE_HEAD:{an(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{un(this,t);break}case T.AFTER_HEAD:{on(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Bu(this,t);break}case T.TEXT:{xf(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.IN_TEMPLATE:{Yu(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Ii(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Ru(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{_r(this,t);break}case T.IN_TABLE_TEXT:{Fu(this,t);break}}}}function gd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):vu(e,t),n}function Ed(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function bd(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=pd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Td(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Td(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function xd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ht(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function _d(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ni(e,t){for(let n=0;n<fd;n++){const r=gd(e,t);if(!r)break;const i=Ed(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=bd(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&xd(e,s,a),_d(e,i,r)}}function Vr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ad(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kd(e,t){e._appendCommentNode(t,e.document)}function Ii(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function yd(e,t){e._setDocumentType(t);const n=t.forceQuirks?De.QUIRKS:ed(t);Jh(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Vt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,De.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Cd(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):rn(e,t)}function Nd(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&rn(e,t)}function rn(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Id(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:an(e,t)}}function Sd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?an(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function an(e,t){e._insertFakeElement(k.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function je(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,fe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:sn(e,t)}}function wd(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{sn(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function At(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,S.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,S.endTagWithoutMatchingOpenElement)}function sn(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Ld(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{je(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:un(e,t)}}function Od(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{un(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function un(e,t){const n=t.type===X.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function Rd(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,S.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),je(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:on(e,t)}}function Dd(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{on(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function on(e,t){e._insertFakeElement(k.BODY,l.BODY),e.insertionMode=T.IN_BODY,ar(e,t)}function ar(e,t){switch(t.type){case X.CHARACTER:{Du(e,t);break}case X.WHITESPACE_CHARACTER:{Ru(e,t);break}case X.COMMENT:{Vr(e,t);break}case X.START_TAG:{Te(e,t);break}case X.END_TAG:{sr(e,t);break}case X.EOF:{Bu(e,t);break}}}function Ru(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Du(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Pd(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Md(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function vd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function Bd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Fd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&qr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function Hd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ud(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function jd(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function zd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=fe.PLAINTEXT}function $d(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function Yd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(k.A);n&&(Ni(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Vd(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Ni(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Gd(e,t){e.treeAdapter.getDocumentMode(e.document)!==De.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Pu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mu(e){const t=ku(e,mt.TYPE);return t!=null&&t.toLowerCase()===dd}function Qd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Mu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Kd(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Xd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Zd(e,t){t.tagName=k.IMG,t.tagID=l.IMG,Pu(e,t)}function Jd(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function ef(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function tf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Fa(e,t){e._switchToTextParsing(t,fe.RAWTEXT)}function nf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function rf(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function af(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function sf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function uf(e,t){e._reconstructActiveFormattingElements(),wu(t),Ci(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function of(e,t){e._reconstructActiveFormattingElements(),Lu(t),Ci(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Ha(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Te(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{qd(e,t);break}case l.A:{Yd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Fd(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Bd(e,t);break}case l.LI:case l.DD:case l.DT:{jd(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Pu(e,t);break}case l.HR:{Xd(e,t);break}case l.RB:case l.RTC:{af(e,t);break}case l.RT:case l.RP:{sf(e,t);break}case l.PRE:case l.LISTING:{Hd(e,t);break}case l.XMP:{ef(e,t);break}case l.SVG:{of(e,t);break}case l.HTML:{Pd(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{je(e,t);break}case l.BODY:{Md(e,t);break}case l.FORM:{Ud(e,t);break}case l.NOBR:{Vd(e,t);break}case l.MATH:{uf(e,t);break}case l.TABLE:{Gd(e,t);break}case l.INPUT:{Qd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Kd(e,t);break}case l.IMAGE:{Zd(e,t);break}case l.BUTTON:{$d(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Wd(e,t);break}case l.IFRAME:{tf(e,t);break}case l.SELECT:{nf(e,t);break}case l.OPTION:case l.OPTGROUP:{rf(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Fa(e,t);break}case l.FRAMESET:{vd(e,t);break}case l.TEXTAREA:{Jd(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Fa(e,t):Ha(e,t);break}case l.PLAINTEXT:{zd(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Ha(e,t)}}function lf(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,qu(e,t))}function hf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function df(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function ff(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(k.P,l.P),e._closePElement()}function pf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function mf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function gf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Ef(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(k.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function vu(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function sr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Ni(e,t);break}case l.P:{ff(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{hf(e,t);break}case l.LI:{pf(e);break}case l.DD:case l.DT:{mf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{gf(e);break}case l.BR:{bf(e);break}case l.BODY:{lf(e,t);break}case l.HTML:{cf(e,t);break}case l.FORM:{df(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Ef(e,t);break}case l.TEMPLATE:{At(e,t);break}default:vu(e,t)}}function Bu(e,t){e.tmplInsertionModeStack.length>0?Yu(e,t):Ii(e,t)}function Tf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function xf(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _r(e,t){if(e.openElements.currentTagId!==void 0&&Ou.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case X.CHARACTER:{Hu(e,t);break}case X.WHITESPACE_CHARACTER:{Fu(e,t);break}}else kn(e,t)}function _f(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function Af(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function kf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(k.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Si(e,t)}function yf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function Cf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(k.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,ur(e,t)}function Nf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function If(e,t){Mu(t)?e._appendElement(t,D.HTML):kn(e,t),t.ackSelfClosing=!0}function Sf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Mt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{Cf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{je(e,t);break}case l.COL:{kf(e,t);break}case l.FORM:{Sf(e,t);break}case l.TABLE:{Nf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{yf(e,t);break}case l.INPUT:{If(e,t);break}case l.CAPTION:{_f(e,t);break}case l.COLGROUP:{Af(e,t);break}default:kn(e,t)}}function gn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:kn(e,t)}}function kn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ar(e,t),e.fosterParentingEnabled=n}function Fu(e,t){e.pendingCharacterTokens.push(t)}function Hu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)kn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Uu=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function wf(e,t){const n=t.tagID;Uu.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,Mt(e,t)):Te(e,t)}function Lf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&gn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:sr(e,t)}}function Si(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{je(e,t);break}default:qn(e,t)}}function Of(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{At(e,t);break}case l.COL:break;default:qn(e,t)}}function qn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function ur(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(k.TR,l.TR),e.insertionMode=T.IN_ROW,or(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,Mt(e,t));break}default:Mt(e,t)}}function Wr(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,gn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:gn(e,t)}}function or(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ur(e,t));break}default:Mt(e,t)}}function ju(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Wr(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Wr(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:gn(e,t)}}function Rf(e,t){const n=t.tagID;Uu.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),or(e,t)):Te(e,t)}function Df(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ju(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:sr(e,t)}}function zu(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{je(e,t);break}}}function $u(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}}}function Pf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):zu(e,t)}function Mf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):$u(e,t)}function vf(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{je(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,Mt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Si(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,ur(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,or(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,Te(e,t)}}function Bf(e,t){t.tagID===l.TEMPLATE&&At(e,t)}function Yu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ii(e,t)}function Ff(e,t){t.tagID===l.HTML?Te(e,t):Vn(e,t)}function qu(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Vn(e,t)}function Vn(e,t){e.insertionMode=T.IN_BODY,ar(e,t)}function Hf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{je(e,t);break}}}function Uf(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function jf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.NOFRAMES:{je(e,t);break}}}function zf(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function $f(e,t){t.tagID===l.HTML?Te(e,t):Hn(e,t)}function Hn(e,t){e.insertionMode=T.IN_BODY,ar(e,t)}function Yf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.NOFRAMES:{je(e,t);break}}}function qf(e,t){t.chars=le,e._insertCharacters(t)}function Vf(e,t){e._insertCharacters(t),e.framesetOk=!1}function Vu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Wf(e,t){if(ud(t))Vu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?wu(t):r===D.SVG&&(od(t),Lu(t)),Ci(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Gf(e,t){if(t.tagID===l.P||t.tagID===l.BR){Vu(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}k.AREA,k.BASE,k.BASEFONT,k.BGSOUND,k.BR,k.COL,k.EMBED,k.FRAME,k.HR,k.IMG,k.INPUT,k.KEYGEN,k.LINK,k.META,k.PARAM,k.SOURCE,k.TRACK,k.WBR;const lr=Wu("end"),qe=Wu("start");function Wu(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Gu(e){const t=qe(e),n=lr(e);if(t&&n)return{start:t,end:n}}const Qf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Kf=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ua={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Qu(e,t){const n=s0(e),r=bu("type",{handlers:{root:Xf,element:Zf,text:Jf,comment:Xu,doctype:e0,raw:n0},unknown:r0}),i={parser:n?new Ba(Ua):Ba.getFragmentParser(void 0,Ua),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),Ut(i,qe());const a=n?i.parser.document:i.parser.getFragment(),s=sh(a,{file:i.options.file});return i.stitches&&at(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Ku(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Xf(e,t){Ku(e.children,t)}function Zf(e,t){i0(e,t),Ku(e.children,t),a0(e,t)}function Jf(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:X.CHARACTER,chars:e.value,location:yn(e)};Ut(t,qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function e0(e,t){const n={type:X.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yn(e)};Ut(t,qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function t0(e,t){t.stitches=!0;const n=u0(e);if("children"in e&&"children"in n){const r=Qu({type:"root",children:e.children},t.options);n.children=r.children}Xu({type:"comment",value:{stitch:n}},t)}function Xu(e,t){const n=e.value,r={type:X.COMMENT,data:n,location:yn(e)};Ut(t,qe(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function n0(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Zu(t,qe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Qf,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function r0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))t0(n,t);else{let r="";throw Kf.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Ut(e,t){Zu(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=fe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Zu(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function i0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fe.PLAINTEXT)return;Ut(t,qe(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:pt.html;i===pt.html&&n==="svg"&&(i=pt.svg);const a=hh({...e,children:[]},{space:i===pt.svg?"svg":"html"}),s={type:X.START_TAG,tagName:n,tagID:Ht(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:yn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function a0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Th.includes(n)||t.parser.tokenizer.state===fe.PLAINTEXT)return;Ut(t,lr(e));const r={type:X.END_TAG,tagName:n,tagID:Ht(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:yn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fe.RCDATA||t.parser.tokenizer.state===fe.RAWTEXT||t.parser.tokenizer.state===fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=fe.DATA)}function s0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function yn(e){const t=qe(e)||{line:void 0,column:void 0,offset:void 0},n=lr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function u0(e){return"children"in e?Et({...e,children:[]}):Et(e)}function Gr(e){return function(t,n){return Qu(t,{...e,file:n})}}const ht=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ln={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ht,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ht],h2:[["className","sr-only"]],img:[...ht,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ht,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ht],table:[...ht],ul:[...ht,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},rt={}.hasOwnProperty;function o0(e,t){let n={type:"root",children:[]};const r={schema:t?{...ln,...t}:ln,stack:[]},i=Ju(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Ju(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return l0(e,n);case"doctype":return c0(e,n);case"element":return h0(e,n);case"root":return d0(e,n);case"text":return f0(e,n)}}}function l0(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Cn(a,t),a}}function c0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Cn(n,t),n}}function h0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=eo(e,t.children),i=p0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&rt.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Cn(s,t),s}function d0(e,t){const r={type:"root",children:eo(e,t.children)};return Cn(r,t),r}function f0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Cn(r,t),r}function eo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Ju(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function p0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&rt.call(r,n)?r[n]:void 0,s=r&&rt.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(rt.call(u,c)){const h=u[c];let d=ja(e,za(a,c),c,h);d==null&&(d=ja(e,za(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&rt.call(i,n)){const h=i[n];for(c in h)rt.call(h,c)&&!rt.call(o,c)&&(o[c]=h[c])}return o}function ja(e,t,n,r){return t?Array.isArray(r)?m0(e,t,n,r):to(e,t,n,r):void 0}function m0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=to(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function to(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&g0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function g0(e,t,n){const r=e.schema.protocols&&rt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Cn(e,t){const n=Gu(t);t.data&&(e.data=Et(t.data)),n&&(e.position=n)}function za(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function no(e){return function(t){return o0(t,e)}}function $a(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ae=ot(/[A-Za-z]/),be=ot(/[\dA-Za-z]/),E0=ot(/[#-'*+\--9=?A-Z^-~]/);function Wn(e){return e!==null&&(e<32||e===127)}const Qr=ot(/\d/),b0=ot(/[\dA-Fa-f]/),T0=ot(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function ue(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const cr=ot(new RegExp("\\p{P}|\\p{S}","u")),bt=ot(/\s/);function ot(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function x0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _0(e,t,n){const i=tr((n||{}).ignore||[]),a=A0(t);let s=-1;for(;++s<a.length;)Ei(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],b=f?f.children:void 0;if(i(p,b?b.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let b=0;const N=d.children.indexOf(c);let y=!1,R=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const H=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=p(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=H+1:(b!==H&&R.push({type:"text",value:c.value.slice(b,H)}),Array.isArray(w)?R.push(...w):w&&R.push(w),b=H+L[0].length,y=!0),!f.global)break;L=f.exec(c.value)}return y?(b<c.value.length&&R.push({type:"text",value:c.value.slice(b)}),d.children.splice(N,1,...R)):R=[c],N+R.length}}function A0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([k0(i[0]),y0(i[1])])}return t}function k0(e){return typeof e=="string"?new RegExp(x0(e),"g"):e}function y0(e){return typeof e=="function"?e:function(){return e}}const Ar="phrasing",kr=["autolink","link","image","label"];function C0(){return{transforms:[R0],enter:{literalAutolink:I0,literalAutolinkEmail:yr,literalAutolinkHttp:yr,literalAutolinkWww:yr},exit:{literalAutolink:O0,literalAutolinkEmail:L0,literalAutolinkHttp:S0,literalAutolinkWww:w0}}}function N0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ar,notInConstruct:kr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ar,notInConstruct:kr},{character:":",before:"[ps]",after:"\\/",inConstruct:Ar,notInConstruct:kr}]}}function I0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function yr(e){this.config.enter.autolinkProtocol.call(this,e)}function S0(e){this.config.exit.autolinkProtocol.call(this,e)}function w0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function L0(e){this.config.exit.autolinkEmail.call(this,e)}function O0(e){this.exit(e)}function R0(e){_0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,D0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),P0]],{ignore:["link","linkReference"]})}function D0(e,t,n,r,i){let a="";if(!ro(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!M0(n)))return!1;const s=v0(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function P0(e,t,n,r){return!ro(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function M0(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function v0(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=$a(e,"(");let a=$a(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function ro(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bt(n)||cr(n))&&(!t||n!==47)}function Ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}io.peek=q0;function B0(){this.buffer()}function F0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H0(){this.buffer()}function U0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function j0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z0(e){this.exit(e)}function $0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Y0(e){this.exit(e)}function q0(){return"["}function io(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function V0(){return{enter:{gfmFootnoteCallString:B0,gfmFootnoteCall:F0,gfmFootnoteDefinitionLabelString:H0,gfmFootnoteDefinition:U0},exit:{gfmFootnoteCallString:j0,gfmFootnoteCall:z0,gfmFootnoteDefinitionLabelString:$0,gfmFootnoteDefinition:Y0}}}function W0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:io},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
|
|
4
|
-
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?
|
|
5
|
-
`)}function rp(e){return e==null?"":String(e)}function
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-h5zD4EvJ.js","assets/index-BC5stA77.js","assets/index-DRJLGAPR.css","assets/chevron-right-YWciNkox.js","assets/chevron-down-CqZBsPeR.js","assets/index-Cjaho2ST.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{k as Js,ab as eu,r as C,j as g,aZ as fc,a_ as pc,aY as Ei,l as tu,u as mc,O as bi,a3 as gc,X as Ec,m as bc,p as Tc,a$ as xc}from"./index-BC5stA77.js";import{C as er}from"./chevron-right-YWciNkox.js";import{C as nu}from"./chevron-down-CqZBsPeR.js";const _c=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ac=Js("file-text",_c);const kc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],yc=Js("image",kc);var la;(function(e){e.TODO="TODO",e.IN_PROGRESS="IN_PROGRESS",e.IN_REVIEW="IN_REVIEW",e.DONE="DONE",e.CANCELLED="CANCELLED"})(la||(la={}));var ca;(function(e){e.ACTIVE="ACTIVE",e.MERGED="MERGED",e.ABANDONED="ABANDONED",e.HIBERNATED="HIBERNATED"})(ca||(ca={}));var ha;(function(e){e.WORKTREE="WORKTREE",e.MAIN_DIRECTORY="MAIN_DIRECTORY"})(ha||(ha={}));var ze;(function(e){e.CLAUDE_CODE="CLAUDE_CODE",e.GEMINI_CLI="GEMINI_CLI",e.CURSOR_AGENT="CURSOR_AGENT",e.CODEX="CODEX"})(ze||(ze={}));var da;(function(e){e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED"})(da||(da={}));var fa;(function(e){e.CHAT="CHAT",e.COMMIT_MSG="COMMIT_MSG"})(fa||(fa={}));var pa;(function(e){e.WORKSPACE="WORKSPACE",e.CONVERSATION="CONVERSATION"})(pa||(pa={}));var ma;(function(e){e.REBASE="REBASE",e.MERGE="MERGE"})(ma||(ma={}));var re;(function(e){e.Action="Action",e.Assistant="Assistant",e.Info="Info",e.Tool="Tool",e.User="User",e.Cursor="Cursor",e.Error="Error"})(re||(re={}));function Cc(e){const t=e.metadata?.toolName||"Tool",n=e.metadata?.action,r=e.metadata?.status,a=n?{file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"}[n]:t;return r==="success"?`${a} ✓`:r==="failed"?`${a} ✗`:r==="pending_approval"?`${a} (待审批)`:a}function Nc(e){switch(e.entryType){case"user_message":case"user_feedback":return{id:e.id,type:re.User,content:e.content};case"assistant_message":return{id:e.id,type:re.Assistant,content:e.content};case"next_action":return{id:e.id,type:re.Action,content:e.content};case"thinking":return{id:e.id,type:re.Info,title:"Thinking",content:e.content};case"tool_use":return{id:e.id,type:re.Tool,title:Cc(e),content:e.content,isCollapsed:e.metadata?.status==="success",tool:{action:e.metadata?.action,name:e.metadata?.toolName,id:e.metadata?.toolId,status:e.metadata?.status}};case"error_message":return{id:e.id,type:re.Error,content:e.content};case"system_message":return{id:e.id,type:re.Info,content:e.content};case"loading":return{id:e.id,type:re.Cursor,content:""};case"token_usage_info":if(e.metadata?.tokenUsage){const{totalTokens:t=0,modelContextWindow:n}=e.metadata.tokenUsage;return{id:e.id,type:re.Info,content:e.content,tokenUsage:{totalTokens:t,modelContextWindow:n}}}return null;default:return null}}function r3(e){return e.map(Nc).filter(t=>t!==null)}function i3(){return{id:`cursor-${Date.now()}`,type:re.Cursor,content:""}}const tr=(function(e){if(e==null)return Lc;if(typeof e=="function")return nr(e);if(typeof e=="object")return Array.isArray(e)?Ic(e):Sc(e);if(typeof e=="string")return wc(e);throw new Error("Expected function, string, or object as test")});function Ic(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return nr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Sc(e){const t=e;return nr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function wc(e){return nr(t);function t(n){return n&&n.type===e}}function nr(e){return t;function t(n,r,i){return!!(Oc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Lc(){return!0}function Oc(e){return e!==null&&typeof e=="object"&&"type"in e}const ru=[],Jt=!0,Ur=!1,zn="skip";function Ti(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=tr(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=ru,b,A,N;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=Rc(n(o,h)),p[0]===Ur))return p;if("children"in o&&o.children){const y=o;if(y.children&&p[0]!==zn)for(A=(r?y.children.length:-1)+s,N=h.concat(y);A>-1&&A<y.children.length;){const R=y.children[A];if(b=u(R,A,N)(),b[0]===Ur)return b;A=typeof b[1]=="number"?b[1]:A+s}}return p}}}function Rc(e){return Array.isArray(e)?e:typeof e=="number"?[Jt,e]:e==null?ru:[e]}function at(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Ti(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Dc({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Bc(e,t,n,r,i,a,s);at(c,h)}}function ga(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Pc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Mc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),vc=new Set(["javascript:","data:","file:","vbscript:"]);function Ea(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=ga(e,n);if(!s||vc.has(s.protocol)||!(Mc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Pc(e);return s&&t.some(c=>{const h=ga(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const br=Symbol("node-seen"),Bc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[br])return Jt;if(o.tagName==="a"){const d=Ea(o.properties.href,t,e,!1,!1,i);return d===null?(o[br]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),zn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",Jt)}if(o.tagName==="img"){const d=Ea(o.properties.src,n,e,r,!0,i);return d===null?(o[br]=!0,at(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),zn):(o.properties.src=d,Jt)}return Jt};return u},iu=-1,rr=0,nn=1,$n=2,xi=3,_i=4,Ai=5,ki=6,au=7,su=8,ba=typeof self=="object"?self:globalThis,Fc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case rr:case iu:return n(s,i);case nn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case $n:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case xi:return n(new Date(s),i);case _i:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Ai:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case ki:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case au:{const{name:u,message:o}=s;return n(new ba[u](o),i)}case su:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new ba[a](s),i)};return r},Ta=e=>Fc(new Map,e)(0),St="",{toString:Hc}={},{keys:Uc}=Object,qt=e=>{const t=typeof e;if(t!=="object"||!e)return[rr,t];const n=Hc.call(e).slice(8,-1);switch(n){case"Array":return[nn,St];case"Object":return[$n,St];case"Date":return[xi,St];case"RegExp":return[_i,St];case"Map":return[Ai,St];case"Set":return[ki,St];case"DataView":return[nn,n]}return n.includes("Array")?[nn,n]:n.includes("Error")?[au,n]:[$n,n]},Ln=([e,t])=>e===rr&&(t==="function"||t==="symbol"),jc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=qt(s);switch(u){case rr:{let h=s;switch(o){case"bigint":u=su,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([iu],s)}return i([u,h],s)}case nn:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case $n:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Uc(s))(e||!Ln(qt(s[f])))&&h.push([a(f),a(s[f])]);return d}case xi:return i([u,s.toISOString()],s);case _i:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Ai:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Ln(qt(f))||Ln(qt(p))))&&h.push([a(f),a(p)]);return d}case ki:{const h=[],d=i([u,h],s);for(const f of s)(e||!Ln(qt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},xa=(e,{json:t,lossy:n}={})=>{const r=[];return jc(!(t||n),!!t,new Map,r)(e),r},Et=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ta(xa(e,t)):structuredClone(e):(e,t)=>Ta(xa(e,t));class _n{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_n.prototype.normal={};_n.prototype.property={};_n.prototype.space=void 0;function uu(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new _n(n,r,t)}function mn(e){return e.toLowerCase()}class Ne{constructor(t,n){this.attribute=n,this.property=t}}Ne.prototype.attribute="";Ne.prototype.booleanish=!1;Ne.prototype.boolean=!1;Ne.prototype.commaOrSpaceSeparated=!1;Ne.prototype.commaSeparated=!1;Ne.prototype.defined=!1;Ne.prototype.mustUseProperty=!1;Ne.prototype.number=!1;Ne.prototype.overloadedBoolean=!1;Ne.prototype.property="";Ne.prototype.spaceSeparated=!1;Ne.prototype.space=void 0;let zc=0;const Q=_t(),pe=_t(),jr=_t(),M=_t(),oe=_t(),Dt=_t(),Le=_t();function _t(){return 2**++zc}const zr=Object.freeze(Object.defineProperty({__proto__:null,boolean:Q,booleanish:pe,commaOrSpaceSeparated:Le,commaSeparated:Dt,number:M,overloadedBoolean:jr,spaceSeparated:oe},Symbol.toStringTag,{value:"Module"})),Tr=Object.keys(zr);class yi extends Ne{constructor(t,n,r,i){let a=-1;if(super(t,n),_a(this,"space",i),typeof r=="number")for(;++a<Tr.length;){const s=Tr[a];_a(this,Tr[a],(r&zr[s])===zr[s])}}}yi.prototype.defined=!0;function _a(e,t,n){n&&(e[t]=n)}function Bt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new yi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[mn(r)]=r,n[mn(a.attribute)]=r}return new _n(t,n,e.space)}const ou=Bt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:oe,ariaCurrent:null,ariaDescribedBy:oe,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:oe,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:oe,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oe,ariaLevel:M,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:oe,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:oe,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:pe,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function lu(e,t){return t in e?e[t]:t}function cu(e,t){return lu(e,t.toLowerCase())}const $c=Bt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dt,acceptCharset:oe,accessKey:oe,action:null,allow:null,allowFullScreen:Q,allowPaymentRequest:Q,allowUserMedia:Q,alt:null,as:null,async:Q,autoCapitalize:null,autoComplete:oe,autoFocus:Q,autoPlay:Q,blocking:oe,capture:null,charSet:null,checked:Q,cite:null,className:oe,cols:M,colSpan:null,content:null,contentEditable:pe,controls:Q,controlsList:oe,coords:M|Dt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Q,defer:Q,dir:null,dirName:null,disabled:Q,download:jr,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Q,formTarget:null,headers:oe,height:M,hidden:jr,high:M,href:null,hrefLang:null,htmlFor:oe,httpEquiv:oe,id:null,imageSizes:null,imageSrcSet:null,inert:Q,inputMode:null,integrity:null,is:null,isMap:Q,itemId:null,itemProp:oe,itemRef:oe,itemScope:Q,itemType:oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Q,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:Q,muted:Q,name:null,nonce:null,noModule:Q,noValidate:Q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Q,optimum:M,pattern:null,ping:oe,placeholder:null,playsInline:Q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Q,referrerPolicy:null,rel:oe,required:Q,reversed:Q,rows:M,rowSpan:M,sandbox:oe,scope:null,scoped:Q,seamless:Q,selected:Q,shadowRootClonable:Q,shadowRootDelegatesFocus:Q,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:Q,useMap:null,value:pe,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:oe,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Q,declare:Q,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:Q,noHref:Q,noShade:Q,noWrap:Q,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Q,disableRemotePlayback:Q,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:cu}),Yc=Bt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Le,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:Q,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dt,g2:Dt,glyphName:Dt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lu}),hu=Bt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),du=Bt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cu}),fu=Bt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Vc=/[A-Z]/g,Aa=/-[a-z]/g,Wc=/^data[-\w.:]+$/i;function ir(e,t){const n=mn(t);let r=t,i=Ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Wc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Aa,Qc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Aa.test(a)){let s=a.replace(Vc,Gc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=yi}return new i(r,t)}function Gc(e){return"-"+e.toLowerCase()}function Qc(e){return e.charAt(1).toUpperCase()}const An=uu([ou,$c,hu,du,fu],"html"),ut=uu([ou,Yc,hu,du,fu],"svg");function ka(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function pu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ya=/[#.]/g;function Kc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){ya.lastIndex=i;const u=ya.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Ca(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function mu(e){return e.join(" ").trim()}function gu(e,t,n){const r=n?eh(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Kc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Xc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))Zc(e,o.properties,d,f)}for(const c of u)$r(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Xc(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Zc(e,t,n,r){const i=ir(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Ca(r):i.commaSeparated?a=ka(r):i.commaOrSpaceSeparated?a=Ca(ka(r).join(" ")):a=Na(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Jc(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(Na(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function $r(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)$r(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?$r(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Na(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||mn(n)===mn(t)))return!0}return n}function Jc(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function eh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const th=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],nh=gu(An,"div"),rh=gu(ut,"g",th);function ih(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=Ia(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=Ia(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ia(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const pt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Eu={}.hasOwnProperty,ah=Object.prototype;function sh(e,t){const n=t||{};return Ci({file:n.file||void 0,location:!1,schema:n.space==="svg"?ut:An,verbose:n.verbose||!1},e)}function Ci(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Fn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:bu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=ih(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Fn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Fn(e,r,n),n}default:return n=uh(e,t),n}}function bu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ci(e,t[n]);r.push(i)}return r}function uh(e,t){const n=e.schema;e.schema=t.namespaceURI===pt.svg?ut:An;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Eu.call(ah,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?rh:nh)(t.tagName,i,bu(e,t.childNodes));if(Fn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Ot(o.startTag),h=o&&o.endTag&&Ot(o.endTag),d=Ci(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function Fn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=oh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function oh(e,t,n){const r=Ot(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Eu.call(n.attrs,s)&&(a[ir(e.schema,s).property]=Ot(n.attrs[s]));n.startTag;const u=Ot(n.startTag),o=n.endTag?Ot(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Ot(e){const t=Sa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sa(e){return e.line&&e.column?e:void 0}const wa={}.hasOwnProperty;function Tu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&wa.call(i,e)){const o=String(i[e]);s=wa.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const lh={},ch={}.hasOwnProperty,xu=Tu("type",{handlers:{root:dh,element:Eh,text:mh,comment:gh,doctype:ph}});function hh(e,t){const r=(t||lh).space;return xu(e,r==="svg"?ut:An)}function dh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ni(e.children,n,t),Ft(e,n),n}function fh(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ni(e.children,n,t),Ft(e,n),n}function ph(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ft(e,t),t}function mh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ft(e,t),t}function gh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ft(e,t),t}function Eh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ut);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&ch.call(e.properties,a)){const o=bh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:pt[s],childNodes:[],parentNode:null};return u.childNodes=Ni(e.children,u,r),Ft(e,u),e.tagName==="template"&&e.content&&(u.content=fh(e.content,r)),u}function bh(e,t,n){const r=ir(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?pu(n):mu(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=pt[r.space]}return i}function Ni(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=xu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ft(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Th=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],xh=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),le="�";var m;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(m||(m={}));const ye={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function _u(e){return e>=55296&&e<=57343}function _h(e){return e>=56320&&e<=57343}function Ah(e,t){return(e-55296)*1024+9216+t}function Au(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ku(e){return e>=64976&&e<=65007||xh.has(e)}var S;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(S||(S={}));const kh=65536;class yh{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=kh,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(_h(n))return this.pos++,this._addGap(),Ah(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(S.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,_u(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Au(t)?this._err(S.controlCharacterInInputStream):ku(t)&&this._err(S.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var X;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(X||(X={}));function yu(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Ch=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Nh=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Ih(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Nh.get(e))!==null&&t!==void 0?t:e}var ge;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ge||(ge={}));const Sh=32;var it;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(it||(it={}));function Yr(e){return e>=ge.ZERO&&e<=ge.NINE}function wh(e){return e>=ge.UPPER_A&&e<=ge.UPPER_F||e>=ge.LOWER_A&&e<=ge.LOWER_F}function Lh(e){return e>=ge.UPPER_A&&e<=ge.UPPER_Z||e>=ge.LOWER_A&&e<=ge.LOWER_Z||Yr(e)}function Oh(e){return e===ge.EQUALS||Lh(e)}var me;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(me||(me={}));var Xe;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xe||(Xe={}));class Rh{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=me.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xe.Strict}startEntity(t){this.decodeMode=t,this.state=me.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case me.EntityStart:return t.charCodeAt(n)===ge.NUM?(this.state=me.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=me.NamedEntity,this.stateNamedEntity(t,n));case me.NumericStart:return this.stateNumericStart(t,n);case me.NumericDecimal:return this.stateNumericDecimal(t,n);case me.NumericHex:return this.stateNumericHex(t,n);case me.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Sh)===ge.LOWER_X?(this.state=me.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=me.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Yr(i)||wh(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Yr(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ge.SEMI)this.consumed+=1;else if(this.decodeMode===Xe.Strict)return 0;return this.emitCodePoint(Ih(this.result),this.consumed),this.errors&&(t!==ge.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&it.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Dh(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Xe.Attribute&&(a===0||Oh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&it.VALUE_LENGTH)>>14,a!==0){if(s===ge.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Xe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&it.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~it.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case me.NamedEntity:return this.result!==0&&(this.decodeMode!==Xe.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case me.NumericDecimal:return this.emitNumericEntity(0,2);case me.NumericHex:return this.emitNumericEntity(0,3);case me.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case me.EntityStart:return 0}}}function Dh(e,t,n,r){const i=(t&it.BRANCH_LENGTH)>>7,a=t&it.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var mt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(mt||(mt={}));var De;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(De||(De={}));var k;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(k||(k={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const Ph=new Map([[k.A,l.A],[k.ADDRESS,l.ADDRESS],[k.ANNOTATION_XML,l.ANNOTATION_XML],[k.APPLET,l.APPLET],[k.AREA,l.AREA],[k.ARTICLE,l.ARTICLE],[k.ASIDE,l.ASIDE],[k.B,l.B],[k.BASE,l.BASE],[k.BASEFONT,l.BASEFONT],[k.BGSOUND,l.BGSOUND],[k.BIG,l.BIG],[k.BLOCKQUOTE,l.BLOCKQUOTE],[k.BODY,l.BODY],[k.BR,l.BR],[k.BUTTON,l.BUTTON],[k.CAPTION,l.CAPTION],[k.CENTER,l.CENTER],[k.CODE,l.CODE],[k.COL,l.COL],[k.COLGROUP,l.COLGROUP],[k.DD,l.DD],[k.DESC,l.DESC],[k.DETAILS,l.DETAILS],[k.DIALOG,l.DIALOG],[k.DIR,l.DIR],[k.DIV,l.DIV],[k.DL,l.DL],[k.DT,l.DT],[k.EM,l.EM],[k.EMBED,l.EMBED],[k.FIELDSET,l.FIELDSET],[k.FIGCAPTION,l.FIGCAPTION],[k.FIGURE,l.FIGURE],[k.FONT,l.FONT],[k.FOOTER,l.FOOTER],[k.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[k.FORM,l.FORM],[k.FRAME,l.FRAME],[k.FRAMESET,l.FRAMESET],[k.H1,l.H1],[k.H2,l.H2],[k.H3,l.H3],[k.H4,l.H4],[k.H5,l.H5],[k.H6,l.H6],[k.HEAD,l.HEAD],[k.HEADER,l.HEADER],[k.HGROUP,l.HGROUP],[k.HR,l.HR],[k.HTML,l.HTML],[k.I,l.I],[k.IMG,l.IMG],[k.IMAGE,l.IMAGE],[k.INPUT,l.INPUT],[k.IFRAME,l.IFRAME],[k.KEYGEN,l.KEYGEN],[k.LABEL,l.LABEL],[k.LI,l.LI],[k.LINK,l.LINK],[k.LISTING,l.LISTING],[k.MAIN,l.MAIN],[k.MALIGNMARK,l.MALIGNMARK],[k.MARQUEE,l.MARQUEE],[k.MATH,l.MATH],[k.MENU,l.MENU],[k.META,l.META],[k.MGLYPH,l.MGLYPH],[k.MI,l.MI],[k.MO,l.MO],[k.MN,l.MN],[k.MS,l.MS],[k.MTEXT,l.MTEXT],[k.NAV,l.NAV],[k.NOBR,l.NOBR],[k.NOFRAMES,l.NOFRAMES],[k.NOEMBED,l.NOEMBED],[k.NOSCRIPT,l.NOSCRIPT],[k.OBJECT,l.OBJECT],[k.OL,l.OL],[k.OPTGROUP,l.OPTGROUP],[k.OPTION,l.OPTION],[k.P,l.P],[k.PARAM,l.PARAM],[k.PLAINTEXT,l.PLAINTEXT],[k.PRE,l.PRE],[k.RB,l.RB],[k.RP,l.RP],[k.RT,l.RT],[k.RTC,l.RTC],[k.RUBY,l.RUBY],[k.S,l.S],[k.SCRIPT,l.SCRIPT],[k.SEARCH,l.SEARCH],[k.SECTION,l.SECTION],[k.SELECT,l.SELECT],[k.SOURCE,l.SOURCE],[k.SMALL,l.SMALL],[k.SPAN,l.SPAN],[k.STRIKE,l.STRIKE],[k.STRONG,l.STRONG],[k.STYLE,l.STYLE],[k.SUB,l.SUB],[k.SUMMARY,l.SUMMARY],[k.SUP,l.SUP],[k.TABLE,l.TABLE],[k.TBODY,l.TBODY],[k.TEMPLATE,l.TEMPLATE],[k.TEXTAREA,l.TEXTAREA],[k.TFOOT,l.TFOOT],[k.TD,l.TD],[k.TH,l.TH],[k.THEAD,l.THEAD],[k.TITLE,l.TITLE],[k.TR,l.TR],[k.TRACK,l.TRACK],[k.TT,l.TT],[k.U,l.U],[k.UL,l.UL],[k.SVG,l.SVG],[k.VAR,l.VAR],[k.WBR,l.WBR],[k.XMP,l.XMP]]);function Ht(e){var t;return(t=Ph.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,Mh={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},qr=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);k.STYLE,k.SCRIPT,k.XMP,k.IFRAME,k.NOEMBED,k.NOFRAMES,k.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function vh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function en(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Bh(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function tt(e){return Bh(e)||en(e)}function La(e){return tt(e)||vh(e)}function On(e){return e+32}function Cu(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function Oa(e){return Cu(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Fh(e){return e===m.NULL?S.nullCharacterReference:e>1114111?S.characterReferenceOutsideUnicodeRange:_u(e)?S.surrogateCharacterReference:ku(e)?S.noncharacterCharacterReference:Au(e)||e===m.CARRIAGE_RETURN?S.controlCharacterReference:null}class Hh{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Rh(Ch,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(S.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(S.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Fh(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:X.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:X.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:X.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:X.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(yu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(S.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ht(t.tagName),t.type===X.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case X.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case X.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case X.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:X.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Cu(t)?X.WHITESPACE_CHARACTER:t===m.NULL?X.NULL_CHARACTER:X.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(X.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xe.Attribute:Xe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(tt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(tt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(S.missingEndTagName),this.state=E.DATA;break}case m.EOF:{this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.tagName+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(en(t)?On(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){tt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){tt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){tt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:tt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){tt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ye.SCRIPT,!1)&&Oa(this.preprocessor.peek(ye.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ye.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(le);break}case m.EOF:{this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ye.SCRIPT,!1)&&Oa(this.preprocessor.peek(ye.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ye.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(S.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.name+=le;break}default:this.currentAttr.name+=String.fromCodePoint(en(t)?On(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),this.currentAttr.value+=le;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(S.eofInTag),this._emitEOFToken();break}default:this._err(S.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=le;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ye.DASH_DASH,!0)?(this._createCommentToken(ye.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(ye.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ye.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(ye.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(S.cdataInHtmlContent),this._createCommentToken(ye.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.data+=le;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(S.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(S.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(S.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(en(t))this._createDoctypeToken(String.fromCharCode(On(t))),this.state=E.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(S.unexpectedNullCharacter),this._createDoctypeToken(le),this.state=E.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.name+=le;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(en(t)?On(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ye.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ye.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.publicId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(S.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(S.unexpectedNullCharacter),n.systemId+=le;break}case m.GREATER_THAN_SIGN:{this._err(S.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(S.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.NULL:{this._err(S.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(S.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&La(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){La(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Nu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Ra=new Set([...Nu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Yn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Uh=new Set([...Yn,l.OL,l.UL]),jh=new Set([...Yn,l.BUTTON]),Da=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Pa=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),zh=new Set([l.TR,l.TEMPLATE,l.HTML]),$h=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Yh=new Set([l.TABLE,l.TEMPLATE,l.HTML]),qh=new Set([l.TD,l.TH]);class Vh{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==D.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(qr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qh,D.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Yh,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo($h,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(zh,D.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(Pa.has(i))return!1;break}case D.MATHML:{if(Da.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Yn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Uh)}hasInButtonScope(t){return this.hasInDynamicScope(t,jh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(qr.has(n))return!0;if(Yn.has(n))return!1;break}case D.SVG:{if(Pa.has(n))return!1;break}case D.MATHML:{if(Da.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Nu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ra.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ra.has(this.currentTagId);)this.pop()}}const xr=3;var Ye;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ye||(Ye={}));const Ma={type:Ye.Marker};class Wh{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Ye.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=xr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Ma)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ye.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ye.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Ma);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ye.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ye.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ye.Element&&n.element===t)}}const nt={createDocument(){return{nodeName:"#document",mode:De.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};nt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(nt.isTextNode(n)){n.value+=t;return}}nt.appendChild(e,nt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&nt.isTextNode(r)?r.value+=t:nt.insertBefore(e,nt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Iu="html",Gh="about:legacy-compat",Qh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Su=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Kh=[...Su,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Xh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),wu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Zh=[...wu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function va(e,t){return t.some(n=>e.startsWith(n))}function Jh(e){return e.name===Iu&&e.publicId===null&&(e.systemId===null||e.systemId===Gh)}function ed(e){if(e.name!==Iu)return De.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Qh)return De.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Xh.has(n))return De.QUIRKS;let r=t===null?Kh:Su;if(va(n,r))return De.QUIRKS;if(r=t===null?wu:Zh,va(n,r))return De.LIMITED_QUIRKS}return De.NO_QUIRKS}const Ba={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},td="definitionurl",nd="definitionURL",rd=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),id=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),ad=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),sd=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function ud(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===mt.COLOR||r===mt.SIZE||r===mt.FACE)||sd.has(t)}function Lu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===td){e.attrs[t].name=nd;break}}function Ou(e){for(let t=0;t<e.attrs.length;t++){const n=rd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ii(e){for(let t=0;t<e.attrs.length;t++){const n=id.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function od(e){const t=ad.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ht(e.tagName))}function ld(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function cd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mt.ENCODING){const i=n[r].value.toLowerCase();return i===Ba.TEXT_HTML||i===Ba.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function hd(e,t,n,r){return(!r||r===D.HTML)&&cd(e,t,n)||(!r||r===D.MATHML)&&ld(e,t)}const dd="hidden",fd=8,pd=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const md={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ru=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Fa={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:nt,onParseError:null};class Ha{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Fa,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Hh(this.options,this),this.activeFormattingElements=new Wh(this.treeAdapter),this.fragmentContextID=r?Ht(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Vh(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Fa,...n};t??(t=r.treeAdapter.createElement(k.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:md,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=fe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===k.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=fe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(k.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===X.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===k.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case X.CHARACTER:{this.onCharacter(t);break}case X.NULL_CHARACTER:{this.onNullCharacter(t);break}case X.COMMENT:{this.onComment(t);break}case X.DOCTYPE:{this.onDoctype(t);break}case X.START_TAG:{this._processStartTag(t);break}case X.END_TAG:{this.onEndTag(t);break}case X.EOF:{this.onEof(t);break}case X.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return hd(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ye.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Ru.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Mh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Vf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{rn(this,t);break}case T.BEFORE_HEAD:{an(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{un(this,t);break}case T.AFTER_HEAD:{on(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Pu(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{_r(this,t);break}case T.IN_TABLE_TEXT:{Uu(this,t);break}case T.IN_COLUMN_GROUP:{qn(this,t);break}case T.AFTER_BODY:{Vn(this,t);break}case T.AFTER_AFTER_BODY:{Hn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{rn(this,t);break}case T.BEFORE_HEAD:{an(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{un(this,t);break}case T.AFTER_HEAD:{on(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{_r(this,t);break}case T.IN_COLUMN_GROUP:{qn(this,t);break}case T.AFTER_BODY:{Vn(this,t);break}case T.AFTER_AFTER_BODY:{Hn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Vr(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.AFTER_BODY:{Ad(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{kd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{yd(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,S.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,S.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Wf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{Cd(this,t);break}case T.BEFORE_HEAD:{Id(this,t);break}case T.IN_HEAD:{je(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Ld(this,t);break}case T.AFTER_HEAD:{Rd(this,t);break}case T.IN_BODY:{Te(this,t);break}case T.IN_TABLE:{Mt(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.IN_CAPTION:{wf(this,t);break}case T.IN_COLUMN_GROUP:{Li(this,t);break}case T.IN_TABLE_BODY:{ur(this,t);break}case T.IN_ROW:{or(this,t);break}case T.IN_CELL:{Rf(this,t);break}case T.IN_SELECT:{$u(this,t);break}case T.IN_SELECT_IN_TABLE:{Pf(this,t);break}case T.IN_TEMPLATE:{vf(this,t);break}case T.AFTER_BODY:{Ff(this,t);break}case T.IN_FRAMESET:{Hf(this,t);break}case T.AFTER_FRAMESET:{jf(this,t);break}case T.AFTER_AFTER_BODY:{$f(this,t);break}case T.AFTER_AFTER_FRAMESET:{Yf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Gf(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{Nd(this,t);break}case T.BEFORE_HEAD:{Sd(this,t);break}case T.IN_HEAD:{wd(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Od(this,t);break}case T.AFTER_HEAD:{Dd(this,t);break}case T.IN_BODY:{sr(this,t);break}case T.TEXT:{Tf(this,t);break}case T.IN_TABLE:{gn(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.IN_CAPTION:{Lf(this,t);break}case T.IN_COLUMN_GROUP:{Of(this,t);break}case T.IN_TABLE_BODY:{Wr(this,t);break}case T.IN_ROW:{zu(this,t);break}case T.IN_CELL:{Df(this,t);break}case T.IN_SELECT:{Yu(this,t);break}case T.IN_SELECT_IN_TABLE:{Mf(this,t);break}case T.IN_TEMPLATE:{Bf(this,t);break}case T.AFTER_BODY:{Vu(this,t);break}case T.IN_FRAMESET:{Uf(this,t);break}case T.AFTER_FRAMESET:{zf(this,t);break}case T.AFTER_AFTER_BODY:{Hn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Vt(this,t);break}case T.BEFORE_HTML:{rn(this,t);break}case T.BEFORE_HEAD:{an(this,t);break}case T.IN_HEAD:{sn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{un(this,t);break}case T.AFTER_HEAD:{on(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Fu(this,t);break}case T.TEXT:{xf(this,t);break}case T.IN_TABLE_TEXT:{Wt(this,t);break}case T.IN_TEMPLATE:{qu(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{wi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Du(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{_r(this,t);break}case T.IN_TABLE_TEXT:{Hu(this,t);break}}}}function gd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Bu(e,t),n}function Ed(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function bd(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=pd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Td(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Td(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function xd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ht(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function _d(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Si(e,t){for(let n=0;n<fd;n++){const r=gd(e,t);if(!r)break;const i=Ed(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=bd(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&xd(e,s,a),_d(e,i,r)}}function Vr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ad(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kd(e,t){e._appendCommentNode(t,e.document)}function wi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function yd(e,t){e._setDocumentType(t);const n=t.forceQuirks?De.QUIRKS:ed(t);Jh(t)||e._err(t,S.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Vt(e,t){e._err(t,S.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,De.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Cd(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):rn(e,t)}function Nd(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&rn(e,t)}function rn(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Id(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:an(e,t)}}function Sd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?an(e,t):e._err(t,S.endTagWithoutMatchingOpenElement)}function an(e,t){e._insertFakeElement(k.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function je(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,fe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:sn(e,t)}}function wd(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{sn(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function At(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,S.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,S.endTagWithoutMatchingOpenElement)}function sn(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Ld(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{je(e,t);break}case l.NOSCRIPT:{e._err(t,S.nestedNoscriptInHead);break}default:un(e,t)}}function Od(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{un(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function un(e,t){const n=t.type===X.EOF?S.openElementsLeftAfterEof:S.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function Rd(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,S.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),je(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,S.misplacedStartTagForHeadElement);break}default:on(e,t)}}function Dd(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{on(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,S.endTagWithoutMatchingOpenElement)}}function on(e,t){e._insertFakeElement(k.BODY,l.BODY),e.insertionMode=T.IN_BODY,ar(e,t)}function ar(e,t){switch(t.type){case X.CHARACTER:{Pu(e,t);break}case X.WHITESPACE_CHARACTER:{Du(e,t);break}case X.COMMENT:{Vr(e,t);break}case X.START_TAG:{Te(e,t);break}case X.END_TAG:{sr(e,t);break}case X.EOF:{Fu(e,t);break}}}function Du(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Pu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Pd(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Md(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function vd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function Bd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Fd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&qr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function Hd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ud(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function jd(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function zd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=fe.PLAINTEXT}function $d(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function Yd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(k.A);n&&(Si(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Vd(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Si(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Gd(e,t){e.treeAdapter.getDocumentMode(e.document)!==De.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Mu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vu(e){const t=yu(e,mt.TYPE);return t!=null&&t.toLowerCase()===dd}function Qd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),vu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Kd(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Xd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Zd(e,t){t.tagName=k.IMG,t.tagID=l.IMG,Mu(e,t)}function Jd(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function ef(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function tf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Ua(e,t){e._switchToTextParsing(t,fe.RAWTEXT)}function nf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function rf(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function af(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function sf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function uf(e,t){e._reconstructActiveFormattingElements(),Lu(t),Ii(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function of(e,t){e._reconstructActiveFormattingElements(),Ou(t),Ii(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function ja(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Te(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{qd(e,t);break}case l.A:{Yd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Fd(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Bd(e,t);break}case l.LI:case l.DD:case l.DT:{jd(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Mu(e,t);break}case l.HR:{Xd(e,t);break}case l.RB:case l.RTC:{af(e,t);break}case l.RT:case l.RP:{sf(e,t);break}case l.PRE:case l.LISTING:{Hd(e,t);break}case l.XMP:{ef(e,t);break}case l.SVG:{of(e,t);break}case l.HTML:{Pd(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{je(e,t);break}case l.BODY:{Md(e,t);break}case l.FORM:{Ud(e,t);break}case l.NOBR:{Vd(e,t);break}case l.MATH:{uf(e,t);break}case l.TABLE:{Gd(e,t);break}case l.INPUT:{Qd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Kd(e,t);break}case l.IMAGE:{Zd(e,t);break}case l.BUTTON:{$d(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Wd(e,t);break}case l.IFRAME:{tf(e,t);break}case l.SELECT:{nf(e,t);break}case l.OPTION:case l.OPTGROUP:{rf(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Ua(e,t);break}case l.FRAMESET:{vd(e,t);break}case l.TEXTAREA:{Jd(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Ua(e,t):ja(e,t);break}case l.PLAINTEXT:{zd(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:ja(e,t)}}function lf(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,Vu(e,t))}function hf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function df(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function ff(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(k.P,l.P),e._closePElement()}function pf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function mf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function gf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Ef(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(k.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Bu(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function sr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Si(e,t);break}case l.P:{ff(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{hf(e,t);break}case l.LI:{pf(e);break}case l.DD:case l.DT:{mf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{gf(e);break}case l.BR:{bf(e);break}case l.BODY:{lf(e,t);break}case l.HTML:{cf(e,t);break}case l.FORM:{df(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Ef(e,t);break}case l.TEMPLATE:{At(e,t);break}default:Bu(e,t)}}function Fu(e,t){e.tmplInsertionModeStack.length>0?qu(e,t):wi(e,t)}function Tf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function xf(e,t){e._err(t,S.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _r(e,t){if(e.openElements.currentTagId!==void 0&&Ru.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case X.CHARACTER:{Uu(e,t);break}case X.WHITESPACE_CHARACTER:{Hu(e,t);break}}else kn(e,t)}function _f(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function Af(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function kf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(k.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Li(e,t)}function yf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function Cf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(k.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,ur(e,t)}function Nf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function If(e,t){vu(t)?e._appendElement(t,D.HTML):kn(e,t),t.ackSelfClosing=!0}function Sf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Mt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{Cf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{je(e,t);break}case l.COL:{kf(e,t);break}case l.FORM:{Sf(e,t);break}case l.TABLE:{Nf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{yf(e,t);break}case l.INPUT:{If(e,t);break}case l.CAPTION:{_f(e,t);break}case l.COLGROUP:{Af(e,t);break}default:kn(e,t)}}function gn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:kn(e,t)}}function kn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ar(e,t),e.fosterParentingEnabled=n}function Hu(e,t){e.pendingCharacterTokens.push(t)}function Uu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)kn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ju=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function wf(e,t){const n=t.tagID;ju.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,Mt(e,t)):Te(e,t)}function Lf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&gn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:sr(e,t)}}function Li(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{je(e,t);break}default:qn(e,t)}}function Of(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{At(e,t);break}case l.COL:break;default:qn(e,t)}}function qn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function ur(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(k.TR,l.TR),e.insertionMode=T.IN_ROW,or(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,Mt(e,t));break}default:Mt(e,t)}}function Wr(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,gn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:gn(e,t)}}function or(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ur(e,t));break}default:Mt(e,t)}}function zu(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Wr(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Wr(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:gn(e,t)}}function Rf(e,t){const n=t.tagID;ju.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),or(e,t)):Te(e,t)}function Df(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),zu(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:sr(e,t)}}function $u(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{je(e,t);break}}}function Yu(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{At(e,t);break}}}function Pf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$u(e,t)}function Mf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Yu(e,t)}function vf(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{je(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,Mt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Li(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,ur(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,or(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,Te(e,t)}}function Bf(e,t){t.tagID===l.TEMPLATE&&At(e,t)}function qu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wi(e,t)}function Ff(e,t){t.tagID===l.HTML?Te(e,t):Vn(e,t)}function Vu(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Vn(e,t)}function Vn(e,t){e.insertionMode=T.IN_BODY,ar(e,t)}function Hf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{je(e,t);break}}}function Uf(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function jf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.NOFRAMES:{je(e,t);break}}}function zf(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function $f(e,t){t.tagID===l.HTML?Te(e,t):Hn(e,t)}function Hn(e,t){e.insertionMode=T.IN_BODY,ar(e,t)}function Yf(e,t){switch(t.tagID){case l.HTML:{Te(e,t);break}case l.NOFRAMES:{je(e,t);break}}}function qf(e,t){t.chars=le,e._insertCharacters(t)}function Vf(e,t){e._insertCharacters(t),e.framesetOk=!1}function Wu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Wf(e,t){if(ud(t))Wu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Lu(t):r===D.SVG&&(od(t),Ou(t)),Ii(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Gf(e,t){if(t.tagID===l.P||t.tagID===l.BR){Wu(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}k.AREA,k.BASE,k.BASEFONT,k.BGSOUND,k.BR,k.COL,k.EMBED,k.FRAME,k.HR,k.IMG,k.INPUT,k.KEYGEN,k.LINK,k.META,k.PARAM,k.SOURCE,k.TRACK,k.WBR;const lr=Gu("end"),qe=Gu("start");function Gu(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Qu(e){const t=qe(e),n=lr(e);if(t&&n)return{start:t,end:n}}const Qf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Kf=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),za={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ku(e,t){const n=s0(e),r=Tu("type",{handlers:{root:Xf,element:Zf,text:Jf,comment:Zu,doctype:e0,raw:n0},unknown:r0}),i={parser:n?new Ha(za):Ha.getFragmentParser(void 0,za),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),Ut(i,qe());const a=n?i.parser.document:i.parser.getFragment(),s=sh(a,{file:i.options.file});return i.stitches&&at(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Xu(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Xf(e,t){Xu(e.children,t)}function Zf(e,t){i0(e,t),Xu(e.children,t),a0(e,t)}function Jf(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:X.CHARACTER,chars:e.value,location:yn(e)};Ut(t,qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function e0(e,t){const n={type:X.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yn(e)};Ut(t,qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function t0(e,t){t.stitches=!0;const n=u0(e);if("children"in e&&"children"in n){const r=Ku({type:"root",children:e.children},t.options);n.children=r.children}Zu({type:"comment",value:{stitch:n}},t)}function Zu(e,t){const n=e.value,r={type:X.COMMENT,data:n,location:yn(e)};Ut(t,qe(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function n0(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Ju(t,qe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Qf,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function r0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))t0(n,t);else{let r="";throw Kf.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Ut(e,t){Ju(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=fe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Ju(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function i0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fe.PLAINTEXT)return;Ut(t,qe(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:pt.html;i===pt.html&&n==="svg"&&(i=pt.svg);const a=hh({...e,children:[]},{space:i===pt.svg?"svg":"html"}),s={type:X.START_TAG,tagName:n,tagID:Ht(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:yn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function a0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Th.includes(n)||t.parser.tokenizer.state===fe.PLAINTEXT)return;Ut(t,lr(e));const r={type:X.END_TAG,tagName:n,tagID:Ht(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:yn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fe.RCDATA||t.parser.tokenizer.state===fe.RAWTEXT||t.parser.tokenizer.state===fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=fe.DATA)}function s0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function yn(e){const t=qe(e)||{line:void 0,column:void 0,offset:void 0},n=lr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function u0(e){return"children"in e?Et({...e,children:[]}):Et(e)}function Gr(e){return function(t,n){return Ku(t,{...e,file:n})}}const ht=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ln={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ht,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ht],h2:[["className","sr-only"]],img:[...ht,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ht,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ht],table:[...ht],ul:[...ht,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},rt={}.hasOwnProperty;function o0(e,t){let n={type:"root",children:[]};const r={schema:t?{...ln,...t}:ln,stack:[]},i=eo(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function eo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return l0(e,n);case"doctype":return c0(e,n);case"element":return h0(e,n);case"root":return d0(e,n);case"text":return f0(e,n)}}}function l0(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Cn(a,t),a}}function c0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Cn(n,t),n}}function h0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=to(e,t.children),i=p0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&rt.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Cn(s,t),s}function d0(e,t){const r={type:"root",children:to(e,t.children)};return Cn(r,t),r}function f0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Cn(r,t),r}function to(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=eo(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function p0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&rt.call(r,n)?r[n]:void 0,s=r&&rt.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(rt.call(u,c)){const h=u[c];let d=$a(e,Ya(a,c),c,h);d==null&&(d=$a(e,Ya(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&rt.call(i,n)){const h=i[n];for(c in h)rt.call(h,c)&&!rt.call(o,c)&&(o[c]=h[c])}return o}function $a(e,t,n,r){return t?Array.isArray(r)?m0(e,t,n,r):no(e,t,n,r):void 0}function m0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=no(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function no(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&g0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function g0(e,t,n){const r=e.schema.protocols&&rt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Cn(e,t){const n=Qu(t);t.data&&(e.data=Et(t.data)),n&&(e.position=n)}function Ya(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function ro(e){return function(t){return o0(t,e)}}function qa(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ae=ot(/[A-Za-z]/),be=ot(/[\dA-Za-z]/),E0=ot(/[#-'*+\--9=?A-Z^-~]/);function Wn(e){return e!==null&&(e<32||e===127)}const Qr=ot(/\d/),b0=ot(/[\dA-Fa-f]/),T0=ot(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function ue(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const cr=ot(new RegExp("\\p{P}|\\p{S}","u")),bt=ot(/\s/);function ot(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function x0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _0(e,t,n){const i=tr((n||{}).ignore||[]),a=A0(t);let s=-1;for(;++s<a.length;)Ti(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],b=f?f.children:void 0;if(i(p,b?b.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let b=0;const N=d.children.indexOf(c);let y=!1,R=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const H=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=p(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=H+1:(b!==H&&R.push({type:"text",value:c.value.slice(b,H)}),Array.isArray(w)?R.push(...w):w&&R.push(w),b=H+L[0].length,y=!0),!f.global)break;L=f.exec(c.value)}return y?(b<c.value.length&&R.push({type:"text",value:c.value.slice(b)}),d.children.splice(N,1,...R)):R=[c],N+R.length}}function A0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([k0(i[0]),y0(i[1])])}return t}function k0(e){return typeof e=="string"?new RegExp(x0(e),"g"):e}function y0(e){return typeof e=="function"?e:function(){return e}}const Ar="phrasing",kr=["autolink","link","image","label"];function C0(){return{transforms:[R0],enter:{literalAutolink:I0,literalAutolinkEmail:yr,literalAutolinkHttp:yr,literalAutolinkWww:yr},exit:{literalAutolink:O0,literalAutolinkEmail:L0,literalAutolinkHttp:S0,literalAutolinkWww:w0}}}function N0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ar,notInConstruct:kr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ar,notInConstruct:kr},{character:":",before:"[ps]",after:"\\/",inConstruct:Ar,notInConstruct:kr}]}}function I0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function yr(e){this.config.enter.autolinkProtocol.call(this,e)}function S0(e){this.config.exit.autolinkProtocol.call(this,e)}function w0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function L0(e){this.config.exit.autolinkEmail.call(this,e)}function O0(e){this.exit(e)}function R0(e){_0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,D0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),P0]],{ignore:["link","linkReference"]})}function D0(e,t,n,r,i){let a="";if(!io(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!M0(n)))return!1;const s=v0(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function P0(e,t,n,r){return!io(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function M0(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function v0(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=qa(e,"(");let a=qa(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function io(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bt(n)||cr(n))&&(!t||n!==47)}function Ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ao.peek=q0;function B0(){this.buffer()}function F0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H0(){this.buffer()}function U0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function j0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z0(e){this.exit(e)}function $0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Y0(e){this.exit(e)}function q0(){return"["}function ao(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function V0(){return{enter:{gfmFootnoteCallString:B0,gfmFootnoteCall:F0,gfmFootnoteDefinitionLabelString:H0,gfmFootnoteDefinition:U0},exit:{gfmFootnoteCallString:j0,gfmFootnoteCall:z0,gfmFootnoteDefinitionLabelString:$0,gfmFootnoteDefinition:Y0}}}function W0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ao},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
|
|
4
|
+
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?so:G0))),c(),o}}function G0(e,t,n){return t===0?e:so(e,t,n)}function so(e,t,n){return(n?"":" ")+e}const Q0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uo.peek=ep;function K0(){return{canContainEols:["delete"],enter:{strikethrough:Z0},exit:{strikethrough:J0}}}function X0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Q0}],handlers:{delete:uo}}}function Z0(e){this.enter({type:"delete",children:[]},e)}function J0(e){this.exit(e)}function uo(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function ep(){return"~"}function tp(e){return e.length}function np(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||tp,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const A=[],N=[];let y=-1;for(e[h].length>c&&(c=e[h].length);++y<e[h].length;){const R=rp(e[h][y]);if(n.alignDelimiters!==!1){const L=i(R);N[y]=L,(o[y]===void 0||L>o[y])&&(o[y]=L)}A.push(R)}s[h]=A,u[h]=N}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=Va(r[d]);else{const A=Va(r);for(;++d<c;)a[d]=A}d=-1;const f=[],p=[];for(;++d<c;){const A=a[d];let N="",y="";A===99?(N=":",y=":"):A===108?N=":":A===114&&(y=":");let R=n.alignDelimiters===!1?1:Math.max(1,o[d]-N.length-y.length);const L=N+"-".repeat(R)+y;n.alignDelimiters!==!1&&(R=N.length+R+y.length,R>o[d]&&(o[d]=R),p[d]=R),f[d]=L}s.splice(1,0,f),u.splice(1,0,p),h=-1;const b=[];for(;++h<s.length;){const A=s[h],N=u[h];d=-1;const y=[];for(;++d<c;){const R=A[d]||"";let L="",H="";if(n.alignDelimiters!==!1){const j=o[d]-(N[d]||0),w=a[d];w===114?L=" ".repeat(j):w===99?j%2?(L=" ".repeat(j/2+.5),H=" ".repeat(j/2-.5)):(L=" ".repeat(j/2),H=L):H=" ".repeat(j)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(L),y.push(R),n.alignDelimiters!==!1&&y.push(H),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}b.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return b.join(`
|
|
5
|
+
`)}function rp(e){return e==null?"":String(e)}function Va(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ip(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),ap);return i(),s}function ap(e,t,n){return">"+(n?"":" ")+e}function sp(e,t){return Wa(e,t.inConstruct,!0)&&!Wa(e,t.notInConstruct,!1)}function Wa(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ga(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
6
6
|
`&&sp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
7
7
|
`}function up(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function op(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lp(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cp(e,t,n,r){const i=lp(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(op(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(a,hp);return d(),f}const u=n.createTracker(r),o=i.repeat(Math.max(up(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
|
|
8
8
|
`,encode:["`"],...u.current()})),d()}return h+=u.move(`
|
|
9
9
|
`),a&&(h+=u.move(a+`
|
|
10
|
-
`)),h+=u.move(o),c(),h}function hp(e,t,n){return(n?"":" ")+e}function
|
|
11
|
-
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function fp(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function En(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vt(e){if(e===null||ue(e)||bt(e))return 1;if(cr(e))return 2}function Gn(e,t,n){const r=vt(e),i=vt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}
|
|
10
|
+
`)),h+=u.move(o),c(),h}function hp(e,t,n){return(n?"":" ")+e}function Oi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dp(e,t,n,r){const i=Oi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
11
|
+
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function fp(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function En(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vt(e){if(e===null||ue(e)||bt(e))return 1;if(cr(e))return 2}function Gn(e,t,n){const r=vt(e),i=vt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}oo.peek=pp;function oo(e,t,n,r){const i=fp(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Gn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=En(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Gn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+En(d));const p=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function pp(e,t,n){return n.options.emphasis||"*"}const mp={};function Ri(e,t){const n=mp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lo(e,r,i)}function lo(e,t,n){if(gp(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qa(e.children,t,n)}return Array.isArray(e)?Qa(e,t,n):""}function Qa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lo(e[i],t,n);return r.join("")}function gp(e){return!!(e&&typeof e=="object")}function Ep(e,t){let n=!1;return at(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ur}),!!((!e.depth||e.depth<3)&&Ri(e)&&(t.options.setext||n))}function bp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ep(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
|
|
12
12
|
`,after:`
|
|
13
13
|
`});return d(),h(),f+`
|
|
14
14
|
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
15
15
|
`))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
-
`,...a.current()});return/^[\t ]/.test(c)&&(c=En(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),o(),u(),c}
|
|
16
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=En(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),o(),u(),c}co.peek=Tp;function co(e){return e.value||""}function Tp(){return"<"}ho.peek=xp;function ho(e,t,n,r){const i=Oi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),s(),c}function xp(){return"!"}fo.peek=_p;function fo(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function _p(){return"!"}po.peek=Ap;function po(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function Ap(){return"`"}function mo(e,t){const n=Ri(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}go.peek=kp;function go(e,t,n,r){const i=Oi(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(mo(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(o=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),o()),c+=s.move(")"),u(),c}function kp(e,t,n){return mo(e,n)?"<":"["}Eo.peek=yp;function Eo(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function yp(){return"["}function Di(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Cp(e){const t=Di(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Np(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function bo(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ip(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Np(n):Di(n);const u=e.ordered?s==="."?")":".":Cp(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),bo(n)===s&&h){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function Sp(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function wp(e,t,n,r){const i=Sp(n);let a=n.bulletCurrent||Di(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?a:a+" ".repeat(s-a.length))+d}}function Lp(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Op=tr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rp(e,t,n,r){return(e.children.some(function(s){return Op(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Dp(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}To.peek=Pp;function To(e,t,n,r){const i=Dp(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=Gn(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=En(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Gn(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+En(d));const p=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function Pp(e,t,n){return n.options.strong||"*"}function Mp(e,t,n,r){return n.safe(e.value,r)}function vp(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Bp(e,t,n){const r=(bo(n)+(n.options.ruleSpaces?" ":"")).repeat(vp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const xo={blockquote:ip,break:Ga,code:cp,definition:dp,emphasis:oo,hardBreak:Ga,heading:bp,html:co,image:ho,imageReference:fo,inlineCode:po,link:go,linkReference:Eo,list:Ip,listItem:wp,paragraph:Lp,root:Rp,strong:To,text:Mp,thematicBreak:Bp},Ka=document.createElement("i");function Pi(e){const t="&"+e+";";Ka.innerHTML=t;const n=Ka.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function _o(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Fp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hp(e){return e.replace(Fp,Up)}function Up(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return _o(n.slice(a?2:1),a?16:10)}return Pi(n)||e}function jp(){return{enter:{table:zp,tableData:Xa,tableHeader:Xa,tableRow:Yp},exit:{codeText:qp,table:$p,tableData:Cr,tableHeader:Cr,tableRow:Cr}}}function zp(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $p(e){this.exit(e),this.data.inTable=void 0}function Yp(e){this.enter({type:"tableRow",children:[]},e)}function Cr(e){this.exit(e)}function Xa(e){this.enter({type:"tableCell",children:[]},e)}function qp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Vp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Vp(e,t){return t==="|"?t:e}function Wp(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
17
17
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:u}};function s(p,b,A,N){return c(h(p,A,N),p.align)}function u(p,b,A,N){const y=d(p,A,N),R=c([y]);return R.slice(0,R.indexOf(`
|
|
18
|
-
`))}function o(p,b,A,N){const y=A.enter("tableCell"),R=A.enter("phrasing"),L=A.containerPhrasing(p,{...N,before:a,after:a});return R(),y(),L}function c(p,b){return np(p,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(p,b,A){const N=p.children;let y=-1;const R=[],L=b.enter("table");for(;++y<N.length;)R[y]=d(N[y],b,A);return L(),R}function d(p,b,A){const N=p.children;let y=-1;const R=[],L=b.enter("tableRow");for(;++y<N.length;)R[y]=o(N[y],p,b,A);return L(),R}function f(p,b,A){let N=To.inlineCode(p,b,A);return A.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function Gp(){return{exit:{taskListCheckValueChecked:Ka,taskListCheckValueUnchecked:Ka,paragraph:Kp}}}function Qp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Xp}}}function Ka(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Kp(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Xp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=To.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function Zp(){return[C0(),V0(),K0(),jp(),Gp()]}function Jp(e){return{extensions:[N0(),W0(e),X0(),Wp(e),Qp()]}}function Re(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Pe(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Xa={}.hasOwnProperty;function _o(e){const t={};let n=-1;for(;++n<e.length;)em(t,e[n]);return t}function em(e,t){let n;for(n in t){const i=(Xa.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Xa.call(i,s)||(i[s]=[]);const u=a[s];tm(i[s],Array.isArray(u)?u:u?[u]:[])}}}function tm(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Re(e,0,0,r)}const nm={tokenize:om,partial:!0},Ao={tokenize:lm,partial:!0},ko={tokenize:cm,partial:!0},yo={tokenize:hm,partial:!0},rm={tokenize:dm,partial:!0},Co={name:"wwwAutolink",tokenize:sm,previous:Io},No={name:"protocolAutolink",tokenize:um,previous:So},Ze={name:"emailAutolink",tokenize:am,previous:wo},Ve={};function im(){return{text:Ve}}let dt=48;for(;dt<123;)Ve[dt]=Ze,dt++,dt===58?dt=65:dt===91&&(dt=97);Ve[43]=Ze;Ve[45]=Ze;Ve[46]=Ze;Ve[95]=Ze;Ve[72]=[Ze,No];Ve[104]=[Ze,No];Ve[87]=[Ze,Co];Ve[119]=[Ze,Co];function am(e,t,n){const r=this;let i,a;return s;function s(d){return!Kr(d)||!wo.call(r,r.previous)||Di(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return Kr(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(rm,h,c)(d):d===45||d===95||be(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&Ae(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function sm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Io.call(r,r.previous)||Di(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nm,e.attempt(Ao,e.attempt(ko,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function um(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&So.call(r,r.previous)&&!Di(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ae(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Wn(d)||ue(d)||bt(d)||cr(d)?n(d):e.attempt(Ao,e.attempt(ko,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function om(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function lm(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(yo,o,u)(c):c===null||ue(c)||bt(c)||c!==45&&cr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function cm(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(yo,t,a)(s):s===null||ue(s)||bt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function hm(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||ue(u)||bt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ue(u)||bt(u)?t(u):r(u)}function a(u){return Ae(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ae(u)?(e.consume(u),s):n(u)}}function dm(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return be(a)?n(a):t(a)}}function Io(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ue(e)}function So(e){return!Ae(e)}function wo(e){return!(e===47||Kr(e))}function Kr(e){return e===43||e===45||e===46||e===95||be(e)}function Di(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function jt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&be(e.charCodeAt(n+1))&&be(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function hr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Xr={name:"attention",resolveAll:fm,tokenize:pm};function fm(e,t){let n=-1,r,i,a,s,u,o,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Za(d,-o),Za(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Pe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Pe(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Pe(c,hr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Pe(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Pe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Re(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vt(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=vt(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!f)),c._close=!!(a===42?f:f&&(h||!d)),t(o)}}function Za(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mm={name:"autolink",tokenize:gm};function gm(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Ae(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||be(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||be(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Wn(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),h):E0(p)?(e.consume(p),c):n(p)}function h(p){return be(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||be(p))&&r++<63){const b=p===45?f:d;return e.consume(p),b}return n(p)}}function ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return Z(o)?(e.enter(n),u(o)):t(o)}function u(o){return Z(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Nn={partial:!0,tokenize:Em};function Em(e,t,n){return r;function r(a){return Z(a)?ee(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||$(a)?t(a):n(a)}}const Lo={continuation:{tokenize:Tm},exit:xm,name:"blockQuote",tokenize:bm};function bm(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Tm(e,t,n){const r=this;return i;function i(s){return Z(s)?ee(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Lo,t,n)(s)}}function xm(e){e.exit("blockQuote")}const Oo={name:"characterEscape",tokenize:_m};function _m(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return T0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ro={name:"characterReference",tokenize:Am};function Am(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=be,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=b0,h):(e.enter("characterReferenceValue"),a=7,s=Qr,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===be&&!Ri(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const Ja={partial:!0,tokenize:ym},es={concrete:!0,name:"codeFenced",tokenize:km};function km(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),Z(w)?ee(e,d,"whitespace")(w):d(w))}function d(w){return w===null||$(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Ja,A,H)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||$(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):Z(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ee(e,p,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),f)}function p(w){return w===null||$(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||$(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),b)}function A(w){return e.attempt(i,H,N)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return a>0&&Z(w)?ee(e,R,"linePrefix",a+1)(w):R(w)}function R(w){return w===null||$(w)?e.check(Ja,A,H)(w):(e.enter("codeFlowValue"),L(w))}function L(w){return w===null||$(w)?(e.exit("codeFlowValue"),R(w)):(e.consume(w),L)}function H(w){return e.exit("codeFenced"),t(w)}function j(w,W,V){let K=0;return I;function I(F){return w.enter("lineEnding"),w.consume(F),w.exit("lineEnding"),U}function U(F){return w.enter("codeFencedFence"),Z(F)?ee(w,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):v(F)}function v(F){return F===u?(w.enter("codeFencedFenceSequence"),Y(F)):V(F)}function Y(F){return F===u?(K++,w.consume(F),Y):K>=s?(w.exit("codeFencedFenceSequence"),Z(F)?ee(w,z,"whitespace")(F):z(F)):V(F)}function z(F){return F===null||$(F)?(w.exit("codeFencedFence"),W(F)):V(F)}}}function ym(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Nr={name:"codeIndented",tokenize:Nm},Cm={partial:!0,tokenize:Im};function Nm(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ee(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):$(c)?e.attempt(Cm,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||$(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function Im(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):$(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ee(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):$(s)?i(s):n(s)}}const Sm={name:"codeText",previous:Lm,resolve:wm,tokenize:Om};function wm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Lm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Om(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||$(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class Rm{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Gt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Gt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gt(this.left,n.reverse())}}}function Gt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Do(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new Rm(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Dm(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Re(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Dm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],c={};let h,d,f=-1,p=n,b=0,A=0;const N=[A];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(A=f+1,N.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):N.pop(),f=N.length;f--;){const y=u.slice(N[f],N[f+1]),R=a.pop();o.push([R,R+y.length-1]),e.splice(R,2,y)}for(o.reverse(),f=-1;++f<o.length;)c[b+o[f][0]]=b+o[f][1],b+=o[f][1]-o[f][0]-1;return c}const Pm={resolve:vm,tokenize:Bm},Mm={partial:!0,tokenize:Fm};function vm(e){return Do(e),e}function Bm(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):$(u)?e.check(Mm,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Fm(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ee(e,a,"linePrefix")}function a(s){if(s===null||$(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Po(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===32||y===41||Wn(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),A(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(u),f(y)):y===null||y===60||$(y)?n(y):(e.consume(y),y===92?b:p)}function b(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function A(y){return!h&&(y===null||y===41||ue(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):h<c&&y===40?(e.consume(y),h++,A):y===41?(e.consume(y),h--,A):y===null||y===32||y===40||Wn(y)?n(y):(e.consume(y),y===92?N:A)}function N(y){return y===40||y===41||y===92?(e.consume(y),A):A(y)}}function Mo(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),h}function h(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):$(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||$(p)||u++>999?(e.exit("chunkString"),h(p)):(e.consume(p),o||(o=!Z(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),u++,d):d(p)}}function vo(e,t,n,r,i,a){let s;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),o(s)):f===null?n(f):$(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ee(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===s||f===null||$(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===s||f===92?(e.consume(f),h):h(f)}}function cn(e,t){let n;return r;function r(i){return $(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Hm={name:"definition",tokenize:jm},Um={partial:!0,tokenize:zm};function jm(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return Mo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Ue(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return ue(p)?cn(e,c)(p):c(p)}function c(p){return Po(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(Um,d,d)(p)}function d(p){return Z(p)?ee(e,f,"whitespace")(p):f(p)}function f(p){return p===null||$(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function zm(e,t,n){return r;function r(u){return ue(u)?cn(e,i)(u):n(u)}function i(u){return vo(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Z(u)?ee(e,s,"whitespace")(u):s(u)}function s(u){return u===null||$(u)?t(u):n(u)}}const $m={name:"hardBreakEscape",tokenize:Ym};function Ym(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return $(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const qm={name:"headingAtx",resolve:Vm,tokenize:Wm};function Vm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Re(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Wm(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||ue(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||$(h)?(e.exit("atxHeading"),t(h)):Z(h)?ee(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||ue(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const Gm=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ts=["pre","script","style","textarea"],Qm={concrete:!0,name:"htmlFlow",resolveTo:Zm,tokenize:Jm},Km={partial:!0,tokenize:t1},Xm={partial:!0,tokenize:e1};function Zm(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Jm(e,t,n){const r=this;let i,a,s,u,o;return c;function c(_){return h(_)}function h(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),a=!0,A):_===63?(e.consume(_),i=3,r.interrupt?t:x):Ae(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function f(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,u=0,b):Ae(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function b(_){const Be="CDATA[";return _===Be.charCodeAt(u++)?(e.consume(_),u===Be.length?r.interrupt?t:v:b):n(_)}function A(_){return Ae(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function N(_){if(_===null||_===47||_===62||ue(_)){const Be=_===47,lt=s.toLowerCase();return!Be&&!a&&ts.includes(lt)?(i=1,r.interrupt?t(_):v(_)):Gm.includes(s.toLowerCase())?(i=6,Be?(e.consume(_),y):r.interrupt?t(_):v(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?R(_):L(_))}return _===45||be(_)?(e.consume(_),s+=String.fromCharCode(_),N):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:v):n(_)}function R(_){return Z(_)?(e.consume(_),R):I(_)}function L(_){return _===47?(e.consume(_),I):_===58||_===95||Ae(_)?(e.consume(_),H):Z(_)?(e.consume(_),L):I(_)}function H(_){return _===45||_===46||_===58||_===95||be(_)?(e.consume(_),H):j(_)}function j(_){return _===61?(e.consume(_),w):Z(_)?(e.consume(_),j):L(_)}function w(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,W):Z(_)?(e.consume(_),w):V(_)}function W(_){return _===o?(e.consume(_),o=null,K):_===null||$(_)?n(_):(e.consume(_),W)}function V(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||ue(_)?j(_):(e.consume(_),V)}function K(_){return _===47||_===62||Z(_)?L(_):n(_)}function I(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||$(_)?v(_):Z(_)?(e.consume(_),U):n(_)}function v(_){return _===45&&i===2?(e.consume(_),ne):_===60&&i===1?(e.consume(_),ce):_===62&&i===4?(e.consume(_),Se):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),ie):$(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Km,We,Y)(_)):_===null||$(_)?(e.exit("htmlFlowData"),Y(_)):(e.consume(_),v)}function Y(_){return e.check(Xm,z,We)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),F}function F(_){return _===null||$(_)?Y(_):(e.enter("htmlFlowData"),v(_))}function ne(_){return _===45?(e.consume(_),x):v(_)}function ce(_){return _===47?(e.consume(_),s="",Ie):v(_)}function Ie(_){if(_===62){const Be=s.toLowerCase();return ts.includes(Be)?(e.consume(_),Se):v(_)}return Ae(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),Ie):v(_)}function ie(_){return _===93?(e.consume(_),x):v(_)}function x(_){return _===62?(e.consume(_),Se):_===45&&i===2?(e.consume(_),x):v(_)}function Se(_){return _===null||$(_)?(e.exit("htmlFlowData"),We(_)):(e.consume(_),Se)}function We(_){return e.exit("htmlFlow"),t(_)}}function e1(e,t,n){const r=this;return i;function i(s){return $(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function t1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nn,t,n)}}const n1={name:"htmlText",tokenize:r1};function r1(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),L):Ae(x)?(e.consume(x),V):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,b):Ae(x)?(e.consume(x),R):n(x)}function h(x){return x===45?(e.consume(x),p):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):$(x)?(s=d,ce(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),p):d(x)}function p(x){return x===62?ne(x):x===45?f(x):d(x)}function b(x){const Se="CDATA[";return x===Se.charCodeAt(a++)?(e.consume(x),a===Se.length?A:b):n(x)}function A(x){return x===null?n(x):x===93?(e.consume(x),N):$(x)?(s=A,ce(x)):(e.consume(x),A)}function N(x){return x===93?(e.consume(x),y):A(x)}function y(x){return x===62?ne(x):x===93?(e.consume(x),y):A(x)}function R(x){return x===null||x===62?ne(x):$(x)?(s=R,ce(x)):(e.consume(x),R)}function L(x){return x===null?n(x):x===63?(e.consume(x),H):$(x)?(s=L,ce(x)):(e.consume(x),L)}function H(x){return x===62?ne(x):L(x)}function j(x){return Ae(x)?(e.consume(x),w):n(x)}function w(x){return x===45||be(x)?(e.consume(x),w):W(x)}function W(x){return $(x)?(s=W,ce(x)):Z(x)?(e.consume(x),W):ne(x)}function V(x){return x===45||be(x)?(e.consume(x),V):x===47||x===62||ue(x)?K(x):n(x)}function K(x){return x===47?(e.consume(x),ne):x===58||x===95||Ae(x)?(e.consume(x),I):$(x)?(s=K,ce(x)):Z(x)?(e.consume(x),K):ne(x)}function I(x){return x===45||x===46||x===58||x===95||be(x)?(e.consume(x),I):U(x)}function U(x){return x===61?(e.consume(x),v):$(x)?(s=U,ce(x)):Z(x)?(e.consume(x),U):K(x)}function v(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,Y):$(x)?(s=v,ce(x)):Z(x)?(e.consume(x),v):(e.consume(x),z)}function Y(x){return x===i?(e.consume(x),i=void 0,F):x===null?n(x):$(x)?(s=Y,ce(x)):(e.consume(x),Y)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ue(x)?K(x):(e.consume(x),z)}function F(x){return x===47||x===62||ue(x)?K(x):n(x)}function ne(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function ce(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ie}function Ie(x){return Z(x)?ee(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):ie(x)}function ie(x){return e.enter("htmlTextData"),s(x)}}const Pi={name:"labelEnd",resolveAll:u1,resolveTo:o1,tokenize:l1},i1={tokenize:c1},a1={tokenize:h1},s1={tokenize:d1};function u1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Re(e,0,e.length,n),e}function o1(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=Pe(u,e.slice(a+1,a+r+3)),u=Pe(u,[["enter",h,t]]),u=Pe(u,hr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Pe(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=Pe(u,e.slice(s+1)),u=Pe(u,[["exit",o,t]]),Re(e,a,e.length,u),e}function l1(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(f){return a?a._inactive?d(f):(s=r.parser.defined.includes(Ue(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(i1,h,s?h:d)(f):f===91?e.attempt(a1,h,s?c:d)(f):s?h(f):d(f)}function c(f){return e.attempt(s1,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function c1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ue(d)?cn(e,a)(d):a(d)}function a(d){return d===41?h(d):Po(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ue(d)?cn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?vo(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return ue(d)?cn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function h1(e,t,n){const r=this;return i;function i(u){return Mo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Ue(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function d1(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const f1={name:"labelStartImage",resolveAll:Pi.resolveAll,tokenize:p1};function p1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const m1={name:"labelStartLink",resolveAll:Pi.resolveAll,tokenize:g1};function g1(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ir={name:"lineEnding",tokenize:E1};function E1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ee(e,t,"linePrefix")}}const Un={name:"thematicBreak",tokenize:b1};function b1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||$(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),Z(c)?ee(e,u,"whitespace")(c):u(c))}}const Ce={continuation:{tokenize:A1},exit:y1,name:"list",tokenize:_1},T1={partial:!0,tokenize:C1},x1={partial:!0,tokenize:k1};function _1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Qr(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Un,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Qr(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Nn,r.interrupt?n:h,e.attempt(T1,f,d))}function h(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function A1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nn,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ee(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Z(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(x1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ee(e,e.attempt(Ce,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function k1(e,t,n){const r=this;return ee(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function y1(e){e.exit(this.containerState.type)}function C1(e,t,n){const r=this;return ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Z(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ns={name:"setextUnderline",resolveTo:N1,tokenize:I1};function N1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function I1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),Z(c)?ee(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||$(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const S1={tokenize:v1,partial:!0};function w1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:D1,continuation:{tokenize:P1},exit:M1}},text:{91:{name:"gfmFootnoteCall",tokenize:R1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:L1,resolveTo:O1}}}}function L1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=Ue(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function O1(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function R1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||ue(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ue(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ue(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function D1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!u||b===null||b===91||ue(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=Ue(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ue(b)||(u=!0),s++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),ee(e,p,"gfmFootnoteDefinitionWhitespace")):n(b)}function p(b){return t(b)}}function P1(e,t,n){return e.check(Nn,t,e.attempt(S1,t,n))}function M1(e){e.exit("gfmFootnoteDefinition")}function v1(e,t,n){const r=this;return ee(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function B1(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],p=u.parser.constructs.insideSpan.null;p&&Re(f,f.length,0,hr(p,s.slice(c+1,o),u)),Re(f,f.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),Re(s,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(b){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(b):(s.enter("strikethroughSequenceTemporary"),p(b))}function p(b){const A=vt(c);if(b===126)return d>1?o(b):(s.consume(b),d++,p);if(d<2&&!n)return o(b);const N=s.exit("strikethroughSequenceTemporary"),y=vt(b);return N._open=!y||y===2&&!!A,N._close=!A||A===2&&!!y,u(b)}}}class F1{constructor(){this.map=[]}add(t,n,r){H1(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function H1(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function U1(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function j1(){return{flow:{null:{name:"table",tokenize:z1,resolveAll:$1}}}}function z1(e,t,n){const r=this;let i=0,a=0,s;return u;function u(I){let U=r.events.length-1;for(;U>-1;){const z=r.events[U][1].type;if(z==="lineEnding"||z==="linePrefix")U--;else break}const v=U>-1?r.events[U][1].type:null,Y=v==="tableHead"||v==="tableRow"?w:o;return Y===w&&r.parser.lazy[r.now().line]?n(I):Y(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),h(I)}function h(I){return I===null?n(I):$(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):n(I):Z(I)?ee(e,h,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||ue(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?f:d)}function f(I){return I===92||I===124?(e.consume(I),d):d(I)}function p(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,Z(I)?ee(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?N(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),A):j(I)}function A(I){return Z(I)?ee(e,N,"whitespace")(I):N(I)}function N(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(a+=1,y(I)):I===null||$(I)?H(I):j(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),R(I)):j(I)}function R(I){return I===45?(e.consume(I),R):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(I))}function L(I){return Z(I)?ee(e,H,"whitespace")(I):H(I)}function H(I){return I===124?b(I):I===null||$(I)?!s||i!==a?j(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):j(I)}function j(I){return n(I)}function w(I){return e.enter("tableRow"),W(I)}function W(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),W):I===null||$(I)?(e.exit("tableRow"),t(I)):Z(I)?ee(e,W,"whitespace")(I):(e.enter("data"),V(I))}function V(I){return I===null||I===124||ue(I)?(e.exit("data"),W(I)):(e.consume(I),I===92?K:V)}function K(I){return I===92||I===124?(e.consume(I),V):V(I)}}function $1(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const f=new F1;for(;++n<e.length;){const p=e[n],b=p[1];p[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(rs(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=Rn(f,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=Rn(f,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=Rn(f,t,a,i,n,d)):s[1]!==0&&(d=Rn(f,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&rs(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=U1(t.events,n))}return e}function Rn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Lt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Lt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Lt(t.events,n[2]),h=Lt(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Lt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function rs(e,t,n,r,i){const a=[],s=Lt(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Lt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Y1={name:"tasklistCheck",tokenize:V1};function q1(){return{text:{91:Y1}}}function V1(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return ue(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return $(o)?t(o):Z(o)?e.check({tokenize:W1},t,n)(o):n(o)}}function W1(e,t,n){return ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function G1(e){return _o([im(),w1(),B1(e),j1(),q1()])}const Q1={};function K1(e){const t=this,n=e||Q1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(G1(n)),a.push(Zp()),s.push(Jp(n))}var X1=Object.defineProperty,Z1=Object.defineProperties,J1=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,eg=Object.prototype.hasOwnProperty,tg=Object.prototype.propertyIsEnumerable,as=(e,t,n)=>t in e?X1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bo=(e,t)=>{for(var n in t||(t={}))eg.call(t,n)&&as(e,n,t[n]);if(is)for(var n of is(t))tg.call(t,n)&&as(e,n,t[n]);return e},Fo=(e,t)=>Z1(e,J1(t)),ng=/(\*\*)([^*]*\*?)$/,rg=/(__)([^_]*?)$/,ig=/(\*\*\*)([^*]*?)$/,ag=/(\*)([^*]*?)$/,sg=/(_)([^_]*?)$/,ug=/(`)([^`]*?)$/,og=/(~~)([^~]*?)$/,kt=/^[\s_~*`]*$/,Ho=/^[\s]*[-*+][\s]+$/,lg=/[\p{L}\p{N}_]/u,cg=/^```[^`\n]*```?$/,hg=/^\*{4,}$/,dg=/(__)([^_]+)_$/,fg=/(~~)([^~]+)~$/,pg=/__/g,ss=/~~/g,st=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:lg.test(e)},Tt=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},mg=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Uo=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},dr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},gg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
19
|
-
`)return!1}return!1},
|
|
20
|
-
`)return!1}return!1},
|
|
18
|
+
`))}function o(p,b,A,N){const y=A.enter("tableCell"),R=A.enter("phrasing"),L=A.containerPhrasing(p,{...N,before:a,after:a});return R(),y(),L}function c(p,b){return np(p,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(p,b,A){const N=p.children;let y=-1;const R=[],L=b.enter("table");for(;++y<N.length;)R[y]=d(N[y],b,A);return L(),R}function d(p,b,A){const N=p.children;let y=-1;const R=[],L=b.enter("tableRow");for(;++y<N.length;)R[y]=o(N[y],p,b,A);return L(),R}function f(p,b,A){let N=xo.inlineCode(p,b,A);return A.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function Gp(){return{exit:{taskListCheckValueChecked:Za,taskListCheckValueUnchecked:Za,paragraph:Kp}}}function Qp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Xp}}}function Za(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Kp(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Xp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=xo.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function Zp(){return[C0(),V0(),K0(),jp(),Gp()]}function Jp(e){return{extensions:[N0(),W0(e),X0(),Wp(e),Qp()]}}function Re(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Pe(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Ja={}.hasOwnProperty;function Ao(e){const t={};let n=-1;for(;++n<e.length;)em(t,e[n]);return t}function em(e,t){let n;for(n in t){const i=(Ja.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Ja.call(i,s)||(i[s]=[]);const u=a[s];tm(i[s],Array.isArray(u)?u:u?[u]:[])}}}function tm(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Re(e,0,0,r)}const nm={tokenize:om,partial:!0},ko={tokenize:lm,partial:!0},yo={tokenize:cm,partial:!0},Co={tokenize:hm,partial:!0},rm={tokenize:dm,partial:!0},No={name:"wwwAutolink",tokenize:sm,previous:So},Io={name:"protocolAutolink",tokenize:um,previous:wo},Ze={name:"emailAutolink",tokenize:am,previous:Lo},Ve={};function im(){return{text:Ve}}let dt=48;for(;dt<123;)Ve[dt]=Ze,dt++,dt===58?dt=65:dt===91&&(dt=97);Ve[43]=Ze;Ve[45]=Ze;Ve[46]=Ze;Ve[95]=Ze;Ve[72]=[Ze,Io];Ve[104]=[Ze,Io];Ve[87]=[Ze,No];Ve[119]=[Ze,No];function am(e,t,n){const r=this;let i,a;return s;function s(d){return!Kr(d)||!Lo.call(r,r.previous)||Mi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return Kr(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(rm,h,c)(d):d===45||d===95||be(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&Ae(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function sm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!So.call(r,r.previous)||Mi(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nm,e.attempt(ko,e.attempt(yo,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function um(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&wo.call(r,r.previous)&&!Mi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ae(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Wn(d)||ue(d)||bt(d)||cr(d)?n(d):e.attempt(ko,e.attempt(yo,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function om(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function lm(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Co,o,u)(c):c===null||ue(c)||bt(c)||c!==45&&cr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function cm(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Co,t,a)(s):s===null||ue(s)||bt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function hm(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||ue(u)||bt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ue(u)||bt(u)?t(u):r(u)}function a(u){return Ae(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ae(u)?(e.consume(u),s):n(u)}}function dm(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return be(a)?n(a):t(a)}}function So(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ue(e)}function wo(e){return!Ae(e)}function Lo(e){return!(e===47||Kr(e))}function Kr(e){return e===43||e===45||e===46||e===95||be(e)}function Mi(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function jt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&be(e.charCodeAt(n+1))&&be(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function hr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Xr={name:"attention",resolveAll:fm,tokenize:pm};function fm(e,t){let n=-1,r,i,a,s,u,o,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};es(d,-o),es(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Pe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Pe(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Pe(c,hr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Pe(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Pe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Re(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vt(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=vt(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!f)),c._close=!!(a===42?f:f&&(h||!d)),t(o)}}function es(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mm={name:"autolink",tokenize:gm};function gm(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Ae(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||be(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||be(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Wn(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),h):E0(p)?(e.consume(p),c):n(p)}function h(p){return be(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||be(p))&&r++<63){const b=p===45?f:d;return e.consume(p),b}return n(p)}}function ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return Z(o)?(e.enter(n),u(o)):t(o)}function u(o){return Z(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Nn={partial:!0,tokenize:Em};function Em(e,t,n){return r;function r(a){return Z(a)?ee(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||$(a)?t(a):n(a)}}const Oo={continuation:{tokenize:Tm},exit:xm,name:"blockQuote",tokenize:bm};function bm(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Tm(e,t,n){const r=this;return i;function i(s){return Z(s)?ee(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Oo,t,n)(s)}}function xm(e){e.exit("blockQuote")}const Ro={name:"characterEscape",tokenize:_m};function _m(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return T0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Do={name:"characterReference",tokenize:Am};function Am(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=be,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=b0,h):(e.enter("characterReferenceValue"),a=7,s=Qr,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===be&&!Pi(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const ts={partial:!0,tokenize:ym},ns={concrete:!0,name:"codeFenced",tokenize:km};function km(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),Z(w)?ee(e,d,"whitespace")(w):d(w))}function d(w){return w===null||$(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(ts,A,H)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||$(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):Z(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ee(e,p,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),f)}function p(w){return w===null||$(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||$(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),b)}function A(w){return e.attempt(i,H,N)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return a>0&&Z(w)?ee(e,R,"linePrefix",a+1)(w):R(w)}function R(w){return w===null||$(w)?e.check(ts,A,H)(w):(e.enter("codeFlowValue"),L(w))}function L(w){return w===null||$(w)?(e.exit("codeFlowValue"),R(w)):(e.consume(w),L)}function H(w){return e.exit("codeFenced"),t(w)}function j(w,W,V){let K=0;return I;function I(F){return w.enter("lineEnding"),w.consume(F),w.exit("lineEnding"),U}function U(F){return w.enter("codeFencedFence"),Z(F)?ee(w,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):v(F)}function v(F){return F===u?(w.enter("codeFencedFenceSequence"),Y(F)):V(F)}function Y(F){return F===u?(K++,w.consume(F),Y):K>=s?(w.exit("codeFencedFenceSequence"),Z(F)?ee(w,z,"whitespace")(F):z(F)):V(F)}function z(F){return F===null||$(F)?(w.exit("codeFencedFence"),W(F)):V(F)}}}function ym(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Nr={name:"codeIndented",tokenize:Nm},Cm={partial:!0,tokenize:Im};function Nm(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ee(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):$(c)?e.attempt(Cm,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||$(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function Im(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):$(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ee(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):$(s)?i(s):n(s)}}const Sm={name:"codeText",previous:Lm,resolve:wm,tokenize:Om};function wm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Lm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Om(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||$(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class Rm{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Gt(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Gt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gt(this.left,n.reverse())}}}function Gt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Po(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new Rm(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Dm(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Re(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Dm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],c={};let h,d,f=-1,p=n,b=0,A=0;const N=[A];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(A=f+1,N.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):N.pop(),f=N.length;f--;){const y=u.slice(N[f],N[f+1]),R=a.pop();o.push([R,R+y.length-1]),e.splice(R,2,y)}for(o.reverse(),f=-1;++f<o.length;)c[b+o[f][0]]=b+o[f][1],b+=o[f][1]-o[f][0]-1;return c}const Pm={resolve:vm,tokenize:Bm},Mm={partial:!0,tokenize:Fm};function vm(e){return Po(e),e}function Bm(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):$(u)?e.check(Mm,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Fm(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ee(e,a,"linePrefix")}function a(s){if(s===null||$(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Mo(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===32||y===41||Wn(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),A(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(u),f(y)):y===null||y===60||$(y)?n(y):(e.consume(y),y===92?b:p)}function b(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function A(y){return!h&&(y===null||y===41||ue(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):h<c&&y===40?(e.consume(y),h++,A):y===41?(e.consume(y),h--,A):y===null||y===32||y===40||Wn(y)?n(y):(e.consume(y),y===92?N:A)}function N(y){return y===40||y===41||y===92?(e.consume(y),A):A(y)}}function vo(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),h}function h(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):$(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||$(p)||u++>999?(e.exit("chunkString"),h(p)):(e.consume(p),o||(o=!Z(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),u++,d):d(p)}}function Bo(e,t,n,r,i,a){let s;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),o(s)):f===null?n(f):$(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ee(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===s||f===null||$(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===s||f===92?(e.consume(f),h):h(f)}}function cn(e,t){let n;return r;function r(i){return $(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Hm={name:"definition",tokenize:jm},Um={partial:!0,tokenize:zm};function jm(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return vo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Ue(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return ue(p)?cn(e,c)(p):c(p)}function c(p){return Mo(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(Um,d,d)(p)}function d(p){return Z(p)?ee(e,f,"whitespace")(p):f(p)}function f(p){return p===null||$(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function zm(e,t,n){return r;function r(u){return ue(u)?cn(e,i)(u):n(u)}function i(u){return Bo(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Z(u)?ee(e,s,"whitespace")(u):s(u)}function s(u){return u===null||$(u)?t(u):n(u)}}const $m={name:"hardBreakEscape",tokenize:Ym};function Ym(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return $(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const qm={name:"headingAtx",resolve:Vm,tokenize:Wm};function Vm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Re(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Wm(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||ue(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||$(h)?(e.exit("atxHeading"),t(h)):Z(h)?ee(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||ue(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const Gm=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rs=["pre","script","style","textarea"],Qm={concrete:!0,name:"htmlFlow",resolveTo:Zm,tokenize:Jm},Km={partial:!0,tokenize:t1},Xm={partial:!0,tokenize:e1};function Zm(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Jm(e,t,n){const r=this;let i,a,s,u,o;return c;function c(_){return h(_)}function h(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),a=!0,A):_===63?(e.consume(_),i=3,r.interrupt?t:x):Ae(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function f(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,u=0,b):Ae(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function b(_){const Be="CDATA[";return _===Be.charCodeAt(u++)?(e.consume(_),u===Be.length?r.interrupt?t:v:b):n(_)}function A(_){return Ae(_)?(e.consume(_),s=String.fromCharCode(_),N):n(_)}function N(_){if(_===null||_===47||_===62||ue(_)){const Be=_===47,lt=s.toLowerCase();return!Be&&!a&&rs.includes(lt)?(i=1,r.interrupt?t(_):v(_)):Gm.includes(s.toLowerCase())?(i=6,Be?(e.consume(_),y):r.interrupt?t(_):v(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?R(_):L(_))}return _===45||be(_)?(e.consume(_),s+=String.fromCharCode(_),N):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:v):n(_)}function R(_){return Z(_)?(e.consume(_),R):I(_)}function L(_){return _===47?(e.consume(_),I):_===58||_===95||Ae(_)?(e.consume(_),H):Z(_)?(e.consume(_),L):I(_)}function H(_){return _===45||_===46||_===58||_===95||be(_)?(e.consume(_),H):j(_)}function j(_){return _===61?(e.consume(_),w):Z(_)?(e.consume(_),j):L(_)}function w(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,W):Z(_)?(e.consume(_),w):V(_)}function W(_){return _===o?(e.consume(_),o=null,K):_===null||$(_)?n(_):(e.consume(_),W)}function V(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||ue(_)?j(_):(e.consume(_),V)}function K(_){return _===47||_===62||Z(_)?L(_):n(_)}function I(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||$(_)?v(_):Z(_)?(e.consume(_),U):n(_)}function v(_){return _===45&&i===2?(e.consume(_),ne):_===60&&i===1?(e.consume(_),ce):_===62&&i===4?(e.consume(_),Se):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),ie):$(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Km,We,Y)(_)):_===null||$(_)?(e.exit("htmlFlowData"),Y(_)):(e.consume(_),v)}function Y(_){return e.check(Xm,z,We)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),F}function F(_){return _===null||$(_)?Y(_):(e.enter("htmlFlowData"),v(_))}function ne(_){return _===45?(e.consume(_),x):v(_)}function ce(_){return _===47?(e.consume(_),s="",Ie):v(_)}function Ie(_){if(_===62){const Be=s.toLowerCase();return rs.includes(Be)?(e.consume(_),Se):v(_)}return Ae(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),Ie):v(_)}function ie(_){return _===93?(e.consume(_),x):v(_)}function x(_){return _===62?(e.consume(_),Se):_===45&&i===2?(e.consume(_),x):v(_)}function Se(_){return _===null||$(_)?(e.exit("htmlFlowData"),We(_)):(e.consume(_),Se)}function We(_){return e.exit("htmlFlow"),t(_)}}function e1(e,t,n){const r=this;return i;function i(s){return $(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function t1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nn,t,n)}}const n1={name:"htmlText",tokenize:r1};function r1(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),L):Ae(x)?(e.consume(x),V):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,b):Ae(x)?(e.consume(x),R):n(x)}function h(x){return x===45?(e.consume(x),p):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):$(x)?(s=d,ce(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),p):d(x)}function p(x){return x===62?ne(x):x===45?f(x):d(x)}function b(x){const Se="CDATA[";return x===Se.charCodeAt(a++)?(e.consume(x),a===Se.length?A:b):n(x)}function A(x){return x===null?n(x):x===93?(e.consume(x),N):$(x)?(s=A,ce(x)):(e.consume(x),A)}function N(x){return x===93?(e.consume(x),y):A(x)}function y(x){return x===62?ne(x):x===93?(e.consume(x),y):A(x)}function R(x){return x===null||x===62?ne(x):$(x)?(s=R,ce(x)):(e.consume(x),R)}function L(x){return x===null?n(x):x===63?(e.consume(x),H):$(x)?(s=L,ce(x)):(e.consume(x),L)}function H(x){return x===62?ne(x):L(x)}function j(x){return Ae(x)?(e.consume(x),w):n(x)}function w(x){return x===45||be(x)?(e.consume(x),w):W(x)}function W(x){return $(x)?(s=W,ce(x)):Z(x)?(e.consume(x),W):ne(x)}function V(x){return x===45||be(x)?(e.consume(x),V):x===47||x===62||ue(x)?K(x):n(x)}function K(x){return x===47?(e.consume(x),ne):x===58||x===95||Ae(x)?(e.consume(x),I):$(x)?(s=K,ce(x)):Z(x)?(e.consume(x),K):ne(x)}function I(x){return x===45||x===46||x===58||x===95||be(x)?(e.consume(x),I):U(x)}function U(x){return x===61?(e.consume(x),v):$(x)?(s=U,ce(x)):Z(x)?(e.consume(x),U):K(x)}function v(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,Y):$(x)?(s=v,ce(x)):Z(x)?(e.consume(x),v):(e.consume(x),z)}function Y(x){return x===i?(e.consume(x),i=void 0,F):x===null?n(x):$(x)?(s=Y,ce(x)):(e.consume(x),Y)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ue(x)?K(x):(e.consume(x),z)}function F(x){return x===47||x===62||ue(x)?K(x):n(x)}function ne(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function ce(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ie}function Ie(x){return Z(x)?ee(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):ie(x)}function ie(x){return e.enter("htmlTextData"),s(x)}}const vi={name:"labelEnd",resolveAll:u1,resolveTo:o1,tokenize:l1},i1={tokenize:c1},a1={tokenize:h1},s1={tokenize:d1};function u1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Re(e,0,e.length,n),e}function o1(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=Pe(u,e.slice(a+1,a+r+3)),u=Pe(u,[["enter",h,t]]),u=Pe(u,hr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Pe(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=Pe(u,e.slice(s+1)),u=Pe(u,[["exit",o,t]]),Re(e,a,e.length,u),e}function l1(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(f){return a?a._inactive?d(f):(s=r.parser.defined.includes(Ue(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(i1,h,s?h:d)(f):f===91?e.attempt(a1,h,s?c:d)(f):s?h(f):d(f)}function c(f){return e.attempt(s1,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function c1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ue(d)?cn(e,a)(d):a(d)}function a(d){return d===41?h(d):Mo(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ue(d)?cn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Bo(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return ue(d)?cn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function h1(e,t,n){const r=this;return i;function i(u){return vo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Ue(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function d1(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const f1={name:"labelStartImage",resolveAll:vi.resolveAll,tokenize:p1};function p1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const m1={name:"labelStartLink",resolveAll:vi.resolveAll,tokenize:g1};function g1(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ir={name:"lineEnding",tokenize:E1};function E1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ee(e,t,"linePrefix")}}const Un={name:"thematicBreak",tokenize:b1};function b1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||$(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),Z(c)?ee(e,u,"whitespace")(c):u(c))}}const Ce={continuation:{tokenize:A1},exit:y1,name:"list",tokenize:_1},T1={partial:!0,tokenize:C1},x1={partial:!0,tokenize:k1};function _1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Qr(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Un,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Qr(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Nn,r.interrupt?n:h,e.attempt(T1,f,d))}function h(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function A1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nn,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ee(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Z(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(x1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ee(e,e.attempt(Ce,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function k1(e,t,n){const r=this;return ee(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function y1(e){e.exit(this.containerState.type)}function C1(e,t,n){const r=this;return ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Z(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const is={name:"setextUnderline",resolveTo:N1,tokenize:I1};function N1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function I1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),Z(c)?ee(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||$(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const S1={tokenize:v1,partial:!0};function w1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:D1,continuation:{tokenize:P1},exit:M1}},text:{91:{name:"gfmFootnoteCall",tokenize:R1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:L1,resolveTo:O1}}}}function L1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=Ue(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function O1(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function R1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||ue(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ue(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ue(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function D1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!u||b===null||b===91||ue(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=Ue(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ue(b)||(u=!0),s++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),ee(e,p,"gfmFootnoteDefinitionWhitespace")):n(b)}function p(b){return t(b)}}function P1(e,t,n){return e.check(Nn,t,e.attempt(S1,t,n))}function M1(e){e.exit("gfmFootnoteDefinition")}function v1(e,t,n){const r=this;return ee(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function B1(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],p=u.parser.constructs.insideSpan.null;p&&Re(f,f.length,0,hr(p,s.slice(c+1,o),u)),Re(f,f.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),Re(s,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(b){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(b):(s.enter("strikethroughSequenceTemporary"),p(b))}function p(b){const A=vt(c);if(b===126)return d>1?o(b):(s.consume(b),d++,p);if(d<2&&!n)return o(b);const N=s.exit("strikethroughSequenceTemporary"),y=vt(b);return N._open=!y||y===2&&!!A,N._close=!A||A===2&&!!y,u(b)}}}class F1{constructor(){this.map=[]}add(t,n,r){H1(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function H1(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function U1(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function j1(){return{flow:{null:{name:"table",tokenize:z1,resolveAll:$1}}}}function z1(e,t,n){const r=this;let i=0,a=0,s;return u;function u(I){let U=r.events.length-1;for(;U>-1;){const z=r.events[U][1].type;if(z==="lineEnding"||z==="linePrefix")U--;else break}const v=U>-1?r.events[U][1].type:null,Y=v==="tableHead"||v==="tableRow"?w:o;return Y===w&&r.parser.lazy[r.now().line]?n(I):Y(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),h(I)}function h(I){return I===null?n(I):$(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):n(I):Z(I)?ee(e,h,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||ue(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?f:d)}function f(I){return I===92||I===124?(e.consume(I),d):d(I)}function p(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,Z(I)?ee(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?N(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),A):j(I)}function A(I){return Z(I)?ee(e,N,"whitespace")(I):N(I)}function N(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(a+=1,y(I)):I===null||$(I)?H(I):j(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),R(I)):j(I)}function R(I){return I===45?(e.consume(I),R):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(I))}function L(I){return Z(I)?ee(e,H,"whitespace")(I):H(I)}function H(I){return I===124?b(I):I===null||$(I)?!s||i!==a?j(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):j(I)}function j(I){return n(I)}function w(I){return e.enter("tableRow"),W(I)}function W(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),W):I===null||$(I)?(e.exit("tableRow"),t(I)):Z(I)?ee(e,W,"whitespace")(I):(e.enter("data"),V(I))}function V(I){return I===null||I===124||ue(I)?(e.exit("data"),W(I)):(e.consume(I),I===92?K:V)}function K(I){return I===92||I===124?(e.consume(I),V):V(I)}}function $1(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const f=new F1;for(;++n<e.length;){const p=e[n],b=p[1];p[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(as(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=Rn(f,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=Rn(f,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=Rn(f,t,a,i,n,d)):s[1]!==0&&(d=Rn(f,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&as(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=U1(t.events,n))}return e}function Rn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Lt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Lt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Lt(t.events,n[2]),h=Lt(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Lt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function as(e,t,n,r,i){const a=[],s=Lt(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Lt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Y1={name:"tasklistCheck",tokenize:V1};function q1(){return{text:{91:Y1}}}function V1(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return ue(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return $(o)?t(o):Z(o)?e.check({tokenize:W1},t,n)(o):n(o)}}function W1(e,t,n){return ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function G1(e){return Ao([im(),w1(),B1(e),j1(),q1()])}const Q1={};function K1(e){const t=this,n=e||Q1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(G1(n)),a.push(Zp()),s.push(Jp(n))}var X1=Object.defineProperty,Z1=Object.defineProperties,J1=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertySymbols,eg=Object.prototype.hasOwnProperty,tg=Object.prototype.propertyIsEnumerable,us=(e,t,n)=>t in e?X1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fo=(e,t)=>{for(var n in t||(t={}))eg.call(t,n)&&us(e,n,t[n]);if(ss)for(var n of ss(t))tg.call(t,n)&&us(e,n,t[n]);return e},Ho=(e,t)=>Z1(e,J1(t)),ng=/(\*\*)([^*]*\*?)$/,rg=/(__)([^_]*?)$/,ig=/(\*\*\*)([^*]*?)$/,ag=/(\*)([^*]*?)$/,sg=/(_)([^_]*?)$/,ug=/(`)([^`]*?)$/,og=/(~~)([^~]*?)$/,kt=/^[\s_~*`]*$/,Uo=/^[\s]*[-*+][\s]+$/,lg=/[\p{L}\p{N}_]/u,cg=/^```[^`\n]*```?$/,hg=/^\*{4,}$/,dg=/(__)([^_]+)_$/,fg=/(~~)([^~]+)~$/,pg=/__/g,os=/~~/g,st=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:lg.test(e)},Tt=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},mg=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},jo=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},dr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},gg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
19
|
+
`)return!1}return!1},zo=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?gg(e,t):!1;if(e[n]===`
|
|
20
|
+
`)return!1}return!1},Bi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
|
|
21
21
|
`){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
|
|
22
22
|
`){i=o;break}let a=e.substring(r,i),s=0,u=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){u=!0;break}return s>=3&&!u},Eg=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,bg=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Eg,(t,n,r,i)=>Tt(e,i)?t:`${n}\\>${r}`),Tg=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
|
|
23
23
|
`){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},xg=(e,t,n,r)=>n==="\\"||e.includes("$")&&dr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&st(n)&&st(r)||(!n||n===" "||n===" "||n===`
|
|
24
24
|
`)&&(!r||r===" "||r===" "||r===`
|
|
25
|
-
`)||Tg(e,t,r))
|
|
26
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return
|
|
27
|
-
`)?!0:
|
|
28
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return
|
|
29
|
-
`)?!0:
|
|
25
|
+
`)||Tg(e,t,r)),$o=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";xg(e,r,i,a)||(t+=1)}return t},_g=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&dr(e,t)||zo(e,t)||n==="_"||r==="_"||n&&r&&st(n)&&st(r)),Ag=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";_g(e,r,i,a)||(t+=1)}return t},kg=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},yg=(e,t,n)=>{if(!t||kt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
26
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Uo.test(a)&&t.includes(`
|
|
27
|
+
`)?!0:Bi(e,n,"*")},Cg=e=>{let t=e.match(ng);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Tt(e,r)||yg(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Ng=(e,t,n)=>{if(!t||kt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Uo.test(a)&&t.includes(`
|
|
29
|
+
`)?!0:Bi(e,n,"_")},Ig=e=>{let t=e.match(rg);if(!t){let i=e.match(dg);if(i){let a=e.lastIndexOf(i[1]);if(!Tt(e,a)&&(e.match(pg)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Tt(e,r)||Ng(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Sg=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!dr(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
|
|
30
30
|
`)&&(!r||r===" "||r===" "||r===`
|
|
31
|
-
`)||n&&r&&st(n)&&st(r))continue;return t}return-1},wg=e=>{if(!e.match(ag))return e;let t=Sg(e);if(t===-1||Tt(e,t))return e;let n=e.substring(t+1);return!n||kt.test(n)?e
|
|
32
|
-
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Og=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r
|
|
31
|
+
`)||n&&r&&st(n)&&st(r))continue;return t}return-1},wg=e=>{if(!e.match(ag))return e;let t=Sg(e);if(t===-1||Tt(e,t))return e;let n=e.substring(t+1);return!n||kt.test(n)?e:$o(e)%2===1?`${e}*`:e},Yo=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!dr(e,t)&&!zo(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&st(n)&&st(r))continue;return t}return-1},Lg=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
32
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Og=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=Yo(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Rg=e=>{if(!e.match(sg))return e;let t=Yo(e);if(t===-1||Tt(e,t))return e;let n=e.substring(t+1);if(!n||kt.test(n))return e;if(Ag(e)%2===1){let r=Og(e);return r!==null?r:Lg(e)}return e},Dg=e=>{let t=(e.match(/\*\*/g)||[]).length,n=$o(e);return t%2===0&&n%2===0},Pg=(e,t,n)=>!t||kt.test(t)||Tt(e,n)?!0:Bi(e,n,"*"),Mg=e=>{if(hg.test(e))return e;let t=e.match(ig);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Pg(e,n,r)?e:kg(e)%2===1?Dg(e)?e:`${e}***`:e},bn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},vg=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},Bg=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!vg(e,n)&&(t+=1);return t},Fg=/<[a-zA-Z/][^>]*$/,Hg=e=>{let t=e.match(Fg);return!t||t.index===void 0||bn(e,t.index)?e:e.substring(0,t.index).trimEnd()},Ug=e=>!e.match(cg)||e.includes(`
|
|
33
33
|
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,jg=e=>(e.match(/```/g)||[]).length%2===1,zg=e=>{let t=Ug(e);if(t!==null)return t;let n=e.match(ug);if(n&&!jg(e)){let r=n[2];if(!r||kt.test(r))return e;if(Bg(e)%2===1)return`${e}\``}return e},$g=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",Yg=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!$g(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},qg=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
34
34
|
`,t)!==-1&&!e.endsWith(`
|
|
35
35
|
`)?`${e}
|
|
36
|
-
$$`:`${e}$$`},Vg=e=>Yg(e)%2===0?e:qg(e),Wg=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=mg(e,t);if(r===-1||bn(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},
|
|
36
|
+
$$`:`${e}$$`},Vg=e=>Yg(e)%2===0?e:qg(e),Wg=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=mg(e,t);if(r===-1||bn(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},ls=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!bn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=jo(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return-1},Gg=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=ls(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(jo(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=ls(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${s}${o}`}return`${e}](streamdown:incomplete-link)`}return null},qo=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bn(e,n)){let r=Wg(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bn(e,r)){let i=Gg(e,r,t);if(i!==null)return i}return e},Qg=/^-{1,2}$/,Kg=/^[\s]*-{1,2}[\s]+$/,Xg=/^={1,2}$/,Zg=/^[\s]*={1,2}[\s]+$/,Jg=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
37
37
|
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(Qg.test(i)&&!n.match(Kg)){let a=r.split(`
|
|
38
38
|
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(Xg.test(i)&&!n.match(Zg)){let a=r.split(`
|
|
39
|
-
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},eE=e=>{let t=e.match(og);if(t){let n=t[2];if(!n||kt.test(n))return e;if((e.match(
|
|
40
|
-
`,c="/",h="*",d="",f="comment",p="declaration";function b(N,y){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];y=y||{};var R=1,L=1;function H(z){var F=z.match(t);F&&(R+=F.length);var ne=z.lastIndexOf(o);L=~ne?z.length-ne:L+z.length}function j(){var z={line:R,column:L};return function(F){return F.position=new w(z),K(),F}}function w(z){this.start=z,this.end={line:R,column:L},this.source=y.source}w.prototype.content=N;function W(z){var F=new Error(y.source+":"+R+":"+L+": "+z);if(F.reason=z,F.filename=y.source,F.line=R,F.column=L,F.source=N,!y.silent)throw F}function V(z){var F=z.exec(N);if(F){var ne=F[0];return H(ne),N=N.slice(ne.length),F}}function K(){V(n)}function I(z){var F;for(z=z||[];F=U();)F!==!1&&z.push(F);return z}function U(){var z=j();if(!(c!=N.charAt(0)||h!=N.charAt(1))){for(var F=2;d!=N.charAt(F)&&(h!=N.charAt(F)||c!=N.charAt(F+1));)++F;if(F+=2,d===N.charAt(F-1))return W("End of comment missing");var ne=N.slice(2,F-2);return L+=2,H(ne),N=N.slice(F),L+=2,z({type:f,comment:ne})}}function v(){var z=j(),F=V(r);if(F){if(U(),!V(i))return W("property missing ':'");var ne=V(a),ce=z({type:p,property:A(F[0].replace(e,d)),value:ne?A(ne[0].replace(e,d)):d});return V(s),ce}}function Y(){var z=[];I(z);for(var F;F=v();)F!==!1&&(z.push(F),I(z));return z}return K(),Y()}function A(N){return N?N.replace(u,d):d}return wr=b,wr}var hs;function hE(){if(hs)return wt;hs=1;var e=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.default=n;const t=e(cE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return wt}var Qt={},ds;function dE(){if(ds)return Qt;ds=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Qt.camelCase=o,Qt}var Kt,fs;function fE(){if(fs)return Kt;fs=1;var e=Kt&&Kt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(hE()),n=dE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,Kt=r,Kt}var pE=fE();const mE=Zs(pE);function hn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ps(e.position):"start"in e||"end"in e?ps(e):"line"in e||"column"in e?Zr(e):""}function Zr(e){return ms(e&&e.line)+":"+ms(e&&e.column)}function ps(e){return Zr(e&&e.start)+"-"+Zr(e&&e.end)}function ms(e){return e&&typeof e=="number"?e:1}class xe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=hn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}xe.prototype.file="";xe.prototype.name="";xe.prototype.reason="";xe.prototype.message="";xe.prototype.stack="";xe.prototype.column=void 0;xe.prototype.line=void 0;xe.prototype.ancestors=void 0;xe.prototype.cause=void 0;xe.prototype.fatal=void 0;xe.prototype.place=void 0;xe.prototype.ruleId=void 0;xe.prototype.source=void 0;const vi={}.hasOwnProperty,gE=new Map,EE=/[A-Z]/g,bE=new Set(["table","tbody","thead","tfoot","tr"]),TE=new Set(["td","th"]),qo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=SE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=IE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ut:An,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Vo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Vo(e,t,n){if(t.type==="element")return _E(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return AE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yE(e,t,n);if(t.type==="mdxjsEsm")return kE(e,t);if(t.type==="root")return CE(e,t,n);if(t.type==="text")return NE(e,t)}function _E(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ut,e.schema=i),e.ancestors.push(t);const a=Go(e,t.tagName,!1),s=wE(e,t);let u=Fi(e,t);return bE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!lE(o):!0})),Wo(e,s,a,t),Bi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function AE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Tn(e,t.position)}function kE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tn(e,t.position)}function yE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ut,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Go(e,t.name,!0),s=LE(e,t),u=Fi(e,t);return Wo(e,s,a,t),Bi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function CE(e,t,n){const r={};return Bi(r,Fi(e,t)),e.create(t,e.Fragment,r,n)}function NE(e,t){return t.value}function Wo(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function IE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function SE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=qe(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function wE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&vi.call(t.properties,i)){const a=OE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&TE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function LE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Tn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Tn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Fi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:gE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=Vo(e,a,s);u!==void 0&&n.push(u)}return n}function OE(e,t,n){const r=ir(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fu(n):pu(n)),r.property==="style"){let i=typeof n=="object"?n:RE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=DE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?qc[r.property]||r.property:r.attribute,n]}}function RE(e,t){try{return mE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=qo+"#cannot-parse-style-attribute",i}}function Go(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=os(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=os(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return vi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tn(e)}function Tn(e,t){const n=new xe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=qo+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DE(e){const t={};let n;for(n in e)vi.call(e,n)&&(t[PE(n)]=e[n]);return t}function PE(e){let t=e.replace(EE,ME);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ME(e){return"-"+e.toLowerCase()}const Lr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},vE={tokenize:BE};function BE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ee(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const FE={tokenize:HE},gs={tokenize:UE};function HE(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const H=t.events.length;let j=H,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}y(r);let W=H;for(;W<t.events.length;)t.events[W][1].end={...w},W++;return Re(t.events,j+1,0,t.events.slice(H)),t.events.length=W,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return f(L);if(i.currentConstruct&&i.currentConstruct.concrete)return b(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gs,h,d)(L)}function h(L){return i&&R(),y(r),f(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(L)}function f(L){return t.containerState={},e.attempt(gs,p,b)(L)}function p(L){return r++,n.push([t.currentConstruct,t.containerState]),f(L)}function b(L){if(L===null){i&&R(),y(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),A(L)}function A(L){if(L===null){N(e.exit("chunkFlow"),!0),y(0),e.consume(L);return}return $(L)?(e.consume(L),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),A)}function N(L,H){const j=t.sliceStream(L);if(H&&j.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(j),t.parser.lazy[L.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const W=t.events.length;let V=W,K,I;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(K){I=t.events[V][1].end;break}K=!0}for(y(r),w=W;w<t.events.length;)t.events[w][1].end={...I},w++;Re(t.events,V+1,0,t.events.slice(W)),t.events.length=w}}function y(L){let H=n.length;for(;H-- >L;){const j=n[H];t.containerState=j[1],j[0].exit.call(t,e)}n.length=L}function R(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function UE(e,t,n){return ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const jE={tokenize:zE};function zE(e){const t=this,n=e.attempt(Nn,r,e.attempt(this.parser.constructs.flowInitial,i,ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Pm,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $E={resolveAll:Ko()},YE=Qo("string"),qE=Qo("text");function Qo(e){return{resolveAll:Ko(e==="text"?VE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ko(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function VE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const WE={42:Ce,43:Ce,45:Ce,48:Ce,49:Ce,50:Ce,51:Ce,52:Ce,53:Ce,54:Ce,55:Ce,56:Ce,57:Ce,62:Lo},GE={91:Hm},QE={[-2]:Nr,[-1]:Nr,32:Nr},KE={35:qm,42:Un,45:[ns,Un],60:Qm,61:ns,95:Un,96:es,126:es},XE={38:Ro,92:Oo},ZE={[-5]:Ir,[-4]:Ir,[-3]:Ir,33:f1,38:Ro,42:Xr,60:[mm,n1],91:m1,92:[$m,Oo],93:Pi,95:Xr,96:Sm},JE={null:[Xr,$E]},eb={null:[42,95]},tb={null:[]},nb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eb,contentInitial:GE,disable:tb,document:WE,flow:KE,flowInitial:QE,insideSpan:JE,string:XE,text:ZE},Symbol.toStringTag,{value:"Module"}));function rb(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:W(j),check:W(w),consume:R,enter:L,exit:H,interrupt:W(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:A,events:[],now:b,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(U){return s=Pe(s,U),N(),s[s.length-1]!==null?[]:(V(t,0),c.events=hr(a,c.events,c),c.events)}function f(U,v){return ab(p(U),v)}function p(U){return ib(s,U)}function b(){const{_bufferIndex:U,_index:v,line:Y,column:z,offset:F}=r;return{_bufferIndex:U,_index:v,line:Y,column:z,offset:F}}function A(U){i[U.line]=U.column,I()}function N(){let U;for(;r._index<s.length;){const v=s[r._index];if(typeof v=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<v.length;)y(v.charCodeAt(r._bufferIndex));else y(v)}}function y(U){h=h(U)}function R(U){$(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function L(U,v){const Y=v||{};return Y.type=U,Y.start=b(),c.events.push(["enter",Y,c]),u.push(Y),Y}function H(U){const v=u.pop();return v.end=b(),c.events.push(["exit",v,c]),v}function j(U,v){V(U,v.from)}function w(U,v){v.restore()}function W(U,v){return Y;function Y(z,F,ne){let ce,Ie,ie,x;return Array.isArray(z)?We(z):"tokenize"in z?We([z]):Se(z);function Se(Ee){return zt;function zt(Je){const Ct=Je!==null&&Ee[Je],Nt=Je!==null&&Ee.null,wn=[...Array.isArray(Ct)?Ct:Ct?[Ct]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return We(wn)(Je)}}function We(Ee){return ce=Ee,Ie=0,Ee.length===0?ne:_(Ee[Ie])}function _(Ee){return zt;function zt(Je){return x=K(),ie=Ee,Ee.partial||(c.currentConstruct=Ee),Ee.name&&c.parser.constructs.disable.null.includes(Ee.name)?lt():Ee.tokenize.call(v?Object.assign(Object.create(c),v):c,o,Be,lt)(Je)}}function Be(Ee){return U(ie,x),F}function lt(Ee){return x.restore(),++Ie<ce.length?_(ce[Ie]):ne}}}function V(U,v){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&Re(c.events,v,c.events.length-v,U.resolve(c.events.slice(v),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function K(){const U=b(),v=c.previous,Y=c.currentConstruct,z=c.events.length,F=Array.from(u);return{from:z,restore:ne};function ne(){r=U,c.previous=v,c.currentConstruct=Y,c.events.length=z,u=F,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ib(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function ab(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
39
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},eE=e=>{let t=e.match(og);if(t){let n=t[2];if(!n||kt.test(n))return e;if((e.match(os)||[]).length%2===1)return`${e}~~`}else if(e.match(fg)&&(e.match(os)||[]).length%2===1)return`${e}~`;return e},Sr=e=>e!==!1,_e={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},tE=[{handler:{name:"comparisonOperators",handle:bg,priority:_e.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Hg,priority:_e.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Jg,priority:_e.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:qo,priority:_e.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Mg,priority:_e.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Cg,priority:_e.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Ig,priority:_e.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:wg,priority:_e.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Rg,priority:_e.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:zg,priority:_e.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:eE,priority:_e.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Vg,priority:_e.KATEX},optionKey:"katex"}],nE=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return tE.filter(({handler:r,optionKey:i})=>r.name==="links"?Sr(e?.links)||Sr(e?.images):Sr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Ho(Fo({},r),{handle:a=>qo(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},rE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=nE(t),a=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:Ho(Fo({},u),{priority:(o=u.priority)!=null?o:_e.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:_e.DEFAULT)-((h=o.handler.priority)!=null?h:_e.DEFAULT)});for(let{handler:u,earlyReturn:o}of s)if(r=u.handle(r),o!=null&&o(r))return r;return r},iE=rE;const aE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uE={};function cs(e,t){return(uE.jsx?sE:aE).test(e)}const oE=/[ \t\n\f\r]/g;function lE(e){return typeof e=="object"?e.type==="text"?hs(e.value):!1:hs(e)}function hs(e){return e.replace(oE,"")===""}var wt={},wr,ds;function cE(){if(ds)return wr;ds=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
40
|
+
`,c="/",h="*",d="",f="comment",p="declaration";function b(N,y){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];y=y||{};var R=1,L=1;function H(z){var F=z.match(t);F&&(R+=F.length);var ne=z.lastIndexOf(o);L=~ne?z.length-ne:L+z.length}function j(){var z={line:R,column:L};return function(F){return F.position=new w(z),K(),F}}function w(z){this.start=z,this.end={line:R,column:L},this.source=y.source}w.prototype.content=N;function W(z){var F=new Error(y.source+":"+R+":"+L+": "+z);if(F.reason=z,F.filename=y.source,F.line=R,F.column=L,F.source=N,!y.silent)throw F}function V(z){var F=z.exec(N);if(F){var ne=F[0];return H(ne),N=N.slice(ne.length),F}}function K(){V(n)}function I(z){var F;for(z=z||[];F=U();)F!==!1&&z.push(F);return z}function U(){var z=j();if(!(c!=N.charAt(0)||h!=N.charAt(1))){for(var F=2;d!=N.charAt(F)&&(h!=N.charAt(F)||c!=N.charAt(F+1));)++F;if(F+=2,d===N.charAt(F-1))return W("End of comment missing");var ne=N.slice(2,F-2);return L+=2,H(ne),N=N.slice(F),L+=2,z({type:f,comment:ne})}}function v(){var z=j(),F=V(r);if(F){if(U(),!V(i))return W("property missing ':'");var ne=V(a),ce=z({type:p,property:A(F[0].replace(e,d)),value:ne?A(ne[0].replace(e,d)):d});return V(s),ce}}function Y(){var z=[];I(z);for(var F;F=v();)F!==!1&&(z.push(F),I(z));return z}return K(),Y()}function A(N){return N?N.replace(u,d):d}return wr=b,wr}var fs;function hE(){if(fs)return wt;fs=1;var e=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.default=n;const t=e(cE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return wt}var Qt={},ps;function dE(){if(ps)return Qt;ps=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Qt.camelCase=o,Qt}var Kt,ms;function fE(){if(ms)return Kt;ms=1;var e=Kt&&Kt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(hE()),n=dE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,Kt=r,Kt}var pE=fE();const mE=eu(pE);function hn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gs(e.position):"start"in e||"end"in e?gs(e):"line"in e||"column"in e?Zr(e):""}function Zr(e){return Es(e&&e.line)+":"+Es(e&&e.column)}function gs(e){return Zr(e&&e.start)+"-"+Zr(e&&e.end)}function Es(e){return e&&typeof e=="number"?e:1}class xe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=hn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}xe.prototype.file="";xe.prototype.name="";xe.prototype.reason="";xe.prototype.message="";xe.prototype.stack="";xe.prototype.column=void 0;xe.prototype.line=void 0;xe.prototype.ancestors=void 0;xe.prototype.cause=void 0;xe.prototype.fatal=void 0;xe.prototype.place=void 0;xe.prototype.ruleId=void 0;xe.prototype.source=void 0;const Fi={}.hasOwnProperty,gE=new Map,EE=/[A-Z]/g,bE=new Set(["table","tbody","thead","tfoot","tr"]),TE=new Set(["td","th"]),Vo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=SE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=IE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ut:An,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Wo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Wo(e,t,n){if(t.type==="element")return _E(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return AE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yE(e,t,n);if(t.type==="mdxjsEsm")return kE(e,t);if(t.type==="root")return CE(e,t,n);if(t.type==="text")return NE(e,t)}function _E(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ut,e.schema=i),e.ancestors.push(t);const a=Qo(e,t.tagName,!1),s=wE(e,t);let u=Ui(e,t);return bE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!lE(o):!0})),Go(e,s,a,t),Hi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function AE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Tn(e,t.position)}function kE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tn(e,t.position)}function yE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ut,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Qo(e,t.name,!0),s=LE(e,t),u=Ui(e,t);return Go(e,s,a,t),Hi(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function CE(e,t,n){const r={};return Hi(r,Ui(e,t)),e.create(t,e.Fragment,r,n)}function NE(e,t){return t.value}function Go(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function IE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function SE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=qe(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function wE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Fi.call(t.properties,i)){const a=OE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&TE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function LE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Tn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Tn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ui(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:gE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=Wo(e,a,s);u!==void 0&&n.push(u)}return n}function OE(e,t,n){const r=ir(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?pu(n):mu(n)),r.property==="style"){let i=typeof n=="object"?n:RE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=DE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?qc[r.property]||r.property:r.attribute,n]}}function RE(e,t){try{return mE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Vo+"#cannot-parse-style-attribute",i}}function Qo(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=cs(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=cs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Fi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tn(e)}function Tn(e,t){const n=new xe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Vo+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DE(e){const t={};let n;for(n in e)Fi.call(e,n)&&(t[PE(n)]=e[n]);return t}function PE(e){let t=e.replace(EE,ME);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ME(e){return"-"+e.toLowerCase()}const Lr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},vE={tokenize:BE};function BE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ee(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const FE={tokenize:HE},bs={tokenize:UE};function HE(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const H=t.events.length;let j=H,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}y(r);let W=H;for(;W<t.events.length;)t.events[W][1].end={...w},W++;return Re(t.events,j+1,0,t.events.slice(H)),t.events.length=W,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return f(L);if(i.currentConstruct&&i.currentConstruct.concrete)return b(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(bs,h,d)(L)}function h(L){return i&&R(),y(r),f(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(L)}function f(L){return t.containerState={},e.attempt(bs,p,b)(L)}function p(L){return r++,n.push([t.currentConstruct,t.containerState]),f(L)}function b(L){if(L===null){i&&R(),y(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),A(L)}function A(L){if(L===null){N(e.exit("chunkFlow"),!0),y(0),e.consume(L);return}return $(L)?(e.consume(L),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),A)}function N(L,H){const j=t.sliceStream(L);if(H&&j.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(j),t.parser.lazy[L.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const W=t.events.length;let V=W,K,I;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(K){I=t.events[V][1].end;break}K=!0}for(y(r),w=W;w<t.events.length;)t.events[w][1].end={...I},w++;Re(t.events,V+1,0,t.events.slice(W)),t.events.length=w}}function y(L){let H=n.length;for(;H-- >L;){const j=n[H];t.containerState=j[1],j[0].exit.call(t,e)}n.length=L}function R(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function UE(e,t,n){return ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const jE={tokenize:zE};function zE(e){const t=this,n=e.attempt(Nn,r,e.attempt(this.parser.constructs.flowInitial,i,ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Pm,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $E={resolveAll:Xo()},YE=Ko("string"),qE=Ko("text");function Ko(e){return{resolveAll:Xo(e==="text"?VE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Xo(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function VE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const WE={42:Ce,43:Ce,45:Ce,48:Ce,49:Ce,50:Ce,51:Ce,52:Ce,53:Ce,54:Ce,55:Ce,56:Ce,57:Ce,62:Oo},GE={91:Hm},QE={[-2]:Nr,[-1]:Nr,32:Nr},KE={35:qm,42:Un,45:[is,Un],60:Qm,61:is,95:Un,96:ns,126:ns},XE={38:Do,92:Ro},ZE={[-5]:Ir,[-4]:Ir,[-3]:Ir,33:f1,38:Do,42:Xr,60:[mm,n1],91:m1,92:[$m,Ro],93:vi,95:Xr,96:Sm},JE={null:[Xr,$E]},eb={null:[42,95]},tb={null:[]},nb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eb,contentInitial:GE,disable:tb,document:WE,flow:KE,flowInitial:QE,insideSpan:JE,string:XE,text:ZE},Symbol.toStringTag,{value:"Module"}));function rb(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:W(j),check:W(w),consume:R,enter:L,exit:H,interrupt:W(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:A,events:[],now:b,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(U){return s=Pe(s,U),N(),s[s.length-1]!==null?[]:(V(t,0),c.events=hr(a,c.events,c),c.events)}function f(U,v){return ab(p(U),v)}function p(U){return ib(s,U)}function b(){const{_bufferIndex:U,_index:v,line:Y,column:z,offset:F}=r;return{_bufferIndex:U,_index:v,line:Y,column:z,offset:F}}function A(U){i[U.line]=U.column,I()}function N(){let U;for(;r._index<s.length;){const v=s[r._index];if(typeof v=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<v.length;)y(v.charCodeAt(r._bufferIndex));else y(v)}}function y(U){h=h(U)}function R(U){$(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function L(U,v){const Y=v||{};return Y.type=U,Y.start=b(),c.events.push(["enter",Y,c]),u.push(Y),Y}function H(U){const v=u.pop();return v.end=b(),c.events.push(["exit",v,c]),v}function j(U,v){V(U,v.from)}function w(U,v){v.restore()}function W(U,v){return Y;function Y(z,F,ne){let ce,Ie,ie,x;return Array.isArray(z)?We(z):"tokenize"in z?We([z]):Se(z);function Se(Ee){return zt;function zt(Je){const Ct=Je!==null&&Ee[Je],Nt=Je!==null&&Ee.null,wn=[...Array.isArray(Ct)?Ct:Ct?[Ct]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return We(wn)(Je)}}function We(Ee){return ce=Ee,Ie=0,Ee.length===0?ne:_(Ee[Ie])}function _(Ee){return zt;function zt(Je){return x=K(),ie=Ee,Ee.partial||(c.currentConstruct=Ee),Ee.name&&c.parser.constructs.disable.null.includes(Ee.name)?lt():Ee.tokenize.call(v?Object.assign(Object.create(c),v):c,o,Be,lt)(Je)}}function Be(Ee){return U(ie,x),F}function lt(Ee){return x.restore(),++Ie<ce.length?_(ce[Ie]):ne}}}function V(U,v){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&Re(c.events,v,c.events.length-v,U.resolve(c.events.slice(v),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function K(){const U=b(),v=c.previous,Y=c.currentConstruct,z=c.events.length,F=Array.from(u);return{from:z,restore:ne};function ne(){r=U,c.previous=v,c.currentConstruct=Y,c.events.length=z,u=F,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ib(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function ab(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
41
41
|
`;break}case-3:{s=`\r
|
|
42
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function sb(e){const r={constructs:_o([nb,...(e||{}).extensions||[]]),content:i(vE),defined:[],document:i(FE),flow:i(jE),lazy:{},string:i(YE),text:i(qE)};return r;function i(a){return s;function s(u){return rb(r,a,u)}}}function ub(e){for(;!Do(e););return e}const Es=/[\0\t\n\r]/g;function ob(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Es.lastIndex=d,c=Es.exec(a),f=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(f),!c){t=a.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(a.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Xo={}.hasOwnProperty;function lb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),cb(n)(ub(sb(n).document().write(ob()(e,t,!0))))}function cb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(aa),autolinkProtocol:K,autolinkEmail:K,atxHeading:a(na),blockQuote:a(Nt),characterEscape:K,characterReference:K,codeFenced:a(wn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(wn,s),codeText:a(ic,s),codeTextData:K,data:K,codeFlowValue:K,definition:a(ac),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(sc),hardBreakEscape:a(ra),hardBreakTrailing:a(ra),htmlFlow:a(ia,s),htmlFlowData:K,htmlText:a(ia,s),htmlTextData:K,image:a(uc),label:s,link:a(aa),listItem:a(oc),listItemValue:f,listOrdered:a(sa,d),listUnordered:a(sa),paragraph:a(lc),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(na),strong:a(cc),thematicBreak:a(dc)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:Ct,autolinkProtocol:Je,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:lt,characterReferenceMarkerNumeric:lt,characterReferenceValue:Ee,characterReference:zt,codeFenced:o(N),codeFencedFence:A,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:o(y),codeText:o(F),codeTextData:I,data:I,definition:o(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(Y),htmlFlowData:I,htmlText:o(z),htmlTextData:I,image:o(ce),label:ie,labelText:Ie,lineEnding:U,link:o(ne),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Be,resourceDestinationString:x,resourceTitleString:Se,resource:We,setextHeading:o(V),setextHeadingLineSequence:W,setextHeadingText:w,strong:o(),thematicBreak:o()}};Zo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[]};const G={stack:[B],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},J=[];let se=-1;for(;++se<O.length;)if(O[se][1].type==="listOrdered"||O[se][1].type==="listUnordered")if(O[se][0]==="enter")J.push(se);else{const Fe=J.pop();se=i(O,Fe,se)}for(se=-1;++se<O.length;){const Fe=t[O[se][0]];Xo.call(Fe,O[se][1].type)&&Fe[O[se][1].type].call(Object.assign({sliceSerialize:O[se][2].sliceSerialize},G),O[se][1])}if(G.tokenStack.length>0){const Fe=G.tokenStack[G.tokenStack.length-1];(Fe[1]||bs).call(G,void 0,Fe[0])}for(B.position={start:et(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:et(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)B=t.transforms[se](B)||B;return B}function i(O,B,G){let J=B-1,se=-1,Fe=!1,ct,Ge,$t,Yt;for(;++J<=G;){const we=O[J];switch(we[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{we[0]==="enter"?se++:se--,Yt=void 0;break}case"lineEndingBlank":{we[0]==="enter"&&(ct&&!Yt&&!se&&!$t&&($t=J),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!se&&we[0]==="enter"&&we[1].type==="listItemPrefix"||se===-1&&we[0]==="exit"&&(we[1].type==="listUnordered"||we[1].type==="listOrdered")){if(ct){let It=J;for(Ge=void 0;It--;){const Qe=O[It];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ge&&(O[Ge][1].type="lineEndingBlank",Fe=!0),Qe[1].type="lineEnding",Ge=It}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}$t&&(!Ge||$t<Ge)&&(ct._spread=!0),ct.end=Object.assign({},Ge?O[Ge][1].start:we[1].end),O.splice(Ge||J,0,["exit",ct,we[2]]),J++,G++}if(we[1].type==="listItemPrefix"){const It={type:"listItem",_spread:!1,start:Object.assign({},we[1].start),end:void 0};ct=It,O.splice(J,0,["enter",It,we[2]]),J++,G++,$t=void 0,Yt=!0}}}return O[B][1]._spread=Fe,G}function a(O,B){return G;function G(J){u.call(this,O(J),J),B&&B.call(this,J)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(O,B,G){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,G||void 0]),O.position={start:et(B.start),end:void 0}}function o(O){return B;function B(G){O&&O.call(this,G),c.call(this,G)}}function c(O,B){const G=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==O.type&&(B?B.call(this,O,J[0]):(J[1]||bs).call(this,O,J[0]));else throw new Error("Cannot close `"+O.type+"` ("+hn({start:O.start,end:O.end})+"): it’s not open");G.position.end=et(O.end)}function h(){return Li(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function p(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function b(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function R(O){const B=this.resume(),G=this.stack[this.stack.length-1];G.label=B,G.identifier=Ue(this.sliceSerialize(O)).toLowerCase()}function L(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function H(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function j(O){const B=this.stack[this.stack.length-1];if(!B.depth){const G=this.sliceSerialize(O).length;B.depth=G}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function W(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function K(O){const G=this.stack[this.stack.length-1].children;let J=G[G.length-1];(!J||J.type!=="text")&&(J=hc(),J.position={start:et(O.start),end:void 0},G.push(J)),this.stack.push(J)}function I(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=et(O.end)}function U(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=B.children[B.children.length-1];G.position.end=et(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(K.call(this,O),I.call(this,O))}function v(){this.data.atHardBreak=!0}function Y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function z(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function F(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ne(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ce(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Ie(O){const B=this.sliceSerialize(O),G=this.stack[this.stack.length-2];G.label=Hp(B),G.identifier=Ue(B).toLowerCase()}function ie(){const O=this.stack[this.stack.length-1],B=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const J=O.children;G.children=J}else G.alt=B}function x(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function Se(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function We(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Be(O){const B=this.resume(),G=this.stack[this.stack.length-1];G.label=B,G.identifier=Ue(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function lt(O){this.data.characterReferenceType=O.type}function Ee(O){const B=this.sliceSerialize(O),G=this.data.characterReferenceType;let J;G?(J=xo(B,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=Ri(B);const se=this.stack[this.stack.length-1];se.value+=J}function zt(O){const B=this.stack.pop();B.position.end=et(O.end)}function Je(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function Ct(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function Nt(){return{type:"blockquote",children:[]}}function wn(){return{type:"code",lang:null,meta:null,value:""}}function ic(){return{type:"inlineCode",value:""}}function ac(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sc(){return{type:"emphasis",children:[]}}function na(){return{type:"heading",depth:0,children:[]}}function ra(){return{type:"break"}}function ia(){return{type:"html",value:""}}function uc(){return{type:"image",title:null,url:"",alt:null}}function aa(){return{type:"link",title:null,url:"",children:[]}}function sa(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function oc(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function lc(){return{type:"paragraph",children:[]}}function cc(){return{type:"strong",children:[]}}function hc(){return{type:"text",value:""}}function dc(){return{type:"thematicBreak"}}}function et(e){return{line:e.line,column:e.column,offset:e.offset}}function Zo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Zo(e,r):hb(e,r)}}function hb(e,t){let n;for(n in t)if(Xo.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function bs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+hn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hn({start:t.start,end:t.end})+") is still open")}function db(e){const t=this;t.parser=n;function n(r){return lb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function pb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
42
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function sb(e){const r={constructs:Ao([nb,...(e||{}).extensions||[]]),content:i(vE),defined:[],document:i(FE),flow:i(jE),lazy:{},string:i(YE),text:i(qE)};return r;function i(a){return s;function s(u){return rb(r,a,u)}}}function ub(e){for(;!Po(e););return e}const Ts=/[\0\t\n\r]/g;function ob(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Ts.lastIndex=d,c=Ts.exec(a),f=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(f),!c){t=a.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(a.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Zo={}.hasOwnProperty;function lb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),cb(n)(ub(sb(n).document().write(ob()(e,t,!0))))}function cb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ua),autolinkProtocol:K,autolinkEmail:K,atxHeading:a(ia),blockQuote:a(Nt),characterEscape:K,characterReference:K,codeFenced:a(wn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(wn,s),codeText:a(ic,s),codeTextData:K,data:K,codeFlowValue:K,definition:a(ac),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(sc),hardBreakEscape:a(aa),hardBreakTrailing:a(aa),htmlFlow:a(sa,s),htmlFlowData:K,htmlText:a(sa,s),htmlTextData:K,image:a(uc),label:s,link:a(ua),listItem:a(oc),listItemValue:f,listOrdered:a(oa,d),listUnordered:a(oa),paragraph:a(lc),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ia),strong:a(cc),thematicBreak:a(dc)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:Ct,autolinkProtocol:Je,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:lt,characterReferenceMarkerNumeric:lt,characterReferenceValue:Ee,characterReference:zt,codeFenced:o(N),codeFencedFence:A,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:o(y),codeText:o(F),codeTextData:I,data:I,definition:o(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(Y),htmlFlowData:I,htmlText:o(z),htmlTextData:I,image:o(ce),label:ie,labelText:Ie,lineEnding:U,link:o(ne),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Be,resourceDestinationString:x,resourceTitleString:Se,resource:We,setextHeading:o(V),setextHeadingLineSequence:W,setextHeadingText:w,strong:o(),thematicBreak:o()}};Jo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[]};const G={stack:[B],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},J=[];let se=-1;for(;++se<O.length;)if(O[se][1].type==="listOrdered"||O[se][1].type==="listUnordered")if(O[se][0]==="enter")J.push(se);else{const Fe=J.pop();se=i(O,Fe,se)}for(se=-1;++se<O.length;){const Fe=t[O[se][0]];Zo.call(Fe,O[se][1].type)&&Fe[O[se][1].type].call(Object.assign({sliceSerialize:O[se][2].sliceSerialize},G),O[se][1])}if(G.tokenStack.length>0){const Fe=G.tokenStack[G.tokenStack.length-1];(Fe[1]||xs).call(G,void 0,Fe[0])}for(B.position={start:et(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:et(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)B=t.transforms[se](B)||B;return B}function i(O,B,G){let J=B-1,se=-1,Fe=!1,ct,Ge,$t,Yt;for(;++J<=G;){const we=O[J];switch(we[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{we[0]==="enter"?se++:se--,Yt=void 0;break}case"lineEndingBlank":{we[0]==="enter"&&(ct&&!Yt&&!se&&!$t&&($t=J),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!se&&we[0]==="enter"&&we[1].type==="listItemPrefix"||se===-1&&we[0]==="exit"&&(we[1].type==="listUnordered"||we[1].type==="listOrdered")){if(ct){let It=J;for(Ge=void 0;It--;){const Qe=O[It];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ge&&(O[Ge][1].type="lineEndingBlank",Fe=!0),Qe[1].type="lineEnding",Ge=It}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}$t&&(!Ge||$t<Ge)&&(ct._spread=!0),ct.end=Object.assign({},Ge?O[Ge][1].start:we[1].end),O.splice(Ge||J,0,["exit",ct,we[2]]),J++,G++}if(we[1].type==="listItemPrefix"){const It={type:"listItem",_spread:!1,start:Object.assign({},we[1].start),end:void 0};ct=It,O.splice(J,0,["enter",It,we[2]]),J++,G++,$t=void 0,Yt=!0}}}return O[B][1]._spread=Fe,G}function a(O,B){return G;function G(J){u.call(this,O(J),J),B&&B.call(this,J)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(O,B,G){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,G||void 0]),O.position={start:et(B.start),end:void 0}}function o(O){return B;function B(G){O&&O.call(this,G),c.call(this,G)}}function c(O,B){const G=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==O.type&&(B?B.call(this,O,J[0]):(J[1]||xs).call(this,O,J[0]));else throw new Error("Cannot close `"+O.type+"` ("+hn({start:O.start,end:O.end})+"): it’s not open");G.position.end=et(O.end)}function h(){return Ri(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function p(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function b(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function R(O){const B=this.resume(),G=this.stack[this.stack.length-1];G.label=B,G.identifier=Ue(this.sliceSerialize(O)).toLowerCase()}function L(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function H(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function j(O){const B=this.stack[this.stack.length-1];if(!B.depth){const G=this.sliceSerialize(O).length;B.depth=G}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function W(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function K(O){const G=this.stack[this.stack.length-1].children;let J=G[G.length-1];(!J||J.type!=="text")&&(J=hc(),J.position={start:et(O.start),end:void 0},G.push(J)),this.stack.push(J)}function I(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=et(O.end)}function U(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=B.children[B.children.length-1];G.position.end=et(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(K.call(this,O),I.call(this,O))}function v(){this.data.atHardBreak=!0}function Y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function z(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function F(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ne(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ce(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Ie(O){const B=this.sliceSerialize(O),G=this.stack[this.stack.length-2];G.label=Hp(B),G.identifier=Ue(B).toLowerCase()}function ie(){const O=this.stack[this.stack.length-1],B=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const J=O.children;G.children=J}else G.alt=B}function x(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function Se(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function We(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Be(O){const B=this.resume(),G=this.stack[this.stack.length-1];G.label=B,G.identifier=Ue(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function lt(O){this.data.characterReferenceType=O.type}function Ee(O){const B=this.sliceSerialize(O),G=this.data.characterReferenceType;let J;G?(J=_o(B,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=Pi(B);const se=this.stack[this.stack.length-1];se.value+=J}function zt(O){const B=this.stack.pop();B.position.end=et(O.end)}function Je(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function Ct(O){I.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function Nt(){return{type:"blockquote",children:[]}}function wn(){return{type:"code",lang:null,meta:null,value:""}}function ic(){return{type:"inlineCode",value:""}}function ac(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sc(){return{type:"emphasis",children:[]}}function ia(){return{type:"heading",depth:0,children:[]}}function aa(){return{type:"break"}}function sa(){return{type:"html",value:""}}function uc(){return{type:"image",title:null,url:"",alt:null}}function ua(){return{type:"link",title:null,url:"",children:[]}}function oa(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function oc(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function lc(){return{type:"paragraph",children:[]}}function cc(){return{type:"strong",children:[]}}function hc(){return{type:"text",value:""}}function dc(){return{type:"thematicBreak"}}}function et(e){return{line:e.line,column:e.column,offset:e.offset}}function Jo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jo(e,r):hb(e,r)}}function hb(e,t){let n;for(n in t)if(Zo.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function xs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+hn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hn({start:t.start,end:t.end})+") is still open")}function db(e){const t=this;t.parser=n;function n(r){return lb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function pb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
43
|
`}]}function mb(e,t){const n=t.value?t.value+`
|
|
44
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function gb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=jt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function Tb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function
|
|
44
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function gb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=jt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function Tb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function el(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function _b(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return el(e,t);const i={src:jt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ab(e,t){const n={src:jt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function kb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function yb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return el(e,t);const i={href:jt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Cb(e,t){const n={href:jt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Nb(e,t,n){const r=e.all(t),i=n?Ib(n):tl(t),a={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
|
|
45
45
|
`}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
46
|
-
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Ib(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=
|
|
46
|
+
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Ib(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=tl(n[r])}return t}function tl(e){const t=e.spread;return t??e.children.length>1}function Sb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function wb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ob(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rb(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=qe(t.children[1]),o=lr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Db(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],f={},p=s?s[o]:void 0;p&&(f.align=p);let b={type:"element",tagName:a,properties:f,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),c.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function Pb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _s=9,As=32;function Mb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(ks(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ks(t.slice(i),i>0,!1)),a.join("")}function ks(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===_s||a===As;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===_s||a===As;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function vb(e,t){const n={type:"text",value:Mb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Bb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Fb={blockquote:fb,break:pb,code:mb,delete:gb,emphasis:Eb,footnoteReference:bb,heading:Tb,html:xb,imageReference:_b,image:Ab,inlineCode:kb,linkReference:yb,link:Cb,listItem:Nb,list:Sb,paragraph:wb,root:Lb,strong:Ob,table:Rb,tableCell:Pb,tableRow:Db,text:vb,thematicBreak:Bb,toml:Dn,yaml:Dn,definition:Dn,footnoteDefinition:Dn};function Dn(){}function Hb(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ub(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function jb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Hb,r=e.options.footnoteBackLabel||Ub,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const h=e.all(c),d=String(c.identifier).toUpperCase(),f=jt(d.toLowerCase());let p=0;const b=[],A=e.footnoteCounts.get(d);for(;A!==void 0&&++p<=A;){b.length>0&&b.push({type:"text",value:" "});let R=typeof n=="string"?n:n(o,p);typeof R=="string"&&(R={type:"text",value:R}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const N=h[h.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const R=N.children[N.children.length-1];R&&R.type==="text"?R.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...b)}else h.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(h,!0)};e.patch(c,y),u.push(y)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Et(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
47
47
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
48
|
-
`}]}}const Jr={}.hasOwnProperty,zb={};function $b(e,t){const n=t||zb,r=new Map,i=new Map,a=new Map,s={...Fb,...n.handlers},u={all:c,applyData:qb,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:Yb,wrap:Wb};return at(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,p=u.handlers[f];if(Jr.call(u.handlers,f)&&p)return p(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:A,...N}=h,y=Et(N);return y.children=u.all(h),y}return Et(h)}return(u.options.unknownHandler||Vb)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const b=u.one(f[p],h);if(b){if(p&&f[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=
|
|
48
|
+
`}]}}const Jr={}.hasOwnProperty,zb={};function $b(e,t){const n=t||zb,r=new Map,i=new Map,a=new Map,s={...Fb,...n.handlers},u={all:c,applyData:qb,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:Yb,wrap:Wb};return at(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,p=u.handlers[f];if(Jr.call(u.handlers,f)&&p)return p(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:A,...N}=h,y=Et(N);return y.children=u.all(h),y}return Et(h)}return(u.options.unknownHandler||Vb)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const b=u.one(f[p],h);if(b){if(p&&f[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=ys(b.value)),!Array.isArray(b)&&b.type==="element")){const A=b.children[0];A&&A.type==="text"&&(A.value=ys(A.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function Yb(e,t){e.position&&(t.position=Qu(e))}function qb(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Et(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Vb(e,t){const n=t.data||{},r="value"in t&&!(Jr.call(n,"hProperties")||Jr.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wb(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
49
49
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
50
50
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
51
|
-
`}),n}function
|
|
52
|
-
`},i),a}function Gb(e,t){return e&&"run"in e?async function(n,r){const i=ks(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ks(n,{file:r,...e||t})}}function ys(e){if(e)throw e}var Or,Cs;function Qb(){if(Cs)return Or;Cs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return Or=function o(){var c,h,d,f,p,b,A=arguments[0],N=1,y=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},N=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});N<y;++N)if(c=arguments[N],c!=null)for(h in c)d=u(A,h),f=u(c,h),A!==f&&(R&&f&&(a(f)||(p=i(f)))?(p?(p=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(A,{name:h,newValue:o(R,b,f)})):typeof f<"u"&&s(A,{name:h,newValue:f}));return A},Or}var Kb=Qb();const Rr=Zs(Kb);function ei(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xb(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?Zb(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Zb(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const $e={basename:Jb,dirname:eT,extname:tT,join:nT,sep:"/"};function Jb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');In(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function eT(e){if(In(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tT(e){In(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function nT(...e){let t=-1,n;for(;++t<e.length;)In(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rT(n)}function rT(e){In(e);const t=e.codePointAt(0)===47;let n=iT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function iT(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function In(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aT={cwd:sT};function sT(){return"/"}function ti(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uT(e){if(typeof e=="string")e=new URL(e);else if(!ti(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return oT(e)}function oT(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Dr=["history","path","basename","stem","extname","dirname"];class lT{constructor(t){let n;t?ti(t)?n={path:t}:typeof t=="string"||cT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Dr.length;){const a=Dr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Dr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?$e.basename(this.path):void 0}set basename(t){Mr(t,"basename"),Pr(t,"basename"),this.path=$e.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$e.dirname(this.path):void 0}set dirname(t){Ns(this.basename,"dirname"),this.path=$e.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$e.extname(this.path):void 0}set extname(t){if(Pr(t,"extname"),Ns(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$e.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ti(t)&&(t=uT(t)),Mr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$e.basename(this.path,this.extname):void 0}set stem(t){Mr(t,"stem"),Pr(t,"stem"),this.path=$e.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Pr(e,t){if(e&&e.includes($e.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$e.sep+"`")}function Mr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ns(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),dT={}.hasOwnProperty;class Hi extends hT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xb()}copy(){const t=new Hi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Fr("data",this.frozen),this.namespace[t]=n,this):dT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Fr("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Pn(t),r=this.parser||this.Parser;return vr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),vr("process",this.parser||this.Parser),Br("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Pn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const p=d,b=r.stringify(p,f);mT(b)?f.value=b:f.result=b,c(h,f)});function c(h,d){h||!d?s(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),vr("processSync",this.parser||this.Parser),Br("processSync",this.compiler||this.Compiler),this.process(t,i),Ss("processSync","process",n),r;function i(a,s){n=!0,ys(a),r=s}}run(t,n,r){Is(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=Pn(n);i.run(t,o,c);function c(h,d,f){const p=d||t;h?u(h):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ss("runSync","run",r),i;function a(s,u){ys(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Pn(n),i=this.compiler||this.Compiler;return Br("stringify",i),Is(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Fr("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=Rr(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[p,...b]=h;const A=r[f][1];ei(A)&&ei(p)&&(p=Rr(!0,A,p)),r[f]=[c,p,...b]}}}}const fT=new Hi().freeze();function vr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Br(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Is(e){if(!ei(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ss(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pn(e){return pT(e)?e:new lT(e)}function pT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mT(e){return typeof e=="string"||gT(e)}function gT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ui(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yt=Ui();function tl(e){yt=e}var dn={exec:()=>null};function te(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ke.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var ET=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ke={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},bT=/^(?:[ \t]*(?:\n|$))+/,TT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Sn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_T=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ji=/(?:[*+-]|\d{1,9}[.)])/,nl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rl=te(nl).replace(/bull/g,ji).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),AT=te(nl).replace(/bull/g,ji).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),zi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kT=/^[^\n]+/,$i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yT=te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),CT=te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ji).getRegex(),fr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,NT=te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Yi).replace("tag",fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),il=te(zi).replace("hr",Sn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),IT=te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",il).getRegex(),qi={blockquote:IT,code:TT,def:yT,fences:xT,heading:_T,hr:Sn,html:NT,lheading:rl,list:CT,newline:bT,paragraph:il,table:dn,text:kT},ws=te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Sn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),ST={...qi,lheading:AT,table:ws,paragraph:te(zi).replace("hr",Sn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ws).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex()},wT={...qi,html:te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:dn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:te(zi).replace("hr",Sn).replace("heading",` *#{1,6} *[^
|
|
53
|
-
]`).replace("lheading",
|
|
51
|
+
`}),n}function ys(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Cs(e,t){const n=$b(e,t),r=n.one(e,void 0),i=jb(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
52
|
+
`},i),a}function Gb(e,t){return e&&"run"in e?async function(n,r){const i=Cs(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Cs(n,{file:r,...e||t})}}function Ns(e){if(e)throw e}var Or,Is;function Qb(){if(Is)return Or;Is=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return Or=function o(){var c,h,d,f,p,b,A=arguments[0],N=1,y=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},N=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});N<y;++N)if(c=arguments[N],c!=null)for(h in c)d=u(A,h),f=u(c,h),A!==f&&(R&&f&&(a(f)||(p=i(f)))?(p?(p=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(A,{name:h,newValue:o(R,b,f)})):typeof f<"u"&&s(A,{name:h,newValue:f}));return A},Or}var Kb=Qb();const Rr=eu(Kb);function ei(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xb(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?Zb(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Zb(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const $e={basename:Jb,dirname:eT,extname:tT,join:nT,sep:"/"};function Jb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');In(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function eT(e){if(In(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tT(e){In(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function nT(...e){let t=-1,n;for(;++t<e.length;)In(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rT(n)}function rT(e){In(e);const t=e.codePointAt(0)===47;let n=iT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function iT(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function In(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aT={cwd:sT};function sT(){return"/"}function ti(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uT(e){if(typeof e=="string")e=new URL(e);else if(!ti(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return oT(e)}function oT(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Dr=["history","path","basename","stem","extname","dirname"];class lT{constructor(t){let n;t?ti(t)?n={path:t}:typeof t=="string"||cT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Dr.length;){const a=Dr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Dr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?$e.basename(this.path):void 0}set basename(t){Mr(t,"basename"),Pr(t,"basename"),this.path=$e.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$e.dirname(this.path):void 0}set dirname(t){Ss(this.basename,"dirname"),this.path=$e.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$e.extname(this.path):void 0}set extname(t){if(Pr(t,"extname"),Ss(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$e.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ti(t)&&(t=uT(t)),Mr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$e.basename(this.path,this.extname):void 0}set stem(t){Mr(t,"stem"),Pr(t,"stem"),this.path=$e.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Pr(e,t){if(e&&e.includes($e.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$e.sep+"`")}function Mr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ss(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),dT={}.hasOwnProperty;class ji extends hT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xb()}copy(){const t=new ji;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Fr("data",this.frozen),this.namespace[t]=n,this):dT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Fr("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Pn(t),r=this.parser||this.Parser;return vr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),vr("process",this.parser||this.Parser),Br("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Pn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const p=d,b=r.stringify(p,f);mT(b)?f.value=b:f.result=b,c(h,f)});function c(h,d){h||!d?s(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),vr("processSync",this.parser||this.Parser),Br("processSync",this.compiler||this.Compiler),this.process(t,i),Ls("processSync","process",n),r;function i(a,s){n=!0,Ns(a),r=s}}run(t,n,r){ws(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=Pn(n);i.run(t,o,c);function c(h,d,f){const p=d||t;h?u(h):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ls("runSync","run",r),i;function a(s,u){Ns(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Pn(n),i=this.compiler||this.Compiler;return Br("stringify",i),ws(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Fr("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=Rr(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[p,...b]=h;const A=r[f][1];ei(A)&&ei(p)&&(p=Rr(!0,A,p)),r[f]=[c,p,...b]}}}}const fT=new ji().freeze();function vr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Br(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ws(e){if(!ei(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ls(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pn(e){return pT(e)?e:new lT(e)}function pT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mT(e){return typeof e=="string"||gT(e)}function gT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function zi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yt=zi();function nl(e){yt=e}var dn={exec:()=>null};function te(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(ke.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var ET=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ke={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},bT=/^(?:[ \t]*(?:\n|$))+/,TT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Sn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_T=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$i=/(?:[*+-]|\d{1,9}[.)])/,rl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,il=te(rl).replace(/bull/g,$i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),AT=te(rl).replace(/bull/g,$i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kT=/^[^\n]+/,qi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yT=te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),CT=te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$i).getRegex(),fr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Vi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,NT=te("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vi).replace("tag",fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),al=te(Yi).replace("hr",Sn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),IT=te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",al).getRegex(),Wi={blockquote:IT,code:TT,def:yT,fences:xT,heading:_T,hr:Sn,html:NT,lheading:il,list:CT,newline:bT,paragraph:al,table:dn,text:kT},Os=te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Sn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),ST={...Wi,lheading:AT,table:Os,paragraph:te(Yi).replace("hr",Sn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Os).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex()},wT={...Wi,html:te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:dn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:te(Yi).replace("hr",Sn).replace("heading",` *#{1,6} *[^
|
|
53
|
+
]`).replace("lheading",il).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},LT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sl=/^( {2,}|\\)\n(?!\s*$)/,RT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pr=/[\p{P}\p{S}]/u,Gi=/[\s\p{P}\p{S}]/u,ul=/[^\s\p{P}\p{S}]/u,DT=te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gi).getRegex(),ol=/(?!~)[\p{P}\p{S}]/u,PT=/(?!~)[\s\p{P}\p{S}]/u,MT=/(?:[^\s\p{P}\p{S}]|~)/u,vT=te(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ET?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ll=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,BT=te(ll,"u").replace(/punct/g,pr).getRegex(),FT=te(ll,"u").replace(/punct/g,ol).getRegex(),cl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",HT=te(cl,"gu").replace(/notPunctSpace/g,ul).replace(/punctSpace/g,Gi).replace(/punct/g,pr).getRegex(),UT=te(cl,"gu").replace(/notPunctSpace/g,MT).replace(/punctSpace/g,PT).replace(/punct/g,ol).getRegex(),jT=te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ul).replace(/punctSpace/g,Gi).replace(/punct/g,pr).getRegex(),zT=te(/\\(punct)/,"gu").replace(/punct/g,pr).getRegex(),$T=te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),YT=te(Vi).replace("(?:-->|$)","-->").getRegex(),qT=te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",YT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,VT=te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Qn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hl=te(/^!?\[(label)\]\[(ref)\]/).replace("label",Qn).replace("ref",qi).getRegex(),dl=te(/^!?\[(ref)\](?:\[\])?/).replace("ref",qi).getRegex(),WT=te("reflink|nolink(?!\\()","g").replace("reflink",hl).replace("nolink",dl).getRegex(),Rs=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qi={_backpedal:dn,anyPunctuation:zT,autolink:$T,blockSkip:vT,br:sl,code:OT,del:dn,emStrongLDelim:BT,emStrongRDelimAst:HT,emStrongRDelimUnd:jT,escape:LT,link:VT,nolink:dl,punctuation:DT,reflink:hl,reflinkSearch:WT,tag:qT,text:RT,url:dn},GT={...Qi,link:te(/^!?\[(label)\]\((.*?)\)/).replace("label",Qn).getRegex(),reflink:te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qn).getRegex()},ni={...Qi,emStrongRDelimAst:UT,emStrongLDelim:FT,url:te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Rs).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:te(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Rs).getRegex()},QT={...ni,br:te(sl).replace("{2,}","*").getRegex(),text:te(ni.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Mn={normal:Wi,gfm:ST,pedantic:wT},Xt={normal:Qi,gfm:ni,breaks:QT,pedantic:GT},KT={"&":"&","<":"<",">":">",'"':""","'":"'"},Ds=e=>KT[e];function Ke(e,t){if(t){if(ke.escapeTest.test(e))return e.replace(ke.escapeReplace,Ds)}else if(ke.escapeTestNoEncode.test(e))return e.replace(ke.escapeReplaceNoEncode,Ds);return e}function Ps(e){try{e=encodeURI(e).replace(ke.percentDecode,"%")}catch{return null}return e}function Ms(e,t){let n=e.replace(ke.findPipe,(a,s,u)=>{let o=!1,c=s;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(ke.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(ke.slashPipe,"|");return r}function Zt(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function XT(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function vs(e,t,n,r,i){let a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function ZT(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
54
54
|
`).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
|
|
55
55
|
`)}var Kn=class{options;rules;lexer;constructor(e){this.options=e||yt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Zt(n,`
|
|
56
56
|
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=ZT(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Zt(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Zt(t[0],`
|
|
@@ -72,9 +72,9 @@ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
72
72
|
`,1)[0],j;if(f=H,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),j=f):j=f.replace(this.rules.other.tabCharGlobal," "),y.test(f)||R.test(f)||L.test(f)||A.test(f)||N.test(f))break;if(j.search(this.rules.other.nonSpaceChar)>=b||!f.trim())h+=`
|
|
73
73
|
`+j.slice(b);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(d)||R.test(d)||N.test(d))break;h+=`
|
|
74
74
|
`+f}!p&&!f.trim()&&(p=!0),c+=H+`
|
|
75
|
-
`,e=e.substring(H.length+1),d=j.slice(b)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=c}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(o.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};o.checked=h.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!i.loose){let c=o.tokens.filter(d=>d.type==="space"),h=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=h}}if(i.loose)for(let o of i.items){o.loose=!0;for(let c of o.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=
|
|
76
|
-
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(
|
|
77
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=Zt(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=XT(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),
|
|
75
|
+
`,e=e.substring(H.length+1),d=j.slice(b)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=c}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(o.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};o.checked=h.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!i.loose){let c=o.tokens.filter(d=>d.type==="space"),h=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=h}}if(i.loose)for(let o of i.items){o.loose=!0;for(let c of o.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Ms(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
76
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(Ms(s,a.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
77
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=Zt(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=XT(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),vs(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return vs(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+s);if(Math.min(i,s)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Me=class ri{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yt,this.options.tokenizer=this.options.tokenizer||new Kn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ke,block:Mn.normal,inline:Xt.normal};this.options.pedantic?(n.block=Mn.pedantic,n.inline=Xt.pedantic):this.options.gfm&&(n.block=Mn.gfm,this.options.breaks?n.inline=Xt.breaks:n.inline=Xt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Mn,inline:Xt}}static lex(t,n){return new ri(n).lex(t)}static lexInline(t,n){return new ri(n).inlineTokens(t)}lex(t){t=t.replace(ke.carriageReturn,`
|
|
78
78
|
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(ke.tabCharGlobal," ").replace(ke.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
79
79
|
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
80
80
|
`)?"":`
|
|
@@ -106,18 +106,18 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
106
106
|
`}tablerow({text:e}){return`<tr>
|
|
107
107
|
${e}</tr>
|
|
108
108
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
109
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ke(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=
|
|
110
|
-
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Ke(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},xt=new JT;function ae(e,t){return xt.parse(e,t)}ae.options=ae.setOptions=function(e){return xt.setOptions(e),ae.defaults=xt.defaults,tl(ae.defaults),ae};ae.getDefaults=Ui;ae.defaults=yt;ae.use=function(...e){return xt.use(...e),ae.defaults=xt.defaults,tl(ae.defaults),ae};ae.walkTokens=function(e,t){return xt.walkTokens(e,t)};ae.parseInline=xt.parseInline;ae.Parser=He;ae.parser=He.parse;ae.Renderer=Xn;ae.TextRenderer=Gi;ae.Lexer=Me;ae.lexer=Me.lex;ae.Tokenizer=Kn;ae.Hooks=tn;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;He.parse;Me.lex;var e2=300,t2="300px",n2=500;function r2(e={}){let{immediate:t=!1,debounceDelay:n=e2,rootMargin:r=t2,idleTimeout:i=n2}=e,[a,s]=C.useState(!1),u=C.useRef(null),o=C.useRef(null),c=C.useRef(null),h=C.useMemo(()=>p=>{let b=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=C.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,b)=>window.requestIdleCallback(p,b):h,[h]),f=C.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return C.useEffect(()=>{if(t){s(!0);return}let p=u.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let b=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},A=L=>{c.current=d(H=>{H.timeRemaining()>0||H.didTimeout?(s(!0),L.disconnect()):c.current=d(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},N=L=>{b(),o.current=window.setTimeout(()=>{var H,j;let w=L.takeRecords();(w.length===0||(j=(H=w.at(-1))==null?void 0:H.isIntersecting)!=null&&j)&&A(L)},n)},y=(L,H)=>{L.isIntersecting?N(H):b()},R=new IntersectionObserver(L=>{for(let H of L)y(H,R)},{rootMargin:r,threshold:0});return R.observe(p),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),R.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:u}}var dl=/\s/,i2=/^\s+$/,a2=new Set(["code","pre","svg","math","annotation"]),s2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",u2=e=>e.some(t=>s2(t)&&a2.has(t.tagName)),o2=e=>{let t=[],n="",r=!1;for(let i of e){let a=dl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},l2=e=>{let t=[],n="";for(let r of e)dl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},c2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),h2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(u2(t))return zn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?l2(s):o2(s)).map(o=>i2.test(o)?{type:"text",value:o}:c2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function ai(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ei(s,"text",(u,o)=>h2(u,o,a))}}}ai();var Qi=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ki=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),mr=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),d2=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),f2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),p2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),fl=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Ms=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),m2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),g2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),q=(...e)=>fc(pc(e)),Pt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},E2=C.createContext({code:""}),pl=()=>C.useContext(E2),vs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=C.useState(!1),c=C.useRef(0),{code:h}=pl(),{isAnimating:d}=C.useContext(ve),f=a??h,p=async()=>{var A;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(f),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(N){t?.(N)}};C.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=u?Qi:Ki;return g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??g.jsx(b,{size:14})})},Bs={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},b2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=pl(),{isAnimating:o}=C.useContext(ve),c=a??u,h=`file.${n&&n in Bs?Bs[n]:"txt"}`,d="text/plain",f=()=>{try{Pt(h,c,d),e?.()}catch(p){t?.(p)}};return g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:o,onClick:f,title:"Download file",type:"button",...s,children:r??g.jsx(mr,{size:14})})},Fs=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(d2,{className:"size-4 animate-spin"})})]}),T2=/\.[^/.]+$/,x2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),h=`${(r||u||"image").replace(T2,"")}.${f}`}Pt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:q("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.jsx("button",{className:q("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:g.jsx(mr,{size:14})})]}):null},fn=0,_2=()=>{fn+=1,fn===1&&(document.body.style.overflow="hidden")},A2=()=>{fn=Math.max(0,fn-1),fn===0&&(document.body.style.overflow="")},k2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=C.useState(!1),s=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=C.useCallback(()=>{r(),n()},[r,n]);return C.useEffect(()=>{if(t){_2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),A2()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:o=>{o.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(fl,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Ms,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:q("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Qi,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ki,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:u,type:"button",children:[g.jsx(Ms,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},si=C.createContext(null),ml=()=>C.useContext(si),Jx=()=>{var e;let t=ml();return(e=t?.code)!=null?e:null},Xi=()=>{var e;let t=ml();return(e=t?.mermaid)!=null?e:null},y2=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},C2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=C.useState(!1),o=C.useRef(null),{isAnimating:c}=C.useContext(ve),h=Xi(),d=async f=>{try{if(f==="mmd"){Pt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),b=e.split("").reduce((y,R)=>(y<<5)-y+R.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await p.render(A,e);if(!N){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Pt("diagram.svg",N,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let y=await y2(N);Pt("diagram.png",y,"image/png"),r?.(f),u(!1);return}}catch(p){a?.(p)}};return C.useEffect(()=>{let f=p=>{let b=p.composedPath();o.current&&!b.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),g.jsxs("div",{className:"relative",ref:o,children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??g.jsx(mr,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},pn=0,N2=()=>{pn+=1,pn===1&&(document.body.style.overflow="hidden")},I2=()=>{pn=Math.max(0,pn-1),pn===0&&(document.body.style.overflow="")},S2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=C.useState(!1),{isAnimating:o,controls:c}=C.useContext(ve),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{u(!s)};return C.useEffect(()=>{if(s){N2();let f=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),I2()}}},[s]),C.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:g.jsx(f2,{size:14})}),s?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:g.jsx(fl,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:g.jsx(Yl,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},gl=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},El=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
|
|
109
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ke(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ps(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Ke(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ps(e);if(i===null)return Ke(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Ke(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ke(e.text)}},Ki=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},He=class ii{options;renderer;textRenderer;constructor(t){this.options=t||yt,this.options.renderer=this.options.renderer||new Xn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ki}static parse(t,n){return new ii(n).parse(t)}static parseInline(t,n){return new ii(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=u||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}let s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},tn=class{options;block;constructor(e){this.options=e||yt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Me.lex:Me.lexInline}provideParser(){return this.block?He.parse:He.parseInline}},JT=class{defaults=zi();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=He;Renderer=Xn;TextRenderer=Ki;Lexer=Me;Tokenizer=Kn;Hooks=tn;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)r=r.concat(this.walkTokens(s.tokens,n));for(let s of a.rows)for(let u of s)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let u=a[s].flat(1/0);r=r.concat(this.walkTokens(u,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...u){let o=a.renderer.apply(this,u);return o===!1&&(o=s.apply(this,u)),o}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new Xn(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let u=s,o=r.renderer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new Kn(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let u=s,o=r.tokenizer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new tn;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let u=s,o=r.hooks[u],c=a[u];tn.passThroughHooks.has(s)?a[u]=h=>{if(this.defaults.async&&tn.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await o.call(a,h);return c.call(a,f)})();let d=o.call(a,h);return c.call(a,d)}:a[u]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(s.call(this,u)),a&&(o=o.concat(a.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Me.lex(t,n??this.defaults)}parser(t,n){return He.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let u=a.hooks?await a.hooks.preprocess(n):n,o=await(a.hooks?await a.hooks.provideLexer():t?Me.lex:Me.lexInline)(u,a),c=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?He.parse:He.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let u=(a.hooks?a.hooks.provideLexer():t?Me.lex:Me.lexInline)(n,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():t?He.parse:He.parseInline)(u,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(u){return s(u)}}}onError(t,n){return r=>{if(r.message+=`
|
|
110
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Ke(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},xt=new JT;function ae(e,t){return xt.parse(e,t)}ae.options=ae.setOptions=function(e){return xt.setOptions(e),ae.defaults=xt.defaults,nl(ae.defaults),ae};ae.getDefaults=zi;ae.defaults=yt;ae.use=function(...e){return xt.use(...e),ae.defaults=xt.defaults,nl(ae.defaults),ae};ae.walkTokens=function(e,t){return xt.walkTokens(e,t)};ae.parseInline=xt.parseInline;ae.Parser=He;ae.parser=He.parse;ae.Renderer=Xn;ae.TextRenderer=Ki;ae.Lexer=Me;ae.lexer=Me.lex;ae.Tokenizer=Kn;ae.Hooks=tn;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;He.parse;Me.lex;var e2=300,t2="300px",n2=500;function r2(e={}){let{immediate:t=!1,debounceDelay:n=e2,rootMargin:r=t2,idleTimeout:i=n2}=e,[a,s]=C.useState(!1),u=C.useRef(null),o=C.useRef(null),c=C.useRef(null),h=C.useMemo(()=>p=>{let b=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=C.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,b)=>window.requestIdleCallback(p,b):h,[h]),f=C.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return C.useEffect(()=>{if(t){s(!0);return}let p=u.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let b=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},A=L=>{c.current=d(H=>{H.timeRemaining()>0||H.didTimeout?(s(!0),L.disconnect()):c.current=d(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},N=L=>{b(),o.current=window.setTimeout(()=>{var H,j;let w=L.takeRecords();(w.length===0||(j=(H=w.at(-1))==null?void 0:H.isIntersecting)!=null&&j)&&A(L)},n)},y=(L,H)=>{L.isIntersecting?N(H):b()},R=new IntersectionObserver(L=>{for(let H of L)y(H,R)},{rootMargin:r,threshold:0});return R.observe(p),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),R.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:u}}var fl=/\s/,i2=/^\s+$/,a2=new Set(["code","pre","svg","math","annotation"]),s2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",u2=e=>e.some(t=>s2(t)&&a2.has(t.tagName)),o2=e=>{let t=[],n="",r=!1;for(let i of e){let a=fl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},l2=e=>{let t=[],n="";for(let r of e)fl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},c2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),h2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(u2(t))return zn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?l2(s):o2(s)).map(o=>i2.test(o)?{type:"text",value:o}:c2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function ai(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ti(s,"text",(u,o)=>h2(u,o,a))}}}ai();var Xi=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Zi=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),mr=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),d2=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),f2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),p2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),pl=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Bs=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),m2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),g2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),q=(...e)=>fc(pc(e)),Pt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},E2=C.createContext({code:""}),ml=()=>C.useContext(E2),Fs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=C.useState(!1),c=C.useRef(0),{code:h}=ml(),{isAnimating:d}=C.useContext(ve),f=a??h,p=async()=>{var A;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(f),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(N){t?.(N)}};C.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=u?Xi:Zi;return g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??g.jsx(b,{size:14})})},Hs={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},b2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=ml(),{isAnimating:o}=C.useContext(ve),c=a??u,h=`file.${n&&n in Hs?Hs[n]:"txt"}`,d="text/plain",f=()=>{try{Pt(h,c,d),e?.()}catch(p){t?.(p)}};return g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:o,onClick:f,title:"Download file",type:"button",...s,children:r??g.jsx(mr,{size:14})})},Us=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(d2,{className:"size-4 animate-spin"})})]}),T2=/\.[^/.]+$/,x2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),h=`${(r||u||"image").replace(T2,"")}.${f}`}Pt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:q("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.jsx("button",{className:q("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:a,title:"Download image",type:"button",children:g.jsx(mr,{size:14})})]}):null},fn=0,_2=()=>{fn+=1,fn===1&&(document.body.style.overflow="hidden")},A2=()=>{fn=Math.max(0,fn-1),fn===0&&(document.body.style.overflow="")},k2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=C.useState(!1),s=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=C.useCallback(()=>{r(),n()},[r,n]);return C.useEffect(()=>{if(t){_2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),A2()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:o=>{o.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(pl,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Bs,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:q("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Xi,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Zi,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:u,type:"button",children:[g.jsx(Bs,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},si=C.createContext(null),gl=()=>C.useContext(si),s3=()=>{var e;let t=gl();return(e=t?.code)!=null?e:null},Ji=()=>{var e;let t=gl();return(e=t?.mermaid)!=null?e:null},y2=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},C2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=C.useState(!1),o=C.useRef(null),{isAnimating:c}=C.useContext(ve),h=Ji(),d=async f=>{try{if(f==="mmd"){Pt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),b=e.split("").reduce((y,R)=>(y<<5)-y+R.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await p.render(A,e);if(!N){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Pt("diagram.svg",N,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let y=await y2(N);Pt("diagram.png",y,"image/png"),r?.(f),u(!1);return}}catch(p){a?.(p)}};return C.useEffect(()=>{let f=p=>{let b=p.composedPath();o.current&&!b.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),g.jsxs("div",{className:"relative",ref:o,children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??g.jsx(mr,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},pn=0,N2=()=>{pn+=1,pn===1&&(document.body.style.overflow="hidden")},I2=()=>{pn=Math.max(0,pn-1),pn===0&&(document.body.style.overflow="")},S2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=C.useState(!1),{isAnimating:o,controls:c}=C.useContext(ve),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{u(!s)};return C.useEffect(()=>{if(s){N2();let f=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),I2()}}},[s]),C.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:g.jsx(f2,{size:14})}),s?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:g.jsx(pl,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:g.jsx(Vl,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},El=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},bl=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
|
|
111
111
|
`)&&(o=!0)}return o?c?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let u of n)a[s]=u.map(r).join(","),s+=1;return a.join(`
|
|
112
112
|
`)},w2=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
|
|
113
113
|
`||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
|
|
114
114
|
`?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let u of n)a[s]=u.map(r).join(" "),s+=1;return a.join(`
|
|
115
115
|
`)},Hr=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},L2=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>Hr(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let c=0;c<t.length;c+=1)o[c]=c<u.length?Hr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>Hr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
|
|
116
|
-
`)},O2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=C.useState(!1),[u,o]=C.useState(!1),c=C.useRef(null),h=C.useRef(0),{isAnimating:d}=C.useContext(ve),f=async b=>{var A,N;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let y=(N=c.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),R=y?.querySelector("table");if(!R){r?.(new Error("Table not found"));return}let L=gl(R),H=b==="csv"?El(L):w2(L),j=new ClipboardItem({"text/plain":new Blob([H],{type:"text/plain"}),"text/html":new Blob([R.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(y){r?.(y)}};C.useEffect(()=>{let b=A=>{let N=A.composedPath();c.current&&!N.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?Qi:Ki;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},R2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=C.useState(!1),s=C.useRef(null),{isAnimating:u}=C.useContext(ve),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=gl(f),b=c==="csv"?El(p):L2(p);Pt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return C.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(mr,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},D2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(O2,{}),g.jsx(R2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:q("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),P2=C.lazy(()=>Js(()=>import("./code-block-OCS4YCEC-CYhJ9OPu.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),M2=C.lazy(()=>Js(()=>Promise.resolve().then(()=>Vx),void 0).then(e=>({default:e.Mermaid}))),v2=/language-([^\s]+)/;function gr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function de(e,t){return e.className===t.className&&gr(e.node,t.node)}var ui=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,vn=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Zi=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:q("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>de(e,t));Zi.displayName="MarkdownOl";var bl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:q("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&gr(e.node,t.node));bl.displayName="MarkdownLi";var Tl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:q("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>de(e,t));Tl.displayName="MarkdownUl";var xl=C.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:q("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>de(e,t));xl.displayName="MarkdownHr";var _l=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:q("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>de(e,t));_l.displayName="MarkdownStrong";var B2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=C.useContext(ve),[s,u]=C.useState(!1),o=n==="streamdown:incomplete-link",c=C.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=C.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=C.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:q("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(k2,{...f})]}):g.jsx("a",{className:q("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Al=C.memo(B2,(e,t)=>de(e,t)&&e.href===t.href);Al.displayName="MarkdownA";var kl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:q("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>de(e,t));kl.displayName="MarkdownH1";var yl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:q("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>de(e,t));yl.displayName="MarkdownH2";var Cl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:q("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>de(e,t));Cl.displayName="MarkdownH3";var Nl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:q("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>de(e,t));Nl.displayName="MarkdownH4";var Il=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:q("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>de(e,t));Il.displayName="MarkdownH5";var Sl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:q("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>de(e,t));Sl.displayName="MarkdownH6";var wl=C.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=C.useContext(ve),a=ui(i,"table");return g.jsx(D2,{className:t,showControls:a,...r,children:e})},(e,t)=>de(e,t));wl.displayName="MarkdownTable";var Ll=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:q("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>de(e,t));Ll.displayName="MarkdownThead";var Ol=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:q("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>de(e,t));Ol.displayName="MarkdownTbody";var Rl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:q("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>de(e,t));Rl.displayName="MarkdownTr";var Dl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:q("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>de(e,t));Dl.displayName="MarkdownTh";var Pl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:q("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>de(e,t));Pl.displayName="MarkdownTd";var Ml=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:q("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>de(e,t));Ml.displayName="MarkdownBlockquote";var vl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:q("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>de(e,t));vl.displayName="MarkdownSup";var Bl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:q("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>de(e,t));Bl.displayName="MarkdownSub";var Fl=C.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!C.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(C.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(C.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!C.isValidElement(s))return s;if(s.type===Zi){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>de(e,t));Fl.displayName="MarkdownSection";var F2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=C.useContext(ve),o=Xi();if(a)return g.jsx("code",{className:q("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(v2),h=(i=c?.at(1))!=null?i:"",d="";if(C.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=ui(u,"mermaid"),b=vn(u,"download"),A=vn(u,"copy"),N=vn(u,"fullscreen"),y=vn(u,"panZoom"),R=p&&(b||A||N);return g.jsx(C.Suspense,{fallback:g.jsx(Fs,{}),children:g.jsxs("div",{className:q("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(C2,{chart:d,config:s?.config}):null,A?g.jsx(vs,{code:d}):null,N?g.jsx(S2,{chart:d,config:s?.config}):null]}):null,g.jsx(M2,{chart:d,config:s?.config,showControls:y})]})})}let f=ui(u,"code");return g.jsx(C.Suspense,{fallback:g.jsx(Fs,{}),children:g.jsx(P2,{className:q("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(b2,{code:d,language:h}),g.jsx(vs,{})]}):null})})},Hl=C.memo(F2,(e,t)=>e.className===t.className&&gr(e.node,t.node));Hl.displayName="MarkdownCode";var Ul=C.memo(x2,(e,t)=>e.className===t.className&&gr(e.node,t.node));Ul.displayName="MarkdownImg";var jl=C.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&C.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>de(e,t));jl.displayName="MarkdownParagraph";var H2={ol:Zi,li:bl,ul:Tl,hr:xl,strong:_l,a:Al,h1:kl,h2:yl,h3:Cl,h4:Nl,h5:Il,h6:Sl,table:wl,thead:Ll,tbody:Ol,tr:Rl,th:Dl,td:Pl,blockquote:Ml,code:Hl,img:Ul,pre:({children:e})=>C.isValidElement(e)?C.cloneElement(e,{"data-block":"true"}):e,sup:vl,sub:Bl,p:jl,section:Fl},U2=()=>e=>{at(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Hs=[],Us={allowDangerousHtml:!0},Bn=new WeakMap,j2=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,A]=p;if(typeof b=="function"){let N=Bn.get(b);N||(N=b.name,Bn.set(b,N)),d+=N}else d+=String(b);d+=":",d+=JSON.stringify(A)}else if(typeof p=="function"){let b=Bn.get(p);b||(b=p.name,Bn.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},js=new j2,zl=e=>{let t=z2(e),n=e.children||"";return Q2(t.runSync(t.parse(n),n),e)},z2=e=>{let t=js.get(e);if(t)return t;let n=Y2(e);return js.set(e,n),n},$2=e=>e.some(t=>Array.isArray(t)?t[0]===Gr:t===Gr),Y2=e=>{let t=e.rehypePlugins||Hs,n=e.remarkPlugins||Hs,r=$2(t)?n:[...n,U2],i=e.remarkRehypeOptions?{...Us,...e.remarkRehypeOptions}:Us;return fT().use(db).use(r).use(Gb,i).use(t)},q2=e=>e,V2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},W2=(e,t)=>{var n;for(let r in Lr)if(Object.hasOwn(Lr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Lr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},G2=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},Q2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||q2;at(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return V2(d,h,a,c.value),h;if(c.type==="element"&&(W2(c,o),G2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return xE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},K2=/\[\^[\w-]{1,200}\](?!:)/,X2=/\[\^[\w-]{1,200}\]:/,Z2=/<\/(\w+)>/,J2=/<(\w+)[\s>]/,ex=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),tx=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},nx=e=>{let t=K2.test(e),n=X2.test(e);if(t||n)return[e];let r=Me.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(Z2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(J2);if(h){let d=h[1];o.includes(`</${d}>`)||ex.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(tx(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},zs,$s,jn={...ln,protocols:{...ln.protocols,href:[...($s=(zs=ln.protocols)==null?void 0:zs.href)!=null?$s:[],"tel"]}},oi={raw:Gr,sanitize:[no,jn],harden:[Dc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},rx={gfm:[K1,{}]},Ys=Object.values(oi),ix=Object.values(rx),ax={block:" ▋",circle:" ●"},sx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ve=C.createContext(sx),$l=C.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(zl,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});$l.displayName="Block";var ux=["github-light","github-dark"],Ji=C.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=Ys,remarkPlugins:a=ix,className:s,shikiTheme:u=ux,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=$l,parseMarkdownIntoBlocksFn:p=nx,caret:b,plugins:A,remend:N,linkSafety:y={enabled:!0},allowedTags:R,...L})=>{let H=C.useId(),[j,w]=C.useTransition(),W=C.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?iE(e,N):e,[e,t,n,N]),V=C.useMemo(()=>p(W),[W,p]),[K,I]=C.useState(V);C.useEffect(()=>{t==="streaming"?w(()=>{I(V)}):I(V)},[V,t]);let U=t==="streaming"?K:V,v=C.useMemo(()=>U.map((ie,x)=>`${H}-${x}`),[U.length,H]),Y=C.useMemo(()=>d?d===!0?ai():ai(d):null,[d]),z=C.useMemo(()=>{var ie,x;return{shikiTheme:(x=(ie=A?.code)==null?void 0:ie.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:y}},[u,c,h,t,o,y,A?.code]),F=C.useMemo(()=>({...H2,...r}),[r]),ne=C.useMemo(()=>{let ie=[];return A!=null&&A.cjk&&(ie=[...ie,...A.cjk.remarkPluginsBefore]),ie=[...ie,...a],A!=null&&A.cjk&&(ie=[...ie,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(ie=[...ie,A.math.remarkPlugin]),ie},[a,A?.math,A?.cjk]),ce=C.useMemo(()=>{var ie;let x=i;if(R&&Object.keys(R).length>0&&i===Ys){let Se={...jn,tagNames:[...(ie=jn.tagNames)!=null?ie:[],...Object.keys(R)],attributes:{...jn.attributes,...R}};x=[oi.raw,[no,Se],oi.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),Y&&h&&(x=[...x,Y.rehypePlugin]),x},[i,A?.math,Y,h,R]),Ie=C.useMemo(()=>b&&h?{"--streamdown-caret":`"${ax[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(si.Provider,{value:A??null,children:g.jsx(ve.Provider,{value:z,children:g.jsx("div",{className:q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx(zl,{components:F,rehypePlugins:ce,remarkPlugins:ne,...L,children:e})})})}):g.jsx(si.Provider,{value:A??null,children:g.jsx(ve.Provider,{value:z,children:g.jsxs("div",{className:q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:Ie,children:[U.length===0&&b&&h&&g.jsx("span",{}),U.map((ie,x)=>g.jsx(f,{components:F,content:ie,index:x,rehypePlugins:ce,remarkPlugins:ne,shouldParseIncompleteMarkdown:n,...L},v[x]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);Ji.displayName="Streamdown";var ox=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=C.useRef(null),c=C.useRef(null),[h,d]=C.useState(s),[f,p]=C.useState({x:0,y:0}),[b,A]=C.useState(!1),[N,y]=C.useState({x:0,y:0}),[R,L]=C.useState({x:0,y:0}),H=C.useCallback(v=>{d(Y=>Math.max(n,Math.min(r,Y+v)))},[n,r]),j=C.useCallback(()=>{H(i)},[H,i]),w=C.useCallback(()=>{H(-i)},[H,i]),W=C.useCallback(()=>{d(s),p({x:0,y:0})},[s]),V=C.useCallback(v=>{v.preventDefault();let Y=v.deltaY>0?-i:i;H(Y)},[H,i]),K=C.useCallback(v=>{if(v.button!==0||v.isPrimary===!1)return;A(!0),y({x:v.clientX,y:v.clientY}),L(f);let Y=v.currentTarget;Y instanceof HTMLElement&&Y.setPointerCapture(v.pointerId)},[f]),I=C.useCallback(v=>{if(!b)return;v.preventDefault();let Y=v.clientX-N.x,z=v.clientY-N.y;p({x:R.x+Y,y:R.y+z})},[b,N,R]),U=C.useCallback(v=>{A(!1);let Y=v.currentTarget;Y instanceof HTMLElement&&Y.releasePointerCapture(v.pointerId)},[]);return C.useEffect(()=>{let v=o.current;if(v)return v.addEventListener("wheel",V,{passive:!1}),()=>{v.removeEventListener("wheel",V)}},[V]),C.useEffect(()=>{let v=c.current;if(v&&b)return document.body.style.userSelect="none",v.addEventListener("pointermove",I,{passive:!1}),v.addEventListener("pointerup",U),v.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",v.removeEventListener("pointermove",I),v.removeEventListener("pointerup",U),v.removeEventListener("pointercancel",U)}},[b,I,U]),g.jsxs("div",{className:q("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:q("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(m2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(g2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:W,title:"Reset zoom and pan",type:"button",children:g.jsx(p2,{size:16})})]}):null,g.jsx("div",{className:q("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:K,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Yl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=C.useState(null),[u,o]=C.useState(!1),[c,h]=C.useState(""),[d,f]=C.useState(""),[p,b]=C.useState(0),{mermaid:A}=C.useContext(ve),N=Xi(),y=A?.errorComponent,{shouldRender:R,containerRef:L}=r2({immediate:r});if(C.useEffect(()=>{if(R){if(!N){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=N.getMermaid(n),w=e.split("").reduce((K,I)=>(K<<5)-K+I.charCodeAt(0)|0,0),W=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:V}=await j.render(W,e);h(V),f(V)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,R,N]),!(R||c||d))return g.jsx("div",{className:q("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return g.jsx("div",{className:q("my-4 flex justify-center p-4",t),ref:L,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return y?g.jsx("div",{ref:L,children:g.jsx(y,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:q("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let H=c||d;return g.jsx("div",{className:q("size-full",t),"data-streamdown":"mermaid",ref:L,children:g.jsx(ox,{className:q(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:q("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:H},role:"img"})})})};const lx=({src:e,alt:t,className:n,node:r,...i})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...i,className:eu("max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 active:opacity-90 transition-opacity",n)})}),cx=({children:e,className:t,node:n,...r})=>g.jsx("li",{className:eu("py-0 pl-0 [&>p]:inline",t),...r,children:e}),ql={img:lx,li:cx},e3={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}};function Vl(e){if(e.tool?.status)return e.tool.status;if(e.title?.endsWith("✓"))return"success";if(e.title?.endsWith("✗"))return"failed";if(e.title?.includes("待审批"))return"pending_approval"}function hx(e){return Vl(e)==="success"}function dx(e){const t=Vl(e);return t==="failed"||t==="timed_out"}function fx(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function px(e){return e.type===re.Tool&&!!e.children?.length}function mx(e){return e.type!==re.Cursor&&!e.children?.length&&e.content.trim()===""}function Wl(e){return!!e.tokenUsage||mx(e)}function gx(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function Ex(e){return e.type===re.Cursor||e.type===re.User||e.type===re.Assistant||fx(e)||e.type===re.Error?!0:e.type===re.Info&&e.tokenUsage?!1:gx(e)}function qs(e){return px(e)||e.type!==re.Tool&&e.type!==re.Action?!1:!Ex(e)}function bx(e){const t=e.filter(i=>!Wl(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(qs(i)){const a=[i];let s=r+1;for(;s<t.length;){const u=t[s];if(qs(u))a.push(u),s++;else break}n.push({kind:"execution-group",logs:a,key:a[0].id}),r=s}else n.push({kind:"single",log:i,key:i.id}),r++}return n}const Tx=gi(),Gl=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${Tx}/attachments/by-path?path=${encodeURIComponent(e)}`:e,Ql=C.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:g.jsx(Ji,{urlTransform:Gl,components:ql,children:e})})}));Ql.displayName="UserMessage";const Kl=C.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=C.useState(t),i=C.useRef(null),[a,s]=C.useState(0);C.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=C.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
|
|
117
|
-
`)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return g.jsxs("div",{className:"my-1.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(er,{size:11,strokeWidth:2})}),g.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&g.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),g.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:g.jsx("div",{ref:i,className:"pl-5 pt-1 pb-2 before:absolute before:left-[7px] before:top-1 before:bottom-2 before:w-px before:bg-neutral-100",children:g.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});Kl.displayName="ThinkingBlock";const
|
|
118
|
-
`)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-2",children:[g.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&g.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?g.jsx(
|
|
116
|
+
`)},O2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=C.useState(!1),[u,o]=C.useState(!1),c=C.useRef(null),h=C.useRef(0),{isAnimating:d}=C.useContext(ve),f=async b=>{var A,N;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let y=(N=c.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),R=y?.querySelector("table");if(!R){r?.(new Error("Table not found"));return}let L=El(R),H=b==="csv"?bl(L):w2(L),j=new ClipboardItem({"text/plain":new Blob([H],{type:"text/plain"}),"text/html":new Blob([R.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(y){r?.(y)}};C.useEffect(()=>{let b=A=>{let N=A.composedPath();c.current&&!N.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?Xi:Zi;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},R2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=C.useState(!1),s=C.useRef(null),{isAnimating:u}=C.useContext(ve),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=El(f),b=c==="csv"?bl(p):L2(p);Pt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return C.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:q("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(mr,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},D2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(O2,{}),g.jsx(R2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:q("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),P2=C.lazy(()=>Ei(()=>import("./code-block-OCS4YCEC-h5zD4EvJ.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeBlock}))),M2=C.lazy(()=>Ei(()=>Promise.resolve().then(()=>Jx),void 0).then(e=>({default:e.Mermaid}))),v2=/language-([^\s]+)/;function gr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function de(e,t){return e.className===t.className&&gr(e.node,t.node)}var ui=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,vn=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ea=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:q("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>de(e,t));ea.displayName="MarkdownOl";var Tl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:q("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&gr(e.node,t.node));Tl.displayName="MarkdownLi";var xl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:q("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>de(e,t));xl.displayName="MarkdownUl";var _l=C.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:q("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>de(e,t));_l.displayName="MarkdownHr";var Al=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:q("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>de(e,t));Al.displayName="MarkdownStrong";var B2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=C.useContext(ve),[s,u]=C.useState(!1),o=n==="streamdown:incomplete-link",c=C.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=C.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=C.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:q("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(k2,{...f})]}):g.jsx("a",{className:q("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},kl=C.memo(B2,(e,t)=>de(e,t)&&e.href===t.href);kl.displayName="MarkdownA";var yl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:q("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>de(e,t));yl.displayName="MarkdownH1";var Cl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:q("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>de(e,t));Cl.displayName="MarkdownH2";var Nl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:q("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>de(e,t));Nl.displayName="MarkdownH3";var Il=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:q("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>de(e,t));Il.displayName="MarkdownH4";var Sl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:q("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>de(e,t));Sl.displayName="MarkdownH5";var wl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:q("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>de(e,t));wl.displayName="MarkdownH6";var Ll=C.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=C.useContext(ve),a=ui(i,"table");return g.jsx(D2,{className:t,showControls:a,...r,children:e})},(e,t)=>de(e,t));Ll.displayName="MarkdownTable";var Ol=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:q("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>de(e,t));Ol.displayName="MarkdownThead";var Rl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:q("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>de(e,t));Rl.displayName="MarkdownTbody";var Dl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:q("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>de(e,t));Dl.displayName="MarkdownTr";var Pl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:q("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>de(e,t));Pl.displayName="MarkdownTh";var Ml=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:q("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>de(e,t));Ml.displayName="MarkdownTd";var vl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:q("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>de(e,t));vl.displayName="MarkdownBlockquote";var Bl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:q("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>de(e,t));Bl.displayName="MarkdownSup";var Fl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:q("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>de(e,t));Fl.displayName="MarkdownSub";var Hl=C.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!C.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(C.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(C.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!C.isValidElement(s))return s;if(s.type===ea){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>de(e,t));Hl.displayName="MarkdownSection";var F2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=C.useContext(ve),o=Ji();if(a)return g.jsx("code",{className:q("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(v2),h=(i=c?.at(1))!=null?i:"",d="";if(C.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=ui(u,"mermaid"),b=vn(u,"download"),A=vn(u,"copy"),N=vn(u,"fullscreen"),y=vn(u,"panZoom"),R=p&&(b||A||N);return g.jsx(C.Suspense,{fallback:g.jsx(Us,{}),children:g.jsxs("div",{className:q("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(C2,{chart:d,config:s?.config}):null,A?g.jsx(Fs,{code:d}):null,N?g.jsx(S2,{chart:d,config:s?.config}):null]}):null,g.jsx(M2,{chart:d,config:s?.config,showControls:y})]})})}let f=ui(u,"code");return g.jsx(C.Suspense,{fallback:g.jsx(Us,{}),children:g.jsx(P2,{className:q("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(b2,{code:d,language:h}),g.jsx(Fs,{})]}):null})})},Ul=C.memo(F2,(e,t)=>e.className===t.className&&gr(e.node,t.node));Ul.displayName="MarkdownCode";var jl=C.memo(x2,(e,t)=>e.className===t.className&&gr(e.node,t.node));jl.displayName="MarkdownImg";var zl=C.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&C.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>de(e,t));zl.displayName="MarkdownParagraph";var H2={ol:ea,li:Tl,ul:xl,hr:_l,strong:Al,a:kl,h1:yl,h2:Cl,h3:Nl,h4:Il,h5:Sl,h6:wl,table:Ll,thead:Ol,tbody:Rl,tr:Dl,th:Pl,td:Ml,blockquote:vl,code:Ul,img:jl,pre:({children:e})=>C.isValidElement(e)?C.cloneElement(e,{"data-block":"true"}):e,sup:Bl,sub:Fl,p:zl,section:Hl},U2=()=>e=>{at(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},js=[],zs={allowDangerousHtml:!0},Bn=new WeakMap,j2=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,A]=p;if(typeof b=="function"){let N=Bn.get(b);N||(N=b.name,Bn.set(b,N)),d+=N}else d+=String(b);d+=":",d+=JSON.stringify(A)}else if(typeof p=="function"){let b=Bn.get(p);b||(b=p.name,Bn.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},$s=new j2,$l=e=>{let t=z2(e),n=e.children||"";return Q2(t.runSync(t.parse(n),n),e)},z2=e=>{let t=$s.get(e);if(t)return t;let n=Y2(e);return $s.set(e,n),n},$2=e=>e.some(t=>Array.isArray(t)?t[0]===Gr:t===Gr),Y2=e=>{let t=e.rehypePlugins||js,n=e.remarkPlugins||js,r=$2(t)?n:[...n,U2],i=e.remarkRehypeOptions?{...zs,...e.remarkRehypeOptions}:zs;return fT().use(db).use(r).use(Gb,i).use(t)},q2=e=>e,V2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},W2=(e,t)=>{var n;for(let r in Lr)if(Object.hasOwn(Lr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Lr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},G2=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},Q2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||q2;at(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return V2(d,h,a,c.value),h;if(c.type==="element"&&(W2(c,o),G2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return xE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},K2=/\[\^[\w-]{1,200}\](?!:)/,X2=/\[\^[\w-]{1,200}\]:/,Z2=/<\/(\w+)>/,J2=/<(\w+)[\s>]/,ex=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),tx=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},nx=e=>{let t=K2.test(e),n=X2.test(e);if(t||n)return[e];let r=Me.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(Z2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(J2);if(h){let d=h[1];o.includes(`</${d}>`)||ex.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(tx(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},Ys,qs,jn={...ln,protocols:{...ln.protocols,href:[...(qs=(Ys=ln.protocols)==null?void 0:Ys.href)!=null?qs:[],"tel"]}},oi={raw:Gr,sanitize:[ro,jn],harden:[Dc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},rx={gfm:[K1,{}]},Vs=Object.values(oi),ix=Object.values(rx),ax={block:" ▋",circle:" ●"},sx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ve=C.createContext(sx),Yl=C.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx($l,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Yl.displayName="Block";var ux=["github-light","github-dark"],ql=C.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=Vs,remarkPlugins:a=ix,className:s,shikiTheme:u=ux,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=Yl,parseMarkdownIntoBlocksFn:p=nx,caret:b,plugins:A,remend:N,linkSafety:y={enabled:!0},allowedTags:R,...L})=>{let H=C.useId(),[j,w]=C.useTransition(),W=C.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?iE(e,N):e,[e,t,n,N]),V=C.useMemo(()=>p(W),[W,p]),[K,I]=C.useState(V);C.useEffect(()=>{t==="streaming"?w(()=>{I(V)}):I(V)},[V,t]);let U=t==="streaming"?K:V,v=C.useMemo(()=>U.map((ie,x)=>`${H}-${x}`),[U.length,H]),Y=C.useMemo(()=>d?d===!0?ai():ai(d):null,[d]),z=C.useMemo(()=>{var ie,x;return{shikiTheme:(x=(ie=A?.code)==null?void 0:ie.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:y}},[u,c,h,t,o,y,A?.code]),F=C.useMemo(()=>({...H2,...r}),[r]),ne=C.useMemo(()=>{let ie=[];return A!=null&&A.cjk&&(ie=[...ie,...A.cjk.remarkPluginsBefore]),ie=[...ie,...a],A!=null&&A.cjk&&(ie=[...ie,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(ie=[...ie,A.math.remarkPlugin]),ie},[a,A?.math,A?.cjk]),ce=C.useMemo(()=>{var ie;let x=i;if(R&&Object.keys(R).length>0&&i===Vs){let Se={...jn,tagNames:[...(ie=jn.tagNames)!=null?ie:[],...Object.keys(R)],attributes:{...jn.attributes,...R}};x=[oi.raw,[ro,Se],oi.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),Y&&h&&(x=[...x,Y.rehypePlugin]),x},[i,A?.math,Y,h,R]),Ie=C.useMemo(()=>b&&h?{"--streamdown-caret":`"${ax[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(si.Provider,{value:A??null,children:g.jsx(ve.Provider,{value:z,children:g.jsx("div",{className:q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx($l,{components:F,rehypePlugins:ce,remarkPlugins:ne,...L,children:e})})})}):g.jsx(si.Provider,{value:A??null,children:g.jsx(ve.Provider,{value:z,children:g.jsxs("div",{className:q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:Ie,children:[U.length===0&&b&&h&&g.jsx("span",{}),U.map((ie,x)=>g.jsx(f,{components:F,content:ie,index:x,rehypePlugins:ce,remarkPlugins:ne,shouldParseIncompleteMarkdown:n,...L},v[x]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);ql.displayName="Streamdown";var ox=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=C.useRef(null),c=C.useRef(null),[h,d]=C.useState(s),[f,p]=C.useState({x:0,y:0}),[b,A]=C.useState(!1),[N,y]=C.useState({x:0,y:0}),[R,L]=C.useState({x:0,y:0}),H=C.useCallback(v=>{d(Y=>Math.max(n,Math.min(r,Y+v)))},[n,r]),j=C.useCallback(()=>{H(i)},[H,i]),w=C.useCallback(()=>{H(-i)},[H,i]),W=C.useCallback(()=>{d(s),p({x:0,y:0})},[s]),V=C.useCallback(v=>{v.preventDefault();let Y=v.deltaY>0?-i:i;H(Y)},[H,i]),K=C.useCallback(v=>{if(v.button!==0||v.isPrimary===!1)return;A(!0),y({x:v.clientX,y:v.clientY}),L(f);let Y=v.currentTarget;Y instanceof HTMLElement&&Y.setPointerCapture(v.pointerId)},[f]),I=C.useCallback(v=>{if(!b)return;v.preventDefault();let Y=v.clientX-N.x,z=v.clientY-N.y;p({x:R.x+Y,y:R.y+z})},[b,N,R]),U=C.useCallback(v=>{A(!1);let Y=v.currentTarget;Y instanceof HTMLElement&&Y.releasePointerCapture(v.pointerId)},[]);return C.useEffect(()=>{let v=o.current;if(v)return v.addEventListener("wheel",V,{passive:!1}),()=>{v.removeEventListener("wheel",V)}},[V]),C.useEffect(()=>{let v=c.current;if(v&&b)return document.body.style.userSelect="none",v.addEventListener("pointermove",I,{passive:!1}),v.addEventListener("pointerup",U),v.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",v.removeEventListener("pointermove",I),v.removeEventListener("pointerup",U),v.removeEventListener("pointercancel",U)}},[b,I,U]),g.jsxs("div",{className:q("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:q("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(m2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(g2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:W,title:"Reset zoom and pan",type:"button",children:g.jsx(p2,{size:16})})]}):null,g.jsx("div",{className:q("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:K,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Vl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=C.useState(null),[u,o]=C.useState(!1),[c,h]=C.useState(""),[d,f]=C.useState(""),[p,b]=C.useState(0),{mermaid:A}=C.useContext(ve),N=Ji(),y=A?.errorComponent,{shouldRender:R,containerRef:L}=r2({immediate:r});if(C.useEffect(()=>{if(R){if(!N){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=N.getMermaid(n),w=e.split("").reduce((K,I)=>(K<<5)-K+I.charCodeAt(0)|0,0),W=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:V}=await j.render(W,e);h(V),f(V)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,R,N]),!(R||c||d))return g.jsx("div",{className:q("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return g.jsx("div",{className:q("my-4 flex justify-center p-4",t),ref:L,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return y?g.jsx("div",{ref:L,children:g.jsx(y,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:q("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let H=c||d;return g.jsx("div",{className:q("size-full",t),"data-streamdown":"mermaid",ref:L,children:g.jsx(ox,{className:q(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:q("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:H},role:"img"})})})};const lx=({src:e,alt:t,className:n,node:r,...i})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...i,className:tu("max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 active:opacity-90 transition-opacity",n)})}),cx=({children:e,className:t,node:n,...r})=>g.jsx("li",{className:tu("py-0 pl-0 [&>p]:inline",t),...r,children:e}),hx={img:lx,li:cx},dx={mermaid:{download:!0,copy:!0,fullscreen:!0,panZoom:!0}},fx=/(^|\n)(```|~~~)[^\S\r\n]*mermaid(?:[\s\r\n]|$)/i;let li=null;function px(e){return fx.test(e)}function mx(){return li??=Ei(async()=>{const{mermaid:e}=await import("./index-Cjaho2ST.js").then(t=>t.bm);return{mermaid:e}},__vite__mapDeps([5,1,2])).then(({mermaid:e})=>({mermaid:e})),li}function gx(e){const t=px(e),[n,r]=C.useState();return C.useEffect(()=>{if(!t){r(void 0);return}let i=!0;return mx().then(a=>{i&&r(a)}).catch(()=>{li=null,i&&r(void 0)}),()=>{i=!1}},[t]),t?n:void 0}function Wl(e){if(e.tool?.status)return e.tool.status;if(e.title?.endsWith("✓"))return"success";if(e.title?.endsWith("✗"))return"failed";if(e.title?.includes("待审批"))return"pending_approval"}function Ex(e){return Wl(e)==="success"}function bx(e){const t=Wl(e);return t==="failed"||t==="timed_out"}function Tx(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function xx(e){return e.type===re.Tool&&!!e.children?.length}function _x(e){return e.type!==re.Cursor&&!e.children?.length&&e.content.trim()===""}function Gl(e){return!!e.tokenUsage||_x(e)}function Ax(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function kx(e){return e.type===re.Cursor||e.type===re.User||e.type===re.Assistant||Tx(e)||e.type===re.Error?!0:e.type===re.Info&&e.tokenUsage?!1:Ax(e)}function Ws(e){return xx(e)||e.type!==re.Tool&&e.type!==re.Action?!1:!kx(e)}function yx(e){const t=e.filter(i=>!Gl(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(Ws(i)){const a=[i];let s=r+1;for(;s<t.length;){const u=t[s];if(Ws(u))a.push(u),s++;else break}n.push({kind:"execution-group",logs:a,key:a[0].id}),r=s}else n.push({kind:"single",log:i,key:i.id}),r++}return n}const Cx=bi(),Nx=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${Cx}/attachments/by-path?path=${encodeURIComponent(e)}`:e,ta=C.memo(({content:e,className:t})=>{const n=gx(e);return g.jsx(ql,{className:t,urlTransform:Nx,components:hx,plugins:n,controls:n?dx:void 0,children:e})});ta.displayName="MarkdownMessage";const Ql=C.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:g.jsx(ta,{content:e})})}));Ql.displayName="UserMessage";const Kl=C.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=C.useState(t),i=C.useRef(null),[a,s]=C.useState(0);C.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=C.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
|
|
117
|
+
`)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return g.jsxs("div",{className:"my-1.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(er,{size:11,strokeWidth:2})}),g.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&g.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),g.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:g.jsx("div",{ref:i,className:"pl-5 pt-1 pb-2 before:absolute before:left-[7px] before:top-1 before:bottom-2 before:w-px before:bg-neutral-100",children:g.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});Kl.displayName="ThinkingBlock";const ci=C.memo(({title:e,content:t,type:n})=>{const[r,i]=C.useState(!1);if(n===re.Action)return g.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[g.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),g.jsx("span",{children:t})]});const s=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":s?"text-emerald-400":"text-neutral-400",c=t?.split(`
|
|
118
|
+
`)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-2",children:[g.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&g.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?g.jsx(nu,{size:10}):g.jsx(er,{size:10})})]}),r&&t&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:t})})]})});ci.displayName="ToolBlock";const hi=C.memo(({logs:e})=>{const{t}=mc(),[n,r]=C.useState(!1),i=e.map(s=>{const u=s.content.split(`
|
|
119
119
|
`)[0]||"",o=u.match(/([^/\\]+\.[a-zA-Z0-9]+)/);return o?o[1]:u.slice(0,40)}),a=e.length;return g.jsxs("div",{className:"my-2",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(er,{size:11,strokeWidth:2,className:"text-neutral-400"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:t("工具调用")}),g.jsx("span",{className:"shrink-0 inline-flex items-center gap-1",children:g.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none tabular-nums",children:a})}),!n&&g.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[i.slice(0,3).join(", "),e.length>3?" …":""]})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(s=>{const u=s.content.split(`
|
|
120
|
-
`)[0]||"";return g.jsx(Xl,{log:s,firstLine:u},s.id)})})]})});
|
|
121
|
-
`),a=
|
|
122
|
-
`)},[i]),c=e.length>0,h=e.some(d=>d.status==="uploading");return{files:e,addFiles:r,removeFile:a,clear:s,restoreFiles:u,buildMarkdownLinks:o,getDoneAttachments:i,hasFiles:c,isUploading:h}}function
|
|
123
|
-
`)}var nc=(function(e){Ix(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,Vs(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=Vs(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),he=nc,wx=Oe,Rt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=Zn(n,this.path);r&&(r=Oe(r));var i=gt(n,{op:"remove",path:this.from}).removed;return gt(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=Zn(n,this.from);return gt(n,{op:"add",path:this.path,value:Oe(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:xn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Lx={add:function(e,t,n){return fi(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Rt.move,copy:Rt.copy,test:Rt.test,_get:Rt._get};function Zn(e,t){if(t=="")return e;var n={op:"_get",path:t};return gt(e,n),n.value}function gt(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):Jn(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=Zn(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=xn(e,t.value),s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=Oe(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,f=void 0,p=void 0,b=void 0;for(typeof n=="function"?b=n:b=Jn;;){if(p=o[h],p&&p.indexOf("~")!=-1&&(p=tc(p)),i&&(p=="__proto__"||p=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&f===void 0&&(c[p]===void 0?f=o.slice(0,h).join("/"):h==d-1&&(f=t.path),f!==void 0&&b(t,0,e,f)),h++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!fi(p))throw new he("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);fi(p)&&(p=~~p)}if(h>=d){if(n&&t.op==="add"&&p>c.length)throw new he("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=Lx[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Rt[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[p],n&&h<d&&(!c||typeof c!="object"))throw new he("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Er(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Oe(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=gt(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function Ox(e,t,n){var r=gt(e,t);if(r.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function Jn(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new he("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Rt[e.op]){if(typeof e.path!="string")throw new he("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new he('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new he("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&pi(e.value))throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new he("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new he("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=rc([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new he("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function rc(e,t,n){try{if(!Array.isArray(e))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Er(Oe(t),Oe(e),n||!0);else{n=n||Jn;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof he)return i;throw i}}function xn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!xn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!xn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const Rx=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:he,_areEquals:xn,applyOperation:gt,applyPatch:Er,applyReducer:Ox,deepClone:wx,getValueByPointer:Zn,validate:rc,validator:Jn},Symbol.toStringTag,{value:"Module"}));var ea=new WeakMap,Dx=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),Px=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function Mx(e){return ea.get(e)}function vx(e,t){return e.observers.get(t)}function Bx(e,t){e.observers.delete(t.callback)}function Fx(e,t){t.unobserve()}function Hx(e,t){var n=[],r,i=Mx(e);if(!i)i=new Dx(e),ea.set(e,i);else{var a=vx(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=Oe(e),t){r.callback=t,r.next=null;var s=function(){mi(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){mi(r),clearTimeout(r.next),Bx(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new Px(t,r)),r}function mi(e,t){t===void 0&&(t=!1);var n=ea.get(e.object);ta(n.value,e.object,e.patches,"",t),e.patches.length&&Er(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ta(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=di(t),s=di(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(hi(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?ta(h,d,n,r+"/"+ft(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+ft(c),value:Oe(h)}),n.push({op:"replace",path:r+"/"+ft(c),value:Oe(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+ft(c),value:Oe(h)}),n.push({op:"remove",path:r+"/"+ft(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!hi(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+ft(c),value:Oe(t[c])})}}}function Ux(e,t,n){n===void 0&&(n=!1);var r=[];return ta(e,t,r,"",n),r}const jx=Object.freeze(Object.defineProperty({__proto__:null,compare:Ux,generate:mi,observe:Hx,unobserve:Fx},Symbol.toStringTag,{value:"Module"}));Object.assign({},Rx,jx,{JsonPatchError:nc,deepClone:Oe,escapePathComponent:ft,unescapePathComponent:tc});const a3={entries:[],isTruncated:!1},zx=50,Ws=500;function Gs(e){return typeof e?.seq=="number"?e.seq:0}function Qs(e){return e?.entries.at(-1)?.id}function Ks(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function s3(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function u3(e,t){if(!e||e.isTruncated)return!0;const n=Gs(e),r=Gs(t);if(r>n)return!0;if(r<n)return!1;if(t.entries.length>e.entries.length)return!0;if(t.entries.length<e.entries.length)return!1;const i=Qs(e),a=Qs(t);if(a&&i&&a!==i)return!0;const s=Ks(e),u=Ks(t);return!!(u&&s&&u!==s)}function $x(e,t){for(;t.length>zx;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const o3=xc((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const a=i.accessOrder.filter(u=>u!==n);a.push(n);const s={...i.conversations,[n]:{...r,isTruncated:r.isTruncated??!1}};return $x(s,a)})},applyPatch:(n,r,i)=>{const a=t().conversations[n];if(!a)return!1;if(typeof i=="number"&&typeof a.seq=="number"&&i<=a.seq)return!0;try{const u={...Er(a,r,!0,!1).newDocument,seq:typeof i=="number"?i:a.seq,isTruncated:a.isTruncated??!1};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0}catch(s){return console.error("[sessionLogStore] applyPatch failed:",s),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const a=[...r.accessOrder];return a.splice(i,1),a.push(n),{accessOrder:a}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=Ws?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-Ws),isTruncated:!0}}}})},removeSession:n=>{e(r=>{const{[n]:i,...a}=r.conversations;return{conversations:a,accessOrder:r.accessOrder.filter(s=>s!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}})),Yx={[ze.CLAUDE_CODE]:{agentType:ze.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[ze.GEMINI_CLI]:{agentType:ze.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[ze.CURSOR_AGENT]:{agentType:ze.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[ze.CODEX]:{agentType:ze.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"}};function qx(e){return e?Yx[e]??null:null}function l3(e,t){return qx(e)?.label??t??(e?String(e):"")}const Vx=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Yl},Symbol.toStringTag,{value:"Module"}));export{n3 as A,fa as C,a3 as E,Ac as F,E2 as I,ve as L,Ji as Q,ca as S,ua as T,la as W,Jx as Z,q as a,t3 as b,o3 as c,Er as d,Kx as e,Xx as f,qx as g,l3 as h,ze as i,i3 as j,e3 as k,ql as l,oa as m,s3 as n,yc as o,u3 as s,r3 as u};
|
|
120
|
+
`)[0]||"";return g.jsx(Xl,{log:s,firstLine:u},s.id)})})]})});hi.displayName="ExecutionDetailsGroup";const Xl=C.memo(({log:e,firstLine:t})=>{const[n,r]=C.useState(!1),i=e.content.includes(`
|
|
121
|
+
`),a=Ex(e),s=bx(e)||e.type===re.Error;return g.jsxs("div",{children:[g.jsxs("button",{onClick:()=>i&&r(!n),className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${i?"cursor-pointer":"cursor-default"}`,children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:s?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):a?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?g.jsx(nu,{size:10}):g.jsx(er,{size:10})})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:e.content})})]})});Xl.displayName="ToolGroupItem";const Zl=C.memo(({content:e,compact:t})=>g.jsx("div",{className:`text-neutral-900 whitespace-pre-wrap min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:e}));Zl.displayName="AgentText";const Jl=C.memo(({content:e,compact:t})=>g.jsx("div",{className:`text-neutral-900 min-w-0 ${t?"text-[13px] leading-5":"text-sm leading-6"}`,children:g.jsx(ta,{className:"space-y-2",content:e})}));Jl.displayName="AssistantMessage";const ec=C.memo(({content:e})=>g.jsx("div",{className:"my-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-red-500",viewBox:"0 0 16 16",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 5a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0V5zm.75 6.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})}),g.jsx("pre",{className:"text-xs text-red-700 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));ec.displayName="ErrorMessage";function Ix(e,t){if(e.kind==="execution-group")return g.jsx(hi,{logs:e.logs});const n=e.log;if(n.type===re.Tool&&n.children?.length)return g.jsx(hi,{logs:n.children});if(Gl(n))return null;if(n.title==="Thinking"||n.content.startsWith("Thinking:"))return g.jsx(Kl,{content:n.content,isOpenDefault:!0});switch(n.type){case re.User:return g.jsx(Ql,{content:n.content,compact:t});case re.Tool:return g.jsx(ci,{type:n.type,title:n.title||"Tool",content:n.content});case re.Action:return g.jsx(ci,{type:n.type,title:"Action",content:n.content});case re.Assistant:return g.jsx(Jl,{content:n.content,compact:t});case re.Info:return n.tokenUsage?null:g.jsx(Zl,{content:n.content,compact:t});case re.Error:return g.jsx(ec,{content:n.content});case re.Cursor:return g.jsx("div",{className:"h-4 w-1.5 bg-neutral-400 animate-pulse rounded-sm mt-1 inline-block align-middle"});default:return null}}const u3=C.forwardRef(function({logs:t,scrollElementRef:n},r){const i=C.useMemo(()=>yx(t),[t]);return C.useImperativeHandle(r,()=>({scrollToBottom:(a="instant")=>{n?.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:a})}}),[n]),g.jsx("div",{className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:i.map(a=>{const s=Ix(a);return s?g.jsx("div",{children:s},a.key):null})})}),Sx=bi();function wx(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function o3({files:e,onRemove:t}){return e.length===0?null:g.jsx("div",{"aria-label":"Attachments",className:"flex flex-wrap gap-2 px-4 pt-3 pb-1",children:e.map(n=>g.jsx(Lx,{item:n,onRemove:t},n.tempId))})}function Lx({item:e,onRemove:t}){const n=e.file.type.startsWith("image/"),r=e.status==="error",i=e.status==="uploading";return g.jsxs("div",{className:`relative group flex items-center gap-2 px-3 py-2 rounded-lg border text-xs max-w-[200px] ${r?"border-red-200 bg-red-50 text-red-600":"border-neutral-200 bg-neutral-50 text-neutral-700"}`,children:[n&&e.status==="done"&&e.attachment?g.jsx("img",{src:`${Sx}${e.attachment.url}`,alt:e.file.name,className:"w-8 h-8 rounded object-cover flex-shrink-0"}):g.jsx("span",{className:"flex-shrink-0",children:i?g.jsx(gc,{size:16,className:"animate-spin text-neutral-400"}):n?g.jsx(yc,{size:16,className:"text-neutral-400"}):g.jsx(Ac,{size:16,className:"text-neutral-400"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"truncate font-medium",children:e.file.name}),r?g.jsx("div",{className:"truncate text-red-500",children:e.error}):g.jsx("div",{className:"text-neutral-400",children:wx(e.file.size)})]}),g.jsx("button",{onClick:()=>t(e.tempId),className:"absolute -top-1.5 -right-1.5 hidden group-hover:flex items-center justify-center w-5 h-5 rounded-full bg-neutral-700 text-white hover:bg-neutral-900 transition-colors",children:g.jsx(Ec,{size:10})})]})}const Ox=bi();async function Rx(e){const t=new FormData;t.append("file",e);const n=await fetch(`${Ox}/attachments/upload`,{method:"POST",body:t});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||`Upload failed (${n.status})`)}return n.json()}let Dx=0;function l3(){const[e,t]=C.useState([]),n=C.useRef(e);n.current=e;const r=C.useCallback(async d=>{const f=d.map(p=>({tempId:`tmp-${++Dx}`,file:p,progress:0,status:"uploading"}));t(p=>[...p,...f]),await Promise.allSettled(f.map(async p=>{try{const b=await Rx(p.file);t(A=>A.map(N=>N.tempId===p.tempId?{...N,status:"done",progress:100,attachment:b}:N))}catch(b){t(A=>A.map(N=>N.tempId===p.tempId?{...N,status:"error",error:b instanceof Error?b.message:"Upload failed"}:N))}}))},[]),i=C.useCallback(()=>n.current.filter(d=>d.status==="done"&&d.attachment).map(d=>d.attachment),[]),a=C.useCallback(d=>{t(f=>f.filter(p=>p.tempId!==d))},[]),s=C.useCallback(()=>{t([])},[]),u=C.useCallback(d=>{d.length!==0&&t(f=>{const p=new Set(f.map(A=>A.attachment?.id??A.tempId)),b=d.filter(A=>{const N=A.attachment?.id??A.tempId;return p.has(N)?!1:(p.add(N),!0)});return b.length>0?[...f,...b]:f})},[]),o=C.useCallback(()=>{const d=i();return d.length===0?"":d.map(f=>`${f.mimeType.startsWith("image/")?"!":""}[${f.originalName}](${f.storagePath})`).join(`
|
|
122
|
+
`)},[i]),c=e.length>0,h=e.some(d=>d.status==="uploading");return{files:e,addFiles:r,removeFile:a,clear:s,restoreFiles:u,buildMarkdownLinks:o,getDoneAttachments:i,hasFiles:c,isUploading:h}}function c3(e){const t=C.useMemo(()=>Array.from(new Set(e.filter(Boolean))),[e]);return bc({queryKey:["attachments","metadata",t],queryFn:()=>Tc.get("/attachments/metadata",{params:{ids:t.join(",")}}),enabled:t.length>0,staleTime:300*1e3})}var Px=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Mx=Object.prototype.hasOwnProperty;function di(e,t){return Mx.call(e,t)}function fi(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)di(e,i)&&r.push(i);return r}function Oe(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function pi(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function ft(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function tc(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function mi(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(mi(e[t]))return!0}else if(typeof e=="object"){for(var r=fi(e),i=r.length,a=0;a<i;a++)if(mi(e[r[a]]))return!0}}return!1}function Gs(e,t){var n=[e];for(var r in t){var i=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof i<"u"&&n.push(r+": "+i)}return n.join(`
|
|
123
|
+
`)}var nc=(function(e){Px(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,Gs(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=Gs(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),he=nc,vx=Oe,Rt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=Zn(n,this.path);r&&(r=Oe(r));var i=gt(n,{op:"remove",path:this.from}).removed;return gt(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=Zn(n,this.from);return gt(n,{op:"add",path:this.path,value:Oe(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:xn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Bx={add:function(e,t,n){return pi(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Rt.move,copy:Rt.copy,test:Rt.test,_get:Rt._get};function Zn(e,t){if(t=="")return e;var n={op:"_get",path:t};return gt(e,n),n.value}function gt(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):Jn(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=Zn(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=xn(e,t.value),s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=Oe(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,f=void 0,p=void 0,b=void 0;for(typeof n=="function"?b=n:b=Jn;;){if(p=o[h],p&&p.indexOf("~")!=-1&&(p=tc(p)),i&&(p=="__proto__"||p=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&f===void 0&&(c[p]===void 0?f=o.slice(0,h).join("/"):h==d-1&&(f=t.path),f!==void 0&&b(t,0,e,f)),h++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!pi(p))throw new he("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);pi(p)&&(p=~~p)}if(h>=d){if(n&&t.op==="add"&&p>c.length)throw new he("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=Bx[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Rt[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[p],n&&h<d&&(!c||typeof c!="object"))throw new he("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Er(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Oe(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=gt(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function Fx(e,t,n){var r=gt(e,t);if(r.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function Jn(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new he("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Rt[e.op]){if(typeof e.path!="string")throw new he("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new he('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new he("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&mi(e.value))throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new he("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new he("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=rc([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new he("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function rc(e,t,n){try{if(!Array.isArray(e))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Er(Oe(t),Oe(e),n||!0);else{n=n||Jn;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof he)return i;throw i}}function xn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!xn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!xn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const Hx=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:he,_areEquals:xn,applyOperation:gt,applyPatch:Er,applyReducer:Fx,deepClone:vx,getValueByPointer:Zn,validate:rc,validator:Jn},Symbol.toStringTag,{value:"Module"}));var na=new WeakMap,Ux=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),jx=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function zx(e){return na.get(e)}function $x(e,t){return e.observers.get(t)}function Yx(e,t){e.observers.delete(t.callback)}function qx(e,t){t.unobserve()}function Vx(e,t){var n=[],r,i=zx(e);if(!i)i=new Ux(e),na.set(e,i);else{var a=$x(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=Oe(e),t){r.callback=t,r.next=null;var s=function(){gi(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){gi(r),clearTimeout(r.next),Yx(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new jx(t,r)),r}function gi(e,t){t===void 0&&(t=!1);var n=na.get(e.object);ra(n.value,e.object,e.patches,"",t),e.patches.length&&Er(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ra(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=fi(t),s=fi(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(di(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?ra(h,d,n,r+"/"+ft(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+ft(c),value:Oe(h)}),n.push({op:"replace",path:r+"/"+ft(c),value:Oe(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+ft(c),value:Oe(h)}),n.push({op:"remove",path:r+"/"+ft(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!di(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+ft(c),value:Oe(t[c])})}}}function Wx(e,t,n){n===void 0&&(n=!1);var r=[];return ra(e,t,r,"",n),r}const Gx=Object.freeze(Object.defineProperty({__proto__:null,compare:Wx,generate:gi,observe:Vx,unobserve:qx},Symbol.toStringTag,{value:"Module"}));Object.assign({},Hx,Gx,{JsonPatchError:nc,deepClone:Oe,escapePathComponent:ft,unescapePathComponent:tc});const h3={entries:[],isTruncated:!1},Qx=50,Qs=500;function Ks(e){return typeof e?.seq=="number"?e.seq:0}function Xs(e){return e?.entries.at(-1)?.id}function Zs(e){const t=e?.entries.at(-1);if(t)return JSON.stringify(t)}function d3(e){return{...e,entries:Array.isArray(e.entries)?e.entries:[],isTruncated:!1}}function f3(e,t){if(!e||e.isTruncated)return!0;const n=Ks(e),r=Ks(t);if(r>n)return!0;if(r<n)return!1;if(t.entries.length>e.entries.length)return!0;if(t.entries.length<e.entries.length)return!1;const i=Xs(e),a=Xs(t);if(a&&i&&a!==i)return!0;const s=Zs(e),u=Zs(t);return!!(u&&s&&u!==s)}function Kx(e,t){for(;t.length>Qx;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const p3=xc((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const a=i.accessOrder.filter(u=>u!==n);a.push(n);const s={...i.conversations,[n]:{...r,isTruncated:r.isTruncated??!1}};return Kx(s,a)})},applyPatch:(n,r,i)=>{const a=t().conversations[n];if(!a)return!1;if(typeof i=="number"&&typeof a.seq=="number"&&i<=a.seq)return!0;try{const u={...Er(a,r,!0,!1).newDocument,seq:typeof i=="number"?i:a.seq,isTruncated:a.isTruncated??!1};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0}catch(s){return console.error("[sessionLogStore] applyPatch failed:",s),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const a=[...r.accessOrder];return a.splice(i,1),a.push(n),{accessOrder:a}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=Qs?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-Qs),isTruncated:!0}}}})},removeSession:n=>{e(r=>{const{[n]:i,...a}=r.conversations;return{conversations:a,accessOrder:r.accessOrder.filter(s=>s!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}})),Xx={[ze.CLAUDE_CODE]:{agentType:ze.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[ze.GEMINI_CLI]:{agentType:ze.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[ze.CURSOR_AGENT]:{agentType:ze.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[ze.CODEX]:{agentType:ze.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"}};function Zx(e){return e?Xx[e]??null:null}function m3(e,t){return Zx(e)?.label??t??(e?String(e):"")}const Jx=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Vl},Symbol.toStringTag,{value:"Module"}));export{o3 as A,ma as C,h3 as E,Ac as F,E2 as I,ve as L,ql as Q,da as S,la as T,ha as W,s3 as Z,q as a,u3 as b,p3 as c,Er as d,r3 as e,i3 as f,Zx as g,m3 as h,ze as i,c3 as j,gx as k,dx as l,hx as m,d3 as n,ca as o,yc as p,f3 as s,l3 as u};
|