@loicngr/kobo 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +6 -1
- package/README.md +43 -29
- package/dist/server/db/index.js +17 -0
- package/dist/server/db/migrations.js +10 -0
- package/dist/server/db/schema.js +2 -1
- package/dist/server/index.js +26 -5
- package/dist/server/middleware/migration-guard.js +15 -0
- package/dist/server/routes/dev-server.js +3 -2
- package/dist/server/routes/documents.js +113 -0
- package/dist/server/routes/engines.js +9 -0
- package/dist/server/routes/migration.js +5 -0
- package/dist/server/routes/workspaces.js +35 -11
- package/dist/server/services/agent/engines/claude-code/args-builder.js +22 -0
- package/dist/server/services/agent/engines/claude-code/capabilities.js +17 -0
- package/dist/server/services/agent/engines/claude-code/engine.js +163 -0
- package/dist/server/services/agent/engines/claude-code/mcp-config.js +23 -0
- package/dist/server/services/agent/engines/claude-code/stream-parser.js +224 -0
- package/dist/server/services/agent/engines/registry.js +21 -0
- package/dist/server/services/agent/engines/types.js +18 -0
- package/dist/server/services/agent/event-router.js +4 -0
- package/dist/server/services/agent/orchestrator.js +582 -0
- package/dist/server/services/agent/session-controller.js +79 -0
- package/dist/server/services/content-migration-service.js +155 -0
- package/dist/server/services/db-backup-service.js +15 -0
- package/dist/server/services/websocket-service.js +81 -50
- package/dist/server/services/workspace-service.js +11 -5
- package/dist/server/utils/paths.js +1 -1
- package/dist/shared/models.js +50 -0
- package/package.json +1 -1
- package/src/client/dist/spa/assets/ActivityFeed-CFuT6H5u.js +7 -0
- package/src/client/dist/spa/assets/ActivityFeed-DXYafbn4.css +1 -0
- package/src/client/dist/spa/assets/ClosePopup-DhM1C4Zw.js +1 -0
- package/src/client/dist/spa/assets/CreatePage-sGrkfyOm.js +2 -0
- package/src/client/dist/spa/assets/CreatePage-yu2IH7GW.css +1 -0
- package/src/client/dist/spa/assets/DiffViewer-BVU58ujc.css +1 -0
- package/src/client/dist/spa/assets/DiffViewer-BwSRtVRI.js +2 -0
- package/src/client/dist/spa/assets/HealthPage-BO-bMpEu.js +1 -0
- package/src/client/dist/spa/assets/MainLayout-BiBJtDTk.css +1 -0
- package/src/client/dist/spa/assets/{MainLayout-_oPM07ln.js → MainLayout-BpqOChIX.js} +17 -17
- package/src/client/dist/spa/assets/QBadge-DqtcDv8D.js +1 -0
- package/src/client/dist/spa/assets/QBtn-CyzfM9-_.js +1 -0
- package/src/client/dist/spa/assets/QChip-KJoHYE6F.js +1 -0
- package/src/client/dist/spa/assets/QDialog-DQeAxY3-.js +1 -0
- package/src/client/dist/spa/assets/QExpansionItem-DCRks-Ra.js +1 -0
- package/src/client/dist/spa/assets/{QSpinner-CliSLjf8.js → QIcon-B0-pH3Qs.js} +1 -1
- package/src/client/dist/spa/assets/QItemLabel-Codqjisk.js +1 -0
- package/src/client/dist/spa/assets/QItemSection-CGpX7GcL.js +1 -0
- package/src/client/dist/spa/assets/QList-B-MkPF7n.js +1 -0
- package/src/client/dist/spa/assets/QPage-yqdKDG7-.js +1 -0
- package/src/client/dist/spa/assets/QScrollArea-e5qTqwcb.js +1 -0
- package/src/client/dist/spa/assets/QSeparator-rkjCbX2M.js +1 -0
- package/src/client/dist/spa/assets/QSlideTransition-BQxI8l5r.js +1 -0
- package/src/client/dist/spa/assets/QSpace-BNr0AftG.js +1 -0
- package/src/client/dist/spa/assets/QSpinnerDots-DEiRooBD.js +1 -0
- package/src/client/dist/spa/assets/QTabPanels--6cYe2US.js +1 -0
- package/src/client/dist/spa/assets/QTooltip-C4CPesBX.js +1 -0
- package/src/client/dist/spa/assets/SearchPage-BrUbbtgI.js +1 -0
- package/src/client/dist/spa/assets/SettingsPage-B3elO1PX.js +1 -0
- package/src/client/dist/spa/assets/TouchPan-BT6phK1f.js +1 -0
- package/src/client/dist/spa/assets/WorkspacePage-BHl17_tY.js +4 -0
- package/src/client/dist/spa/assets/WorkspacePage-DPGiH02q.css +1 -0
- package/src/client/dist/spa/assets/build-path-tree-Bgl2q74t.js +1 -0
- package/src/client/dist/spa/assets/{cssMode-DMX8jq8u.js → cssMode-B1wQ-79R.js} +1 -1
- package/src/client/dist/spa/assets/documents-CHc8t22V.js +60 -0
- package/src/client/dist/spa/assets/{editor.api-DirOkGGg.js → editor.api-CRb_5Zw6.js} +1 -1
- package/src/client/dist/spa/assets/{editor.main-DC4ezIu0.js → editor.main-C5sdCvGW.js} +3 -3
- package/src/client/dist/spa/assets/format-Bttc9ToS.js +1 -0
- package/src/client/dist/spa/assets/{formatters-BzaS4w0I.js → formatters-BDadphwz.js} +1 -1
- package/src/client/dist/spa/assets/{freemarker2-DI9xJfj0.js → freemarker2-CVSnsZk-.js} +1 -1
- package/src/client/dist/spa/assets/{handlebars-B9F-pScn.js → handlebars-uL_pucGI.js} +1 -1
- package/src/client/dist/spa/assets/{html-DTe2v8Q8.js → html-CatZVwWp.js} +1 -1
- package/src/client/dist/spa/assets/{htmlMode-F_XLjWfJ.js → htmlMode-DTDzEngo.js} +1 -1
- package/src/client/dist/spa/assets/i18n-D-VdPLEh.js +1 -0
- package/src/client/dist/spa/assets/index-CUI-zN26.js +2 -0
- package/src/client/dist/spa/assets/{javascript-B9xJRPC6.js → javascript-DeHBpolA.js} +1 -1
- package/src/client/dist/spa/assets/{jsonMode-DTZ6j6UO.js → jsonMode-Bma_YGGm.js} +1 -1
- package/src/client/dist/spa/assets/{liquid-BjU5MtW6.js → liquid-CW7xQEG_.js} +1 -1
- package/src/client/dist/spa/assets/{mdx-BMUpG7Be.js → mdx-BsYUhMzF.js} +1 -1
- package/src/client/dist/spa/assets/models-BbSRHL9b.js +1 -0
- package/src/client/dist/spa/assets/{monaco.contribution-D7JUf8DP.js → monaco.contribution-Du0atePv.js} +2 -2
- package/src/client/dist/spa/assets/private.use-form-D1RuEt2P.js +1 -0
- package/src/client/dist/spa/assets/{python-Dz0D4uSk.js → python-D7DQWXZm.js} +1 -1
- package/src/client/dist/spa/assets/{razor-D7CFxuwR.js → razor-B2ZxF301.js} +1 -1
- package/src/client/dist/spa/assets/scroll-JVVkg2Ng.js +1 -0
- package/src/client/dist/spa/assets/touch-CBLrR6_z.js +1 -0
- package/src/client/dist/spa/assets/{tsMode-DjscaxpS.js → tsMode-B4Xul5xA.js} +1 -1
- package/src/client/dist/spa/assets/{typescript-DozCWZl2.js → typescript-CdsKQuLT.js} +1 -1
- package/src/client/dist/spa/assets/use-checkbox-DYiZQsbF.js +1 -0
- package/src/client/dist/spa/assets/use-id-CeduaJbU.js +1 -0
- package/src/client/dist/spa/assets/use-portal-DBe4lcC2.js +1 -0
- package/src/client/dist/spa/assets/use-quasar-Ch82z8H5.js +1 -0
- package/src/client/dist/spa/assets/{xml-DFOJMT39.js → xml-Wap00dMv.js} +1 -1
- package/src/client/dist/spa/assets/{yaml-yEefnsXm.js → yaml-BxRDHC24.js} +1 -1
- package/src/client/dist/spa/index.html +12 -14
- package/src/mcp-server/README.md +1 -1
- package/dist/server/routes/plans.js +0 -89
- package/dist/server/services/agent-manager.js +0 -621
- package/src/client/dist/spa/assets/ActivityFeed-0GR1zPoc.js +0 -10
- package/src/client/dist/spa/assets/ActivityFeed-CfsKExt9.css +0 -1
- package/src/client/dist/spa/assets/ClosePopup-CdSn7HO8.js +0 -1
- package/src/client/dist/spa/assets/CreatePage-dMi4xVYN.css +0 -1
- package/src/client/dist/spa/assets/CreatePage-je_7dC5I.js +0 -2
- package/src/client/dist/spa/assets/DiffViewer-DREYX-8k.js +0 -2
- package/src/client/dist/spa/assets/DiffViewer-DiHFLSk4.css +0 -1
- package/src/client/dist/spa/assets/HealthPage-Do8QZdxw.js +0 -1
- package/src/client/dist/spa/assets/MainLayout-B5poKEy_.css +0 -1
- package/src/client/dist/spa/assets/QBadge-Bvh-hQ8K.js +0 -1
- package/src/client/dist/spa/assets/QBtn-BsD8vrWq.js +0 -1
- package/src/client/dist/spa/assets/QDialog-CkbLS1If.js +0 -1
- package/src/client/dist/spa/assets/QExpansionItem-UgkE560c.js +0 -1
- package/src/client/dist/spa/assets/QList-D80ms7bw.js +0 -1
- package/src/client/dist/spa/assets/QMenu-DU-wiY_A.js +0 -1
- package/src/client/dist/spa/assets/QPage-BKY2-sf-.js +0 -1
- package/src/client/dist/spa/assets/QSpace-C5Ebr0vq.js +0 -1
- package/src/client/dist/spa/assets/QSpinnerDots-Dp12eHrB.js +0 -1
- package/src/client/dist/spa/assets/QTabPanels-C7lWp1yU.js +0 -1
- package/src/client/dist/spa/assets/QToggle-B0HvuNEg.js +0 -1
- package/src/client/dist/spa/assets/QTooltip-kLXuUa_m.js +0 -1
- package/src/client/dist/spa/assets/SearchPage-CCfyqBKh.js +0 -1
- package/src/client/dist/spa/assets/SettingsPage-CmyIsV-S.js +0 -1
- package/src/client/dist/spa/assets/TouchPan-CVMnGs0y.js +0 -1
- package/src/client/dist/spa/assets/WorkspacePage-CWRMLYs-.css +0 -1
- package/src/client/dist/spa/assets/WorkspacePage-Cl7YrG51.js +0 -4
- package/src/client/dist/spa/assets/focus-manager-DYbz9jFW.js +0 -1
- package/src/client/dist/spa/assets/format-Cyg8IgRi.js +0 -1
- package/src/client/dist/spa/assets/i18n-B13zBh1H.js +0 -1
- package/src/client/dist/spa/assets/i18n-CCWLBc0p.js +0 -1
- package/src/client/dist/spa/assets/index-DoNZ_5QK.js +0 -5
- package/src/client/dist/spa/assets/marked.esm-DCmk6NO8.js +0 -60
- package/src/client/dist/spa/assets/models-B8fzv7K4.js +0 -1
- package/src/client/dist/spa/assets/pinia-C3JsrLkB.js +0 -1
- package/src/client/dist/spa/assets/private.use-form-BhKyDtO7.js +0 -1
- package/src/client/dist/spa/assets/scroll-CLibRGI-.js +0 -1
- package/src/client/dist/spa/assets/settings-B69lIVX0.js +0 -1
- package/src/client/dist/spa/assets/touch-ChrvzrnI.js +0 -1
- package/src/client/dist/spa/assets/use-dark-DnuCB6tC.js +0 -1
- package/src/client/dist/spa/assets/use-quasar-DBoizHBW.js +0 -1
- /package/src/client/dist/spa/assets/{_plugin-vue_export-helper-Cxt1D8wE.js → _plugin-vue_export-helper-r4mAJOHR.js} +0 -0
- /package/src/client/dist/spa/assets/{abap-CFuyUYKP.js → abap-Bgec7Keq.js} +0 -0
- /package/src/client/dist/spa/assets/{apex-Ctq_xcrv.js → apex-VBlPwEoQ.js} +0 -0
- /package/src/client/dist/spa/assets/{azcli-BBQSVn-C.js → azcli-DKqrEFBx.js} +0 -0
- /package/src/client/dist/spa/assets/{bat-DbnqAfvr.js → bat-DdgQWy_0.js} +0 -0
- /package/src/client/dist/spa/assets/{bicep-BtDlIXop.js → bicep-CRMM43EB.js} +0 -0
- /package/src/client/dist/spa/assets/{cameligo-BLeJgKTj.js → cameligo-UatALtML.js} +0 -0
- /package/src/client/dist/spa/assets/{clojure-aZUQIUKP.js → clojure-D8JU08RA.js} +0 -0
- /package/src/client/dist/spa/assets/{coffee-Secadq9U.js → coffee-C56wu358.js} +0 -0
- /package/src/client/dist/spa/assets/{cpp-JicRPTRv.js → cpp-CyZLvhJG.js} +0 -0
- /package/src/client/dist/spa/assets/{csharp-C7NSOZyj.js → csharp-BJl3ixva.js} +0 -0
- /package/src/client/dist/spa/assets/{csp-CIje7830.js → csp-CxEKxmO-.js} +0 -0
- /package/src/client/dist/spa/assets/{css-G0bm1q_M.js → css-B0t_muXd.js} +0 -0
- /package/src/client/dist/spa/assets/{cypher-CldD5D0u.js → cypher-D1hqiMFD.js} +0 -0
- /package/src/client/dist/spa/assets/{dart-DIK3l8YT.js → dart-Bz550Pyv.js} +0 -0
- /package/src/client/dist/spa/assets/{dockerfile-czxaGh2L.js → dockerfile-CIXgVAuA.js} +0 -0
- /package/src/client/dist/spa/assets/{ecl-BqdYhwmw.js → ecl-D9qbvZoA.js} +0 -0
- /package/src/client/dist/spa/assets/{elixir-m52LePTW.js → elixir-b2M38fAy.js} +0 -0
- /package/src/client/dist/spa/assets/{flow9-B5QJ9GvZ.js → flow9-Dq1UYMkt.js} +0 -0
- /package/src/client/dist/spa/assets/{fsharp-B15czHsH.js → fsharp-CFNadkg7.js} +0 -0
- /package/src/client/dist/spa/assets/{go-BkoQxDo1.js → go-dSur1iB2.js} +0 -0
- /package/src/client/dist/spa/assets/{graphql-BnI6uRa_.js → graphql-qyhAo11d.js} +0 -0
- /package/src/client/dist/spa/assets/{hcl-CAwwENT7.js → hcl-DFzjMyzm.js} +0 -0
- /package/src/client/dist/spa/assets/{ini-BHM5zh1H.js → ini-TdzA8TIl.js} +0 -0
- /package/src/client/dist/spa/assets/{java-B5i95QvQ.js → java-CSGA9pkE.js} +0 -0
- /package/src/client/dist/spa/assets/{julia-DPDm885q.js → julia-9izz5OsY.js} +0 -0
- /package/src/client/dist/spa/assets/{kotlin-qoccd5BP.js → kotlin-DuPK7AtF.js} +0 -0
- /package/src/client/dist/spa/assets/{less-B6RU166D.js → less-B8d93iCg.js} +0 -0
- /package/src/client/dist/spa/assets/{lexon-YfUeoL1V.js → lexon-DWtEIyu7.js} +0 -0
- /package/src/client/dist/spa/assets/{lua-BIUI5y9b.js → lua-Ciq0OGgt.js} +0 -0
- /package/src/client/dist/spa/assets/{m3-D5SAbSdU.js → m3-Cki6JWj_.js} +0 -0
- /package/src/client/dist/spa/assets/{markdown-CVJLwHzJ.js → markdown-Cu47xwU0.js} +0 -0
- /package/src/client/dist/spa/assets/{mips-R-FZ3zOR.js → mips-BM8ui995.js} +0 -0
- /package/src/client/dist/spa/assets/{msdax-Blveyl9r.js → msdax-DqLio0_c.js} +0 -0
- /package/src/client/dist/spa/assets/{mysql-D4mY1AFx.js → mysql-v1wbjJOq.js} +0 -0
- /package/src/client/dist/spa/assets/{objective-c-BmXrLr4h.js → objective-c-CQl3PGSB.js} +0 -0
- /package/src/client/dist/spa/assets/{pascal-yxckoyvV.js → pascal-D4iW0ZtD.js} +0 -0
- /package/src/client/dist/spa/assets/{pascaligo-Q5JCwXMI.js → pascaligo-BdC9CZdj.js} +0 -0
- /package/src/client/dist/spa/assets/{perl-BF1Rrs5h.js → perl-BL10m4XD.js} +0 -0
- /package/src/client/dist/spa/assets/{pgsql-CnYB97wm.js → pgsql-Be_oqVo3.js} +0 -0
- /package/src/client/dist/spa/assets/{php-CdDfQfSg.js → php-BtvXSFRI.js} +0 -0
- /package/src/client/dist/spa/assets/{pla-whj-d71F.js → pla-B2vUy15C.js} +0 -0
- /package/src/client/dist/spa/assets/{postiats-ClfLr4I-.js → postiats-CbmTTfXr.js} +0 -0
- /package/src/client/dist/spa/assets/{powerquery-iRaBhuuk.js → powerquery-DszLhJGx.js} +0 -0
- /package/src/client/dist/spa/assets/{powershell-DjiEt5xK.js → powershell-B0dYktF6.js} +0 -0
- /package/src/client/dist/spa/assets/{protobuf-B6dcIEUr.js → protobuf-CZvaj1VX.js} +0 -0
- /package/src/client/dist/spa/assets/{pug-DtmHnjM9.js → pug-CPDx1B3S.js} +0 -0
- /package/src/client/dist/spa/assets/{qsharp-CELCyd79.js → qsharp-CDP9TFLl.js} +0 -0
- /package/src/client/dist/spa/assets/{r-ZpJXWV-o.js → r-8DbbFX2l.js} +0 -0
- /package/src/client/dist/spa/assets/{rate-limit-labels-dCPVjS61.js → rate-limit-labels-BoDORKFj.js} +0 -0
- /package/src/client/dist/spa/assets/{redis-BiHSNkAl.js → redis-DRWj9MtJ.js} +0 -0
- /package/src/client/dist/spa/assets/{redshift-DzuwYCHP.js → redshift-C6cElE_5.js} +0 -0
- /package/src/client/dist/spa/assets/{restructuredtext-YOT94bbS.js → restructuredtext-W9pS9n3m.js} +0 -0
- /package/src/client/dist/spa/assets/{ruby-BfiHr6Uu.js → ruby-BKnzWnk-.js} +0 -0
- /package/src/client/dist/spa/assets/{rust-JZ-uOoYM.js → rust-YPCclWwe.js} +0 -0
- /package/src/client/dist/spa/assets/{sb-CBglP1-t.js → sb-BgM4DTFb.js} +0 -0
- /package/src/client/dist/spa/assets/{scala-C9l41paw.js → scala-fz1OPLMl.js} +0 -0
- /package/src/client/dist/spa/assets/{scheme-B-InQ6hy.js → scheme-8Uz1RIbu.js} +0 -0
- /package/src/client/dist/spa/assets/{scss-v6OmJRN9.js → scss-Djo3IYXr.js} +0 -0
- /package/src/client/dist/spa/assets/{shell-Dyp6iwB6.js → shell-CINF5Tx_.js} +0 -0
- /package/src/client/dist/spa/assets/{solidity-D5epNWue.js → solidity-GgiNEuUm.js} +0 -0
- /package/src/client/dist/spa/assets/{sophia-Eva-79sB.js → sophia-Culj97P9.js} +0 -0
- /package/src/client/dist/spa/assets/{sparql-gvALLO1w.js → sparql-C2ZlpxOY.js} +0 -0
- /package/src/client/dist/spa/assets/{sql-COdamZYI.js → sql-BEf5Pg7Y.js} +0 -0
- /package/src/client/dist/spa/assets/{st-eMoImIwE.js → st-CT6UUoeH.js} +0 -0
- /package/src/client/dist/spa/assets/{swift-7R_T9RYH.js → swift-B5g0xTG3.js} +0 -0
- /package/src/client/dist/spa/assets/{symbols-CAg-nBkV.js → symbols-DCYodwb2.js} +0 -0
- /package/src/client/dist/spa/assets/{systemverilog-1pCEfaHU.js → systemverilog-CEgQz9DR.js} +0 -0
- /package/src/client/dist/spa/assets/{tcl-B_KgnhfE.js → tcl-D0qL2L0I.js} +0 -0
- /package/src/client/dist/spa/assets/{twig-CFZUJxb9.js → twig-BFUAVf1E.js} +0 -0
- /package/src/client/dist/spa/assets/{typespec-B1ZgHlud.js → typespec-CjVVcNKm.js} +0 -0
- /package/src/client/dist/spa/assets/{vb-DKdun5tL.js → vb-CZJr-DQz.js} +0 -0
- /package/src/client/dist/spa/assets/{vue-i18n-eUDnMrPl.js → vue-i18n-CeG0hR0Z.js} +0 -0
- /package/src/client/dist/spa/assets/{wgsl-CzNaxTrn.js → wgsl-ivoXUo2e.js} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MainLayout-_oPM07ln.js","assets/_plugin-vue_export-helper-Cxt1D8wE.js","assets/vue-i18n-eUDnMrPl.js","assets/runtime-core.esm-bundler-C3IgBgY5.js","assets/QSpinner-CliSLjf8.js","assets/marked.esm-DCmk6NO8.js","assets/QBadge-Bvh-hQ8K.js","assets/QBtn-BsD8vrWq.js","assets/QMenu-DU-wiY_A.js","assets/QDialog-CkbLS1If.js","assets/scroll-CLibRGI-.js","assets/focus-manager-DYbz9jFW.js","assets/QTooltip-kLXuUa_m.js","assets/use-dark-DnuCB6tC.js","assets/use-quasar-DBoizHBW.js","assets/QList-D80ms7bw.js","assets/touch-ChrvzrnI.js","assets/TouchPan-CVMnGs0y.js","assets/private.use-form-BhKyDtO7.js","assets/QSpace-C5Ebr0vq.js","assets/QTabPanels-C7lWp1yU.js","assets/symbols-CAg-nBkV.js","assets/ClosePopup-CdSn7HO8.js","assets/format-Cyg8IgRi.js","assets/settings-B69lIVX0.js","assets/pinia-C3JsrLkB.js","assets/formatters-BzaS4w0I.js","assets/rate-limit-labels-dCPVjS61.js","assets/MainLayout-B5poKEy_.css","assets/WorkspacePage-Cl7YrG51.js","assets/models-B8fzv7K4.js","assets/QPage-BKY2-sf-.js","assets/QSpinnerDots-Dp12eHrB.js","assets/WorkspacePage-CWRMLYs-.css","assets/CreatePage-je_7dC5I.js","assets/QExpansionItem-UgkE560c.js","assets/CreatePage-dMi4xVYN.css","assets/SettingsPage-CmyIsV-S.js","assets/QToggle-B0HvuNEg.js","assets/SettingsPage-CLMCHMpz.css","assets/SearchPage-CCfyqBKh.js","assets/SearchPage-DWglAeQv.css","assets/HealthPage-Do8QZdxw.js","assets/i18n-CCWLBc0p.js","assets/i18n-B13zBh1H.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,A as t,D as n,E as r,F as i,H as a,I as o,M as s,N as c,Q as l,R as u,S as d,Y as f,Z as p,d as m,et as h,j as g,k as _,l as v,rt as y,tt as b,v as x,w as S,y as C}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{A as w,E as T,M as E,O as D,S as O,T as k,b as A,c as j,d as ee,f as M,i as N,j as P,k as te,m as ne,o as re,p as ie,s as ae,t as F,u as I,w as oe,y as se}from"./QSpinner-CliSLjf8.js";import{a as L,o as R,r as ce,s as le,t as ue}from"./focus-manager-DYbz9jFW.js";import{a as de,i as fe,n as pe,r as me,t as he}from"./private.use-form-BhKyDtO7.js";import{l as z,t as ge,u as _e}from"./QDialog-CkbLS1If.js";import{n as ve}from"./symbols-CAg-nBkV.js";import{C as ye,S as be,T as xe,w as Se,x as Ce}from"./scroll-CLibRGI-.js";import{n as we,t as Te}from"./pinia-C3JsrLkB.js";import{t as Ee}from"./i18n-B13zBh1H.js";import{t as De}from"./settings-B69lIVX0.js";import{l as Oe,t as ke,u as Ae}from"./QBtn-BsD8vrWq.js";import{n as je,t as Me}from"./use-dark-DnuCB6tC.js";import{a as Ne,i as Pe,n as Fe,o as Ie,r as Le,t as Re}from"./QToggle-B0HvuNEg.js";var ze=[`sm`,`md`,`lg`,`xl`],{passive:Be}=se,Ve=D({width:0,height:0,name:`xs`,sizes:{sm:600,md:1024,lg:1440,xl:1920},lt:{sm:!0,md:!0,lg:!0,xl:!0},gt:{xs:!1,sm:!1,md:!1,lg:!1},xs:!0,sm:!1,md:!1,lg:!1,xl:!1},{setSizes:A,setDebounce:A,install({$q:e,onSSRHydrated:t}){if(e.screen=this,this.__installed===!0){e.config.screen!==void 0&&(e.config.screen.bodyClasses===!1?document.body.classList.remove(`screen--${this.name}`):this.__update(!0));return}let{visualViewport:n}=window,r=n||window,i=document.scrollingElement||document.documentElement,a=n===void 0||R.is.mobile===!0?()=>[Math.max(window.innerWidth,i.clientWidth),Math.max(window.innerHeight,i.clientHeight)]:()=>[n.width*n.scale+window.innerWidth-i.clientWidth,n.height*n.scale+window.innerHeight-i.clientHeight],o=e.config.screen?.bodyClasses===!0;this.__update=e=>{let[t,n]=a();if(n!==this.height&&(this.height=n),t!==this.width)this.width=t;else if(e!==!0)return;let r=this.sizes;this.gt.xs=t>=r.sm,this.gt.sm=t>=r.md,this.gt.md=t>=r.lg,this.gt.lg=t>=r.xl,this.lt.sm=t<r.sm,this.lt.md=t<r.md,this.lt.lg=t<r.lg,this.lt.xl=t<r.xl,this.xs=this.lt.sm,this.sm=this.gt.xs===!0&&this.lt.md===!0,this.md=this.gt.sm===!0&&this.lt.lg===!0,this.lg=this.gt.md===!0&&this.lt.xl===!0,this.xl=this.gt.lg,r=this.xs===!0&&`xs`||this.sm===!0&&`sm`||this.md===!0&&`md`||this.lg===!0&&`lg`||`xl`,r!==this.name&&(o===!0&&(document.body.classList.remove(`screen--${this.name}`),document.body.classList.add(`screen--${r}`)),this.name=r)};let s,c={},l=16;this.setSizes=e=>{ze.forEach(t=>{e[t]!==void 0&&(c[t]=e[t])})},this.setDebounce=e=>{l=e};let u=()=>{let e=getComputedStyle(document.body);e.getPropertyValue(`--q-size-sm`)&&ze.forEach(t=>{this.sizes[t]=parseInt(e.getPropertyValue(`--q-size-${t}`),10)}),this.setSizes=e=>{ze.forEach(t=>{e[t]&&(this.sizes[t]=e[t])}),this.__update(!0)},this.setDebounce=e=>{s!==void 0&&r.removeEventListener(`resize`,s,Be),s=e>0?de(this.__update,e):this.__update,r.addEventListener(`resize`,s,Be)},this.setDebounce(l),Object.keys(c).length===0?this.__update():(this.setSizes(c),c=void 0),o===!0&&this.name===`xs`&&document.body.classList.add(`screen--xs`)};le.value===!0?t.push(u):u()}}),B=D({isActive:!1,mode:!1},{__media:void 0,set(e){B.mode=e,e===`auto`?(B.__media===void 0&&(B.__media=window.matchMedia(`(prefers-color-scheme: dark)`),B.__updateMedia=()=>{B.set(`auto`)},B.__media.addListener(B.__updateMedia)),e=B.__media.matches):B.__media!==void 0&&(B.__media.removeListener(B.__updateMedia),B.__media=void 0),B.isActive=e===!0,document.body.classList.remove(`body--${e===!0?`light`:`dark`}`),document.body.classList.add(`body--${e===!0?`dark`:`light`}`)},toggle(){B.set(B.isActive===!1)},install({$q:e,ssrContext:t}){let n=e.config.dark;e.dark=this,this.__installed!==!0&&this.set(n===void 0?!1:n)}});function He(e,t,n=document.body){if(typeof e!=`string`)throw TypeError(`Expected a string as propName`);if(typeof t!=`string`)throw TypeError(`Expected a string as value`);if(!(n instanceof Element))throw TypeError(`Expected a DOM element`);n.style.setProperty(`--q-${e}`,t)}function Ue(e){if(e.ios===!0)return`ios`;if(e.android===!0)return`android`}function We({is:e,has:t,within:n},r){let i=[e.desktop===!0?`desktop`:`mobile`,`${t.touch===!1?`no-`:``}touch`];if(e.mobile===!0){let t=Ue(e);t!==void 0&&i.push(`platform-`+t)}if(e.nativeMobile===!0){let t=e.nativeMobileWrapper;i.push(t),i.push(`native-mobile`),e.ios===!0&&(r[t]===void 0||r[t].iosStatusBarPadding!==!1)&&i.push(`q-ios-padding`)}else e.electron===!0?i.push(`electron`):e.bex===!0&&i.push(`bex`);return n.iframe===!0&&i.push(`within-iframe`),i}function Ge(){let{is:e}=R,t=document.body.className,n=new Set(t.replace(/ {2}/g,` `).split(` `));if(e.nativeMobile!==!0&&e.electron!==!0&&e.bex!==!0){if(e.desktop===!0)n.delete(`mobile`),n.delete(`platform-ios`),n.delete(`platform-android`),n.add(`desktop`);else if(e.mobile===!0){n.delete(`desktop`),n.add(`mobile`),n.delete(`platform-ios`),n.delete(`platform-android`);let t=Ue(e);t!==void 0&&n.add(`platform-${t}`)}}R.has.touch===!0&&(n.delete(`no-touch`),n.add(`touch`)),R.within.iframe===!0&&n.add(`within-iframe`);let r=Array.from(n).join(` `);t!==r&&(document.body.className=r)}function Ke(e){for(let t in e)He(t,e[t])}var qe={install(e){if(this.__installed!==!0){if(le.value===!0)Ge();else{let{$q:t}=e;t.config.brand!==void 0&&Ke(t.config.brand);let n=We(R,t.config);document.body.classList.add.apply(document.body.classList,n)}R.is.ios===!0&&document.body.addEventListener(`touchstart`,A),window.addEventListener(`keydown`,ie,!0)}}},Je={isoName:`en-US`,nativeName:`English (US)`,label:{clear:`Clear`,ok:`OK`,cancel:`Cancel`,close:`Close`,set:`Set`,select:`Select`,reset:`Reset`,remove:`Remove`,update:`Update`,create:`Create`,search:`Search`,filter:`Filter`,refresh:`Refresh`,expand:e=>e?`Expand "${e}"`:`Expand`,collapse:e=>e?`Collapse "${e}"`:`Collapse`},date:{days:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),daysShort:`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),monthsShort:`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),firstDayOfWeek:0,format24h:!1,pluralDay:`days`,prevMonth:`Previous month`,nextMonth:`Next month`,prevYear:`Previous year`,nextYear:`Next year`,today:`Today`,prevRangeYears:e=>`Previous ${e} years`,nextRangeYears:e=>`Next ${e} years`},table:{noData:`No data available`,noResults:`No matching records found`,loading:`Loading...`,selectedRecords:e=>e===1?`1 record selected.`:(e===0?`No`:e)+` records selected.`,recordsPerPage:`Records per page:`,allRows:`All`,pagination:(e,t,n)=>e+`-`+t+` of `+n,columns:`Columns`},pagination:{first:`First page`,prev:`Previous page`,next:`Next page`,last:`Last page`},editor:{url:`URL`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,underline:`Underline`,unorderedList:`Unordered List`,orderedList:`Ordered List`,subscript:`Subscript`,superscript:`Superscript`,hyperlink:`Hyperlink`,toggleFullscreen:`Toggle Fullscreen`,quote:`Quote`,left:`Left align`,center:`Center align`,right:`Right align`,justify:`Justify align`,print:`Print`,outdent:`Decrease indentation`,indent:`Increase indentation`,removeFormat:`Remove formatting`,formatting:`Formatting`,fontSize:`Font Size`,align:`Align`,hr:`Insert Horizontal Rule`,undo:`Undo`,redo:`Redo`,heading1:`Heading 1`,heading2:`Heading 2`,heading3:`Heading 3`,heading4:`Heading 4`,heading5:`Heading 5`,heading6:`Heading 6`,paragraph:`Paragraph`,code:`Code`,size1:`Very small`,size2:`A bit small`,size3:`Normal`,size4:`Medium-large`,size5:`Big`,size6:`Very big`,size7:`Maximum`,defaultFont:`Default Font`,viewSource:`View Source`},tree:{noNodes:`No nodes available`,noResults:`No matching nodes found`}};function Ye(){let e=Array.isArray(navigator.languages)===!0&&navigator.languages.length!==0?navigator.languages[0]:navigator.language;if(typeof e==`string`)return e.split(/[-_]/).map((e,t)=>t===0?e.toLowerCase():t>1||e.length<4?e.toUpperCase():e[0].toUpperCase()+e.slice(1).toLowerCase()).join(`-`)}var V=D({__qLang:{}},{getLocale:Ye,set(e=Je,t){let n={...e,rtl:e.rtl===!0,getLocale:Ye};if(n.set=V.set,V.__langConfig===void 0||V.__langConfig.noHtmlAttrs!==!0){let e=document.documentElement;e.setAttribute(`dir`,n.rtl===!0?`rtl`:`ltr`),e.setAttribute(`lang`,n.isoName)}Object.assign(V.__qLang,n)},install({$q:e,lang:t,ssrContext:n}){e.lang=V.__qLang,V.__langConfig=e.config.lang,this.__installed===!0?t!==void 0&&this.set(t):(this.props=new Proxy(this.__qLang,{get(){return Reflect.get(...arguments)},ownKeys(e){return Reflect.ownKeys(e).filter(e=>e!==`set`&&e!==`getLocale`)}}),this.set(t||Je))}}),Xe={name:`material-icons`,type:{positive:`check_circle`,negative:`warning`,info:`info`,warning:`priority_high`},arrow:{up:`arrow_upward`,right:`arrow_forward`,down:`arrow_downward`,left:`arrow_back`,dropdown:`arrow_drop_down`},chevron:{left:`chevron_left`,right:`chevron_right`},colorPicker:{spectrum:`gradient`,tune:`tune`,palette:`style`},pullToRefresh:{icon:`refresh`},carousel:{left:`chevron_left`,right:`chevron_right`,up:`keyboard_arrow_up`,down:`keyboard_arrow_down`,navigationIcon:`lens`},chip:{remove:`cancel`,selected:`check`},datetime:{arrowLeft:`chevron_left`,arrowRight:`chevron_right`,now:`access_time`,today:`today`},editor:{bold:`format_bold`,italic:`format_italic`,strikethrough:`strikethrough_s`,underline:`format_underlined`,unorderedList:`format_list_bulleted`,orderedList:`format_list_numbered`,subscript:`vertical_align_bottom`,superscript:`vertical_align_top`,hyperlink:`link`,toggleFullscreen:`fullscreen`,quote:`format_quote`,left:`format_align_left`,center:`format_align_center`,right:`format_align_right`,justify:`format_align_justify`,print:`print`,outdent:`format_indent_decrease`,indent:`format_indent_increase`,removeFormat:`format_clear`,formatting:`text_format`,fontSize:`format_size`,align:`format_align_left`,hr:`remove`,undo:`undo`,redo:`redo`,heading:`format_size`,code:`code`,size:`format_size`,font:`font_download`,viewSource:`code`},expansionItem:{icon:`keyboard_arrow_down`,denseIcon:`arrow_drop_down`},fab:{icon:`add`,activeIcon:`close`},field:{clear:`cancel`,error:`error`},pagination:{first:`first_page`,prev:`keyboard_arrow_left`,next:`keyboard_arrow_right`,last:`last_page`},rating:{icon:`grade`},stepper:{done:`check`,active:`edit`,error:`warning`},tabs:{left:`chevron_left`,right:`chevron_right`,up:`keyboard_arrow_up`,down:`keyboard_arrow_down`},table:{arrowUp:`arrow_upward`,warning:`warning`,firstPage:`first_page`,prevPage:`chevron_left`,nextPage:`chevron_right`,lastPage:`last_page`},tree:{icon:`play_arrow`},uploader:{done:`done`,clear:`clear`,add:`add_box`,upload:`cloud_upload`,removeQueue:`clear_all`,removeUploaded:`done_all`}},Ze=D({iconMapFn:null,__qIconSet:{}},{set(e,t){let n={...e};n.set=Ze.set,Object.assign(Ze.__qIconSet,n)},install({$q:e,iconSet:t,ssrContext:n}){e.config.iconMapFn!==void 0&&(this.iconMapFn=e.config.iconMapFn),e.iconSet=this.__qIconSet,te(e,`iconMapFn`,()=>this.iconMapFn,e=>{this.iconMapFn=e}),this.__installed===!0?t!==void 0&&this.set(t):(this.props=new Proxy(this.__qIconSet,{get(){return Reflect.get(...arguments)},ownKeys(e){return Reflect.ownKeys(e).filter(e=>e!==`set`)}}),this.set(t||Xe))}}),Qe=[L,qe,B,Ve,_e,V,Ze];function $e(e,t){let n=E(e);n.config.globalProperties=t.config.globalProperties;let{reload:r,...i}=t._context;return Object.assign(n._context,i),n}function et(e,t){t.forEach(t=>{t.install(e),t.__installed=!0})}function tt(e,t,n){e.config.globalProperties.$q=n.$q,e.provide(`_q_`,n.$q),et(n,Qe),t.components!==void 0&&Object.values(t.components).forEach(t=>{z(t)===!0&&t.name!==void 0&&e.component(t.name,t)}),t.directives!==void 0&&Object.values(t.directives).forEach(t=>{z(t)===!0&&t.name!==void 0&&e.directive(t.name,t)}),t.plugins!==void 0&&et(n,Object.values(t.plugins).filter(e=>typeof e.install==`function`&&Qe.includes(e)===!1)),le.value===!0&&(n.$q.onSSRHydrated=()=>{n.onSSRHydrated.forEach(e=>{e()}),n.$q.onSSRHydrated=()=>{}})}var nt={name:`Quasar`,version:`2.19.3`,install:function(e,t={}){let n={version:`2.19.3`};xe===!1?(t.config!==void 0&&Object.assign(Se,t.config),n.config={...Se},ye()):n.config=t.config||{},tt(e,t,{parentApp:e,$q:n,lang:t.lang,iconSet:t.iconSet,onSSRHydrated:[]})},lang:V,iconSet:Ze},rt=we(`templates`,{state:()=>({templates:[],loading:!1,loaded:!1}),actions:{async fetchTemplates(){if(!this.loading){this.loading=!0;try{let e=await fetch(`/api/templates`);if(!e.ok)throw Error(`HTTP ${e.status}`);this.templates=(await e.json()).templates,this.loaded=!0}catch(e){console.error(`[templates store] fetchTemplates failed:`,e)}finally{this.loading=!1}}},async createTemplate(e){let t=await fetch(`/api/templates`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}let n=await t.json();return this.templates.push(n),n},async updateTemplate(e,t){let n=await fetch(`/api/templates/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json(),i=this.templates.findIndex(t=>t.slug===e);return i>=0&&(this.templates[i]=r),r},async deleteTemplate(e){let t=await fetch(`/api/templates/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}this.templates=this.templates.filter(t=>t.slug!==e)}}}),it=null;function at(){return it||=new Audio(`/notification.mp3`),it}function ot(){`Notification`in window&&Notification.permission===`default`&&Notification.requestPermission()}function st(e,t,n){let r=De();if(!document.hasFocus()&&r.global.browserNotifications&&`Notification`in window&&Notification.permission===`granted`){let r=new Notification(e,{body:t,icon:`/favicon.ico`});n&&(r.onclick=()=>{window.focus(),window.location.hash=`#/workspace/${n}`,r.close()})}if(r.global.audioNotifications){let e=at();e.currentTime=0,e.play().catch(()=>{})}}function ct(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`&&Number.isFinite(e))return new Date(e*1e3).toISOString()}function lt(e){let t=e.used_percent??e.percent_used??e.utilization??e.usage_ratio??e.used_ratio??e.usedPct;if(typeof t==`number`&&Number.isFinite(t))return t<=1?t*100:t;let n=e.used??e.current??e.spent,r=e.limit??e.max??e.allowed;return typeof n==`number`&&typeof r==`number`&&r>0?n/r*100:null}function ut(e,t){let n=lt(t),r=ct(t.resets_at??t.reset_at??t.resetsAt??t.resetAt),i=typeof t.label==`string`&&t.label||typeof t.name==`string`&&t.name||typeof t.rateLimitType==`string`&&t.rateLimitType||void 0,a=t.used??t.current??t.spent,o=t.limit??t.max??t.allowed,s=a!==void 0&&o!==void 0?`${String(a)} / ${String(o)}`:void 0,c=t.__fallbackUsedPct,l=n??(typeof c==`number`?c:null);return l===null?null:{id:e,label:i,usedPct:Math.max(0,Math.min(100,l)),resetAt:r,details:s}}function dt(e,t){if(!e.resetAt)return!1;let n=new Date(e.resetAt).getTime();return Number.isFinite(n)?n<=t:!1}function ft(e,t,n,r=Date.now()){let i=[],a=new Set,o=e=>{!e||a.has(e.id)||(i.push(e),a.add(e.id))};if(typeof e.rateLimitType==`string`&&o(ut(e.rateLimitType,{...e,__fallbackUsedPct:0})),Array.isArray(e.buckets))for(let t=0;t<e.buckets.length;t++){let n=e.buckets[t];if(n&&typeof n==`object`){let e=n;o(ut(typeof e.id==`string`&&e.id||typeof e.name==`string`&&e.name||typeof e.label==`string`&&e.label||`bucket-${t}`,e))}}for(let[t,n]of Object.entries(e))!n||typeof n!=`object`||Array.isArray(n)||o(ut(t,n));if(n)for(let e of n.buckets)a.has(e.id)||dt(e,r)||(i.push(e),a.add(e.id));return i.length===0?null:{updatedAt:t,buckets:i}}var pt=we(`devServer`,{state:()=>({statuses:{},logs:{}}),getters:{getStatus:e=>t=>e.statuses[t]??null},actions:{async fetchStatus(e){try{let t=await fetch(`/api/dev-server/${e}/status`);if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){console.error(`[dev-server store] fetchStatus failed:`,e)}},async startDevServer(e){try{let t=await fetch(`/api/dev-server/${e}/start`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){throw console.error(`[dev-server store] startDevServer failed:`,e),e}},async stopDevServer(e){try{let t=await fetch(`/api/dev-server/${e}/stop`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){throw console.error(`[dev-server store] stopDevServer failed:`,e),e}},async fetchLogs(e,t=200){try{let n=await fetch(`/api/dev-server/${e}/logs?tail=${t}`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();return this.logs[e]=r.logs,r.logs}catch(e){return console.error(`[dev-server store] fetchLogs failed:`,e),``}},updateFromWsEvent(e,t){this.statuses[e]=t}}});function mt(e){"@babel/helpers - typeof";return mt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mt(e)}function ht(e,t){if(mt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(mt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gt(e){var t=ht(e,`string`);return mt(t)==`symbol`?t:t+``}function _t(e,t,n){return(t=gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vt=class extends Error{constructor(e,t){super(e),_t(this,`code`,void 0),this.name=`WorkspaceActionError`,this.code=t}},yt=new Set([`completed`,`stopped`,`failed`,`cancelled`]);function bt(e,t){return e!==`task_notification`||!t?!1:yt.has(t)}var xt=5e3,St=we(`workspace`,{state:()=>({workspaces:[],selectedWorkspaceId:null,tasks:[],activityFeeds:{},activityFeedIds:{},activityCounts:{},subagents:{},agentTodos:{},sessions:[],selectedSessionId:null,archivedWorkspaces:[],archivedLoaded:!1,loading:!1,loadingOlderEvents:!1,hasMoreEvents:{},usageStats:{},rateLimitUsage:{},chatDraft:``,queuedMessages:{},gitRefreshTrigger:0,gitStatsCache:{}}),getters:{selectedWorkspace:e=>e.workspaces.find(t=>t.id===e.selectedWorkspaceId)??null,needsAttention:e=>e.workspaces.filter(e=>[`error`,`quota`].includes(e.status)),running:e=>e.workspaces.filter(e=>[`extracting`,`brainstorming`,`executing`].includes(e.status)),idle:e=>e.workspaces.filter(e=>[`completed`,`idle`,`created`].includes(e.status)),favorites(e){return e.workspaces.filter(e=>e.favoritedAt!==null)},currentAgentTodos:e=>e.selectedWorkspaceId?e.agentTodos[e.selectedWorkspaceId]??[]:[],currentSubagents:e=>{if(!e.selectedWorkspaceId)return[];let t=e.subagents[e.selectedWorkspaceId]??{};return Object.values(t).sort((e,t)=>e.startedAt.localeCompare(t.startedAt))},activityFeed:e=>{if(!e.selectedWorkspaceId)return[];let t=e.activityFeeds[e.selectedWorkspaceId]??[];if(!e.selectedSessionId)return e.sessions.length===0?t:[];let n=e.sessions.find(t=>t.id===e.selectedSessionId)?.claudeSessionId??null;return t.filter(t=>!t.sessionId||t.sessionId===e.selectedSessionId||n!==null&&t.sessionId===n)},acceptanceCriteria:e=>e.tasks.filter(e=>e.isAcceptanceCriterion),archived:e=>e.archivedWorkspaces,globalRateLimitUsage:e=>{let t=null;for(let n of Object.values(e.rateLimitUsage))n&&(!t||n.updatedAt>t.updatedAt)&&(t=n);return t}},actions:{async toggleFavorite(e){let t=this.workspaces.find(t=>t.id===e);if(!t)return;let n=t.favoritedAt,r=n===null,i=r?new Date().toISOString():null;this.workspaces=this.workspaces.map(t=>t.id===e?{...t,favoritedAt:i}:t);try{let t=await fetch(`/api/workspaces/${e}/favorite`,{method:r?`POST`:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t)}catch(t){throw this.workspaces=this.workspaces.map(t=>t.id===e?{...t,favoritedAt:n}:t),t}},async setWorkspaceTags(e,t){let n=this.workspaces.find(t=>t.id===e);if(!n)return;let r=n.tags,i=[...t];this.workspaces=this.workspaces.map(t=>t.id===e?{...t,tags:i}:t);try{let n=await fetch(`/api/workspaces/${e}/tags`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({tags:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();this.workspaces=this.workspaces.map(t=>t.id===e?r:t)}catch(t){throw this.workspaces=this.workspaces.map(t=>t.id===e?{...t,tags:r}:t),t}},async fetchWorkspaces(){this.loading=!0;try{let e=await fetch(`/api/workspaces`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();this.workspaces=t.workspaces??t}catch(e){console.error(`[workspace store] fetchWorkspaces failed:`,e)}finally{this.loading=!1}},async fetchArchivedWorkspaces(){try{let e=await fetch(`/api/workspaces/archived`);if(!e.ok)throw Error(`HTTP ${e.status}`);this.archivedWorkspaces=await e.json(),this.archivedLoaded=!0}catch(e){console.error(`[workspace store] fetchArchivedWorkspaces failed:`,e)}},async fetchWorkspaceDetails(e){try{let t=await fetch(`/api/workspaces/${e}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(this.selectedWorkspaceId!==e)return;let r=this.workspaces.findIndex(t=>t.id===e);r>=0&&(this.workspaces[r]={...this.workspaces[r],...n.workspace??n}),n.tasks&&(this.tasks=n.tasks)}catch(e){console.error(`[workspace store] fetchWorkspaceDetails failed:`,e)}},async createWorkspace(e){try{let t=await fetch(`/api/workspaces`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json(),r=n.workspace??n;return this.workspaces.push(r),r}catch(e){throw console.error(`[workspace store] createWorkspace failed:`,e),e}},async startWorkspace(e,t,n,r){try{let i=await fetch(`/api/workspaces/${e}/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({prompt:t,agentSessionId:n,resume:r})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.error??`HTTP ${i.status}`)}await this.fetchWorkspaces()}catch(e){throw console.error(`[workspace store] startWorkspace failed:`,e),e}},async stopWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/stop`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await this.fetchWorkspaces()}catch(e){throw console.error(`[workspace store] stopWorkspace failed:`,e),e}},async interruptAgent(e){try{let t=await fetch(`/api/workspaces/${e}/interrupt`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}}catch(e){throw console.error(`[workspace store] interruptAgent failed:`,e),e}},async deleteWorkspace(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});if(!n.ok)throw Error(`HTTP ${n.status}`);this.workspaces=this.workspaces.filter(t=>t.id!==e),delete this.activityFeeds[e],delete this.activityFeedIds[e],delete this.activityCounts[e],delete this.subagents[e],delete this.agentTodos[e],delete this.usageStats[e],delete this.rateLimitUsage[e],this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[])}catch(e){throw console.error(`[workspace store] deleteWorkspace failed:`,e),e}},async updateModel(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateModel failed:`,e),e}},async updateReasoningEffort(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({reasoningEffort:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateReasoningEffort failed:`,e),e}},async updatePermissionMode(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({permissionMode:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updatePermissionMode failed:`,e),e}},async pushBranch(e){let t=await fetch(`/api/workspaces/${e}/push`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({error:`Push failed`}));throw new vt(e.error??`Push failed`,e.code)}},async pullBranch(e){let t=await fetch(`/api/workspaces/${e}/pull`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({error:`Pull failed`}));throw new vt(e.error??`Pull failed`,e.code)}},async fetchGitStats(e){let t=await fetch(`/api/workspaces/${e}/git-stats`);if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();return this.gitStatsCache[e]=n,n},async openPullRequest(e){let t=await fetch(`/api/workspaces/${e}/open-pr`,{method:`POST`}),n=await t.json().catch(()=>null);if(!t.ok)throw new vt(n?.error??`Open PR failed`,n?.code);return n},async archiveWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/archive`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();return this.workspaces=this.workspaces.filter(t=>t.id!==e),this.archivedLoaded&&this.archivedWorkspaces.unshift(n),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]),n}catch(e){throw console.error(`[workspace store] archiveWorkspace failed:`,e),e}},async unarchiveWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/unarchive`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();return this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e),this.workspaces.unshift(n),n}catch(e){throw console.error(`[workspace store] unarchiveWorkspace failed:`,e),e}},async createTask(e,t,n){try{let r=await fetch(`/api/workspaces/${e}/tasks`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:t,isAcceptanceCriterion:n})});if(!r.ok)throw Error(`HTTP ${r.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] createTask failed:`,e),e}},async updateTaskTitle(e,t,n){try{let r=await fetch(`/api/workspaces/${e}/tasks/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:n})});if(!r.ok)throw Error(`HTTP ${r.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] updateTaskTitle failed:`,e),e}},async deleteTask(e,t){try{let n=await fetch(`/api/workspaces/${e}/tasks/${t}`,{method:`DELETE`});if(!n.ok)throw Error(`HTTP ${n.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] deleteTask failed:`,e),e}},selectWorkspace(e){this.selectedWorkspaceId=e,this.selectedSessionId=null,this.tasks=[],this.markRead(e),this.fetchWorkspaceDetails(e),this.fetchSessions(e),this.fetchGitStats(e).catch(()=>{}),this.activityFeeds[e]?.length||Et().subscribe(e)},async fetchSessions(e){try{let t=await fetch(`/api/workspaces/${e}/sessions`);if(!t.ok)throw Error(`HTTP ${t.status}`);if(this.selectedWorkspaceId!==e)return;this.sessions=await t.json();let n=this.selectedSessionId&&this.sessions.some(e=>e.id===this.selectedSessionId);if(this.sessions.length>0&&!n){let t=localStorage.getItem(`kobo:session:${e}`),n=t?this.sessions.find(e=>e.id===t):null;this.selectSession(n?n.id:this.sessions[0].id)}}catch(e){console.error(`[workspace store] fetchSessions failed:`,e)}},async fetchOlderEvents(e){if(this.loadingOlderEvents||this.hasMoreEvents[e]===!1)return!1;let t=this.activityFeeds[e];if(!t?.length)return!1;let n=t[0].id;this.loadingOlderEvents=!0;try{let t=await fetch(`/api/workspaces/${e}/events?before=${encodeURIComponent(n)}&limit=100`);if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(this.hasMoreEvents[e]=r.hasMore,r.events.length>0){let e=Et();for(let t of r.events)e._routeMessage(t)}return r.events.length>0}catch(e){return console.error(`[workspace store] fetchOlderEvents failed:`,e),!1}finally{this.loadingOlderEvents=!1}},selectSession(e){this.selectedSessionId=e,this.selectedWorkspaceId&&localStorage.setItem(`kobo:session:${this.selectedWorkspaceId}`,e)},async createSession(e){try{let t=await fetch(`/api/workspaces/${e}/sessions`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}let n=await t.json();return this.sessions.unshift(n),this.selectSession(n.id),n}catch(e){throw console.error(`[workspace store] createSession failed:`,e),e}},async renameWorkspace(e,t){let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]={...this.workspaces[i],...r});let a=this.archivedWorkspaces.findIndex(t=>t.id===e);a>=0&&(this.archivedWorkspaces[a]={...this.archivedWorkspaces[a],...r})},async renameSession(e,t,n){let r=await fetch(`/api/workspaces/${e}/sessions/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}let i=await r.json().catch(()=>null),a=this.sessions.find(e=>e.id===t);a&&(a.name=i?.name??n)},addActivityItem(e,t){if(this.activityFeeds[e]||(this.activityFeeds[e]=[]),this.activityFeedIds[e]||(this.activityFeedIds[e]=new Set),this.activityCounts[e]||(this.activityCounts[e]={toolUses:0,agentMessages:0,userMessages:0,errors:0}),t.meta?.sender!==`user`&&t.meta?.sender!==`system-prompt`)for(let t of this.activityFeeds[e])t.meta?.pending&&(t.meta.pending=!1);if(!this.activityFeedIds[e].has(t.id)){this.activityFeedIds[e].add(t.id),this.activityFeeds[e].push(t);let n=this.activityCounts[e];t.type===`tool_use`?n.toolUses++:t.type===`error`&&n.errors++,t.meta?.sender===`user`?n.userMessages++:t.type===`text`&&t.meta?.sender!==`system-prompt`&&n.agentMessages++}let n=this.activityFeeds[e];if(n.length>xt){let t=n.splice(0,n.length-xt),r=this.activityFeedIds[e];for(let e of t)r.delete(e.id)}},removeActivityItem(e,t){let n=this.activityFeeds[e],r=this.activityFeedIds[e];if(!n||!r)return;let i=n.findIndex(e=>e.id===t);if(i<0)return;let[a]=n.splice(i,1);r.delete(t);let o=this.activityCounts[e];o&&a&&(a.type===`tool_use`?o.toolUses=Math.max(0,o.toolUses-1):a.type===`error`&&(o.errors=Math.max(0,o.errors-1)),a.meta?.sender===`user`?o.userMessages=Math.max(0,o.userMessages-1):a.type===`text`&&a.meta?.sender!==`system-prompt`&&(o.agentMessages=Math.max(0,o.agentMessages-1)))},clearActivityFeed(e){e?(delete this.activityFeeds[e],delete this.activityFeedIds[e],delete this.activityCounts[e]):(this.activityFeeds={},this.activityFeedIds={},this.activityCounts={})},addUsageStats(e,t){this.usageStats[e]||(this.usageStats[e]={inputTokens:0,outputTokens:0,costUsd:0,sessionCount:0});let n=this.usageStats[e];n.inputTokens+=t.inputTokens??0,n.outputTokens+=t.outputTokens??0,n.costUsd+=t.costUsd??0,n.sessionCount++},setRateLimitUsage(e,t){this.rateLimitUsage[e]=t},triggerGitRefresh(){this.gitRefreshTrigger++},updateAgentTodos(e,t){this.agentTodos[e]=t},upsertSubagent(e,t){this.subagents[e]||(this.subagents[e]={});let n=this.subagents[e][t.toolUseId],r=new Date().toISOString(),i=n?.status===`done`?`done`:t.status??n?.status??`running`;this.subagents[e][t.toolUseId]={toolUseId:t.toolUseId,description:t.description??n?.description??``,taskType:t.taskType??n?.taskType,status:i,lastToolName:t.lastToolName??n?.lastToolName,lastDescription:t.lastDescription??n?.lastDescription,totalTokens:t.totalTokens??n?.totalTokens,toolUses:t.toolUses??n?.toolUses,durationMs:t.durationMs??n?.durationMs,startedAt:n?.startedAt??r,updatedAt:r}},async markRead(e){try{let t=await fetch(`/api/workspaces/${e}/mark-read`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=this.workspaces.findIndex(t=>t.id===e);n>=0&&(this.workspaces[n]={...this.workspaces[n],hasUnread:!1})}catch(e){console.error(`[workspace store] markRead failed:`,e)}},queueMessage(e,t,n){this.queuedMessages[e]={content:t,sessionId:n}},cancelQueuedMessage(e){delete this.queuedMessages[e]},updateWorkspaceFromEvent(e,t){let n=this.workspaces.findIndex(t=>t.id===e);if(n>=0&&(this.workspaces[n]={...this.workspaces[n],...t}),t.status&&[`completed`,`idle`,`error`,`quota`].includes(t.status)){let n=this.activityFeeds[e];if(n)for(let e of n)e.meta?.pending&&(e.meta.pending=!1);let r=this.subagents[e];if(r)for(let[e,t]of Object.entries(r))t.status===`running`&&(r[e]={...t,status:`done`});let i=this.queuedMessages[e];(t.status===`completed`||t.status===`idle`)&&i&&(delete this.queuedMessages[e],Et().sendChatMessage(e,i.content,i.sessionId),this.addActivityItem(e,{id:`user-${Date.now()}`,type:`text`,content:i.content,timestamp:new Date().toISOString(),sessionId:i.sessionId,meta:{sender:`user`,pending:!0}}))}}}}),Ct=Ee.global.t,H=null,wt=null,Tt=0,Et=we(`websocket`,{state:()=>({connected:!1,lastEventId:null,_replaying:!1}),actions:{connect(){if(H)return;let e=`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/ws`,t=new WebSocket(e);H=t,t.addEventListener(`open`,()=>{this.connected=!0,Tt=0;let e=St().workspaces.map(e=>e.id);for(let t of e)this._send({type:`subscribe`,payload:{workspaceId:t}});this.lastEventId&&this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:e}})}),t.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data);this._routeMessage(t)}catch{}}),t.addEventListener(`close`,()=>{this.connected=!1,H=null,this._scheduleReconnect()}),t.addEventListener(`error`,()=>{})},disconnect(){wt&&=(clearTimeout(wt),null),H&&=(H.close(),null),this.connected=!1},subscribe(e){this._send({type:`subscribe`,payload:{workspaceId:e}}),this._send({type:`sync:request`,payload:{workspaceIds:[e]}})},unsubscribe(e){this._send({type:`unsubscribe`,payload:{workspaceId:e}})},sendChatMessage(e,t,n){this._send({type:`chat:message`,payload:{workspaceId:e,content:t,sessionId:n}})},_send(e){H&&H.readyState===WebSocket.OPEN&&H.send(JSON.stringify(e))},_scheduleReconnect(){if(wt)return;let e=Math.min(1e3*2**Tt,3e4);Tt++,wt=setTimeout(()=>{wt=null,this.connect()},e)},_routeMessage(e){let t=St(),n=e.id??e.eventId??Date.now().toString();e.id?this.lastEventId=e.id:e.eventId&&(this.lastEventId=e.eventId);let r=e.payload??{},i=e.createdAt??new Date().toISOString(),a=e.sessionId,o=e.workspaceId??r.workspaceId??``;switch(e.type){case`agent:output`:{let e=r.type;if(e===`assistant`){let e=r.message?.content??r.content,s=Array.isArray(e)?e:[],c=s.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
3
|
-
`);c&&t.addActivityItem(o,{id:n,type:`text`,content:c,timestamp:i,sessionId:a,meta:r});let l=s.filter(e=>e.type===`tool_use`);for(let e of l){let r=e,s=r.name??`tool`;if(t.addActivityItem(o,{id:`${n}-${r.id??Math.random()}`,type:`tool_use`,content:s,timestamp:i,sessionId:a,meta:r}),s===`Bash`&&o){let e=r.input,n=(e?.command??``)+(e?.description??``);/\bgit\b|commit|push|pull|merge|rebase|checkout|branch/i.test(n)&&t.triggerGitRefresh()}if(s===`TodoWrite`&&o){let e=r.input;e?.todos&&Array.isArray(e.todos)&&t.updateAgentTodos(o,e.todos.map(e=>({content:e.content??``,status:e.status??`pending`,activeForm:e.activeForm??void 0})))}}}else if(e===`tool_use`){let e=r.name??`tool`;if(t.addActivityItem(o,{id:n,type:`tool_use`,content:e,timestamp:i,sessionId:a,meta:r}),e===`TodoWrite`&&o){let e=r.input;e?.todos&&Array.isArray(e.todos)&&t.updateAgentTodos(o,e.todos.map(e=>({content:e.content??``,status:e.status??`pending`,activeForm:e.activeForm??void 0})))}}else if(e===`tool_result`){let e=this._extractToolResultContent(r.content);e&&t.addActivityItem(o,{id:n,type:`tool_use`,content:e,timestamp:i,sessionId:a,meta:r})}else if(e===`system`){let e=r.subtype;if(e===`hook_started`||e===`hook_response`)break;if(e===`task_started`||e===`task_progress`||e===`task_notification`){let n=r.tool_use_id;if(o&&n){let i=r.usage,a=r.status,s=bt(e,a);t.upsertSubagent(o,{toolUseId:n,description:r.description??r.summary??void 0,taskType:r.task_type??void 0,status:s?`done`:`running`,lastToolName:r.last_tool_name??void 0,totalTokens:i?.total_tokens??void 0,toolUses:i?.tool_uses??void 0,durationMs:i?.duration_ms??void 0})}}if((e===`task_progress`||e===`task_started`||e===`task_notification`)&&!De().showVerboseSystemMessages)break;let s={init:`Session started`,compact:`Context compacted — conversation history was summarized`,compact_boundary:e=>`Compact boundary (${e.compact_metadata?.trigger??`auto`}, ${e.compact_metadata?.pre_tokens??`?`} tokens before)`,status:e=>e.status===`compacting`?`Compacting context...`:e.status?`Status: ${e.status}`:null};if(e===`init`&&(t.fetchSessions(o),!De().showVerboseSystemMessages))break;let c=e?s[e]:void 0,l=null;if(typeof c==`function`)l=c(r);else if(typeof c==`string`)l=c;else if(De().showVerboseSystemMessages){let t=r.summary??null;l=t?`[${e??`system`}] ${t}`:`[${e??`system`}]`}l&&t.addActivityItem(o,{id:n,type:`system`,content:l,timestamp:i,sessionId:a,meta:r})}else if(e===`result`){let e=r.usage;if(e&&o){let n=e.input_tokens??e.inputTokens??0,i=e.output_tokens??e.outputTokens??0,a=r.cost_usd??r.costUsd??e.cost_usd??e.costUsd??0;t.addUsageStats(o,{inputTokens:n,outputTokens:i,costUsd:a})}if(!De().showVerboseSystemMessages)break;if(e){let s=e.input_tokens??e.inputTokens,c=e.output_tokens??e.outputTokens,l=r.cost_usd??r.costUsd??e.cost_usd??e.costUsd,u=[];s&&u.push(`in: ${this._formatTokenCount(s)}`),c&&u.push(`out: ${this._formatTokenCount(c)}`),l&&u.push(`$${l.toFixed(4)}`),u.length>0&&t.addActivityItem(o,{id:n,type:`system`,content:`Session ended [${u.join(` | `)}]`,timestamp:i,sessionId:a,meta:r})}}else if(e===`user`){let e=r.message?.content;if(typeof e==`string`)t.addActivityItem(o,{id:n,type:`tool_use`,content:e.length>300?`${e.slice(0,300)}...`:e,timestamp:i,sessionId:a,meta:r});else if(Array.isArray(e))for(let r of e){let e=r;if(e.type===`tool_result`){let r=e.tool_use_id??``;o&&r&&t.subagents[o]?.[r]&&t.upsertSubagent(o,{toolUseId:r,status:`done`});let s=typeof e.content==`string`?e.content:this._extractReadableContent(e.content);s&&t.addActivityItem(o,{id:`${n}-${r}`,type:`tool_use`,content:`Result: ${s.length>300?`${s.slice(0,300)}...`:s}`,timestamp:i,sessionId:a,meta:e})}}}else if(e===`rate_limit_event`){let e=r.rate_limit_info;if(e){if(o){let n=ft(e,i,t.rateLimitUsage[o]??null);n&&t.setRateLimitUsage(o,n)}if(!De().showVerboseSystemMessages)break;let s=e.status??`unknown`,c=e.utilization;t.addActivityItem(o,{id:n,type:`system`,content:`Rate limit: ${s}${c===void 0?``:` (${Math.round(c*100)}% used)`}`,timestamp:i,sessionId:a,meta:r})}}else if(e===`raw`){let e=this._extractReadableContent(r.content??r);e&&t.addActivityItem(o,{id:n,type:`raw`,content:e,timestamp:i,sessionId:a,meta:r})}else{let s=this._extractReadableContent(r);s&&t.addActivityItem(o,{id:n,type:`raw`,content:`[${e??`unknown`}] ${s}`,timestamp:i,sessionId:a,meta:r})}break}case`agent:status`:if(o){let e=r.status;if(t.updateWorkspaceFromEvent(o,{status:e}),t.fetchWorkspaces(),!this._replaying&&(e===`completed`||e===`idle`||e===`error`)){let n=t.workspaces.find(e=>e.id===o)?.name??``;st(Ct(e===`error`?`notification.agentError`:`notification.agentFinished`,{name:n}),void 0,o)}}break;case`agent:progress`:r.tasks&&Array.isArray(r.tasks)&&(t.tasks=r.tasks);break;case`agent:error`:o&&(t.updateWorkspaceFromEvent(o,{status:`error`}),t.addActivityItem(o,{id:n,type:`error`,content:r.message??`Unknown error`,timestamp:i,sessionId:a,meta:r}));break;case`user:message`:if(o&&r.content){let e=r.content,s=r.sender??`user`,c=t.activityFeeds[o]??[];if(s===`user`&&c.some(t=>t.meta?.sender===`user`&&t.content===e&&t.meta?.pending)){let t=c.findIndex(t=>t.meta?.sender===`user`&&t.content===e&&t.meta?.pending);t>=0&&(c[t]={...c[t],id:n,sessionId:a})}else t.addActivityItem(o,{id:n,type:`text`,content:e,timestamp:i,sessionId:a,meta:{sender:s}})}break;case`sync:response`:this._replaying=!0;try{let e=r.events??[];for(let t of e)t.type!==`sync:response`&&this._routeMessage(t)}finally{this._replaying=!1}break;case`devserver:status`:{let e=pt();o&&e.updateFromWsEvent(o,r);break}case`task:updated`:o&&t.fetchWorkspaceDetails(o);break;case`setup:output`:t.addActivityItem(o,{id:e.id??`setup-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`setup:complete`:t.addActivityItem(o,{id:e.id??`setup-complete-${Date.now()}`,type:`text`,content:`[setup] Complete`,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`setup:error`:t.addActivityItem(o,{id:e.id??`setup-error-${Date.now()}`,type:`text`,content:`[setup] Error: ${e.payload?.message??`unknown`}`,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`error`}});break;case`workspace:unread`:if(o){let e=r.hasUnread??!1;t.updateWorkspaceFromEvent(o,{hasUnread:e})}break;case`workspace:archived`:case`workspace:unarchived`:t.fetchWorkspaces(),t.archivedLoaded&&t.fetchArchivedWorkspaces();break}},_extractToolResultContent(e){if(typeof e==`string`)return e;if(Array.isArray(e)){let t=e.filter(e=>typeof e==`object`&&!!e&&e.type===`text`).map(e=>e.text).join(`
|
|
4
|
-
`);if(t)return t}return e&&typeof e==`object`?this._extractReadableContent(e):``},_extractReadableContent(e){if(typeof e==`string`)return e;if(!e||typeof e!=`object`)return``;let t=e;for(let e of[`content`,`text`,`message`,`description`,`summary`])if(typeof t[e]==`string`&&t[e])return t[e];if(Array.isArray(t.content)){let e=t.content.filter(e=>typeof e==`object`&&!!e&&e.type===`text`).map(e=>e.text).filter(Boolean);if(e.length>0)return e.join(`
|
|
5
|
-
`)}return JSON.stringify(t,null,2)},_formatTokenCount(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}}}),Dt=x({__name:`App`,setup(e){let t=Et(),n=rt();return s(()=>{t.connect(),n.fetchTemplates(),ot()}),c(()=>{t.disconnect()}),(e,t)=>{let n=u(`router-view`);return i(),m(n)}}});function Ot(e){return e}function kt(e){return e}function At(e){return e}var jt=At(()=>Te()),Mt=typeof document<`u`;function Nt(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Pt(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Nt(e.default)}var U=Object.assign;function Ft(e,t){let n={};for(let r in t){let i=t[r];n[r]=W(i)?i.map(e):e(i)}return n}var It=()=>{},W=Array.isArray;function Lt(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Rt=/#/g,zt=/&/g,Bt=/\//g,Vt=/=/g,Ht=/\?/g,Ut=/\+/g,Wt=/%5B/g,Gt=/%5D/g,Kt=/%5E/g,qt=/%60/g,Jt=/%7B/g,Yt=/%7C/g,Xt=/%7D/g,Zt=/%20/g;function Qt(e){return e==null?``:encodeURI(``+e).replace(Yt,`|`).replace(Wt,`[`).replace(Gt,`]`)}function $t(e){return Qt(e).replace(Jt,`{`).replace(Xt,`}`).replace(Kt,`^`)}function en(e){return Qt(e).replace(Ut,`%2B`).replace(Zt,`+`).replace(Rt,`%23`).replace(zt,`%26`).replace(qt,"`").replace(Jt,`{`).replace(Xt,`}`).replace(Kt,`^`)}function tn(e){return en(e).replace(Vt,`%3D`)}function nn(e){return Qt(e).replace(Rt,`%23`).replace(Ht,`%3F`)}function rn(e){return nn(e).replace(Bt,`%2F`)}function an(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var on=/\/$/,sn=e=>e.replace(on,``);function cn(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=gn(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:an(o)}}function ln(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function un(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function dn(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&fn(t.matched[r],n.matched[i])&&pn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!mn(e[n],t[n]))return!1;return!0}function mn(e,t){return W(e)?hn(e,t):W(t)?hn(t,e):e?.valueOf()===t?.valueOf()}function hn(e,t){return W(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function gn(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var G={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},_n=function(e){return e.pop=`pop`,e.push=`push`,e}({}),vn=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function yn(e){if(!e)if(Mt){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),sn(e)}var bn=/^[^#]+#/;function xn(e,t){return e.replace(bn,`#`)+t}function Sn(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Cn=()=>({left:window.scrollX,top:window.scrollY});function wn(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Sn(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Tn(e,t){return(history.state?history.state.position-t:-1)+e}var En=new Map;function Dn(e,t){En.set(e,t)}function On(e){let t=En.get(e);return En.delete(e),t}function kn(e){return typeof e==`string`||e&&typeof e==`object`}function An(e){return typeof e==`string`||typeof e==`symbol`}var K=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),jn=Symbol(``);K.MATCHER_NOT_FOUND,K.NAVIGATION_GUARD_REDIRECT,K.NAVIGATION_ABORTED,K.NAVIGATION_CANCELLED,K.NAVIGATION_DUPLICATED;function Mn(e,t){return U(Error(),{type:e,[jn]:!0},t)}function q(e,t){return e instanceof Error&&jn in e&&(t==null||!!(e.type&t))}function Nn(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(Ut,` `),i=r.indexOf(`=`),a=an(i<0?r:r.slice(0,i)),o=i<0?null:an(r.slice(i+1));if(a in t){let e=t[a];W(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Pn(e){let t=``;for(let n in e){let r=e[n];if(n=tn(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(W(r)?r.map(e=>e&&en(e)):[r&&en(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Fn(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=W(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var In=Symbol(``),Ln=Symbol(``),Rn=Symbol(``),zn=Symbol(``),Bn=Symbol(``);function Vn(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function J(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Mn(K.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):kn(e)?c(Mn(K.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Hn(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Nt(s)){let c=(s.__vccOpts||s)[t];c&&a.push(J(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Pt(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&J(c,n,r,o,e,i)()}))}}return a}function Un(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>fn(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>fn(e,s))||i.push(s))}return[n,r,i]}var Wn=()=>location.protocol+`//`+location.host;function Gn(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),un(n,``)}return un(n,e)+r+i}function Kn(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Gn(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:_n.pop,direction:u?u>0?vn.forward:vn.back:vn.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(U({},e.state,{scroll:Cn()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function qn(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Cn():null}}function Jn(e){let{history:t,location:n}=window,r={value:Gn(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Wn()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,U({},t.state,qn(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=U({},i.value,t.state,{forward:e,scroll:Cn()});a(o.current,o,!0),a(e,U({},qn(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Yn(e){e=yn(e);let t=Jn(e),n=Kn(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=U({location:``,base:e,go:r,createHref:xn.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function Xn(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Yn(e)}var Zn=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Y=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Y||{}),Qn={type:Zn.Static,value:``},$n=/[a-zA-Z0-9_]/;function er(e){if(!e)return[[]];if(e===`/`)return[[Qn]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Y.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Y.Static?a.push({type:Zn.Static,value:l}):n===Y.Param||n===Y.ParamRegExp||n===Y.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Zn.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==Y.ParamRegExp){r=n,n=Y.EscapeNext;continue}switch(n){case Y.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=Y.Param):f();break;case Y.EscapeNext:f(),n=r;break;case Y.Param:c===`(`?n=Y.ParamRegExp:$n.test(c)?f():(d(),n=Y.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case Y.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=Y.ParamRegExpEnd:u+=c;break;case Y.ParamRegExpEnd:d(),n=Y.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===Y.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var tr=`[^/]+?`,nr={sensitive:!1,strict:!1,start:!0,end:!0},X=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}(X||{}),rr=/[.+*?^${}()[\]/\\]/g;function ir(e,t){let n=U({},nr,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[X.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=X.Segment+(n.sensitive?X.BonusCaseSensitive:0);if(o.type===Zn.Static)r||(i+=`/`),i+=o.value.replace(rr,`\\$&`),s+=X.Static;else if(o.type===Zn.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||tr;if(u!==tr){s+=X.BonusCustomRegExp;try{`${u}`}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=X.Dynamic,c&&(s+=X.BonusOptional),n&&(s+=X.BonusRepeatable),u===`.*`&&(s+=X.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=X.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===Zn.Static)n+=e.value;else if(e.type===Zn.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(W(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=W(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function ar(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===X.Static+X.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===X.Static+X.Segment?1:-1:0}function or(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=ar(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(sr(r))return 1;if(sr(i))return-1}return i.length-r.length}function sr(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var cr={strict:!1,end:!0,sensitive:!1};function lr(e,t,n){let r=U(ir(er(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function ur(e,t){let n=[],r=new Map;t=Lt(cr,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=fr(e);s.aliasOf=r&&r.record;let l=Lt(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(fr(U({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=lr(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!mr(d)&&o(e.name)),vr(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:It}function o(e){if(An(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=gr(e,n);n.splice(t,0,e),e.record.name&&!mr(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Mn(K.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=U(dr(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&dr(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Mn(K.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=U({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:hr(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function dr(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function fr(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pr(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function pr(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function mr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hr(e){return e.reduce((e,t)=>U(e,t.meta),{})}function gr(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;or(e,t[i])<0?r=i:n=i+1}let i=_r(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function _r(e){let t=e;for(;t=t.parent;)if(vr(t)&&or(e,t)===0)return t}function vr({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function yr(e){let t=S(Rn),n=S(zn),r=v(()=>{let n=y(e.to);return t.resolve(n)}),i=v(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(fn.bind(null,i));if(o>-1)return o;let s=wr(e[t-2]);return t>1&&wr(i)===s&&a[a.length-1].path!==s?a.findIndex(fn.bind(null,e[t-2])):o}),a=v(()=>i.value>-1&&Cr(n.params,r.value.params)),o=v(()=>i.value>-1&&i.value===n.matched.length-1&&pn(n.params,r.value.params));function s(n={}){if(Sr(n)){let n=t[y(e.replace)?`replace`:`push`](y(e.to)).catch(It);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:v(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function br(e){return e.length===1?e[0]:e}var xr=x({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:yr,setup(e,{slots:t}){let n=p(yr(e)),{options:r}=S(Rn),i=v(()=>({[Tr(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Tr(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&br(t.default(n));return e.custom?r:d(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function Sr(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Cr(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!W(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function wr(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Tr=(e,t,n)=>e??t??n,Er=x({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=S(Bn),i=v(()=>e.route||r.value),s=S(Ln,0),c=v(()=>{let e=y(s),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),u=v(()=>i.value.matched[c.value]);o(Ln,v(()=>c.value+1)),o(In,u),o(Bn,i);let f=l();return a(()=>[f.value,u.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!fn(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=u.value,s=o&&o.components[a];if(!s)return Dr(n.default,{Component:s,route:r});let c=o.props[a],l=d(s,U({},c?c===!0?r.params:typeof c==`function`?c(r):c:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:f}));return Dr(n.default,{Component:l,route:r})||l}}});function Dr(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Or=Er;function kr(t){let n=ur(t.routes,t),i=t.parseQuery||Nn,a=t.stringifyQuery||Pn,o=t.history,s=Vn(),c=Vn(),l=Vn(),u=h(G),d=G;Mt&&t.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let f=Ft.bind(null,e=>``+e),p=Ft.bind(null,rn),m=Ft.bind(null,an);function g(e,t){let r,i;return An(e)?(r=n.getRecordMatcher(e),i=t):i=e,n.addRoute(i,r)}function _(e){let t=n.getRecordMatcher(e);t&&n.removeRoute(t)}function v(){return n.getRoutes().map(e=>e.record)}function b(e){return!!n.getRecordMatcher(e)}function x(e,t){if(t=U({},t||u.value),typeof e==`string`){let r=cn(i,e,t.path),a=n.resolve({path:r.path},t),s=o.createHref(r.fullPath);return U(r,a,{params:m(a.params),hash:an(r.hash),redirectedFrom:void 0,href:s})}let r;if(e.path!=null)r=U({},e,{path:cn(i,e.path,t.path).path});else{let n=U({},e.params);for(let e in n)n[e]??delete n[e];r=U({},e,{params:p(n)}),t.params=p(t.params)}let s=n.resolve(r,t),c=e.hash||``;s.params=f(m(s.params));let l=ln(a,U({},e,{hash:$t(c),path:s.path})),d=o.createHref(l);return U({fullPath:l,hash:c,query:a===Pn?Fn(e.query):e.query||{}},s,{redirectedFrom:void 0,href:d})}function S(e){return typeof e==`string`?cn(i,e,u.value.path):U({},e)}function C(e,t){if(d!==e)return Mn(K.NAVIGATION_CANCELLED,{from:t,to:e})}function w(e){return D(e)}function T(e){return w(U(S(e),{replace:!0}))}function E(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=S(i):{path:i},i.params={}),U({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function D(e,t){let n=d=x(e),r=u.value,i=e.state,o=e.force,s=e.replace===!0,c=E(n,r);if(c)return D(U(S(c),{state:typeof c==`object`?U({},i,c.state):i,force:o,replace:s}),t||n);let l=n;l.redirectedFrom=t;let f;return!o&&dn(a,r,n)&&(f=Mn(K.NAVIGATION_DUPLICATED,{to:l,from:r}),F(r,r,!0,!1)),(f?Promise.resolve(f):A(l,r)).catch(e=>q(e)?q(e,K.NAVIGATION_GUARD_REDIRECT)?e:ae(e):re(e,l,r)).then(e=>{if(e){if(q(e,K.NAVIGATION_GUARD_REDIRECT))return D(U({replace:s},S(e.to),{state:typeof e.to==`object`?U({},i,e.to.state):i,force:o}),t||l)}else e=ee(l,r,!0,s,i);return j(l,r,e),e})}function O(e,t){let n=C(e,t);return n?Promise.reject(n):Promise.resolve()}function k(e){let t=se.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function A(e,t){let n,[r,i,a]=Un(e,t);n=Hn(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(J(r,e,t))});let o=O.bind(null,e,t);return n.push(o),R(n).then(()=>{n=[];for(let r of s.list())n.push(J(r,e,t));return n.push(o),R(n)}).then(()=>{n=Hn(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(J(r,e,t))});return n.push(o),R(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(W(r.beforeEnter))for(let i of r.beforeEnter)n.push(J(i,e,t));else n.push(J(r.beforeEnter,e,t));return n.push(o),R(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Hn(a,`beforeRouteEnter`,e,t,k),n.push(o),R(n))).then(()=>{n=[];for(let r of c.list())n.push(J(r,e,t));return n.push(o),R(n)}).catch(e=>q(e,K.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function j(e,t,n){l.list().forEach(r=>k(()=>r(e,t,n)))}function ee(e,t,n,r,i){let a=C(e,t);if(a)return a;let s=t===G,c=Mt?history.state:{};n&&(r||s?o.replace(e.fullPath,U({scroll:s&&c&&c.scroll},i)):o.push(e.fullPath,i)),u.value=e,F(e,t,n,s),ae()}let M;function N(){M||=o.listen((e,t,n)=>{if(!L.listening)return;let r=x(e),i=E(r,L.currentRoute.value);if(i){D(U(i,{replace:!0,force:!0}),r).catch(It);return}d=r;let a=u.value;Mt&&Dn(Tn(a.fullPath,n.delta),Cn()),A(r,a).catch(e=>q(e,K.NAVIGATION_ABORTED|K.NAVIGATION_CANCELLED)?e:q(e,K.NAVIGATION_GUARD_REDIRECT)?(D(U(S(e.to),{force:!0}),r).then(e=>{q(e,K.NAVIGATION_ABORTED|K.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===_n.pop&&o.go(-1,!1)}).catch(It),Promise.reject()):(n.delta&&o.go(-n.delta,!1),re(e,r,a))).then(e=>{e||=ee(r,a,!1),e&&(n.delta&&!q(e,K.NAVIGATION_CANCELLED)?o.go(-n.delta,!1):n.type===_n.pop&&q(e,K.NAVIGATION_ABORTED|K.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),j(r,a,e)}).catch(It)})}let P=Vn(),te=Vn(),ne;function re(e,t,n){ae(e);let r=te.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ie(){return ne&&u.value!==G?Promise.resolve():new Promise((e,t)=>{P.add([e,t])})}function ae(e){return ne||(ne=!e,N(),P.list().forEach(([t,n])=>e?n(e):t()),P.reset()),e}function F(e,n,i,a){let{scrollBehavior:o}=t;if(!Mt||!o)return Promise.resolve();let s=!i&&On(Tn(e.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return r().then(()=>o(e,n,s)).then(e=>e&&wn(e)).catch(t=>re(t,e,n))}let I=e=>o.go(e),oe,se=new Set,L={currentRoute:u,listening:!0,addRoute:g,removeRoute:_,clearRoutes:n.clearRoutes,hasRoute:b,getRoutes:v,resolve:x,options:t,push:w,replace:T,go:I,back:()=>I(-1),forward:()=>I(1),beforeEach:s.add,beforeResolve:c.add,afterEach:l.add,onError:te.add,isReady:ie,install(t){t.component(`RouterLink`,xr),t.component(`RouterView`,Or),t.config.globalProperties.$router=L,Object.defineProperty(t.config.globalProperties,`$route`,{enumerable:!0,get:()=>y(u)}),Mt&&!oe&&u.value===G&&(oe=!0,w(o.location).catch(e=>{}));let n={};for(let e in G)Object.defineProperty(n,e,{get:()=>u.value[e],enumerable:!0});t.provide(Rn,L),t.provide(zn,e(n)),t.provide(Bn,u);let r=t.unmount;se.add(t),t.unmount=function(){se.delete(t),se.size<1&&(d=G,M&&M(),M=null,u.value=G,oe=!1,ne=!1),r()}}};function R(e){return e.reduce((e,t)=>e.then(()=>k(t)),Promise.resolve())}return L}function Ar(){return S(Rn)}function jr(e){return S(zn)}var Mr=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Nr=function(e){return`/`+e},Pr={},Fr=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Nr(t,n),t in Pr)return;Pr[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Mr,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ir=[{path:`/`,component:()=>Fr(()=>import(`./MainLayout-_oPM07ln.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28])),children:[{path:``,redirect:{name:`workspace`}},{path:`workspace/:id?`,name:`workspace`,component:()=>Fr(()=>import(`./WorkspacePage-Cl7YrG51.js`),__vite__mapDeps([29,1,2,3,4,6,7,8,9,10,11,12,13,30,14,18,23,31,21,19,32,22,26,27,33]))},{path:`create`,name:`create`,component:()=>Fr(()=>import(`./CreatePage-je_7dC5I.js`),__vite__mapDeps([34,1,2,3,4,7,8,9,10,11,12,13,35,14,18,30,23,31,21,19,24,25,36]))},{path:`settings`,name:`settings`,component:()=>Fr(()=>import(`./SettingsPage-CmyIsV-S.js`),__vite__mapDeps([37,1,2,3,4,7,38,18,13,8,9,10,11,12,35,14,30,23,15,31,21,19,20,16,22,24,25,39]))},{path:`search`,name:`search`,component:()=>Fr(()=>import(`./SearchPage-CCfyqBKh.js`),__vite__mapDeps([40,1,2,3,4,25,6,38,18,13,31,21,19,26,41]))},{path:`health`,name:`health`,component:()=>Fr(()=>import(`./HealthPage-Do8QZdxw.js`),__vite__mapDeps([42,3,4,7,14,13,15,31,21,19]))}]},{path:`/:catchAll(.*)*`,redirect:`/`}],Lr=kt(()=>kr({scrollBehavior:()=>({left:0,top:0}),routes:Ir,history:Xn()}));async function Rr(e,t){let n=e(Dt);n.use(nt,t);let r=typeof jt==`function`?await jt({}):jt;n.use(r);let i=f(typeof Lr==`function`?await Lr({store:r}):Lr);return r.use(({store:e})=>{e.router=i}),{app:n,store:r,router:i}}var zr=T({name:`QAvatar`,props:{...ee,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){let n=I(e),r=v(()=>`q-avatar`+(e.color?` bg-${e.color}`:``)+(e.textColor?` text-${e.textColor} q-chip--colored`:``)+(e.square===!0?` q-avatar--square`:e.rounded===!0?` rounded-borders`:``)),i=v(()=>e.fontSize?{fontSize:e.fontSize}:null);return()=>{let a=e.icon===void 0?void 0:[d(N,{name:e.icon})];return d(`div`,{class:r.value,style:n.value},[d(`div`,{class:`q-avatar__content row flex-center overflow-hidden`,style:i.value},ae(t.default,a))])}}}),Br=0,Vr={},Hr={},Z={},Ur={},Wr=/^\s*$/,Gr=[],Kr=[void 0,null,!0,!1,``],qr=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`bottom`,`left`,`right`,`center`],Jr=[`top-left`,`top-right`,`bottom-left`,`bottom-right`],Yr={positive:{icon:e=>e.iconSet.type.positive,color:`positive`},negative:{icon:e=>e.iconSet.type.negative,color:`negative`},warning:{icon:e=>e.iconSet.type.warning,color:`warning`,textColor:`dark`},info:{icon:e=>e.iconSet.type.info,color:`info`},ongoing:{group:!1,timeout:0,spinner:!0,color:`grey-8`}};function Xr(e,t,n){if(!e)return $r(`parameter required`);let r,i={textColor:`white`};if(e.ignoreDefaults!==!0&&Object.assign(i,Vr),z(e)===!1&&(i.type&&Object.assign(i,Yr[i.type]),e={message:e}),Object.assign(i,Yr[e.type||i.type],e),typeof i.icon==`function`&&(i.icon=i.icon(t)),i.spinner?(i.spinner===!0&&(i.spinner=F),i.spinner=f(i.spinner)):i.spinner=!1,i.meta={hasMedia:!!(i.spinner!==!1||i.icon||i.avatar),hasText:Qr(i.message)||Qr(i.caption)},i.position){if(qr.includes(i.position)===!1)return $r(`wrong position`,e)}else i.position=`bottom`;if(Kr.includes(i.timeout)===!0)i.timeout=5e3;else{let t=Number(i.timeout);if(isNaN(t)||t<0)return $r(`wrong timeout`,e);i.timeout=Number.isFinite(t)?t:0}i.timeout===0?i.progress=!1:i.progress===!0&&(i.meta.progressClass=`q-notification__progress`+(i.progressClass?` ${i.progressClass}`:``),i.meta.progressStyle={animationDuration:`${i.timeout+1e3}ms`});let a=(Array.isArray(e.actions)===!0?e.actions:[]).concat(e.ignoreDefaults!==!0&&Array.isArray(Vr.actions)===!0?Vr.actions:[]).concat(Array.isArray(Yr[e.type]?.actions)===!0?Yr[e.type].actions:[]),{closeBtn:o}=i;if(o&&a.push({label:typeof o==`string`?o:t.lang.label.close}),i.actions=a.map(({handler:e,noDismiss:t,...n})=>({flat:!0,...n,onClick:typeof e==`function`?()=>{e(),t!==!0&&s()}:()=>{s()}})),i.multiLine===void 0&&(i.multiLine=i.actions.length>1),Object.assign(i.meta,{class:`q-notification row items-stretch q-notification--${i.multiLine===!0?`multi-line`:`standard`}`+(i.color===void 0?``:` bg-${i.color}`)+(i.textColor===void 0?``:` text-${i.textColor}`)+(i.classes===void 0?``:` ${i.classes}`),wrapperClass:`q-notification__wrapper col relative-position border-radius-inherit `+(i.multiLine===!0?`column no-wrap justify-center`:`row items-center`),contentClass:`q-notification__content row items-center`+(i.multiLine===!0?``:` col`),leftClass:i.meta.hasText===!0?`additional`:`single`,attrs:{role:`alert`,...i.attrs}}),i.group===!1?(i.group=void 0,i.meta.group=void 0):((i.group===void 0||i.group===!0)&&(i.group=[i.message,i.caption,i.multiline].concat(i.actions.map(e=>`${e.label}*${e.icon}`)).join(`|`)),i.meta.group=i.group+`|`+i.position),i.actions.length===0?i.actions=void 0:i.meta.actionsClass=`q-notification__actions row items-center `+(i.multiLine===!0?`justify-end`:`col-auto`)+(i.meta.hasMedia===!0?` q-notification__actions--with-media`:``),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),i.meta.uid=n.notif.meta.uid;let e=Z[i.position].value.indexOf(n.notif);Z[i.position].value[e]=i}else{let t=Hr[i.meta.group];if(t===void 0){if(i.meta.uid=Br++,i.meta.badge=1,[`left`,`right`,`center`].indexOf(i.position)!==-1)Z[i.position].value.splice(Math.floor(Z[i.position].value.length/2),0,i);else{let e=i.position.indexOf(`top`)===-1?`push`:`unshift`;Z[i.position].value[e](i)}i.group!==void 0&&(Hr[i.meta.group]=i)}else{if(t.meta.timer&&(clearTimeout(t.meta.timer),t.meta.timer=void 0),i.badgePosition!==void 0){if(Jr.includes(i.badgePosition)===!1)return $r(`wrong badgePosition`,e)}else i.badgePosition=`top-${i.position.indexOf(`left`)===-1?`left`:`right`}`;i.meta.uid=t.meta.uid,i.meta.badge=t.meta.badge+1,i.meta.badgeClass=`q-notification__badge q-notification__badge--${i.badgePosition}`+(i.badgeColor===void 0?``:` bg-${i.badgeColor}`)+(i.badgeTextColor===void 0?``:` text-${i.badgeTextColor}`)+(i.badgeClass?` ${i.badgeClass}`:``);let n=Z[i.position].value.indexOf(t);Z[i.position].value[n]=Hr[i.meta.group]=i}}let s=()=>{Zr(i),r=void 0};if(i.timeout>0&&(i.meta.timer=setTimeout(()=>{i.meta.timer=void 0,s()},i.timeout+1e3)),i.group!==void 0)return t=>{t===void 0?s():$r(`trying to update a grouped one which is forbidden`,e)};if(r={dismiss:s,config:e,notif:i},n!==void 0){Object.assign(n,r);return}return e=>{r!==void 0&&(e===void 0?r.dismiss():Xr(Object.assign({},r.config,e,{group:!1,position:i.position}),t,r))}}function Zr(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);let t=Z[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete Hr[e.meta.group];let n=Gr[String(e.meta.uid)];if(n){let{width:e,height:t}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=e,n.style.height=t}Z[e.position].value.splice(t,1),typeof e.onDismiss==`function`&&e.onDismiss()}}function Qr(e){return e!=null&&Wr.test(e)!==!0}function $r(e,t){return console.error(`Notify: ${e}`,t),!1}function ei(){return T({name:`QNotifications`,devtools:{hide:!0},setup(){return()=>d(`div`,{class:`q-notifications`},qr.map(e=>d(P,{key:e,class:Ur[e],tag:`div`,name:`q-notification--${e}`},()=>Z[e].value.map(e=>{let t=e.meta,n=[];if(t.hasMedia===!0&&(e.spinner===!1?e.icon?n.push(d(N,{class:`q-notification__icon q-notification__icon--`+t.leftClass,name:e.icon,color:e.iconColor,size:e.iconSize,role:`img`})):e.avatar&&n.push(d(zr,{class:`q-notification__avatar q-notification__avatar--`+t.leftClass},()=>d(`img`,{src:e.avatar,"aria-hidden":`true`}))):n.push(d(e.spinner,{class:`q-notification__spinner q-notification__spinner--`+t.leftClass,color:e.spinnerColor,size:e.spinnerSize}))),t.hasText===!0){let t,r={class:`q-notification__message col`};if(e.html===!0)r.innerHTML=e.caption?`<div>${e.message}</div><div class="q-notification__caption">${e.caption}</div>`:e.message;else{let n=[e.message];t=e.caption?[d(`div`,n),d(`div`,{class:`q-notification__caption`},[e.caption])]:n}n.push(d(`div`,r,t))}let r=[d(`div`,{class:t.contentClass},n)];return e.progress===!0&&r.push(d(`div`,{key:`${t.uid}|p|${t.badge}`,class:t.progressClass,style:t.progressStyle})),e.actions!==void 0&&r.push(d(`div`,{class:t.actionsClass},e.actions.map(e=>d(ke,e)))),t.badge>1&&r.push(d(`div`,{key:`${t.uid}|${t.badge}`,class:e.meta.badgeClass,style:e.badgeStyle},[t.badge])),d(`div`,{ref:e=>{Gr[String(t.uid)]=e},key:t.uid,class:t.class,...t.attrs},[d(`div`,{class:t.wrapperClass},r)])}))))}})}var ti={setDefaults(e){z(e)===!0&&Object.assign(Vr,e)},registerType(e,t){z(t)===!0&&(Yr[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=t=>Xr(t,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),this.__installed!==!0){qr.forEach(e=>{Z[e]=l([]);let t=[`left`,`center`,`right`].includes(e)===!0?`center`:e.indexOf(`top`)===-1?`bottom`:`top`,n=e.indexOf(`left`)===-1?e.indexOf(`right`)===-1?`center`:`end`:`start`;Ur[e]=`q-notifications__list q-notifications__list--${t} fixed column no-wrap ${[`left`,`right`].includes(e)?`items-${e===`left`?`start`:`end`} justify-center`:e===`center`?`flex-center`:`items-${n}`}`});let e=Ce(`q-notify`);$e(ei(),t).mount(e)}}},ni=T({name:`QCard`,props:{...je,tag:{type:String,default:`div`},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){let{proxy:{$q:n}}=C(),r=Me(e,n),i=v(()=>`q-card`+(r.value===!0?` q-card--dark q-dark`:``)+(e.bordered===!0?` q-card--bordered`:``)+(e.square===!0?` q-card--square no-border-radius`:``)+(e.flat===!0?` q-card--flat no-shadow`:``));return()=>d(e.tag,{class:i.value},j(t.default))}}),ri=T({name:`QCardSection`,props:{tag:{type:String,default:`div`},horizontal:Boolean},setup(e,{slots:t}){let n=v(()=>`q-card__section q-card__section--${e.horizontal===!0?`horiz row no-wrap`:`vert`}`);return()=>d(e.tag,{class:n.value},j(t.default))}}),ii=T({name:`QCardActions`,props:{...Ae,vertical:Boolean},setup(e,{slots:t}){let n=Oe(e),r=v(()=>`q-card__actions ${n.value} q-card__actions--${e.vertical===!0?`vert column`:`horiz row`}`);return()=>d(`div`,{class:r.value},j(t.default))}}),ai,oi=0,Q=Array(256);for(let e=0;e<256;e++)Q[e]=(e+256).toString(16).substring(1);var si=(()=>{let e=typeof crypto<`u`?crypto:typeof window<`u`?window.crypto||window.msCrypto:void 0;if(e!==void 0){if(e.randomBytes!==void 0)return e.randomBytes;if(e.getRandomValues!==void 0)return t=>{let n=new Uint8Array(t);return e.getRandomValues(n),n}}return e=>{let t=[];for(let n=e;n>0;n--)t.push(Math.floor(Math.random()*256));return t}})(),ci=4096;function li(){(ai===void 0||oi+16>ci)&&(oi=0,ai=si(ci));let e=Array.prototype.slice.call(ai,oi,oi+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Q[e[0]]+Q[e[1]]+Q[e[2]]+Q[e[3]]+`-`+Q[e[4]]+Q[e[5]]+`-`+Q[e[6]]+Q[e[7]]+`-`+Q[e[8]]+Q[e[9]]+`-`+Q[e[10]]+Q[e[11]]+Q[e[12]]+Q[e[13]]+Q[e[14]]+Q[e[15]]}function ui(e){return e??null}function di(e,t){return e??(t===!0?`f_${li()}`:null)}function fi({getValue:e,required:t=!0}={}){if(le.value===!0){let n=l(e===void 0?null:ui(e()));return t===!0&&n.value===null&&s(()=>{n.value=`f_${li()}`}),e!==void 0&&a(e,e=>{n.value=di(e,t)}),n}return e===void 0?l(`f_${li()}`):v(()=>di(e(),t))}var pi=/^on[A-Z]/;function mi(){let{attrs:e,vnode:n}=C(),r={listeners:l({}),attributes:l({})};function i(){let t={},i={};for(let n in e)n!==`class`&&n!==`style`&&pi.test(n)===!1&&(t[n]=e[n]);for(let e in n.props)pi.test(e)===!0&&(i[e]=n.props[e]);r.attributes.value=t,r.listeners.value=i}return t(i),i(),r}function hi({validate:e,resetValidation:t,requiresQForm:n}){let r=S(ve,!1);if(r!==!1){let{props:n,proxy:i}=C();Object.assign(i,{validate:e,resetValidation:t}),a(()=>n.disable,e=>{e===!0?(typeof t==`function`&&t(),r.unbindComponent(i)):r.bindComponent(i)}),s(()=>{n.disable!==!0&&r.bindComponent(i)}),_(()=>{n.disable!==!0&&r.unbindComponent(i)})}else n===!0&&console.error(`Parent QForm not found on useFormChild()!`)}var gi=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,_i=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,vi=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,yi=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,bi=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,xi={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>gi.test(e),hexaColor:e=>_i.test(e),hexOrHexaColor:e=>vi.test(e),rgbColor:e=>yi.test(e),rgbaColor:e=>bi.test(e),rgbOrRgbaColor:e=>yi.test(e)||bi.test(e),hexOrRgbColor:e=>gi.test(e)||yi.test(e),hexaOrRgbaColor:e=>_i.test(e)||bi.test(e),anyColor:e=>vi.test(e)||yi.test(e)||bi.test(e)},Si=[!0,!1,`ondemand`],Ci={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>Si.includes(e)}};function wi(e,t){let{props:n,proxy:r}=C(),i=l(!1),o=l(null),s=l(!1);hi({validate:y,resetValidation:g});let c=0,u,d=v(()=>n.rules!==void 0&&n.rules!==null&&n.rules.length!==0),f=v(()=>n.disable!==!0&&d.value===!0&&t.value===!1),p=v(()=>n.error===!0||i.value===!0),m=v(()=>typeof n.errorMessage==`string`&&n.errorMessage.length!==0?n.errorMessage:o.value);a(()=>n.modelValue,()=>{s.value=!0,f.value===!0&&n.lazyRules===!1&&b()});function h(){n.lazyRules!==`ondemand`&&f.value===!0&&s.value===!0&&b()}a(()=>n.reactiveRules,e=>{e===!0?u===void 0&&(u=a(()=>n.rules,h,{immediate:!0,deep:!0})):u!==void 0&&(u(),u=void 0)},{immediate:!0}),a(()=>n.lazyRules,h),a(e,e=>{e===!0?s.value=!0:f.value===!0&&n.lazyRules!==`ondemand`&&b()});function g(){c++,t.value=!1,s.value=!1,i.value=!1,o.value=null,b.cancel()}function y(e=n.modelValue){if(n.disable===!0||d.value===!1)return!0;let r=++c,a=t.value===!0?()=>{}:()=>{s.value=!0},l=(e,n)=>{e===!0&&a(),i.value=e,o.value=n||null,t.value=!1},u=[];for(let t=0;t<n.rules.length;t++){let r=n.rules[t],i;if(typeof r==`function`?i=r(e,xi):typeof r==`string`&&xi[r]!==void 0&&(i=xi[r](e)),i===!1||typeof i==`string`)return l(!0,i),!1;i!==!0&&i!==void 0&&u.push(i)}return u.length===0?(l(!1),!0):(t.value=!0,Promise.all(u).then(e=>{if(e===void 0||Array.isArray(e)===!1||e.length===0)return r===c&&l(!1),!0;let t=e.find(e=>e===!1||typeof e==`string`);return r===c&&l(t!==void 0,t),t===void 0},e=>(r===c&&(console.error(e),l(!0)),!1)))}let b=de(y,0);return _(()=>{u?.(),b.cancel()}),Object.assign(r,{resetValidation:g,validate:y}),te(r,`hasError`,()=>p.value),{isDirtyModel:s,hasRules:d,hasError:p,errorMessage:m,validate:y,resetValidation:g}}function Ti(e){return e!=null&&String(e).length!==0}var Ei={...je,...Ci,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String,maxlength:[Number,String]},Di=[`update:modelValue`,`clear`,`focus`,`blur`];function Oi({requiredForAttr:e=!0,tagProp:t,changeEvent:n=!1}={}){let{props:r,proxy:i}=C(),a=Me(r,i.$q),o=fi({required:e,getValue:()=>r.for});return{requiredForAttr:e,changeEvent:n,tag:t===!0?v(()=>r.tag):{value:`label`},isDark:a,editable:v(()=>r.disable!==!0&&r.readonly!==!0),innerLoading:l(!1),focused:l(!1),hasPopupOpen:!1,splitAttrs:mi(),targetUid:o,rootRef:l(null),targetRef:l(null),controlRef:l(null)}}function ki(e){let{props:t,emit:i,slots:a,attrs:o,proxy:c}=C(),{$q:l}=c,u=null;e.hasValue===void 0&&(e.hasValue=v(()=>Ti(t.modelValue))),e.emitValue===void 0&&(e.emitValue=e=>{i(`update:modelValue`,e)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:re,onFocusout:ie}),Object.assign(e,{clearValue:ae,onControlFocusin:re,onControlFocusout:ie,focus:te}),e.computedCounter===void 0&&(e.computedCounter=v(()=>{if(t.counter!==!1){let e=typeof t.modelValue==`string`||typeof t.modelValue==`number`?String(t.modelValue).length:Array.isArray(t.modelValue)===!0?t.modelValue.length:0,n=t.maxlength===void 0?t.maxValues:t.maxlength;return e+(n===void 0?``:` / `+n)}}));let{isDirtyModel:f,hasRules:p,hasError:m,errorMessage:h,resetValidation:y}=wi(e.focused,e.innerLoading),b=e.floatingLabel===void 0?v(()=>t.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0):v(()=>t.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0),x=v(()=>t.bottomSlots===!0||t.hint!==void 0||p.value===!0||t.counter===!0||t.error!==null),S=v(()=>t.filled===!0?`filled`:t.outlined===!0?`outlined`:t.borderless===!0?`borderless`:t.standout?`standout`:`standard`),T=v(()=>`q-field row no-wrap items-start q-field--${S.value}`+(e.fieldClass===void 0?``:` ${e.fieldClass.value}`)+(t.rounded===!0?` q-field--rounded`:``)+(t.square===!0?` q-field--square`:``)+(b.value===!0?` q-field--float`:``)+(D.value===!0?` q-field--labeled`:``)+(t.dense===!0?` q-field--dense`:``)+(t.itemAligned===!0?` q-field--item-aligned q-item-type`:``)+(e.isDark.value===!0?` q-field--dark`:``)+(e.getControl===void 0?` q-field--auto-height`:``)+(e.focused.value===!0?` q-field--focused`:``)+(m.value===!0?` q-field--error`:``)+(m.value===!0||e.focused.value===!0?` q-field--highlighted`:``)+(t.hideBottomSpace!==!0&&x.value===!0?` q-field--with-bottom`:``)+(t.disable===!0?` q-field--disabled`:t.readonly===!0?` q-field--readonly`:``)),E=v(()=>`q-field__control relative-position row no-wrap`+(t.bgColor===void 0?``:` bg-${t.bgColor}`)+(m.value===!0?` text-negative`:typeof t.standout==`string`&&t.standout.length!==0&&e.focused.value===!0?` ${t.standout}`:t.color===void 0?``:` text-${t.color}`)),D=v(()=>t.labelSlot===!0||t.label!==void 0),A=v(()=>`q-field__label no-pointer-events absolute ellipsis`+(t.labelColor!==void 0&&m.value!==!0?` text-${t.labelColor}`:``)),ee=v(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:b.value,modelValue:t.modelValue,emitValue:e.emitValue})),M=v(()=>{let n={};return e.targetUid.value&&(n.for=e.targetUid.value),t.disable===!0&&(n[`aria-disabled`]=`true`),n});function P(){let t=document.activeElement,n=e.targetRef?.value;n&&(t===null||t.id!==e.targetUid.value)&&(n.hasAttribute(`tabindex`)!==!0&&(n=n.querySelector(`[tabindex]`)),n!==t&&n?.focus({preventScroll:!0}))}function te(){ue(P)}function ne(){ce(P);let t=document.activeElement;t!==null&&e.rootRef.value.contains(t)&&t.blur()}function re(t){u!==null&&(clearTimeout(u),u=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,i(`focus`,t))}function ie(t,n){u!==null&&clearTimeout(u),u=setTimeout(()=>{u=null,!(document.hasFocus()===!0&&(e.hasPopupOpen===!0||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)!==!1))&&(e.focused.value===!0&&(e.focused.value=!1,i(`blur`,t)),n?.())})}function ae(n){k(n),l.platform.is.mobile===!0?e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur():(e.targetRef?.value||e.rootRef.value).focus(),t.type===`file`&&(e.inputRef.value.value=null),i(`update:modelValue`,null),e.changeEvent===!0&&i(`change`,null),i(`clear`,t.modelValue),r(()=>{let e=f.value;y(),f.value=e})}function I(e){[13,32].includes(e.keyCode)&&ae(e)}function oe(){let n=[];return a.prepend!==void 0&&n.push(d(`div`,{class:`q-field__prepend q-field__marginal row no-wrap items-center`,key:`prepend`,onClick:O},a.prepend())),n.push(d(`div`,{class:`q-field__control-container col relative-position row no-wrap q-anchor--skip`},se())),m.value===!0&&t.noErrorIcon===!1&&n.push(R(`error`,[d(N,{name:l.iconSet.field.error,color:`negative`})])),t.loading===!0||e.innerLoading.value===!0?n.push(R(`inner-loading-append`,a.loading===void 0?[d(F,{color:t.color})]:a.loading())):t.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&n.push(R(`inner-clearable-append`,[d(N,{class:`q-field__focusable-action`,name:t.clearIcon||l.iconSet.field.clear,tabindex:0,role:`button`,"aria-hidden":`false`,"aria-label":l.lang.label.clear,onKeyup:I,onClick:ae})])),a.append!==void 0&&n.push(d(`div`,{class:`q-field__append q-field__marginal row no-wrap items-center`,key:`append`,onClick:O},a.append())),e.getInnerAppend!==void 0&&n.push(R(`inner-append`,e.getInnerAppend())),e.getControlChild!==void 0&&n.push(e.getControlChild()),n}function se(){let n=[];return t.prefix!==void 0&&t.prefix!==null&&n.push(d(`div`,{class:`q-field__prefix no-pointer-events row items-center`},t.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&n.push(e.getShadowControl()),D.value===!0&&n.push(d(`div`,{class:A.value},j(a.label,t.label))),e.getControl===void 0?a.rawControl===void 0?a.control!==void 0&&n.push(d(`div`,{ref:e.targetRef,class:`q-field__native row`,tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus===!0||void 0},a.control(ee.value))):n.push(a.rawControl()):n.push(e.getControl()),t.suffix!==void 0&&t.suffix!==null&&n.push(d(`div`,{class:`q-field__suffix no-pointer-events row items-center`},t.suffix)),n.concat(j(a.default))}function L(){let n,r;m.value===!0?h.value===null?(n=j(a.error),r=`q--slot-error`):(n=[d(`div`,{role:`alert`},h.value)],r=`q--slot-error-${h.value}`):(t.hideHint!==!0||e.focused.value===!0)&&(t.hint===void 0?(n=j(a.hint),r=`q--slot-hint`):(n=[d(`div`,t.hint)],r=`q--slot-hint-${t.hint}`));let i=t.counter===!0||a.counter!==void 0;if(t.hideBottomSpace===!0&&i===!1&&n===void 0)return;let o=d(`div`,{key:r,class:`q-field__messages col`},n);return d(`div`,{class:`q-field__bottom row items-start q-field__bottom--`+(t.hideBottomSpace===!0?`stale`:`animated`),onClick:O},[t.hideBottomSpace===!0?o:d(w,{name:`q-transition--field-message`},()=>o),i===!0?d(`div`,{class:`q-field__counter`},a.counter===void 0?e.computedCounter.value:a.counter()):null])}function R(e,t){return t===null?null:d(`div`,{key:e,class:`q-field__append q-field__marginal row no-wrap items-center q-anchor--skip`},t)}let le=!1;return g(()=>{le=!0}),n(()=>{le===!0&&t.autofocus===!0&&c.focus()}),t.autofocus===!0&&s(()=>{c.focus()}),_(()=>{u!==null&&clearTimeout(u)}),Object.assign(c,{focus:te,blur:ne}),function(){let n=e.getControl===void 0&&a.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus===!0||void 0,...M.value}:M.value;return d(e.tag.value,{ref:e.rootRef,class:[T.value,o.class],style:o.style,...n},[a.before===void 0?null:d(`div`,{class:`q-field__before q-field__marginal row no-wrap items-center`,onClick:O},a.before()),d(`div`,{class:`q-field__inner relative-position col self-stretch`},[d(`div`,{ref:e.controlRef,class:E.value,tabindex:-1,...e.controlEvents},oe()),x.value===!0?L():null]),a.after===void 0?null:d(`div`,{class:`q-field__after q-field__marginal row no-wrap items-center`,onClick:O},a.after())])}}var Ai={date:`####/##/##`,datetime:`####/##/## ##:##`,time:`##:##`,fulltime:`##:##:##`,phone:`(###) ### - ####`,card:`#### #### #### ####`},{tokenMap:ji,tokenKeys:Mi}=Ni({"#":{pattern:`[\\d]`,negate:`[^\\d]`},S:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`},N:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`},A:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`,transform:e=>e.toLocaleUpperCase()},a:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`,transform:e=>e.toLocaleLowerCase()},X:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`,transform:e=>e.toLocaleUpperCase()},x:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`,transform:e=>e.toLocaleLowerCase()}});function Ni(e){let t=Object.keys(e),n={};return t.forEach(t=>{let r=e[t];n[t]={...r,regex:new RegExp(r.pattern)}}),{tokenMap:n,tokenKeys:t}}function Pi(e){return RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+e.join(``)+`])|(.)`,`g`)}var Fi=/[.*+?^${}()|[\]\\]/g,Ii=Pi(Mi),$=``,Li={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean,maskTokens:Object};function Ri(e,t,n,i){let o,s,c,u,d,f,p=v(()=>{if(e.maskTokens===void 0||e.maskTokens===null)return{tokenMap:ji,tokenRegexMask:Ii};let{tokenMap:t}=Ni(e.maskTokens),n={...ji,...t};return{tokenMap:n,tokenRegexMask:Pi(Object.keys(n))}}),m=l(null),h=l(_());function g(){return e.autogrow===!0||[`textarea`,`text`,`search`,`url`,`tel`,`password`].includes(e.type)}a(()=>e.type+e.autogrow,b),a(()=>e.mask,n=>{if(n!==void 0)x(h.value,!0);else{let n=O(h.value);b(),e.modelValue!==n&&t(`update:modelValue`,n)}}),a(()=>e.fillMask+e.reverseFillMask,()=>{m.value===!0&&x(h.value,!0)}),a(()=>e.unmaskedValue,()=>{m.value===!0&&x(h.value)});function _(){if(b(),m.value===!0){let t=E(O(e.modelValue));return e.fillMask===!1?t:k(t)}return e.modelValue}function y(e){if(e<o.length)return o.slice(-e);let t=``,n=o,r=n.indexOf($);if(r!==-1){for(let r=e-n.length;r>0;r--)t+=$;n=n.slice(0,r)+t+n.slice(r)}return n}function b(){if(m.value=e.mask!==void 0&&e.mask.length!==0&&g(),m.value===!1){u=void 0,o=``,s=``;return}let t=Ai[e.mask]===void 0?e.mask:Ai[e.mask],n=typeof e.fillMask==`string`&&e.fillMask.length!==0?e.fillMask.slice(0,1):`_`,r=n.replace(Fi,`\\$&`),i=[],a=[],l=[],d=e.reverseFillMask===!0,f=``,h=``;t.replace(p.value.tokenRegexMask,(e,t,n,r,o)=>{if(r!==void 0){let e=p.value.tokenMap[r];l.push(e),h=e.negate,d===!0&&(a.push(`(?:`+h+`+)?(`+e.pattern+`+)?(?:`+h+`+)?(`+e.pattern+`+)?`),d=!1),a.push(`(?:`+h+`+)?(`+e.pattern+`)?`)}else if(n!==void 0)f=`\\`+(n===`\\`?``:n),l.push(n),i.push(`([^`+f+`]+)?`+f+`?`);else{let e=t===void 0?o:t;f=e===`\\`?`\\\\\\\\`:e.replace(Fi,`\\\\$&`),l.push(e),i.push(`([^`+f+`]+)?`+f+`?`)}});let _=RegExp(`^`+i.join(``)+`(`+(f===``?`.`:`[^`+f+`]`)+`+)?`+(f===``?``:`[`+f+`]*`)+`$`),v=a.length-1,y=a.map((t,n)=>n===0&&e.reverseFillMask===!0?RegExp(`^`+r+`*`+t):RegExp(n===v?`^`+t+`(`+(h===``?`.`:h)+`+)?`+(e.reverseFillMask===!0?`$`:r+`*`):`^`+t));c=l,u=t=>{let n=_.exec(e.reverseFillMask===!0?t:t.slice(0,l.length+1));n!==null&&(t=n.slice(1).join(``));let r=[],i=y.length;for(let e=0,n=t;e<i;e++){let t=y[e].exec(n);if(t===null)break;n=n.slice(t.shift().length),r.push(...t)}return r.length===0?t:r.join(``)},o=l.map(e=>typeof e==`string`?e:$).join(``),s=o.split($).join(n)}function x(t,a,c){let l=i.value,u=l.selectionEnd,f=l.value.length-u,p=O(t);a===!0&&b();let m=E(p,a),g=e.fillMask===!1?m:k(m),_=h.value!==g;l.value!==g&&(l.value=g),_===!0&&(h.value=g),document.activeElement===l&&r(()=>{if(g===s){let t=e.reverseFillMask===!0?s.length:0;l.setSelectionRange(t,t,`forward`);return}if(c===`insertFromPaste`&&e.reverseFillMask!==!0){let e=l.selectionEnd,t=u-1;for(let n=d;n<=t&&n<e;n++)o[n]!==$&&t++;C.right(l,t);return}if([`deleteContentBackward`,`deleteContentForward`].indexOf(c)!==-1){let t=e.reverseFillMask===!0?u===0?g.length>m.length?1:0:Math.max(0,g.length-(g===s?0:Math.min(m.length,f)+1))+1:u;l.setSelectionRange(t,t,`forward`);return}if(e.reverseFillMask===!0)if(_===!0){let e=Math.max(0,g.length-(g===s?0:Math.min(m.length,f+1)));e===1&&u===1?l.setSelectionRange(e,e,`forward`):C.rightReverse(l,e)}else{let e=g.length-f;l.setSelectionRange(e,e,`backward`)}else if(_===!0){let e=Math.max(0,o.indexOf($),Math.min(m.length,u)-1);C.right(l,e)}else{let e=u-1;C.right(l,e)}});let v=e.unmaskedValue===!0?O(g):g;String(e.modelValue)!==v&&(e.modelValue!==null||v!==``)&&n(v,!0)}function S(e,t,n){let r=E(O(e.value));t=Math.max(0,o.indexOf($),Math.min(r.length,t)),d=t,e.setSelectionRange(t,n,`forward`)}let C={left(e,t){let n=o.slice(t-1).indexOf($)===-1,r=Math.max(0,t-1);for(;r>=0;r--)if(o[r]===$){t=r,n===!0&&t++;break}if(r<0&&o[t]!==void 0&&o[t]!==$)return C.right(e,0);t>=0&&e.setSelectionRange(t,t,`backward`)},right(e,t){let n=e.value.length,r=Math.min(n,t+1);for(;r<=n;r++)if(o[r]===$){t=r;break}else o[r-1]===$&&(t=r);if(r>n&&o[t-1]!==void 0&&o[t-1]!==$)return C.left(e,n);e.setSelectionRange(t,t,`forward`)},leftReverse(e,t){let n=y(e.value.length),r=Math.max(0,t-1);for(;r>=0;r--)if(n[r-1]===$){t=r;break}else if(n[r]===$&&(t=r,r===0))break;if(r<0&&n[t]!==void 0&&n[t]!==$)return C.rightReverse(e,0);t>=0&&e.setSelectionRange(t,t,`backward`)},rightReverse(e,t){let n=e.value.length,r=y(n),i=r.slice(0,t+1).indexOf($)===-1,a=Math.min(n,t+1);for(;a<=n;a++)if(r[a-1]===$){t=a,t>0&&i===!0&&t--;break}if(a>n&&r[t-1]!==void 0&&r[t-1]!==$)return C.leftReverse(e,n);e.setSelectionRange(t,t,`forward`)}};function w(e){t(`click`,e),f=void 0}function T(n){if(t(`keydown`,n),ne(n)===!0||n.altKey===!0)return;let r=i.value,a=r.selectionStart,o=r.selectionEnd;if(n.shiftKey||(f=void 0),n.keyCode===37||n.keyCode===39){n.shiftKey&&f===void 0&&(f=r.selectionDirection===`forward`?a:o);let t=C[(n.keyCode===39?`right`:`left`)+(e.reverseFillMask===!0?`Reverse`:``)];if(n.preventDefault(),t(r,f===a?o:a),n.shiftKey){let e=r.selectionStart;r.setSelectionRange(Math.min(f,e),Math.max(f,e),`forward`)}}else n.keyCode===8&&e.reverseFillMask!==!0&&a===o?(C.left(r,a),r.setSelectionRange(r.selectionStart,o,`backward`)):n.keyCode===46&&e.reverseFillMask===!0&&a===o&&(C.rightReverse(r,o),r.setSelectionRange(a,r.selectionEnd,`forward`))}function E(t,n){if(t==null||t===``)return``;if(e.reverseFillMask===!0)return D(t,n);let r=c,i=0,a=``;for(let e=0;e<r.length;e++){let o=t[i],s=r[e];if(typeof s==`string`)a+=s,n===!0&&o===s&&i++;else if(o!==void 0&&s.regex.test(o))a+=s.transform===void 0?o:s.transform(o),i++;else return a}return a}function D(e,t){let n=c,r=o.indexOf($),i=e.length-1,a=``;for(let o=n.length-1;o>=0&&i!==-1;o--){let s=n[o],c=e[i];if(typeof s==`string`)a=s+a,t===!0&&c===s&&i--;else if(c!==void 0&&s.regex.test(c))do a=(s.transform===void 0?c:s.transform(c))+a,i--,c=e[i];while(r===o&&c!==void 0&&s.regex.test(c));else return a}return a}function O(e){return typeof e!=`string`||u===void 0?typeof e==`number`?u(String(e)):e:u(e)}function k(t){return s.length-t.length<=0?t:e.reverseFillMask===!0&&t.length!==0?s.slice(0,-t.length)+t:t+s.slice(t.length)}return{innerValue:h,hasMask:m,moveCursorForPaste:S,updateMaskValue:x,onMaskedKeydown:T,onMaskedClick:w}}function zi(e,t){function n(){let t=e.modelValue;try{let e=`DataTransfer`in window?new DataTransfer:`ClipboardEvent`in window?new ClipboardEvent(``).clipboardData:void 0;return Object(t)===t&&(`length`in t?Array.from(t):[t]).forEach(t=>{e.items.add(t)}),{files:e.files}}catch{return{files:void 0}}}return v(t===!0?()=>{if(e.type===`file`)return n()}:n)}var Bi=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,Vi=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,Hi=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,Ui=/[a-z0-9_ -]$/i;function Wi(e){return function(t){if(t.type===`compositionend`||t.type===`change`){if(t.target.qComposing!==!0)return;t.target.qComposing=!1,e(t)}else t.type===`compositionupdate`&&t.target.qComposing!==!0&&typeof t.data==`string`&&(R.is.firefox===!0?Ui.test(t.data)===!1:Bi.test(t.data)===!0||Vi.test(t.data)===!0||Hi.test(t.data)===!0)&&(t.target.qComposing=!0)}}var Gi=T({name:`QInput`,inheritAttrs:!1,props:{...Ei,...Li,...me,modelValue:[String,Number,FileList],shadowText:String,type:{type:String,default:`text`},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...Di,`paste`,`change`,`keydown`,`click`,`animationend`],setup(e,{emit:t,attrs:n}){let{proxy:i}=C(),{$q:o}=i,c={},u=NaN,f,p,m=null,h,g=l(null),y=pe(e),{innerValue:b,hasMask:x,moveCursorForPaste:S,updateMaskValue:w,onMaskedKeydown:T,onMaskedClick:E}=Ri(e,t,F,g),D=zi(e,!0),O=v(()=>Ti(b.value)),k=Wi(ie),A=Oi({changeEvent:!0}),j=v(()=>e.type===`textarea`||e.autogrow===!0),ee=v(()=>j.value===!0||[`text`,`search`,`url`,`tel`,`password`].includes(e.type)),M=v(()=>{let t={...A.splitAttrs.listeners.value,onInput:ie,onPaste:re,onChange:se,onBlur:L,onFocus:oe};return t.onCompositionstart=t.onCompositionupdate=t.onCompositionend=k,x.value===!0&&(t.onKeydown=T,t.onClick=E),e.autogrow===!0&&(t.onAnimationend=ae),t}),N=v(()=>{let t={tabindex:0,"data-autofocus":e.autofocus===!0||void 0,rows:e.type===`textarea`?6:void 0,"aria-label":e.label,name:y.value,...A.splitAttrs.attributes.value,id:A.targetUid.value,maxlength:e.maxlength,disabled:e.disable===!0,readonly:e.readonly===!0};return j.value===!1&&(t.type=e.type),e.autogrow===!0&&(t.rows=1),t});a(()=>e.type,()=>{g.value&&(g.value.value=e.modelValue)}),a(()=>e.modelValue,t=>{if(x.value===!0){if(p===!0&&(p=!1,String(t)===u))return;w(t)}else b.value!==t&&(b.value=t,e.type===`number`&&c.hasOwnProperty(`value`)===!0&&(f===!0?f=!1:delete c.value));e.autogrow===!0&&r(I)}),a(()=>e.autogrow,e=>{e===!0?r(I):g.value!==null&&n.rows>0&&(g.value.style.height=`auto`)}),a(()=>e.dense,()=>{e.autogrow===!0&&r(I)});function P(){ue(()=>{let e=document.activeElement;g.value!==null&&g.value!==e&&(e===null||e.id!==A.targetUid.value)&&g.value.focus({preventScroll:!0})})}function ne(){g.value?.select()}function re(n){if(x.value===!0&&e.reverseFillMask!==!0){let e=n.target;S(e,e.selectionStart,e.selectionEnd)}t(`paste`,n)}function ie(n){if(!n||!n.target)return;if(e.type===`file`){t(`update:modelValue`,n.target.files);return}let i=n.target.value;if(n.target.qComposing===!0){c.value=i;return}if(x.value===!0)w(i,!1,n.inputType);else if(F(i),ee.value===!0&&n.target===document.activeElement){let{selectionStart:e,selectionEnd:t}=n.target;e!==void 0&&t!==void 0&&r(()=>{n.target===document.activeElement&&i.indexOf(n.target.value)===0&&n.target.setSelectionRange(e,t)})}e.autogrow===!0&&I()}function ae(e){t(`animationend`,e),I()}function F(n,i){h=()=>{m=null,e.type!==`number`&&c.hasOwnProperty(`value`)===!0&&delete c.value,e.modelValue!==n&&u!==n&&(u=n,i===!0&&(p=!0),t(`update:modelValue`,n),r(()=>{u===n&&(u=NaN)})),h=void 0},e.type===`number`&&(f=!0,c.value=n),e.debounce===void 0?h():(m!==null&&clearTimeout(m),c.value=n,m=setTimeout(h,e.debounce))}function I(){requestAnimationFrame(()=>{let e=g.value;if(e!==null){let t=e.parentNode.style,{scrollTop:n}=e,{overflowY:r,maxHeight:i}=o.platform.is.firefox===!0?{}:window.getComputedStyle(e),a=r!==void 0&&r!==`scroll`;a===!0&&(e.style.overflowY=`hidden`),t.marginBottom=e.scrollHeight-1+`px`,e.style.height=`1px`,e.style.height=e.scrollHeight+`px`,a===!0&&(e.style.overflowY=parseInt(i,10)<e.scrollHeight?`auto`:`hidden`),t.marginBottom=``,e.scrollTop=n}})}function se(e){k(e),m!==null&&(clearTimeout(m),m=null),h?.(),t(`change`,e.target.value)}function L(t){t!==void 0&&oe(t),m!==null&&(clearTimeout(m),m=null),h?.(),f=!1,p=!1,delete c.value,e.type!==`file`&&setTimeout(()=>{g.value!==null&&(g.value.value=b.value===void 0?``:b.value)})}function R(){return c.hasOwnProperty(`value`)===!0?c.value:b.value===void 0?``:b.value}_(()=>{L()}),s(()=>{e.autogrow===!0&&I()}),Object.assign(A,{innerValue:b,fieldClass:v(()=>`q-${j.value===!0?`textarea`:`input`}`+(e.autogrow===!0?` q-textarea--autogrow`:``)),hasShadow:v(()=>e.type!==`file`&&typeof e.shadowText==`string`&&e.shadowText.length!==0),inputRef:g,emitValue:F,hasValue:O,floatingLabel:v(()=>O.value===!0&&(e.type!==`number`||isNaN(b.value)===!1)||Ti(e.displayValue)),getControl:()=>d(j.value===!0?`textarea`:`input`,{ref:g,class:[`q-field__native q-placeholder`,e.inputClass],style:e.inputStyle,...N.value,...M.value,...e.type===`file`?D.value:{value:R()}}),getShadowControl:()=>d(`div`,{class:`q-field__native q-field__shadow absolute-bottom no-pointer-events`+(j.value===!0?``:` text-no-wrap`)},[d(`span`,{class:`invisible`},R()),d(`span`,e.shadowText)])});let ce=ki(A);return Object.assign(i,{focus:P,select:ne,getNativeElement:()=>g.value}),te(i,`nativeEl`,()=>g.value),ce}}),Ki=()=>d(`svg`,{key:`svg`,class:`q-radio__bg absolute non-selectable`,viewBox:`0 0 24 24`},[d(`path`,{d:`M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12`}),d(`path`,{class:`q-radio__check`,d:`M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6`})]),qi=T({name:`QRadio`,props:{...je,...ee,...me,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:[`update:modelValue`],setup(e,{slots:t,emit:n}){let{proxy:r}=C(),i=Me(e,r.$q),a=I(e,Ne),o=l(null),{refocusTargetEl:s,refocusTarget:c}=Ie(e,o),u=v(()=>b(e.modelValue)===b(e.val)),f=v(()=>`q-radio cursor-pointer no-outline row inline no-wrap items-center`+(e.disable===!0?` disabled`:``)+(i.value===!0?` q-radio--dark`:``)+(e.dense===!0?` q-radio--dense`:``)+(e.leftLabel===!0?` reverse`:``)),p=v(()=>{let t=e.color!==void 0&&(e.keepColor===!0||u.value===!0)?` text-${e.color}`:``;return`q-radio__inner relative-position q-radio__inner--${u.value===!0?`truthy`:`falsy`}${t}`}),m=v(()=>(u.value===!0?e.checkedIcon:e.uncheckedIcon)||null),h=v(()=>e.disable===!0?-1:e.tabindex||0),g=he(v(()=>{let t={type:`radio`};return e.name!==void 0&&Object.assign(t,{".checked":u.value===!0,"^checked":u.value===!0?`checked`:void 0,name:e.name,value:e.val}),t}));function _(t){t!==void 0&&(k(t),c(t)),e.disable!==!0&&u.value!==!0&&n(`update:modelValue`,e.val,t)}function y(e){(e.keyCode===13||e.keyCode===32)&&k(e)}function x(e){(e.keyCode===13||e.keyCode===32)&&_(e)}Object.assign(r,{set:_});let S=Ki();return()=>{let n=m.value===null?[S]:[d(`div`,{key:`icon`,class:`q-radio__icon-container absolute-full flex flex-center no-wrap`},[d(N,{class:`q-radio__icon`,name:m.value})])];e.disable!==!0&&g(n,`unshift`,` q-radio__native q-ma-none q-pa-none`);let r=[d(`div`,{class:p.value,style:a.value,"aria-hidden":`true`},n)];s.value!==null&&r.push(s.value);let i=e.label===void 0?j(t.default):re(t.default,[e.label]);return i!==void 0&&r.push(d(`div`,{class:`q-radio__label q-anchor--skip`},i)),d(`div`,{ref:o,class:f.value,tabindex:h.value,role:`radio`,"aria-label":e.label,"aria-checked":u.value===!0?`true`:`false`,"aria-disabled":e.disable===!0?`true`:void 0,onClick:_,onKeydown:y,onKeyup:x},r)}}}),Ji=()=>d(`div`,{key:`svg`,class:`q-checkbox__bg absolute`},[d(`svg`,{class:`q-checkbox__svg fit absolute-full`,viewBox:`0 0 24 24`},[d(`path`,{class:`q-checkbox__truthy`,fill:`none`,d:`M1.73,12.91 8.1,19.28 22.79,4.59`}),d(`path`,{class:`q-checkbox__indet`,d:`M4,14H20V10H4`})])]),Yi=T({name:`QCheckbox`,props:Pe,emits:Le,setup(e){let t=Ji();function n(n,r){let i=v(()=>(n.value===!0?e.checkedIcon:r.value===!0?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>i.value===null?[t]:[d(`div`,{key:`icon`,class:`q-checkbox__icon-container absolute-full flex flex-center no-wrap`},[d(N,{class:`q-checkbox__icon`,name:i.value})])]}return Fe(`checkbox`,n)}}),Xi={radio:qi,checkbox:Yi,toggle:Re},Zi=Object.keys(Xi);function Qi(e,t){if(typeof e==`function`)return e;let n=e===void 0?t:e;return e=>e[n]}var $i=T({name:`QOptionGroup`,props:{...je,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(z),default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],name:String,type:{type:String,default:`radio`,validator:e=>Zi.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:[`update:modelValue`],setup(e,{emit:t,slots:n}){let{proxy:{$q:r}}=C(),i=Array.isArray(e.modelValue);e.type===`radio`?i===!0&&console.error(`q-option-group: model should not be array`):i===!1&&console.error(`q-option-group: model should be array in your case`);let a=Me(e,r),o=v(()=>Xi[e.type]),s=v(()=>Qi(e.optionValue,`value`)),c=v(()=>Qi(e.optionLabel,`label`)),l=v(()=>Qi(e.optionDisable,`disable`)),u=v(()=>e.options.map(t=>({val:s.value(t),name:t.name===void 0?e.name:t.name,disable:e.disable||l.value(t),leftLabel:t.leftLabel===void 0?e.leftLabel:t.leftLabel,color:t.color===void 0?e.color:t.color,checkedIcon:t.checkedIcon,uncheckedIcon:t.uncheckedIcon,dark:t.dark===void 0?a.value:t.dark,size:t.size===void 0?e.size:t.size,dense:e.dense,keepColor:t.keepColor===void 0?e.keepColor:t.keepColor}))),f=v(()=>`q-option-group q-gutter-x-sm`+(e.inline===!0?` q-option-group--inline`:``)),p=v(()=>{let t={role:`group`};return e.type===`radio`&&(t.role=`radiogroup`,e.disable===!0&&(t[`aria-disabled`]=`true`)),t});function m(e){t(`update:modelValue`,e)}return()=>d(`div`,{class:f.value,...p.value},e.options.map((t,r)=>{let i=n[`label-`+r]===void 0?n.label===void 0?void 0:()=>n.label(t):()=>n[`label-`+r](t);return d(`div`,[d(o.value,{label:i===void 0?c.value(t):null,modelValue:e.modelValue,"onUpdate:modelValue":m,...u.value[r]},i)])}))}}),ea=T({name:`DialogPluginComponent`,props:{...je,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:`ok`,validator:e=>[`ok`,`cancel`,`none`].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:[`ok`,`hide`],setup(e,{emit:t}){let{proxy:n}=C(),{$q:r}=n,i=Me(e,r),o=l(null),s=l(e.prompt===void 0?e.options===void 0?void 0:e.options.model:e.prompt.model),c=v(()=>`q-dialog-plugin`+(i.value===!0?` q-dialog-plugin--dark q-dark`:``)+(e.progress===!1?``:` q-dialog-plugin--progress`)),u=v(()=>e.color||(i.value===!0?`amber`:`primary`)),f=v(()=>e.progress===!1?null:z(e.progress)===!0?{component:e.progress.spinner||F,props:{color:e.progress.color||u.value}}:{component:F,props:{color:u.value}}),p=v(()=>e.prompt!==void 0||e.options!==void 0),m=v(()=>{if(p.value!==!0)return{};let{model:t,isValid:n,items:r,...i}=e.prompt===void 0?e.options:e.prompt;return i}),h=v(()=>z(e.ok)===!0||e.ok===!0?r.lang.label.ok:e.ok),g=v(()=>z(e.cancel)===!0||e.cancel===!0?r.lang.label.cancel:e.cancel),_=v(()=>e.prompt===void 0?e.options===void 0?!1:e.options.isValid!==void 0&&e.options.isValid(s.value)!==!0:e.prompt.isValid!==void 0&&e.prompt.isValid(s.value)!==!0),y=v(()=>({color:u.value,label:h.value,ripple:!1,disable:_.value,...z(e.ok)===!0?e.ok:{flat:!0},"data-autofocus":e.focus===`ok`&&p.value!==!0||void 0,onClick:T})),x=v(()=>({color:u.value,label:g.value,ripple:!1,...z(e.cancel)===!0?e.cancel:{flat:!0},"data-autofocus":e.focus===`cancel`&&p.value!==!0||void 0,onClick:E}));a(()=>e.prompt&&e.prompt.model,O),a(()=>e.options&&e.options.model,O);function S(){o.value.show()}function w(){o.value.hide()}function T(){t(`ok`,b(s.value)),w()}function E(){w()}function D(){t(`hide`)}function O(e){s.value=e}function k(t){_.value!==!0&&e.prompt.type!==`textarea`&&M(t,13)===!0&&T()}function A(t,n){return e.html===!0?d(ri,{class:t,innerHTML:n}):d(ri,{class:t},()=>n)}function j(){return[d(Gi,{color:u.value,dense:!0,autofocus:!0,dark:i.value,...m.value,modelValue:s.value,"onUpdate:modelValue":O,onKeyup:k})]}function ee(){return[d($i,{color:u.value,options:e.options.items,dark:i.value,...m.value,modelValue:s.value,"onUpdate:modelValue":O})]}function N(){let t=[];return e.cancel&&t.push(d(ke,x.value)),e.ok&&t.push(d(ke,y.value)),d(ii,{class:e.stackButtons===!0?`items-end`:``,vertical:e.stackButtons,align:`right`},()=>t)}function P(){let t=[];return e.title&&t.push(A(`q-dialog__title`,e.title)),e.progress!==!1&&t.push(d(ri,{class:`q-dialog__progress`},()=>d(f.value.component,f.value.props))),e.message&&t.push(A(`q-dialog__message`,e.message)),e.prompt===void 0?e.options!==void 0&&t.push(d(fe,{dark:i.value}),d(ri,{class:`scroll q-dialog-plugin__form`},ee),d(fe,{dark:i.value})):t.push(d(ri,{class:`scroll q-dialog-plugin__form`},j)),(e.ok||e.cancel)&&t.push(N()),t}function te(){return[d(ni,{class:[c.value,e.cardClass],style:e.cardStyle,dark:i.value},P)]}return Object.assign(n,{show:S,hide:w}),()=>d(ge,{ref:o,onHide:D},te)}});function ta(e,t){for(let n in t)n!==`spinner`&&Object(t[n])===t[n]?(e[n]=Object(e[n])===e[n]?{...e[n]}:{},ta(e[n],t[n])):e[n]=t[n]}function na(e,t,n){return i=>{let a,o,s=t===!0&&i.component!==void 0;if(s===!0){let{component:e,componentProps:t}=i;a=typeof e==`string`?n.component(e):e,o=t||{}}else{let{class:t,style:n,...r}=i;a=e,o=r,t!==void 0&&(r.cardClass=t),n!==void 0&&(r.cardStyle=n)}let c,u=!1,f=l(null),p=Ce(!1,`dialog`),m=e=>{if(f.value?.[e]!==void 0){f.value[e]();return}let t=c.$.subTree;if(t?.component){if(t.component.proxy&&t.component.proxy[e]){t.component.proxy[e]();return}if(t.component.subTree&&t.component.subTree.component&&t.component.subTree.component.proxy&&t.component.subTree.component.proxy[e]){t.component.subTree.component.proxy[e]();return}}console.error(`[Quasar] Incorrectly defined Dialog component`)},h=[],g=[],_={onOk(e){return h.push(e),_},onCancel(e){return g.push(e),_},onDismiss(e){return h.push(e),g.push(e),_},hide(){return m(`hide`),_},update(e){if(c!==null){if(s===!0)Object.assign(o,e);else{let{class:t,style:n,...r}=e;t!==void 0&&(r.cardClass=t),n!==void 0&&(r.cardStyle=n),ta(o,r)}c.$forceUpdate()}return _}},v=e=>{u=!0,h.forEach(t=>{t(e)})},y=()=>{b.unmount(p),be(p),b=null,c=null,u!==!0&&g.forEach(e=>{e()})},b=$e({name:`QGlobalDialog`,setup:()=>()=>d(a,{...o,ref:f,onOk:v,onHide:y,onVnodeMounted(...e){typeof o.onVnodeMounted==`function`&&o.onVnodeMounted(...e),r(()=>m(`show`))}})},n);return c=b.mount(p),_}}var ra={install({$q:e,parentApp:t}){e.dialog=this.create=na(ea,!0,t)}},ia={config:{dark:!0,brand:{primary:`#6c63ff`,secondary:`#26a69a`,accent:`#9c27b0`,dark:`#1a1a2e`,"dark-page":`#1a1a2e`,positive:`#21ba45`,negative:`#c10015`,info:`#31ccec`,warning:`#f2c037`}},plugins:{Notify:ti,Dialog:ra}},aa=`/`;async function oa({app:e,router:t,store:n},r){let i=!1,a=e=>{try{return t.resolve(e).href}catch{}return Object(e)===e?null:e},o=e=>{if(i=!0,typeof e==`string`&&/^https?:\/\//.test(e)){window.location.href=e;return}let t=a(e);t!==null&&(window.location.href=t,window.location.reload())},s=window.location.href.replace(window.location.origin,``);for(let a=0;i===!1&&a<r.length;a++)try{await r[a]({app:e,router:t,store:n,ssrContext:null,redirect:o,urlPath:s,publicPath:aa})}catch(e){if(e&&e.url){o(e.url);return}console.error(`[Quasar] boot error:`,e);return}i!==!0&&(e.use(t),e.mount(`#q-app`))}Rr(E,ia).then(e=>{let[t,n]=Promise.allSettled===void 0?[`all`,e=>e.map(e=>e.default)]:[`allSettled`,e=>e.map(e=>{if(e.status===`rejected`){console.error(`[Quasar] boot error:`,e.reason);return}return e.value.default})];return Promise[t]([Fr(()=>import(`./i18n-CCWLBc0p.js`),__vite__mapDeps([43,44,2,3]))]).then(t=>{oa(e,n(t).filter(e=>typeof e==`function`))})});export{pt as C,_t as S,Ar as _,Ti as a,vt as b,Ei as c,li as d,ii as f,jr as g,Fr as h,Wi as i,Oi as l,ni as m,Yi as n,ki as o,ri as p,Gi as r,Di as s,$i as t,fi as u,Ot as v,rt as w,St as x,Et as y};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{S as e}from"./index-DoNZ_5QK.js";var{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object,{freeze:o,seal:s,create:c}=Object,{apply:l,construct:u}=typeof Reflect<`u`&&Reflect;o||=function(e){return e},s||=function(e){return e},l||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},u||=function(e){return new e(...[...arguments].slice(1))};var d=g(Array.prototype.forEach),f=g(Array.prototype.lastIndexOf),ee=g(Array.prototype.pop),p=g(Array.prototype.push),te=g(Array.prototype.splice),ne=g(String.prototype.toLowerCase),re=g(String.prototype.toString),ie=g(String.prototype.match),ae=g(String.prototype.replace),oe=g(String.prototype.indexOf),se=g(String.prototype.trim),m=g(Object.prototype.hasOwnProperty),h=g(RegExp.prototype.test),ce=le(TypeError);function g(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return l(e,t,n)}}function le(e){return function(){return u(e,[...arguments])}}function _(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ne;n&&n(e,null);let a=t.length;for(;a--;){let n=t[a];if(typeof n==`string`){let e=i(n);e!==n&&(r(t)||(t[a]=e),n=e)}e[n]=!0}return e}function ue(e){for(let t=0;t<e.length;t++)m(e,t)||(e[t]=null);return e}function v(e){let n=c(null);for(let[r,i]of t(e))m(e,r)&&(Array.isArray(i)?n[r]=ue(i):i&&typeof i==`object`&&i.constructor===Object?n[r]=v(i):n[r]=i);return n}function de(e,t){for(;e!==null;){let n=a(e,t);if(n){if(n.get)return g(n.get);if(typeof n.value==`function`)return g(n.value)}e=i(e)}function n(){return null}return n}var fe=o(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),pe=o(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),me=o([`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`]),he=o([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ge=o(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),_e=o([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ve=o([`#text`]),ye=o(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),be=o(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),xe=o(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Se=o([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ce=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),we=s(/<%[\w\W]*|[\w\W]*%>/gm),Te=s(/\$\{[\w\W]*/gm),y=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ee=s(/^aria-[\-\w]+$/),De=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oe=s(/^(?:\w+script|data):/i),ke=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ae=s(/^html$/i),je=s(/^[a-z][.\w]*(-[.\w]+)+$/i),Me=Object.freeze({__proto__:null,ARIA_ATTR:Ee,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:je,DATA_ATTR:y,DOCTYPE_NAME:Ae,ERB_EXPR:we,IS_ALLOWED_URI:De,IS_SCRIPT_OR_DATA:Oe,MUSTACHE_EXPR:Ce,TMPLIT_EXPR:Te}),Ne={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Pe=function(){return typeof window>`u`?null:window},Fe=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ie=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Le(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pe(),n=e=>Le(e);if(n.version=`3.3.3`,n.removed=[],!e||!e.document||e.document.nodeType!==Ne.document||!e.Element)return n.isSupported=!1,n;let{document:r}=e,i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:u,Element:g,NodeFilter:le,NamedNodeMap:ue=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:Ce,DOMParser:we,trustedTypes:Te}=e,y=g.prototype,Ee=de(y,`cloneNode`),Oe=de(y,`remove`),ke=de(y,`nextSibling`),je=de(y,`childNodes`),Re=de(y,`parentNode`);if(typeof l==`function`){let e=r.createElement(`template`);e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:ze,createDocumentFragment:C,getElementsByTagName:w}=r,{importNode:Be}=i,T=Ie();n.isSupported=typeof t==`function`&&typeof Re==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ve,ERB_EXPR:He,TMPLIT_EXPR:Ue,DATA_ATTR:We,ARIA_ATTR:Ge,IS_SCRIPT_OR_DATA:Ke,ATTR_WHITESPACE:qe,CUSTOM_ELEMENT:Je}=Me,{IS_ALLOWED_URI:Ye}=Me,E=null,Xe=_({},[...fe,...pe,...me,...ge,...ve]),D=null,Ze=_({},[...ye,...be,...xe,...Se]),O=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),k=null,A=null,j=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Qe=!0,$e=!0,et=!1,tt=!0,M=!1,nt=!0,N=!1,rt=!1,it=!1,P=!1,F=!1,I=!1,at=!0,ot=!1,st=!0,ct=!1,L={},R=null,lt=_({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),ut=null,dt=_({},[`audio`,`video`,`img`,`source`,`image`,`track`]),ft=null,pt=_({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),mt=`http://www.w3.org/1998/Math/MathML`,ht=`http://www.w3.org/2000/svg`,z=`http://www.w3.org/1999/xhtml`,B=z,gt=!1,_t=null,vt=_({},[mt,ht,z],re),V=_({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),yt=_({},[`annotation-xml`]),bt=_({},[`title`,`style`,`font`,`a`,`script`]),H=null,xt=[`application/xhtml+xml`,`text/html`],U=null,W=null,St=r.createElement(`form`),Ct=function(e){return e instanceof RegExp||e instanceof Function},wt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(W&&W===e)){if((!e||typeof e!=`object`)&&(e={}),e=v(e),H=xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,U=H===`application/xhtml+xml`?re:ne,E=m(e,`ALLOWED_TAGS`)?_({},e.ALLOWED_TAGS,U):Xe,D=m(e,`ALLOWED_ATTR`)?_({},e.ALLOWED_ATTR,U):Ze,_t=m(e,`ALLOWED_NAMESPACES`)?_({},e.ALLOWED_NAMESPACES,re):vt,ft=m(e,`ADD_URI_SAFE_ATTR`)?_(v(pt),e.ADD_URI_SAFE_ATTR,U):pt,ut=m(e,`ADD_DATA_URI_TAGS`)?_(v(dt),e.ADD_DATA_URI_TAGS,U):dt,R=m(e,`FORBID_CONTENTS`)?_({},e.FORBID_CONTENTS,U):lt,k=m(e,`FORBID_TAGS`)?_({},e.FORBID_TAGS,U):v({}),A=m(e,`FORBID_ATTR`)?_({},e.FORBID_ATTR,U):v({}),L=m(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Qe=e.ALLOW_ARIA_ATTR!==!1,$e=e.ALLOW_DATA_ATTR!==!1,et=e.ALLOW_UNKNOWN_PROTOCOLS||!1,tt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=e.SAFE_FOR_TEMPLATES||!1,nt=e.SAFE_FOR_XML!==!1,N=e.WHOLE_DOCUMENT||!1,P=e.RETURN_DOM||!1,F=e.RETURN_DOM_FRAGMENT||!1,I=e.RETURN_TRUSTED_TYPE||!1,it=e.FORCE_BODY||!1,at=e.SANITIZE_DOM!==!1,ot=e.SANITIZE_NAMED_PROPS||!1,st=e.KEEP_CONTENT!==!1,ct=e.IN_PLACE||!1,Ye=e.ALLOWED_URI_REGEXP||De,B=e.NAMESPACE||z,V=e.MATHML_TEXT_INTEGRATION_POINTS||V,yt=e.HTML_INTEGRATION_POINTS||yt,O=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(O.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&($e=!1),F&&(P=!0),L&&(E=_({},ve),D=c(null),L.html===!0&&(_(E,fe),_(D,ye)),L.svg===!0&&(_(E,pe),_(D,be),_(D,Se)),L.svgFilters===!0&&(_(E,me),_(D,be),_(D,Se)),L.mathMl===!0&&(_(E,ge),_(D,xe),_(D,Se))),m(e,`ADD_TAGS`)||(j.tagCheck=null),m(e,`ADD_ATTR`)||(j.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?j.tagCheck=e.ADD_TAGS:(E===Xe&&(E=v(E)),_(E,e.ADD_TAGS,U))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?j.attributeCheck=e.ADD_ATTR:(D===Ze&&(D=v(D)),_(D,e.ADD_ATTR,U))),e.ADD_URI_SAFE_ATTR&&_(ft,e.ADD_URI_SAFE_ATTR,U),e.FORBID_CONTENTS&&(R===lt&&(R=v(R)),_(R,e.FORBID_CONTENTS,U)),e.ADD_FORBID_CONTENTS&&(R===lt&&(R=v(R)),_(R,e.ADD_FORBID_CONTENTS,U)),st&&(E[`#text`]=!0),N&&_(E,[`html`,`head`,`body`]),E.table&&(_(E,[`tbody`]),delete k.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ce(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ce(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=Fe(Te,a)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));o&&o(e),W=e}},Tt=_({},[...pe,...me,...he]),G=_({},[...ge,..._e]),Et=function(e){let t=Re(e);(!t||!t.tagName)&&(t={namespaceURI:B,tagName:`template`});let n=ne(e.tagName),r=ne(t.tagName);return _t[e.namespaceURI]?e.namespaceURI===ht?t.namespaceURI===z?n===`svg`:t.namespaceURI===mt?n===`svg`&&(r===`annotation-xml`||V[r]):!!Tt[n]:e.namespaceURI===mt?t.namespaceURI===z?n===`math`:t.namespaceURI===ht?n===`math`&&yt[r]:!!G[n]:e.namespaceURI===z?t.namespaceURI===ht&&!yt[r]||t.namespaceURI===mt&&!V[r]?!1:!G[n]&&(bt[n]||!Tt[n]):!!(H===`application/xhtml+xml`&&_t[e.namespaceURI]):!1},K=function(e){p(n.removed,{element:e});try{Re(e).removeChild(e)}catch{Oe(e)}},q=function(e,t){try{p(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{p(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e===`is`)if(P||F)try{K(t)}catch{}else try{t.setAttribute(e,``)}catch{}},Dt=function(e){let t=null,n=null;if(it)e=`<remove></remove>`+e;else{let t=ie(e,/^[\r\n\t ]+/);n=t&&t[0]}H===`application/xhtml+xml`&&B===z&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(B===z)try{t=new we().parseFromString(i,H)}catch{}if(!t||!t.documentElement){t=S.createDocument(B,`template`,null);try{t.documentElement.innerHTML=gt?x:i}catch{}}let a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),B===z?w.call(t,N?`html`:`body`)[0]:N?t.documentElement:a},Ot=function(e){return ze.call(e.ownerDocument||e,e,le.SHOW_ELEMENT|le.SHOW_COMMENT|le.SHOW_TEXT|le.SHOW_PROCESSING_INSTRUCTION|le.SHOW_CDATA_SECTION,null)},J=function(e){return e instanceof Ce&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof ue)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},kt=function(e){return typeof u==`function`&&e instanceof u};function Y(e,t,r){d(e,e=>{e.call(n,t,r,W)})}let At=function(e){let t=null;if(Y(T.beforeSanitizeElements,e,null),J(e))return K(e),!0;let r=U(e.nodeName);if(Y(T.uponSanitizeElement,e,{tagName:r,allowedTags:E}),nt&&e.hasChildNodes()&&!kt(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Ne.progressingInstruction||nt&&e.nodeType===Ne.comment&&h(/<[/\w]/g,e.data))return K(e),!0;if(!(j.tagCheck instanceof Function&&j.tagCheck(r))&&(!E[r]||k[r])){if(!k[r]&&Mt(r)&&(O.tagNameCheck instanceof RegExp&&h(O.tagNameCheck,r)||O.tagNameCheck instanceof Function&&O.tagNameCheck(r)))return!1;if(st&&!R[r]){let t=Re(e)||e.parentNode,n=je(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Ee(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ke(e))}}}return K(e),!0}return e instanceof g&&!Et(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(K(e),!0):(M&&e.nodeType===Ne.text&&(t=e.textContent,d([Ve,He,Ue],e=>{t=ae(t,e,` `)}),e.textContent!==t&&(p(n.removed,{element:e.cloneNode()}),e.textContent=t)),Y(T.afterSanitizeElements,e,null),!1)},jt=function(e,t,n){if(A[t]||at&&(t===`id`||t===`name`)&&(n in r||n in St))return!1;if(!($e&&!A[t]&&h(We,t))&&!(Qe&&h(Ge,t))&&!(j.attributeCheck instanceof Function&&j.attributeCheck(t,e))){if(!D[t]||A[t]){if(!(Mt(e)&&(O.tagNameCheck instanceof RegExp&&h(O.tagNameCheck,e)||O.tagNameCheck instanceof Function&&O.tagNameCheck(e))&&(O.attributeNameCheck instanceof RegExp&&h(O.attributeNameCheck,t)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck(t,e))||t===`is`&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&h(O.tagNameCheck,n)||O.tagNameCheck instanceof Function&&O.tagNameCheck(n))))return!1}else if(!ft[t]&&!h(Ye,ae(n,qe,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&oe(n,`data:`)===0&&ut[e])&&!(et&&!h(Ke,ae(n,qe,``)))&&n)return!1}return!0},Mt=function(e){return e!==`annotation-xml`&&ie(e,Je)},X=function(e){Y(T.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||J(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0},i=t.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=t[i],c=U(a),l=s,u=a===`value`?l:se(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Y(T.uponSanitizeAttribute,e,r),u=r.attrValue,ot&&(c===`id`||c===`name`)&&(q(a,e),u=`user-content-`+u),nt&&h(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){q(a,e);continue}if(c===`attributename`&&ie(u,`href`)){q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){q(a,e);continue}if(!tt&&h(/\/>/i,u)){q(a,e);continue}M&&d([Ve,He,Ue],e=>{u=ae(u,e,` `)});let f=U(e.nodeName);if(!jt(f,c,u)){q(a,e);continue}if(b&&typeof Te==`object`&&typeof Te.getAttributeType==`function`&&!o)switch(Te.getAttributeType(f,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),J(e)?K(e):ee(n.removed)}catch{q(a,e)}}Y(T.afterSanitizeAttributes,e,null)},Nt=function e(t){let n=null,r=Ot(t);for(Y(T.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Y(T.uponSanitizeShadowNode,n,null),At(n),X(n),n.content instanceof s&&e(n.content);Y(T.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=null,a=null,o=null,c=null;if(gt=!e,gt&&(e=`<!-->`),typeof e!=`string`&&!kt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw ce(`dirty is not a string, aborting`)}else throw ce(`toString is not a function`);if(!n.isSupported)return e;if(rt||wt(t),n.removed=[],typeof e==`string`&&(ct=!1),ct){if(e.nodeName){let t=U(e.nodeName);if(!E[t]||k[t])throw ce(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof u)r=Dt(`<!---->`),a=r.ownerDocument.importNode(e,!0),a.nodeType===Ne.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?r=a:r.appendChild(a);else{if(!P&&!M&&!N&&e.indexOf(`<`)===-1)return b&&I?b.createHTML(e):e;if(r=Dt(e),!r)return P?null:I?x:``}r&&it&&K(r.firstChild);let l=Ot(ct?e:r);for(;o=l.nextNode();)At(o),X(o),o.content instanceof s&&Nt(o.content);if(ct)return e;if(P){if(F)for(c=C.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(D.shadowroot||D.shadowrootmode)&&(c=Be.call(i,c,!0)),c}let f=N?r.outerHTML:r.innerHTML;return N&&E[`!doctype`]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&h(Ae,r.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+r.ownerDocument.doctype.name+`>
|
|
2
|
-
`+f),M&&d([Ve,He,Ue],e=>{f=ae(f,e,` `)}),b&&I?b.createHTML(f):f},n.setConfig=function(){wt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),rt=!0},n.clearConfig=function(){W=null,rt=!1},n.isValidAttribute=function(e,t,n){return W||wt({}),jt(U(e),U(t),n)},n.addHook=function(e,t){typeof t==`function`&&p(T[e],t)},n.removeHook=function(e,t){if(t!==void 0){let n=f(T[e],t);return n===-1?void 0:te(T[e],n,1)[0]}return ee(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T=Ie()},n}var Re=Le(),b;function x(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var S=x();function ze(e){S=e}var C={exec:()=>null};function w(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(T.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Be=(()=>{try{return!0}catch{return!1}})(),T={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,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,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Ve=/^(?:[ \t]*(?:\n|$))+/,He=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ue=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,We=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ke=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Je=w(qe).replace(/bull/g,Ke).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(),Ye=w(qe).replace(/bull/g,Ke).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(),E=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xe=/^[^\n]+/,D=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ze=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,D).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O=w(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ke).getRegex(),k=`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`,A=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,j=w(`^ {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`,A).replace(`tag`,k).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qe=w(E).replace(`hr`,We).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[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,k).getRegex(),$e={blockquote:w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Qe).getRegex(),code:He,def:Ze,fences:Ue,heading:Ge,hr:We,html:j,lheading:Je,list:O,newline:Ve,paragraph:Qe,table:C,text:Xe},et=w(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,We).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[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,k).getRegex(),tt={...$e,lheading:Ye,table:et,paragraph:w(E).replace(`hr`,We).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,et).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,k).getRegex()},M={...$e,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,A).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:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(E).replace(`hr`,We).replace(`heading`,` *#{1,6} *[^
|
|
3
|
-
]`).replace(`lheading`,Je).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},nt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,N=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rt=/^( {2,}|\\)\n(?!\s*$)/,it=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,P=/[\p{P}\p{S}]/u,F=/[\s\p{P}\p{S}]/u,I=/[^\s\p{P}\p{S}]/u,at=w(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,F).getRegex(),ot=/(?!~)[\p{P}\p{S}]/u,st=/(?!~)[\s\p{P}\p{S}]/u,ct=/(?:[^\s\p{P}\p{S}]|~)/u,L=w(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Be?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),R=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,lt=w(R,`u`).replace(/punct/g,P).getRegex(),ut=w(R,`u`).replace(/punct/g,ot).getRegex(),dt=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ft=w(dt,`gu`).replace(/notPunctSpace/g,I).replace(/punctSpace/g,F).replace(/punct/g,P).getRegex(),pt=w(dt,`gu`).replace(/notPunctSpace/g,ct).replace(/punctSpace/g,st).replace(/punct/g,ot).getRegex(),mt=w(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,I).replace(/punctSpace/g,F).replace(/punct/g,P).getRegex(),ht=w(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,P).getRegex(),z=w(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,I).replace(/punctSpace/g,F).replace(/punct/g,P).getRegex(),B=w(/\\(punct)/,`gu`).replace(/punct/g,P).getRegex(),gt=w(/^<(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(),_t=w(A).replace(`(?:-->|$)`,`-->`).getRegex(),vt=w(`^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`,_t).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,yt=w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,V).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bt=w(/^!?\[(label)\]\[(ref)\]/).replace(`label`,V).replace(`ref`,D).getRegex(),H=w(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,D).getRegex(),xt=w(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,bt).replace(`nolink`,H).getRegex(),U=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W={_backpedal:C,anyPunctuation:B,autolink:gt,blockSkip:L,br:rt,code:N,del:C,delLDelim:C,delRDelim:C,emStrongLDelim:lt,emStrongRDelimAst:ft,emStrongRDelimUnd:mt,escape:nt,link:yt,nolink:H,punctuation:at,reflink:bt,reflinkSearch:xt,tag:vt,text:it,url:C},St={...W,link:w(/^!?\[(label)\]\((.*?)\)/).replace(`label`,V).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,V).getRegex()},Ct={...W,emStrongRDelimAst:pt,emStrongLDelim:ut,delLDelim:ht,delRDelim:z,url:w(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,U).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:w(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,U).getRegex()},wt={...Ct,br:w(rt).replace(`{2,}`,`*`).getRegex(),text:w(Ct.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Tt={normal:$e,gfm:tt,pedantic:M},G={normal:W,gfm:Ct,breaks:wt,pedantic:St},Et={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},K=e=>Et[e];function q(e,t){if(t){if(T.escapeTest.test(e))return e.replace(T.escapeReplace,K)}else if(T.escapeTestNoEncode.test(e))return e.replace(T.escapeReplaceNoEncode,K);return e}function Dt(e){try{e=encodeURI(e).replace(T.percentDecode,`%`)}catch{return null}return e}function Ot(e,t){let n=e.replace(T.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(T.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(T.slashPipe,`|`);return n}function J(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function kt(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 Y(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function At(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function jt(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
4
|
-
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
5
|
-
`)}var Mt=class{constructor(t){e(this,`options`,void 0),e(this,`rules`,void 0),e(this,`lexer`,void 0),this.options=t||S}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 e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:J(e,`
|
|
6
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=jt(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=J(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:J(t[0],`
|
|
7
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=J(t[0],`
|
|
8
|
-
`).split(`
|
|
9
|
-
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
10
|
-
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
11
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
12
|
-
${s}`:s,r=r?`${r}
|
|
13
|
-
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
14
|
-
`+e.join(`
|
|
15
|
-
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
16
|
-
`+e.join(`
|
|
17
|
-
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
18
|
-
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Y(t[2].split(`
|
|
19
|
-
`,1)[0],t[1].length),l=e.split(`
|
|
20
|
-
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
21
|
-
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let ee=e.split(`
|
|
22
|
-
`,1)[0],p;if(l=ee,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
23
|
-
`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
24
|
-
`+l}u=!l.trim(),r+=ee+`
|
|
25
|
-
`,e=e.substring(ee.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.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 e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Ot(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
26
|
-
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Ot(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
27
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}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 e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=J(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=kt(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),At(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.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 e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return At(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},X=class t{constructor(t){e(this,`tokens`,void 0),e(this,`options`,void 0),e(this,`state`,void 0),e(this,`inlineQueue`,void 0),e(this,`tokenizer`,void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||S,this.options.tokenizer=this.options.tokenizer||new Mt,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:T,block:Tt.normal,inline:G.normal};this.options.pedantic?(n.block=Tt.pedantic,n.inline=G.pedantic):this.options.gfm&&(n.block=Tt.gfm,this.options.breaks?n.inline=G.breaks:n.inline=G.gfm),this.tokenizer.rules=n}static get rules(){return{block:Tt,inline:G}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(e){e=e.replace(T.carriageReturn,`
|
|
28
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(T.tabCharGlobal,` `).replace(T.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
29
|
-
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
30
|
-
`)?``:`
|
|
31
|
-
`)+r.raw,n.text+=`
|
|
32
|
-
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
33
|
-
`)?``:`
|
|
34
|
-
`)+r.raw,n.text+=`
|
|
35
|
-
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
|
|
36
|
-
`)?``:`
|
|
37
|
-
`)+r.raw,a.text+=`
|
|
38
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
39
|
-
`)?``:`
|
|
40
|
-
`)+r.raw,n.text+=`
|
|
41
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Nt=class{constructor(t){e(this,`options`,void 0),e(this,`parser`,void 0),this.options=t||S}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(T.notSpaceStart)?.[0],i=e.replace(T.endingNewline,``)+`
|
|
42
|
-
`;return r?`<pre><code class="language-`+q(r)+`">`+(n?i:q(i,!0))+`</code></pre>
|
|
43
|
-
`:`<pre><code>`+(n?i:q(i,!0))+`</code></pre>
|
|
44
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
45
|
-
${this.parser.parse(e)}</blockquote>
|
|
46
|
-
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
47
|
-
`}hr(e){return`<hr>
|
|
48
|
-
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
49
|
-
`+r+`</`+i+`>
|
|
50
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
51
|
-
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
52
|
-
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
53
|
-
<thead>
|
|
54
|
-
`+t+`</thead>
|
|
55
|
-
`+r+`</table>
|
|
56
|
-
`}tablerow({text:e}){return`<tr>
|
|
57
|
-
${e}</tr>
|
|
58
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
59
|
-
`}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>${q(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=Dt(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+q(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=Dt(e);if(i===null)return q(n);e=i;let a=`<img src="${e}" alt="${q(n)}"`;return t&&(a+=` title="${q(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:q(e.text)}},Pt=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}},Z=class t{constructor(t){e(this,`options`,void 0),e(this,`renderer`,void 0),e(this,`textRenderer`,void 0),this.options=t||S,this.options.renderer=this.options.renderer||new Nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pt}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Ft=(b=class{constructor(t){e(this,`options`,void 0),e(this,`block`,void 0),this.options=t||S}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?X.lex:X.lexInline}provideParser(e=this.block){return e?Z.parse:Z.parseInline}},e(b,`passThroughHooks`,new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`])),e(b,`passThroughHooksRespectAsync`,new Set([`preprocess`,`postprocess`,`processAllTokens`])),b),Q=new class{constructor(...t){e(this,`defaults`,x()),e(this,`options`,this.setOptions),e(this,`parse`,this.parseMarkdown(!0)),e(this,`parseInline`,this.parseMarkdown(!1)),e(this,`Parser`,Z),e(this,`Renderer`,Nt),e(this,`TextRenderer`,Pt),e(this,`Lexer`,X),e(this,`Tokenizer`,Mt),e(this,`Hooks`,Ft),this.use(...t)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Nt(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Mt(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ft;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Ft.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return X.lex(e,t??this.defaults)}parser(e,t){return Z.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?X.lex:X.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?X.lex:X.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
60
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+q(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return Q.parse(e,t)}$.options=$.setOptions=function(e){return Q.setOptions(e),$.defaults=Q.defaults,ze($.defaults),$},$.getDefaults=x,$.defaults=S,$.use=function(...e){return Q.use(...e),$.defaults=Q.defaults,ze($.defaults),$},$.walkTokens=function(e,t){return Q.walkTokens(e,t)},$.parseInline=Q.parseInline,$.Parser=Z,$.parser=Z.parse,$.Renderer=Nt,$.TextRenderer=Pt,$.Lexer=X,$.lexer=X.lex,$.Tokenizer=Mt,$.Hooks=Ft,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,Z.parse,X.lex;export{Re as n,$ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,D as t,E as n,H as r,O as i,P as a,Q as o,S as s,j as c,k as l,l as u,y as d}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{E as f,S as p,T as m,b as h,f as ee,i as g,m as _,o as v,w as y}from"./QSpinner-CliSLjf8.js";import{a as b,n as x,r as S}from"./private.use-form-BhKyDtO7.js";import{c as C,t as w}from"./QDialog-CkbLS1If.js";import{a as T,c as E,i as D,l as O,o as k,s as A}from"./index-DoNZ_5QK.js";import{n as te}from"./format-Cyg8IgRi.js";import{i as j,n as ne,r as re,t as ie}from"./QMenu-DU-wiY_A.js";import{n as ae,r as oe}from"./use-quasar-DBoizHBW.js";var se=f({name:`QField`,inheritAttrs:!1,props:{...E,tag:{type:String,default:`label`}},emits:A,setup(){return k(O({tagProp:!0}))}}),M=1e3,N=[`start`,`center`,`end`,`start-force`,`center-force`,`end-force`],P=Array.prototype.filter,ce=window.getComputedStyle(document.body).overflowAnchor===void 0?h:function(e,t){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;let n=e.children||[];P.call(n,e=>e.dataset&&e.dataset.qVsAnchor!==void 0).forEach(e=>{delete e.dataset.qVsAnchor});let r=n[t];r?.dataset&&(r.dataset.qVsAnchor=``)}))};function F(e,t){return e+t}function I(e,t,n,r,i,a,o,s){let c=e===window?document.scrollingElement||document.documentElement:e,l=i===!0?`offsetWidth`:`offsetHeight`,u={scrollStart:0,scrollViewSize:-o-s,scrollMaxSize:0,offsetStart:-o,offsetEnd:-s};if(i===!0?(e===window?(u.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,u.scrollViewSize+=document.documentElement.clientWidth):(u.scrollStart=c.scrollLeft,u.scrollViewSize+=c.clientWidth),u.scrollMaxSize=c.scrollWidth,a===!0&&(u.scrollStart=(j===!0?u.scrollMaxSize-u.scrollViewSize:0)-u.scrollStart)):(e===window?(u.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,u.scrollViewSize+=document.documentElement.clientHeight):(u.scrollStart=c.scrollTop,u.scrollViewSize+=c.clientHeight),u.scrollMaxSize=c.scrollHeight),n!==null)for(let e=n.previousElementSibling;e!==null;e=e.previousElementSibling)e.classList.contains(`q-virtual-scroll--skip`)===!1&&(u.offsetStart+=e[l]);if(r!==null)for(let e=r.nextElementSibling;e!==null;e=e.nextElementSibling)e.classList.contains(`q-virtual-scroll--skip`)===!1&&(u.offsetEnd+=e[l]);if(t!==e){let n=c.getBoundingClientRect(),r=t.getBoundingClientRect();i===!0?(u.offsetStart+=r.left-n.left,u.offsetEnd-=r.width):(u.offsetStart+=r.top-n.top,u.offsetEnd-=r.height),e!==window&&(u.offsetStart+=u.scrollStart),u.offsetEnd+=u.scrollMaxSize-u.offsetStart}return u}function L(e,t,n,r){t===`end`&&(t=(e===window?document.body:e)[n===!0?`scrollWidth`:`scrollHeight`]),e===window?n===!0?(r===!0&&(t=(j===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-t),window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):n===!0?(r===!0&&(t=(j===!0?e.scrollWidth-e.offsetWidth:0)-t),e.scrollLeft=t):e.scrollTop=t}function R(e,t,n,r){if(n>=r)return 0;let i=t.length,a=Math.floor(n/M),o=Math.floor((r-1)/M)+1,s=e.slice(a,o).reduce(F,0);return n%M!==0&&(s-=t.slice(a*M,n).reduce(F,0)),r%M!==0&&r!==i&&(s-=t.slice(r,o*M).reduce(F,0)),s}var z={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]};function B({virtualScrollLength:e,getVirtualScrollTarget:a,getVirtualScrollEl:f,virtualScrollItemSizeComputed:p}){let{props:m,emit:h,proxy:ee}=d(),{$q:g}=ee,_,v,y,x=[],S,C=o(0),w=o(0),T=o({}),E=o(null),D=o(null),O=o(null),k=o({from:0,to:0}),A=u(()=>m.tableColspan===void 0?100:m.tableColspan);p===void 0&&(p=u(()=>m.virtualScrollItemSize));let te=u(()=>p.value+`;`+m.virtualScrollHorizontal);r(u(()=>te.value+`;`+m.virtualScrollSliceRatioBefore+`;`+m.virtualScrollSliceRatioAfter),()=>{B()}),r(te,j);function j(){z(v,!0)}function ne(e){z(e===void 0?v:e)}function re(t,n){let r=a();if(r==null||r.nodeType===8)return;let i=I(r,f(),E.value,D.value,m.virtualScrollHorizontal,g.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd);y!==i.scrollViewSize&&B(i.scrollViewSize),ae(r,i,Math.min(e.value-1,Math.max(0,parseInt(t,10)||0)),0,N.indexOf(n)===-1?v!==-1&&t>v?`end`:`start`:n)}function ie(){let t=a();if(t==null||t.nodeType===8)return;let n=I(t,f(),E.value,D.value,m.virtualScrollHorizontal,g.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd),r=e.value-1,i=n.scrollMaxSize-n.offsetStart-n.offsetEnd-w.value;if(_===n.scrollStart)return;if(n.scrollMaxSize<=0){ae(t,n,0,0);return}y!==n.scrollViewSize&&B(n.scrollViewSize),oe(k.value.from);let o=Math.floor(n.scrollMaxSize-Math.max(n.scrollViewSize,n.offsetEnd)-Math.min(S[r],n.scrollViewSize/2));if(o>0&&Math.ceil(n.scrollStart)>=o){ae(t,n,r,n.scrollMaxSize-n.offsetEnd-x.reduce(F,0));return}let s=0,c=n.scrollStart-n.offsetStart,l=c;if(c<=i&&c+n.scrollViewSize>=C.value)c-=C.value,s=k.value.from,l=c;else for(let e=0;c>=x[e]&&s<r;e++)c-=x[e],s+=M;for(;c>0&&s<r;)c-=S[s],c>-n.scrollViewSize?(s++,l=c):l=S[s]+c;ae(t,n,s,l)}function ae(t,n,r,i,a){let o=typeof a==`string`&&a.indexOf(`-force`)!==-1,s=o===!0?a.replace(`-force`,``):a,c=s===void 0?`start`:s,l=Math.max(0,r-T.value[c]),u=l+T.value.total;u>e.value&&(u=e.value,l=Math.max(0,u-T.value.total)),_=n.scrollStart;let d=l!==k.value.from||u!==k.value.to;if(d===!1&&s===void 0){ue(r);return}let{activeElement:f}=document,p=O.value;d===!0&&p!==null&&p!==f&&p.contains(f)===!0&&(p.addEventListener(`focusout`,se),setTimeout(()=>{p?.removeEventListener(`focusout`,se)})),ce(p,r-l);let h=s===void 0?0:S.slice(l,r).reduce(F,0);if(d===!0){let t=u>=k.value.from&&l<=k.value.to?k.value.to:u;k.value={from:l,to:t},C.value=R(x,S,0,l),w.value=R(x,S,u,e.value),requestAnimationFrame(()=>{k.value.to!==u&&_===n.scrollStart&&(k.value={from:k.value.from,to:u},w.value=R(x,S,u,e.value))})}requestAnimationFrame(()=>{if(_!==n.scrollStart)return;d===!0&&oe(l);let e=S.slice(l,r).reduce(F,0),a=e+n.offsetStart+C.value,c=a+S[r],u=a+i;if(s!==void 0){let t=e-h,i=n.scrollStart+t;u=o!==!0&&i<a&&c<i+n.scrollViewSize?i:s===`end`?c-n.scrollViewSize:a-(s===`start`?0:Math.round((n.scrollViewSize-S[r])/2))}_=u,L(t,u,m.virtualScrollHorizontal,g.lang.rtl),ue(r)})}function oe(e){let t=O.value;if(t){let n=P.call(t.children,e=>e.classList&&e.classList.contains(`q-virtual-scroll--skip`)===!1),r=n.length,i=m.virtualScrollHorizontal===!0?e=>e.getBoundingClientRect().width:e=>e.offsetHeight,a=e,o,s;for(let e=0;e<r;){for(o=i(n[e]),e++;e<r&&n[e].classList.contains(`q-virtual-scroll--with-prev`)===!0;)o+=i(n[e]),e++;s=o-S[a],s!==0&&(S[a]+=s,x[Math.floor(a/M)]+=s),a++}}}function se(){O.value?.focus()}function z(t,r){let i=Number(p.value);(r===!0||Array.isArray(S)===!1)&&(S=[]);let a=S.length;S.length=e.value;for(let t=e.value-1;t>=a;t--)S[t]=i;let o=Math.floor((e.value-1)/M);x=[];for(let t=0;t<=o;t++){let n=0,r=Math.min((t+1)*M,e.value);for(let e=t*M;e<r;e++)n+=S[e];x.push(n)}v=-1,_=void 0,C.value=R(x,S,0,k.value.from),w.value=R(x,S,k.value.to,e.value),t>=0?(oe(k.value.from),n(()=>{re(t)})):de()}function B(e){if(e===void 0&&typeof window<`u`){let t=a();t!=null&&t.nodeType!==8&&(e=I(t,f(),E.value,D.value,m.virtualScrollHorizontal,g.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd).scrollViewSize)}y=e;let t=parseFloat(m.virtualScrollSliceRatioBefore)||0,n=parseFloat(m.virtualScrollSliceRatioAfter)||0,r=1+t+n,i=e===void 0||e<=0?1:Math.ceil(e/p.value),o=Math.max(1,i,Math.ceil((m.virtualScrollSliceSize>0?m.virtualScrollSliceSize:10)/r));T.value={total:Math.ceil(o*r),start:Math.ceil(o*t),center:Math.ceil(o*(.5+t)),end:Math.ceil(o*(1+t)),view:i}}function le(e,t){let n=m.virtualScrollHorizontal===!0?`width`:`height`,r={[`--q-virtual-scroll-item-`+n]:p.value+`px`};return[e===`tbody`?s(e,{class:`q-virtual-scroll__padding`,key:`before`,ref:E},[s(`tr`,[s(`td`,{style:{[n]:`${C.value}px`,...r},colspan:A.value})])]):s(e,{class:`q-virtual-scroll__padding`,key:`before`,ref:E,style:{[n]:`${C.value}px`,...r}}),s(e,{class:`q-virtual-scroll__content`,key:`content`,ref:O,tabindex:-1},t.flat()),e===`tbody`?s(e,{class:`q-virtual-scroll__padding`,key:`after`,ref:D},[s(`tr`,[s(`td`,{style:{[n]:`${w.value}px`,...r},colspan:A.value})])]):s(e,{class:`q-virtual-scroll__padding`,key:`after`,ref:D,style:{[n]:`${w.value}px`,...r}})]}function ue(e){v!==e&&(m.onVirtualScroll!==void 0&&h(`virtualScroll`,{index:e,from:k.value.from,to:k.value.to-1,direction:e<v?`decrease`:`increase`,ref:ee}),v=e)}B();let de=b(ie,g.platform.is.ios===!0?120:35);i(()=>{B()});let fe=!1;return c(()=>{fe=!0}),t(()=>{if(fe!==!0)return;let e=a();_!==void 0&&e!=null&&e.nodeType!==8?L(e,_,m.virtualScrollHorizontal,g.lang.rtl):re(v)}),l(()=>{de.cancel()}),Object.assign(ee,{scrollTo:re,reset:j,refresh:ne}),{virtualScrollSliceRange:k,virtualScrollSliceSizeComputed:T,setVirtualScrollSize:B,onVirtualScrollEvt:de,localResetVirtualScroll:z,padVirtualScroll:le,scrollTo:re,reset:j,refresh:ne}}var le=e=>[`add`,`add-unique`,`toggle`].includes(e),ue=".*+?^${}()|[]\\",de=Object.keys(E);function fe(e,t){if(typeof e==`function`)return e;let n=e===void 0?t:e;return e=>typeof e==`object`&&e&&n in e?e[n]:e}var V=f({name:`QSelect`,inheritAttrs:!1,props:{...z,...S,...E,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:le},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>[`default`,`menu`,`dialog`].includes(e),default:`default`},virtualScrollItemSize:z.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...A,`add`,`remove`,`inputValue`,`keyup`,`keypress`,`keydown`,`popupShow`,`popupHide`,`filterAbort`],setup(t,{slots:i,emit:c}){let{proxy:f}=d(),{$q:h}=f,b=o(!1),S=o(!1),E=o(-1),A=o(``),j=o(!1),M=o(!1),N=null,P=null,ce,F,I,L=null,R,z,V,H,pe=o(null),U=o(null),W=o(null),me=o(null),he=o(null),ge=x(t),_e=D(ut),G=u(()=>Array.isArray(t.options)?t.options.length:0),{virtualScrollSliceRange:ve,virtualScrollSliceSizeComputed:ye,localResetVirtualScroll:be,padVirtualScroll:xe,onVirtualScrollEvt:Se,scrollTo:Ce,setVirtualScrollSize:we}=B({virtualScrollLength:G,getVirtualScrollTarget:ot,getVirtualScrollEl:at,virtualScrollItemSizeComputed:u(()=>t.virtualScrollItemSize===void 0?t.optionsDense===!0?24:48:t.virtualScrollItemSize)}),K=O(),q=u(()=>{let e=t.mapOptions===!0&&t.multiple!==!0,n=t.modelValue!==void 0&&(t.modelValue!==null||e===!0)?t.multiple===!0&&Array.isArray(t.modelValue)?t.modelValue:[t.modelValue]:[];if(t.mapOptions===!0&&Array.isArray(t.options)===!0){let r=t.mapOptions===!0&&ce!==void 0?ce:[],i=n.map(e=>Qe(e,r));return t.modelValue===null&&e===!0?i.filter(e=>e!==null):i}return n}),Te=u(()=>{let e={};return de.forEach(n=>{let r=t[n];r!==void 0&&(e[n]=r)}),e}),Ee=u(()=>t.optionsDark===null?K.isDark.value:t.optionsDark),De=u(()=>T(q.value)),Oe=u(()=>{let e=`q-field__input q-placeholder col`;return t.hideSelected===!0||q.value.length===0?[e,t.inputClass]:(e+=` q-field__input--padding`,t.inputClass===void 0?e:[e,t.inputClass])}),ke=u(()=>(t.virtualScrollHorizontal===!0?`q-virtual-scroll--horizontal`:``)+(t.popupContentClass?` `+t.popupContentClass:``)),Ae=u(()=>G.value===0),je=u(()=>q.value.map(e=>Y.value(e)).join(`, `)),Me=u(()=>t.displayValue===void 0?je.value:t.displayValue),Ne=u(()=>t.optionsHtml===!0?()=>!0:e=>e?.html===!0),Pe=u(()=>t.displayValueHtml===!0||t.displayValue===void 0&&(t.optionsHtml===!0||q.value.some(Ne.value))),Fe=u(()=>K.focused.value===!0?t.tabindex:-1),Ie=u(()=>{let e={tabindex:t.tabindex,role:`combobox`,"aria-label":t.label,"aria-readonly":t.readonly===!0?`true`:`false`,"aria-autocomplete":t.useInput===!0?`list`:`none`,"aria-expanded":b.value===!0?`true`:`false`,"aria-controls":`${K.targetUid.value}_lb`};return E.value>=0&&(e[`aria-activedescendant`]=`${K.targetUid.value}_${E.value}`),e}),Le=u(()=>({id:`${K.targetUid.value}_lb`,role:`listbox`,"aria-multiselectable":t.multiple===!0?`true`:`false`})),Re=u(()=>q.value.map((e,t)=>({index:t,opt:e,html:Ne.value(e),selected:!0,removeAtIndex:Je,toggleOption:X,tabindex:Fe.value}))),ze=u(()=>{if(G.value===0)return[];let{from:e,to:n}=ve.value;return t.options.slice(e,n).map((n,r)=>{let i=Ue.value(n)===!0,a=$e(n)===!0,o=e+r,s={clickable:!0,active:a,activeClass:He.value,manualFocus:!0,focused:!1,disable:i,tabindex:-1,dense:t.optionsDense,dark:Ee.value,role:`option`,"aria-selected":a===!0?`true`:`false`,id:`${K.targetUid.value}_${o}`,onClick:()=>{X(n)}};return i!==!0&&(E.value===o&&(s.focused=!0),h.platform.is.desktop===!0&&(s.onMousemove=()=>{b.value===!0&&Xe(o)})),{index:o,opt:n,html:Ne.value(n),label:Y.value(n),selected:s.active,focused:s.focused,toggleOption:X,setOptionIndex:Xe,itemProps:s}})}),Be=u(()=>t.dropdownIcon===void 0?h.iconSet.arrow.dropdown:t.dropdownIcon),Ve=u(()=>t.optionsCover===!1&&t.outlined!==!0&&t.standout!==!0&&t.borderless!==!0&&t.rounded!==!0),He=u(()=>t.optionsSelectedClass===void 0?t.color===void 0?``:`text-${t.color}`:t.optionsSelectedClass),J=u(()=>fe(t.optionValue,`value`)),Y=u(()=>fe(t.optionLabel,`label`)),Ue=u(()=>fe(t.optionDisable,`disable`)),We=u(()=>q.value.map(J.value)),Ge=u(()=>{let e={onInput:ut,onChange:_e,onKeydown:it,onKeyup:nt,onKeypress:rt,onFocus:et,onClick(e){F===!0&&y(e)}};return e.onCompositionstart=e.onCompositionupdate=e.onCompositionend=_e,e});r(q,e=>{ce=e,t.useInput===!0&&t.fillInput===!0&&t.multiple!==!0&&K.innerLoading.value!==!0&&(S.value!==!0&&b.value!==!0||De.value!==!0)&&(I!==!0&&$(),(S.value===!0||b.value===!0)&&Z(``))},{immediate:!0}),r(()=>t.fillInput,$),r(b,wt),r(G,Tt);function Ke(e){return t.emitValue===!0?J.value(e):e}function qe(e){if(e!==-1&&e<q.value.length)if(t.multiple===!0){let n=t.modelValue.slice();c(`remove`,{index:e,value:n.splice(e,1)[0]}),c(`update:modelValue`,n)}else c(`update:modelValue`,null)}function Je(e){qe(e),K.focus()}function Ye(e,n){let r=Ke(e);if(t.multiple!==!0){t.fillInput===!0&&ft(Y.value(e),!0,!0),c(`update:modelValue`,r);return}if(q.value.length===0){c(`add`,{index:0,value:r}),c(`update:modelValue`,t.multiple===!0?[r]:r);return}if(n===!0&&$e(e)===!0||t.maxValues!==void 0&&t.modelValue.length>=t.maxValues)return;let i=t.modelValue.slice();c(`add`,{index:i.length,value:r}),i.push(r),c(`update:modelValue`,i)}function X(e,n){if(K.editable.value!==!0||e===void 0||Ue.value(e)===!0)return;let r=J.value(e);if(t.multiple!==!0){n!==!0&&(ft(t.fillInput===!0?Y.value(e):``,!0,!0),Q()),U.value?.focus(),(q.value.length===0||C(J.value(q.value[0]),r)!==!0)&&c(`update:modelValue`,t.emitValue===!0?r:e);return}if((F!==!0||j.value===!0)&&K.focus(),et(),q.value.length===0){let n=t.emitValue===!0?r:e;c(`add`,{index:0,value:n}),c(`update:modelValue`,t.multiple===!0?[n]:n);return}let i=t.modelValue.slice(),a=We.value.findIndex(e=>C(e,r));if(a!==-1)c(`remove`,{index:a,value:i.splice(a,1)[0]});else{if(t.maxValues!==void 0&&i.length>=t.maxValues)return;let n=t.emitValue===!0?r:e;c(`add`,{index:i.length,value:n}),i.push(n)}c(`update:modelValue`,i)}function Xe(e){if(h.platform.is.desktop!==!0)return;let t=e!==-1&&e<G.value?e:-1;E.value!==t&&(E.value=t)}function Ze(e=1,n){if(b.value===!0){let r=E.value;do r=te(r+e,-1,G.value-1);while(r!==-1&&r!==E.value&&Ue.value(t.options[r])===!0);E.value!==r&&(Xe(r),Ce(r),n!==!0&&t.useInput===!0&&t.fillInput===!0&&dt(r>=0?Y.value(t.options[r]):R,!0))}}function Qe(e,n){let r=t=>C(J.value(t),e);return t.options.find(r)||n.find(r)||e}function $e(e){let t=J.value(e);return We.value.find(e=>C(e,t))!==void 0}function et(e){t.useInput===!0&&U.value!==null&&(e===void 0||U.value===e.target&&e.target.value===je.value)&&U.value.select()}function tt(e){ee(e,27)===!0&&b.value===!0&&(y(e),Q(),$()),c(`keyup`,e)}function nt(e){let{value:n}=e.target;if(e.keyCode!==void 0){tt(e);return}if(e.target.value=``,N!==null&&(clearTimeout(N),N=null),P!==null&&(clearTimeout(P),P=null),$(),typeof n==`string`&&n.length!==0){let e=n.toLocaleLowerCase(),r=n=>{let r=t.options.find(t=>String(n.value(t)).toLocaleLowerCase()===e);return r===void 0?!1:(q.value.indexOf(r)===-1?X(r):Q(),!0)},i=e=>{r(J)!==!0&&e!==!0&&r(Y)!==!0&&Z(n,!0,()=>i(!0))};i()}else K.clearValue(e)}function rt(e){c(`keypress`,e)}function it(e){if(c(`keydown`,e),_(e)===!0)return;let r=A.value.length!==0&&(t.newValueMode!==void 0||t.onNewValue!==void 0),i=e.shiftKey!==!0&&t.disableTabSelection!==!0&&t.multiple!==!0&&(E.value!==-1||r===!0);if(e.keyCode===27){p(e);return}if(e.keyCode===9&&i===!1){St();return}if(e.target===void 0||e.target.id!==K.targetUid.value||K.editable.value!==!0)return;if(e.keyCode===40&&K.innerLoading.value!==!0&&b.value===!1){m(e),Ct();return}if(e.keyCode===8&&(t.useChips===!0||t.clearable===!0)&&t.hideSelected!==!0&&A.value.length===0){t.multiple===!0&&Array.isArray(t.modelValue)===!0?qe(t.modelValue.length-1):t.multiple!==!0&&t.modelValue!==null&&c(`update:modelValue`,null);return}(e.keyCode===35||e.keyCode===36)&&(typeof A.value!=`string`||A.value.length===0)&&(m(e),E.value=-1,Ze(e.keyCode===36?1:-1,t.multiple)),(e.keyCode===33||e.keyCode===34)&&ye.value!==void 0&&(m(e),E.value=Math.max(-1,Math.min(G.value,E.value+(e.keyCode===33?-1:1)*ye.value.view)),Ze(e.keyCode===33?1:-1,t.multiple)),(e.keyCode===38||e.keyCode===40)&&(m(e),Ze(e.keyCode===38?-1:1,t.multiple));let a=G.value;if((V===void 0||H<Date.now())&&(V=``),a>0&&t.useInput!==!0&&e.key!==void 0&&e.key.length===1&&e.altKey===!1&&e.ctrlKey===!1&&e.metaKey===!1&&(e.keyCode!==32||V.length!==0)){b.value!==!0&&Ct(e);let r=e.key.toLocaleLowerCase(),i=V.length===1&&V[0]===r;H=Date.now()+1500,i===!1&&(m(e),V+=r);let o=RegExp(`^`+V.split(``).map(e=>ue.indexOf(e)===-1?e:`\\`+e).join(`.*`),`i`),s=E.value;if(i===!0||s<0||o.test(Y.value(t.options[s]))!==!0)do s=te(s+1,-1,a-1);while(s!==E.value&&(Ue.value(t.options[s])===!0||o.test(Y.value(t.options[s]))!==!0));E.value!==s&&n(()=>{Xe(s),Ce(s),s>=0&&t.useInput===!0&&t.fillInput===!0&&dt(Y.value(t.options[s]),!0)});return}if(!(e.keyCode!==13&&(e.keyCode!==32||t.useInput===!0||V!==``)&&(e.keyCode!==9||i===!1))){if(e.keyCode!==9&&m(e),E.value!==-1&&E.value<a){X(t.options[E.value]);return}if(r===!0){let e=(e,n)=>{if(n){if(le(n)!==!0)return}else n=t.newValueMode;ft(``,t.multiple!==!0,!0),e!=null&&((n===`toggle`?X:Ye)(e,n===`add-unique`),t.multiple!==!0&&(U.value?.focus(),Q()))};if(t.onNewValue===void 0?e(A.value):c(`newValue`,A.value,e),t.multiple!==!0)return}b.value===!0?St():K.innerLoading.value!==!0&&Ct()}}function at(){return F===!0?he.value:W.value!==null&&W.value.contentEl!==null?W.value.contentEl:void 0}function ot(){return at()}function st(){return t.hideSelected===!0?[]:i[`selected-item`]===void 0?i.selected===void 0?t.useChips===!0?Re.value.map((e,n)=>s(ne,{key:`option-`+n,removable:K.editable.value===!0&&Ue.value(e.opt)!==!0,dense:!0,textColor:t.color,tabindex:Fe.value,onRemove(){e.removeAtIndex(n)}},()=>s(`span`,{class:`ellipsis`,[e.html===!0?`innerHTML`:`textContent`]:Y.value(e.opt)}))):[s(`span`,{class:`ellipsis`,[Pe.value===!0?`innerHTML`:`textContent`]:Me.value})]:[].concat(i.selected()):Re.value.map(e=>i[`selected-item`](e)).slice()}function ct(){if(Ae.value===!0)return i[`no-option`]===void 0?void 0:i[`no-option`]({inputValue:A.value});let e=i.option===void 0?e=>s(ae,{key:e.index,...e.itemProps},()=>s(oe,()=>s(re,()=>s(`span`,{[e.html===!0?`innerHTML`:`textContent`]:e.label})))):i.option,t=xe(`div`,ze.value.map(e));return i[`before-options`]!==void 0&&(t=i[`before-options`]().concat(t)),v(i[`after-options`],t)}function lt(e,n){let r=n===!0?{...Ie.value,...K.splitAttrs.attributes.value}:void 0,i={ref:n===!0?U:void 0,key:`i_t`,class:Oe.value,style:t.inputStyle,value:A.value===void 0?``:A.value,type:`search`,...r,id:n===!0?K.targetUid.value:void 0,maxlength:t.maxlength,autocomplete:t.autocomplete,"data-autofocus":e===!0||t.autofocus===!0||void 0,disabled:t.disable===!0,readonly:t.readonly===!0,...Ge.value};return e!==!0&&F===!0&&(Array.isArray(i.class)===!0?i.class=[...i.class,`no-pointer-events`]:i.class+=` no-pointer-events`),s(`input`,i)}function ut(e){N!==null&&(clearTimeout(N),N=null),P!==null&&(clearTimeout(P),P=null),!(e&&e.target&&e.target.qComposing===!0)&&(dt(e.target.value||``),I=!0,R=A.value,K.focused.value!==!0&&(F!==!0||j.value===!0)&&K.focus(),t.onFilter!==void 0&&(N=setTimeout(()=>{N=null,Z(A.value)},t.inputDebounce)))}function dt(e,n){A.value!==e&&(A.value=e,n===!0||t.inputDebounce===0||t.inputDebounce===`0`?c(`inputValue`,e):P=setTimeout(()=>{P=null,c(`inputValue`,e)},t.inputDebounce))}function ft(e,n,r){I=r!==!0,t.useInput===!0&&(dt(e,!0),(n===!0||r!==!0)&&(R=e),n!==!0&&Z(e))}function Z(e,r,i){if(t.onFilter===void 0||r!==!0&&K.focused.value!==!0)return;K.innerLoading.value===!0?c(`filterAbort`):(K.innerLoading.value=!0,M.value=!0),e!==``&&t.multiple!==!0&&q.value.length!==0&&I!==!0&&e===Y.value(q.value[0])&&(e=``);let a=setTimeout(()=>{b.value===!0&&(b.value=!1)},10);L!==null&&clearTimeout(L),L=a,c(`filter`,e,(e,t)=>{(r===!0||K.focused.value===!0)&&L===a&&(clearTimeout(L),typeof e==`function`&&e(),M.value=!1,n(()=>{K.innerLoading.value=!1,K.editable.value===!0&&(r===!0?b.value===!0&&Q():b.value===!0?wt(!0):b.value=!0),typeof t==`function`&&n(()=>{t(f)}),typeof i==`function`&&n(()=>{i(f)})}))},()=>{K.focused.value===!0&&L===a&&(clearTimeout(L),K.innerLoading.value=!1,M.value=!1),b.value===!0&&(b.value=!1)})}function pt(){return s(ie,{ref:W,class:ke.value,style:t.popupContentStyle,modelValue:b.value,fit:t.menuShrink!==!0,cover:t.optionsCover===!0&&Ae.value!==!0&&t.useInput!==!0,anchor:t.menuAnchor,self:t.menuSelf,offset:t.menuOffset,dark:Ee.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:t.popupNoRouteDismiss,square:Ve.value,transitionShow:t.transitionShow,transitionHide:t.transitionHide,transitionDuration:t.transitionDuration,separateClosePopup:!0,...Le.value,onScrollPassive:Se,onBeforeShow:Dt,onBeforeHide:mt,onShow:ht},ct)}function mt(e){Ot(e),St()}function ht(){we()}function gt(e){y(e),U.value?.focus(),j.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function _t(e){y(e),n(()=>{j.value=!1})}function vt(){let e=[s(se,{class:`col-auto ${K.fieldClass.value}`,...Te.value,for:K.targetUid.value,dark:Ee.value,square:!0,loading:M.value,itemAligned:!1,filled:!0,stackLabel:A.value.length!==0,...K.splitAttrs.listeners.value,onFocus:gt,onBlur:_t},{...i,rawControl:()=>K.getControl(!0),before:void 0,after:void 0})];return b.value===!0&&e.push(s(`div`,{ref:he,class:ke.value+` scroll`,style:t.popupContentStyle,...Le.value,onClick:p,onScrollPassive:Se},ct())),s(w,{ref:me,modelValue:S.value,position:t.useInput===!0?`top`:void 0,transitionShow:z,transitionHide:t.transitionHide,transitionDuration:t.transitionDuration,noRouteDismiss:t.popupNoRouteDismiss,onBeforeShow:Dt,onBeforeHide:yt,onHide:bt,onShow:xt},()=>s(`div`,{class:`q-select__dialog`+(Ee.value===!0?` q-select__dialog--dark q-dark`:``)+(j.value===!0?` q-select__dialog--focused`:``)},e))}function yt(e){Ot(e),me.value!==null&&me.value.__updateRefocusTarget(K.rootRef.value.querySelector(`.q-field__native > [tabindex]:last-child`)),K.focused.value=!1}function bt(e){Q(),K.focused.value===!1&&c(`blur`,e),$()}function xt(){let e=document.activeElement;(e===null||e.id!==K.targetUid.value)&&U.value!==null&&U.value!==e&&U.value.focus(),we()}function St(){S.value!==!0&&(E.value=-1,b.value===!0&&(b.value=!1),K.focused.value===!1&&(L!==null&&(clearTimeout(L),L=null),K.innerLoading.value===!0&&(c(`filterAbort`),K.innerLoading.value=!1,M.value=!1)))}function Ct(e){K.editable.value===!0&&(F===!0?(K.onControlFocusin(e),S.value=!0,n(()=>{K.focus()})):K.focus(),t.onFilter===void 0?(Ae.value!==!0||i[`no-option`]!==void 0)&&(b.value=!0):Z(A.value))}function Q(){S.value=!1,St()}function $(){t.useInput===!0&&ft(t.multiple!==!0&&t.fillInput===!0&&q.value.length!==0&&Y.value(q.value[0])||``,!0,!0)}function wt(e){let n=-1;if(e===!0){if(q.value.length!==0){let e=J.value(q.value[0]);n=t.options.findIndex(t=>C(J.value(t),e))}be(n)}Xe(n)}function Tt(e,t){b.value===!0&&K.innerLoading.value===!1&&(be(-1,!0),n(()=>{b.value===!0&&K.innerLoading.value===!1&&(e>t?be():wt(!0))}))}function Et(){S.value===!1&&W.value!==null&&W.value.updatePosition()}function Dt(e){e!==void 0&&y(e),c(`popupShow`,e),K.hasPopupOpen=!0,K.onControlFocusin(e)}function Ot(e){e!==void 0&&y(e),c(`popupHide`,e),K.hasPopupOpen=!1,K.onControlFocusout(e)}function kt(){F=h.platform.is.mobile!==!0&&t.behavior!==`dialog`?!1:t.behavior!==`menu`&&(t.useInput===!0?i[`no-option`]!==void 0||t.onFilter!==void 0||Ae.value===!1:!0),z=h.platform.is.ios===!0&&F===!0&&t.useInput===!0?`fade`:t.transitionShow}return e(kt),a(Et),kt(),l(()=>{N!==null&&clearTimeout(N),P!==null&&clearTimeout(P)}),Object.assign(f,{showPopup:Ct,hidePopup:Q,removeAtIndex:qe,add:Ye,toggleOption:X,getOptionIndex:()=>E.value,setOptionIndex:Xe,moveOptionSelection:Ze,filter:Z,updateMenuPosition:Et,updateInputValue:ft,isOptionSelected:$e,getEmittingOptionValue:Ke,isOptionDisabled:(...e)=>Ue.value.apply(null,e)===!0,getOptionValue:(...e)=>J.value.apply(null,e),getOptionLabel:(...e)=>Y.value.apply(null,e)}),Object.assign(K,{innerValue:q,fieldClass:u(()=>`q-select q-field--auto-height q-select--with${t.useInput===!0?``:`out`}-input q-select--with${t.useChips===!0?``:`out`}-chips q-select--${t.multiple===!0?`multiple`:`single`}`),inputRef:pe,targetRef:U,hasValue:De,showPopup:Ct,floatingLabel:u(()=>t.hideSelected!==!0&&De.value===!0||typeof A.value==`number`||A.value.length!==0||T(t.displayValue)),getControlChild:()=>{if(K.editable.value!==!1&&(S.value===!0||Ae.value!==!0||i[`no-option`]!==void 0))return F===!0?vt():pt();K.hasPopupOpen===!0&&(K.hasPopupOpen=!1)},controlEvents:{onFocusin(e){K.onControlFocusin(e)},onFocusout(e){K.onControlFocusout(e,()=>{$(),St()})},onClick(e){if(p(e),F!==!0&&b.value===!0){St(),U.value?.focus();return}Ct(e)}},getControl:e=>{let n=st(),r=e===!0||S.value!==!0||F!==!0;if(t.useInput===!0)n.push(lt(e,r));else if(K.editable.value===!0){let i=r===!0?Ie.value:void 0;n.push(s(`input`,{ref:r===!0?U:void 0,key:`d_t`,class:`q-select__focus-target`,id:r===!0?K.targetUid.value:void 0,value:Me.value,readonly:!0,"data-autofocus":e===!0||t.autofocus===!0||void 0,...i,onKeydown:it,onKeyup:tt,onKeypress:rt})),r===!0&&typeof t.autocomplete==`string`&&t.autocomplete.length!==0&&n.push(s(`input`,{class:`q-select__autocomplete-input`,autocomplete:t.autocomplete,tabindex:-1,onKeyup:nt}))}if(ge.value!==void 0&&t.disable!==!0&&We.value.length!==0){let e=We.value.map(e=>s(`option`,{value:e,selected:!0}));n.push(s(`select`,{class:`hidden`,name:ge.value,multiple:t.multiple},e))}return s(`div`,{class:`q-field__native row items-center`,...t.useInput===!0||r!==!0?void 0:K.splitAttrs.attributes.value,...K.splitAttrs.listeners.value},n)},getInnerAppend:()=>t.loading!==!0&&M.value!==!0&&t.hideDropdownIcon!==!0?[s(g,{class:`q-select__dropdown-icon`+(b.value===!0?` rotate-180`:``),name:Be.value})]:null}),k(K)}}),H={AUTO:`auto`,OPUS_47_CLASSIC:`claude-opus-4-7`,OPUS_47_1M:`claude-opus-4-7[1m]`,OPUS_CLASSIC:`claude-opus-4-6`,OPUS_1M:`claude-opus-4-6[1m]`,SONNET_CLASSIC:`claude-sonnet-4-6`,SONNET_1M:`claude-sonnet-4-6[1m]`,HAIKU:`claude-haiku-4-5-20251001`},pe=[{i18nLabelKey:`model.auto`,value:H.AUTO,i18nDescriptionKey:`model.autoDescription`},{i18nLabelKey:`model.opus47Classic`,value:H.OPUS_47_CLASSIC,i18nDescriptionKey:`model.opus47ClassicDescription`},{i18nLabelKey:`model.opus471m`,value:H.OPUS_47_1M,i18nDescriptionKey:`model.opus471mDescription`},{i18nLabelKey:`model.opusClassic`,value:H.OPUS_CLASSIC,i18nDescriptionKey:`model.opusClassicDescription`},{i18nLabelKey:`model.opus1m`,value:H.OPUS_1M,i18nDescriptionKey:`model.opus1mDescription`},{i18nLabelKey:`model.sonnetClassic`,value:H.SONNET_CLASSIC,i18nDescriptionKey:`model.sonnetClassicDescription`},{i18nLabelKey:`model.sonnet1m`,value:H.SONNET_1M,i18nDescriptionKey:`model.sonnet1mDescription`},{i18nLabelKey:`model.haiku`,value:H.HAIKU,i18nDescriptionKey:`model.haikuDescription`}];export{V as n,pe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,E as t,G as n,H as r,J as i,K as a,Q as o,X as s,Y as c,Z as l,l as u,nt as d,q as f,tt as p,w as m}from"./runtime-core.esm-bundler-C3IgBgY5.js";var h,g=e=>h=e,_=Symbol();function v(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var y;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(y||={});var b=typeof window<`u`,x=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function S(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function C(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){O(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function w(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function T(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var E=typeof navigator==`object`?navigator:{userAgent:``},D=/Macintosh/.test(E.userAgent)&&/AppleWebKit/.test(E.userAgent)&&!/Safari/.test(E.userAgent),O=b?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!D?k:`msSaveOrOpenBlob`in E?A:j:()=>{};function k(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?T(r):w(r.href)?C(e,t,n):(r.target=`_blank`,T(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){T(r)},0))}function A(e,t=`download`,n){if(typeof e==`string`)if(w(e))C(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){T(t)})}else navigator.msSaveOrOpenBlob(S(e,n),t)}function j(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return C(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(x.HTMLElement))||`safari`in x,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||D)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:M}=Object;function N(){let e=n(!0),t=e.run(()=>o({})),r=[],i=[],a=c({install(e){g(a),a._a=e,e.provide(_,a),e.config.globalProperties.$pinia=a,i.forEach(e=>r.push(e)),i=[]},use(e){return this._a?r.push(e):i.push(e),this},_p:r,_a:null,_e:e,_s:new Map,state:t});return a}var P=()=>{};function F(e,t,n,r=P){e.push(t);let i=()=>{let n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&a()&&s(i),i}function I(e,...t){e.slice().forEach(e=>{e(...t)})}var L=e=>e(),R=Symbol(),z=Symbol();function B(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],a=e[n];v(a)&&v(r)&&e.hasOwnProperty(n)&&!i(r)&&!f(r)?e[n]=B(a,r):e[n]=r}return e}var V=Symbol();function H(e){return!v(e)||!e.hasOwnProperty(V)}var{assign:U}=Object;function W(e){return!!(i(e)&&e.effect)}function G(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],l;function f(){return s||(n.state.value[e]=i?i():{}),U(d(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=c(u(()=>{g(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return l=K(e,f,t,n,r,!0),l}function K(e,a,s={},c,u,d){let m,h=U({actions:{}},s),_={deep:!0},v,b,x=[],S=[],C=c.state.value[e];!d&&!C&&(c.state.value[e]={}),o({});let w;function T(n){let r;v=b=!1,typeof n==`function`?(n(c.state.value[e]),r={type:y.patchFunction,storeId:e,events:void 0}):(B(c.state.value[e],n),r={type:y.patchObject,payload:n,storeId:e,events:void 0});let i=w=Symbol();t().then(()=>{w===i&&(v=!0)}),b=!0,I(x,r,c.state.value[e])}let E=d?function(){let{state:e}=s,t=e?e():{};this.$patch(e=>{U(e,t)})}:P;function D(){m.stop(),x=[],S=[],c._s.delete(e)}let O=(t,n=``)=>{if(R in t)return t[z]=n,t;let r=function(){g(c);let n=Array.from(arguments),i=[],a=[];function o(e){i.push(e)}function s(e){a.push(e)}I(S,{args:n,name:r[z],store:k,after:o,onError:s});let l;try{l=t.apply(this&&this.$id===e?this:k,n)}catch(e){throw I(a,e),e}return l instanceof Promise?l.then(e=>(I(i,e),e)).catch(e=>(I(a,e),Promise.reject(e))):(I(i,l),l)};return r[R]=!0,r[z]=n,r},k=l({_p:c,$id:e,$onAction:F.bind(null,S),$patch:T,$reset:E,$subscribe(t,n={}){let i=F(x,t,n.detached,()=>a()),a=m.run(()=>r(()=>c.state.value[e],r=>{(n.flush===`sync`?b:v)&&t({storeId:e,type:y.direct,events:void 0},r)},U({},_,n)));return i},$dispose:D});c._s.set(e,k);let A=(c._a&&c._a.runWithContext||L)(()=>c._e.run(()=>(m=n()).run(()=>a({action:O}))));for(let t in A){let n=A[t];i(n)&&!W(n)||f(n)?d||(C&&H(n)&&(i(n)?n.value=C[t]:B(n,C[t])),c.state.value[e][t]=n):typeof n==`function`&&(A[t]=O(n,t),h.actions[t]=n)}return U(k,A),U(p(k),A),Object.defineProperty(k,`$state`,{get:()=>c.state.value[e],set:e=>{T(t=>{U(t,e)})}}),c._p.forEach(e=>{U(k,m.run(()=>e({store:k,app:c._a,pinia:c,options:h})))}),C&&d&&s.hydrate&&s.hydrate(k.$state,C),v=!0,b=!0,k}function q(t,n,r){let i,a,o=typeof n==`function`;typeof t==`string`?(i=t,a=o?r:n):(a=t,i=t.id);function s(t,r){let s=e();return t||=s?m(_,null):null,t&&g(t),t=h,t._s.has(i)||(o?K(i,n,a,t):G(i,a,t)),t._s.get(i)}return s.$id=i,s}export{q as n,N as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,l as t,y as n}from"./runtime-core.esm-bundler-C3IgBgY5.js";import{E as r}from"./QSpinner-CliSLjf8.js";import{n as i,t as a}from"./use-dark-DnuCB6tC.js";function o(e,t=250,n){let r=null;function i(){let i=arguments;r===null?n===!0&&e.apply(this,i):clearTimeout(r),r=setTimeout(()=>{r=null,n!==!0&&e.apply(this,i)},t)}return i.cancel=()=>{r!==null&&clearTimeout(r)},i}var s={true:`inset`,item:`item-inset`,"item-thumbnail":`item-thumbnail-inset`},c={xs:2,sm:4,md:8,lg:16,xl:24},l=r({name:`QSeparator`,props:{...i,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(r){let i=a(r,n().proxy.$q),o=t(()=>r.vertical===!0?`vertical`:`horizontal`),l=t(()=>` q-separator--${o.value}`),u=t(()=>r.inset===!1?``:`${l.value}-${s[r.inset]}`),d=t(()=>`q-separator${l.value}${u.value}`+(r.color===void 0?``:` bg-${r.color}`)+(i.value===!0?` q-separator--dark`:``)),f=t(()=>{let e={};if(r.size!==void 0&&(e[r.vertical===!0?`width`:`height`]=r.size),r.spaced!==!1){let t=r.spaced===!0?`${c.md}px`:r.spaced in c?`${c[r.spaced]}px`:r.spaced,n=r.vertical===!0?[`Left`,`Right`]:[`Top`,`Bottom`];e[`margin${n[0]}`]=e[`margin${n[1]}`]=t}return e});return()=>e(`hr`,{class:d.value,style:f.value,"aria-orientation":o.value})}}),u={name:String};function d(t={}){return(n,r,i)=>{n[r](e(`input`,{class:`hidden`+(i||``),...t.value}))}}function f(e){return t(()=>e.name||e.for)}export{o as a,l as i,f as n,u as r,d as t};
|