@preventive/triage 1.0.0-alpha.6 → 1.0.0-alpha.61
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/LICENSE-APACHE +202 -0
- package/README.md +16 -0
- package/api/reap.ts +17 -0
- package/cli.js +6 -0
- package/client/dependency-paths.d.ts +3 -0
- package/client/dependency-paths.js +36 -0
- package/client/finding-link.js +305 -0
- package/client/linked-findings.d.ts +1 -0
- package/client/linked-findings.js +115 -0
- package/common/bundle-commit.d.ts +1 -0
- package/common/bundle-commit.js +4 -0
- package/common/bundle-compare-diff.d.ts +3 -0
- package/common/bundle-compare-diff.js +376 -0
- package/common/bundle-compare-inputs.d.ts +3 -0
- package/common/bundle-compare-inputs.js +141 -0
- package/common/bundle-compare-versions.js +172 -0
- package/common/bundle-comparison.d.ts +8 -0
- package/common/bundle-comparison.js +69 -0
- package/common/bundle-metadata.d.ts +15 -0
- package/common/bundle-metadata.js +226 -0
- package/common/bundle-pkg-of.d.ts +1 -0
- package/common/bundle-pkg-of.js +90 -0
- package/common/bundle-reasons.d.ts +2 -0
- package/common/bundle-reasons.js +21 -0
- package/common/bundle-source-links.d.ts +6 -0
- package/common/bundle-source-links.js +216 -0
- package/common/bundle-sourcemap.d.ts +10 -0
- package/common/bundle-sourcemap.js +100 -0
- package/common/bundle-sources.d.ts +7 -0
- package/common/bundle-sources.js +333 -0
- package/common/bundle-stats.js +41 -0
- package/common/bundle-tabs.js +1 -0
- package/common/code-language.js +65 -0
- package/common/default-scan-models.ts +36 -0
- package/common/dependency-reviews.d.ts +18 -0
- package/common/dependency-reviews.js +64 -0
- package/common/finding-duplicates.js +58 -0
- package/common/finding-filters.js +274 -0
- package/common/finding-id.js +47 -0
- package/common/finding-repo.d.ts +5 -0
- package/common/finding-repo.js +67 -0
- package/common/github-issue-labels.d.ts +1 -0
- package/common/github-issue-labels.js +11 -0
- package/common/github-pr.ts +56 -0
- package/common/gzip.js +59 -0
- package/common/line-diff.d.ts +8 -0
- package/common/line-diff.js +57 -0
- package/common/linked-workspace-groups.js +63 -0
- package/common/managed/agent-tasks.ts +292 -0
- package/common/managed/comments.ts +43 -0
- package/common/managed/finding-detail.d.ts +5 -0
- package/common/managed/finding-detail.js +75 -0
- package/common/managed/finding-values.d.ts +2 -0
- package/common/managed/finding-values.js +44 -0
- package/common/managed/github-agents.ts +114 -0
- package/common/managed/github-logins.ts +49 -0
- package/common/managed/lite-name.d.ts +2 -0
- package/common/managed/lite-name.js +20 -0
- package/common/managed/npm-packages.d.ts +7 -0
- package/common/managed/npm-packages.js +51 -0
- package/common/managed/permissions.ts +31 -0
- package/common/managed/report-content.ts +72 -0
- package/common/managed/report-filter.ts +120 -0
- package/common/managed/repository-alias.ts +65 -0
- package/common/managed/roles.ts +35 -0
- package/common/managed/routes.d.ts +2 -0
- package/common/managed/routes.js +363 -0
- package/common/managed/scan-models.ts +6 -0
- package/common/managed/team-app.d.ts +15 -0
- package/common/managed/team-app.js +100 -0
- package/common/managed/team-filters.js +26 -0
- package/common/managed/triage.ts +83 -0
- package/common/managed/upload-seal.ts +126 -0
- package/common/pretty-print.d.ts +5 -0
- package/common/pretty-print.js +24 -0
- package/common/repo-commit.d.ts +4 -0
- package/common/repo-commit.js +30 -0
- package/common/revalidation-conflicts.js +48 -0
- package/common/revalidation-input-groups.js +56 -0
- package/common/save-error-reason.ts +20 -7
- package/common/scan-server.ts +13 -0
- package/common/security-links.d.ts +5 -0
- package/common/security-links.js +33 -0
- package/common/server-info.ts +46 -0
- package/common/utf8.d.ts +3 -0
- package/common/utf8.js +45 -0
- package/common/workspace-app.js +71 -0
- package/common/workspace-groups.js +176 -0
- package/out/activity.js +4 -0
- package/out/brotli-fallback.js +3 -3
- package/out/chunk-2XUEZHIP.js +28 -0
- package/out/chunk-4EMM6UCD.js +1 -0
- package/out/chunk-4ISO5F7Y.js +7 -0
- package/out/chunk-4XIH7YTX.js +1 -0
- package/out/chunk-6CCSTJWB.js +1 -0
- package/out/chunk-74AEKRES.js +10 -0
- package/out/chunk-7BKKYVWR.js +7 -0
- package/out/chunk-7C7DWL7I.js +1 -0
- package/out/chunk-B3FNMHOE.js +1 -0
- package/out/chunk-BNH52UHC.js +2 -0
- package/out/chunk-BRO77PQY.js +42 -0
- package/out/chunk-C4Z6ZBXV.js +10 -0
- package/out/chunk-DEVAORP2.js +1 -0
- package/out/chunk-E3LFSUDJ.js +9 -0
- package/out/chunk-G3LY2FV4.js +1 -0
- package/out/chunk-GO7FT4OD.js +1 -0
- package/out/chunk-GRGIZOTP.js +4 -0
- package/out/chunk-HAZKDK4M.js +4 -0
- package/out/chunk-HOB3YPS5.js +1 -0
- package/out/chunk-IYPY47MC.js +1 -0
- package/out/chunk-IZ6MYRYB.js +3 -0
- package/out/chunk-J2FWBXFV.js +1 -0
- package/out/chunk-JCIIBLKR.js +1 -0
- package/out/chunk-JFL7WLRV.js +1 -0
- package/out/chunk-JJK5OZG2.js +15 -0
- package/out/chunk-JMG5DXII.js +2 -0
- package/out/chunk-JOXLZXMI.js +1 -0
- package/out/chunk-M37X4LCF.js +14 -0
- package/out/chunk-M3Y6SLC4.js +1 -0
- package/out/chunk-NRPC74AM.js +1 -0
- package/out/chunk-NXATZJQ2.js +1 -0
- package/out/chunk-OFZYEWBH.js +244 -0
- package/out/chunk-OIERSXON.js +1 -0
- package/out/chunk-OOJM4CTU.js +1 -0
- package/out/chunk-PAD2JHZT.js +1 -0
- package/out/chunk-PNHBZGDD.js +1 -0
- package/out/chunk-PTFQKLKO.js +1 -0
- package/out/chunk-PWFUOLZK.js +17 -0
- package/out/chunk-PXK7EU4V.js +1 -0
- package/out/chunk-QCOGVL37.js +52 -0
- package/out/chunk-QMVOEBWC.js +13 -0
- package/out/chunk-QRKFPLA4.js +80 -0
- package/out/chunk-R3NZFXVR.js +1 -0
- package/out/chunk-R5O6FAW4.js +2 -0
- package/out/chunk-RRBIJL2B.js +1 -0
- package/out/chunk-SYXT3SFP.js +2 -0
- package/out/chunk-TOXMUOIW.js +5 -0
- package/out/chunk-TUII34K2.js +1 -0
- package/out/chunk-UCP3JRE2.js +1 -0
- package/out/chunk-VFWMQ3LG.js +2 -0
- package/out/chunk-VRX2APNA.js +9 -0
- package/out/chunk-W3QFV4SP.js +3 -0
- package/out/chunk-W6VOKW2N.js +12 -0
- package/out/chunk-WCPJDAYA.js +10 -0
- package/out/chunk-WMFDQS2L.js +11 -0
- package/out/chunk-WREU7JAG.js +1 -0
- package/out/chunk-Y5ZHFNBD.js +2 -0
- package/out/chunk-YF4M5OCI.js +1 -0
- package/out/chunk-Z667U2UJ.js +1 -0
- package/out/chunk-ZQHLECTI.js +1 -0
- package/out/chunk-ZQNEWVGG.js +1 -0
- package/out/client-managed-import.js +4 -0
- package/out/client-managed.js +34 -0
- package/out/client-sync.js +11 -17
- package/out/compare.js +40 -0
- package/out/dialogs.js +40 -0
- package/out/github-issue-authorized.html +3 -0
- package/out/github-issue-authorized.js +1 -0
- package/out/graph.js +19 -4
- package/out/index.html +106 -8
- package/out/prism.js +14 -10
- package/out/scan.js +2 -0
- package/out/stasis.svg +20 -0
- package/out/terminal.js +366 -39
- package/out/view.css +1 -1
- package/out/view.js +19 -144
- package/package.json +383 -63
- package/risk/actions/findings.js +161 -0
- package/risk/actions/resolve.js +250 -0
- package/risk/actions/scripts/commands.js +182 -0
- package/risk/actions/scripts/grade.js +113 -0
- package/risk/actions/scripts/packages.js +123 -0
- package/risk/actions/scripts/shell.js +169 -0
- package/risk/actions/uses.js +76 -0
- package/risk/actions/workflow.js +110 -0
- package/risk/files/characters.js +196 -0
- package/risk/files/hosts.js +205 -0
- package/risk/files/readability.js +177 -0
- package/risk/files/runs-code.js +615 -0
- package/risk/files/script.js +118 -0
- package/risk/files/stamps.js +47 -0
- package/risk/index.d.ts +272 -0
- package/risk/index.js +11 -0
- package/risk/npm/assess.js +285 -0
- package/risk/npm/combined.js +68 -0
- package/risk/npm/compare.js +257 -0
- package/risk/npm/dependencies.js +172 -0
- package/risk/npm/diff.js +79 -0
- package/risk/npm/downloads.js +84 -0
- package/risk/npm/files.js +445 -0
- package/risk/npm/held.js +63 -0
- package/risk/npm/install-scripts.js +34 -0
- package/risk/npm/malware.js +38 -0
- package/risk/npm/manifest.js +65 -0
- package/risk/npm/new-dependency.js +60 -0
- package/risk/npm/old-version.js +108 -0
- package/risk/npm/registry.js +390 -0
- package/risk/npm/release.js +85 -0
- package/risk/npm/score.js +59 -0
- package/risk/npm/specs.js +124 -0
- package/risk/npm/tarball.js +96 -0
- package/server-common/database-config.ts +16 -0
- package/server-common/initialize.ts +18 -0
- package/server-common/npm-advisories.ts +101 -0
- package/{server → server-common}/origin.ts +5 -5
- package/server-common/reap.ts +48 -0
- package/server-common/scan-config.ts +19 -0
- package/server-common/standalone.ts +29 -0
- package/server-common/storage-crypto.ts +182 -0
- package/server-common/storage-log.ts +38 -0
- package/server-common/vercel-blob.ts +103 -0
- package/server-e2e/app.ts +487 -0
- package/{server → server-e2e}/bus-receiver.ts +2 -1
- package/{server → server-e2e}/cli.js +9 -4
- package/{server → server-e2e}/config.ts +50 -42
- package/{server → server-e2e}/db-neon.ts +2 -2
- package/{server → server-e2e}/db-revision-sql.ts +1 -1
- package/{server → server-e2e}/db-stmt.ts +2 -2
- package/{server → server-e2e}/db.ts +7 -7
- package/{server → server-e2e}/http.ts +44 -13
- package/{server → server-e2e}/hub.ts +40 -9
- package/server-e2e/index.ts +17 -0
- package/server-e2e/lifecycle.ts +95 -0
- package/{server → server-e2e}/neon-driver.ts +2 -2
- package/{server → server-e2e}/npm-proxy.ts +12 -145
- package/{server → server-e2e}/objstore/blob-vercel.ts +10 -114
- package/{server → server-e2e}/objstore/blob.ts +1 -1
- package/{server → server-e2e}/objstore/fetch-mint-guard.ts +2 -2
- package/{server → server-e2e}/objstore/handlers.ts +9 -8
- package/{server → server-e2e}/objstore/init.ts +19 -27
- package/{server → server-e2e}/objstore/reaper.ts +1 -1
- package/{server → server-e2e}/objstore/rest-deny.ts +1 -1
- package/{server → server-e2e}/objstore/rest-mint.ts +3 -3
- package/{server → server-e2e}/objstore/rest.ts +3 -3
- package/{server → server-e2e}/objstore/store-neon.ts +6 -10
- package/{server → server-e2e}/objstore/store.ts +7 -7
- package/{server → server-e2e}/objstore/tokens.ts +2 -2
- package/{server → server-e2e}/pubsub.ts +12 -9
- package/{server → server-e2e}/sign.ts +4 -4
- package/{server → server-e2e}/sse-server.ts +60 -33
- package/{server → server-e2e}/static.ts +31 -21
- package/{server → server-e2e}/sync-handlers.ts +64 -30
- package/{server → server-e2e}/ws-server.ts +20 -9
- package/server-managed/activity.ts +238 -0
- package/server-managed/agent-merges.ts +109 -0
- package/server-managed/app-agents.ts +23 -0
- package/server-managed/avatar-store.ts +13 -0
- package/server-managed/blob-store.ts +26 -0
- package/server-managed/brotli.ts +10 -0
- package/server-managed/bundle-advisories.ts +103 -0
- package/server-managed/bundle-advisory-inventory.ts +77 -0
- package/server-managed/bundle-build-diagnostics.d.ts +10 -0
- package/server-managed/bundle-build-diagnostics.js +23 -0
- package/server-managed/bundle-build-leases.ts +41 -0
- package/server-managed/bundle-build-worker.js +238 -0
- package/server-managed/bundle-build.ts +240 -0
- package/server-managed/bundle-cache.ts +199 -0
- package/server-managed/bundle-catalog.ts +29 -0
- package/server-managed/bundle-commits.ts +133 -0
- package/server-managed/bundle-dependency-reviews.ts +68 -0
- package/server-managed/bundle-store.ts +24 -0
- package/server-managed/bundle-summary-cache.ts +139 -0
- package/server-managed/bundle-validation.ts +33 -0
- package/server-managed/bundle.ts +119 -0
- package/server-managed/cache-storage.ts +20 -0
- package/server-managed/cli.js +21 -0
- package/server-managed/combined.ts +43 -0
- package/server-managed/comments.ts +138 -0
- package/server-managed/commit-coauthors.ts +105 -0
- package/server-managed/commit-lockfiles.ts +77 -0
- package/server-managed/comparison.ts +50 -0
- package/server-managed/config.ts +163 -0
- package/server-managed/content-access.ts +15 -0
- package/server-managed/crypto.ts +25 -0
- package/server-managed/db-methods.ts +1877 -0
- package/server-managed/db-neon.ts +388 -0
- package/server-managed/db-schema.ts +253 -0
- package/server-managed/db-table-names.ts +22 -0
- package/server-managed/db.ts +146 -0
- package/server-managed/dependabot-access.ts +61 -0
- package/server-managed/dependabot-alerts.ts +180 -0
- package/server-managed/dependency-review-comments.ts +92 -0
- package/server-managed/dependency-reviews.ts +363 -0
- package/server-managed/github-accounts.ts +59 -0
- package/server-managed/github-actions.ts +71 -0
- package/server-managed/github-app.ts +347 -0
- package/server-managed/github-errors.ts +70 -0
- package/server-managed/github-graphql.ts +42 -0
- package/server-managed/github-issue-links.ts +264 -0
- package/server-managed/github-issue-oauth.ts +30 -0
- package/server-managed/github-issues.ts +157 -0
- package/server-managed/github-link-oauth.ts +56 -0
- package/server-managed/github-links.ts +204 -0
- package/server-managed/github-metadata.ts +213 -0
- package/server-managed/github-oauth.ts +264 -0
- package/server-managed/github-pulls.ts +257 -0
- package/server-managed/github-requests.ts +179 -0
- package/server-managed/github-users.ts +30 -0
- package/server-managed/github-values.ts +26 -0
- package/server-managed/history-windows.ts +172 -0
- package/server-managed/http-response.ts +76 -0
- package/server-managed/http.ts +5796 -0
- package/server-managed/import-triage.ts +51 -0
- package/server-managed/index.ts +204 -0
- package/server-managed/kept-briefly.ts +37 -0
- package/server-managed/kept.ts +28 -0
- package/server-managed/link-reports.ts +149 -0
- package/server-managed/listed-activity.ts +39 -0
- package/server-managed/locked-packages.ts +152 -0
- package/server-managed/lockfile-scope.ts +49 -0
- package/server-managed/lru.ts +30 -0
- package/server-managed/managed-issues.ts +92 -0
- package/server-managed/management-catalog.ts +45 -0
- package/server-managed/management.ts +110 -0
- package/server-managed/npm-delta-worker.js +23 -0
- package/server-managed/npm-delta.ts +159 -0
- package/server-managed/npm-insights.ts +455 -0
- package/server-managed/npm-kept.ts +234 -0
- package/server-managed/npm-loads.ts +259 -0
- package/server-managed/npm-manifest.ts +117 -0
- package/server-managed/npm-packages.ts +462 -0
- package/server-managed/npm-patch.ts +317 -0
- package/server-managed/npm-provenance.ts +127 -0
- package/server-managed/npm-risk.ts +287 -0
- package/server-managed/object-storage-disk.ts +147 -0
- package/server-managed/object-storage-vercel.ts +71 -0
- package/server-managed/object-storage.ts +82 -0
- package/server-managed/package-entry-points.ts +79 -0
- package/server-managed/pretty-print.ts +425 -0
- package/server-managed/public-workspace.ts +242 -0
- package/server-managed/pull-comment-reviews.ts +161 -0
- package/server-managed/pull-dependencies.ts +340 -0
- package/server-managed/pull-dependency-reviews.ts +327 -0
- package/server-managed/pull-reviews.ts +202 -0
- package/server-managed/queue.ts +53 -0
- package/server-managed/release-commits.ts +85 -0
- package/server-managed/rename-diff-worker.js +26 -0
- package/server-managed/rename-diff.ts +236 -0
- package/server-managed/repo-path.ts +21 -0
- package/server-managed/report-migration.ts +32 -0
- package/server-managed/report-query.ts +10 -0
- package/server-managed/report-response.ts +16 -0
- package/server-managed/report-sources.ts +181 -0
- package/server-managed/report-store.ts +77 -0
- package/server-managed/repository-actions.ts +220 -0
- package/server-managed/repository-agents.ts +422 -0
- package/server-managed/repository-aliases.ts +85 -0
- package/server-managed/repository-browser.ts +303 -0
- package/server-managed/repository-changes.ts +280 -0
- package/server-managed/repository-code.ts +215 -0
- package/server-managed/repository-dependency-reviews.ts +159 -0
- package/server-managed/repository-discovery.ts +83 -0
- package/server-managed/repository-history.ts +428 -0
- package/server-managed/repository-issues.ts +224 -0
- package/server-managed/repository-policy.ts +27 -0
- package/server-managed/repository-pulls.ts +207 -0
- package/server-managed/repository-pulse.ts +477 -0
- package/server-managed/repository-risk-assess.ts +108 -0
- package/server-managed/repository-risk-audit.ts +78 -0
- package/server-managed/repository-risk-read.ts +170 -0
- package/server-managed/repository-risk.ts +483 -0
- package/server-managed/repository-squashes.ts +160 -0
- package/server-managed/repository-stamp.ts +41 -0
- package/server-managed/request-timing.ts +63 -0
- package/server-managed/reviewed-dependencies.ts +149 -0
- package/server-managed/revisions.ts +35 -0
- package/server-managed/scan-downloads.ts +87 -0
- package/server-managed/session.ts +132 -0
- package/server-managed/slugs.ts +38 -0
- package/server-managed/solidity-entry-points.ts +71 -0
- package/server-managed/sql-postgres.ts +34 -0
- package/server-managed/sql.ts +107 -0
- package/server-managed/stasis-config.ts +55 -0
- package/server-managed/static.ts +28 -0
- package/server-managed/storage-command.ts +16 -0
- package/server-managed/storage-db.ts +183 -0
- package/server-managed/storage-encryption.ts +288 -0
- package/server-managed/storage-maintenance.ts +259 -0
- package/server-managed/storage-payload.ts +121 -0
- package/server-managed/storage-stores.ts +91 -0
- package/server-managed/storage.ts +82 -0
- package/server-managed/team-app-summaries.ts +54 -0
- package/server-managed/team-app.ts +154 -0
- package/server-managed/team-catalog.ts +7 -0
- package/server-managed/team-feed.ts +180 -0
- package/server-managed/team-npm-scopes.ts +103 -0
- package/server-managed/team-reports.ts +351 -0
- package/server-managed/triage-response.ts +16 -0
- package/server-managed/type-only-proof.js +108 -0
- package/server-managed/type-only-worker.js +31 -0
- package/server-managed/type-only.ts +115 -0
- package/server-managed/uploads.ts +106 -0
- package/server-managed/upstream-cache.ts +250 -0
- package/server-managed/view-as.ts +58 -0
- package/server-managed/worker-turns.ts +76 -0
- package/server-managed/workspace-shares.ts +170 -0
- package/server.ts +70 -0
- package/server/index.ts +0 -480
- package/server/lifecycle.ts +0 -208
- /package/{LICENSE → LICENSE-MIT} +0 -0
- /package/{server → server-e2e}/auth.ts +0 -0
- /package/{server → server-e2e}/config.example.json +0 -0
- /package/{server → server-e2e}/objstore/blob-fs.ts +0 -0
- /package/{server → server-e2e}/objstore/fs.ts +0 -0
- /package/{server → server-e2e}/objstore/sign.ts +0 -0
- /package/{server → server-e2e}/peer.ts +0 -0
- /package/{server → server-e2e}/sse-session.ts +0 -0
- /package/{server → server-e2e}/util.ts +0 -0
- /package/{server → server-e2e}/validation.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as e}from"./chunk-4EMM6UCD.js";import{C as t,H as n,J as r,K as i,L as a,R as o,a as s,c,d as l,e as u,g as d,h as f,i as p,m,p as h,u as ee}from"./chunk-UCP3JRE2.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{d as g,f as te,h as _,i as v,j as ne,m as re,n as ie}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var y=e=>e.replace(/^[ \t\n\r\0\v]+|[ \t\n\r\0\v]+$/gu,``),b=e=>e.replace(/[A-Z]+/gu,e=>e.toLowerCase()),x=e=>e===void 0||e===``||e===`0`,S=e=>e!==void 0&&e>=`0`&&e<=`9`,ae=e=>S(e)||/^[A-Za-z]$/u.test(e??``);function oe(e){let t=e[0];for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1],a=t.at(-1)===`.`?``:`.`;r===`-`||r===`_`||r===`+`?t+=a:!S(i)&&i!==`.`&&S(r)||S(i)&&!S(r)&&r!==`.`?t+=`${a}${r}`:ae(r)?t+=r:t+=a}return t.endsWith(`.`)?t.slice(0,-1):t}var se=[[`dev`,0],[`alpha`,1],[`a`,1],[`beta`,2],[`b`,2],[`RC`,3],[`rc`,3],[`#`,4],[`pl`,5],[`p`,5]],C=e=>se.find(([t])=>e.startsWith(t))?.[1]??-1,w=e=>e>0?1:e<0?-1:0,T=2n**63n-1n,ce=e=>e<=T&&e>=-T-1n,le=e=>{let t=BigInt(/^\d+/u.exec(e)[0]);return t>T?T:t};function ue(e,t){return S(e[0])&&S(t[0])?w(Number(le(e)-le(t))):!S(e[0])&&!S(t[0])?w(C(e)-C(t)):S(e[0])?w(C(`#N#`)-C(t)):w(C(e)-C(`#N#`))}var de=new TextEncoder,fe=e=>/^[\0-\u007F]*$/u.test(e)?e:String.fromCodePoint(...de.encode(e));function pe(e,t){if(e===``||t===``)return e===t?0:e===``?-1:1;let n=e[0]===`#`?e:oe(e),r=t[0]===`#`?t:oe(t),[i,a,o,s,c]=[0,0,0,0,0];for(;i<n.length&&a<r.length&&o!==-1&&s!==-1&&(o=n.indexOf(`.`,i),s=r.indexOf(`.`,a),c=ue(n.slice(i,o===-1?void 0:o),r.slice(a,s===-1?void 0:s)),c===0);)o!==-1&&(i=o+1),s!==-1&&(a=s+1);return c===0?o===-1?s===-1?0:S(r[a])?-1:pe(`#N#`,r.slice(a)):S(n[i])?1:pe(n.slice(i),`#N#`):c}var me=(e,t)=>pe(fe(e),fe(t)),he={"==":e=>e===0,"!=":e=>e!==0,"<":e=>e<0,"<=":e=>e<=0,">":e=>e>0,">=":e=>e>=0},ge=(e,t,n)=>he[n](me(e,t)),E=(t,n)=>w(e(t,n)),_e=/^[ \t\n\r\v\f]*[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[ \t\n\r\v\f]*$/u;function ve(e){if(!_e.test(e))return;let t=e.trim();if(!/[.eE]/u.test(t)){let e=BigInt(t);return ce(e)?{long:e}:{double:Number(t),overflow:e>0n?1:-1}}return{double:Number(t),overflow:0}}function ye(e,t){let n=ve(e),r=ve(t);return n===void 0||r===void 0||n.overflow!==void 0&&n.overflow!==0&&n.overflow===r.overflow&&n.double-r.double===0?E(e,t):n.double!==void 0||r.double!==void 0?n.double===void 0?r.overflow===0?w(Number(n.long)-r.double):-r.overflow:r.double===void 0?n.overflow===0?w(n.double-Number(r.long)):n.overflow:n.double===r.double&&!Number.isFinite(n.double)?E(e,t):w(n.double-r.double):w(Number(n.long-r.long))}var be=/^(?:0|-?[1-9]\d*)$/u;function xe(e){if(!be.test(e))return e;let t=BigInt(e);return ce(t)?t:e}function Se(e,t){let n=xe(e),r=xe(t);if(typeof n==`bigint`&&typeof r==`bigint`)return n>r?1:-1;if(typeof n==`string`&&typeof r==`string`)return ye(n,r);let[i,a,o]=typeof n==`bigint`?[n,r,1]:[r,n,-1],s=ve(a);return s?.long===void 0?s?.double===void 0?o*E(String(i),a):o*w(Number(i)-s.double):o*w(Number(i-s.long))}var D=511,Ce=new WeakMap,O=e=>Ce.get(e)??Object.keys(e),we=e=>c(e)&&O(e).length===0,Te=e=>e.every((e,t)=>e===String(t)),k=(e,t)=>{let n=1;for(let r=e.indexOf(`
|
|
2
|
+
`);r!==-1&&r<t;r=e.indexOf(`
|
|
3
|
+
`,r+1))n++;return n},A=(e,t,n=e.pos)=>ne(t,k(e.text,n)-1);function j(e){let{text:t,pos:n}=e;if(n>=t.length)return`the end of the file`;if(t[n]===`
|
|
4
|
+
`)return`an LF line end`;if(t.startsWith(`\r
|
|
5
|
+
`,n))return`a CRLF line end`;let r=t.indexOf(`
|
|
6
|
+
`,n);return _(t.slice(n,r===-1?t.length:t[r-1]===`\r`?r-1:r))}function Ee(e,t,n){if(!e.text.startsWith(t,e.pos))throw A(e,`expected ${n()}, as Composer writes it, found ${j(e)}`);e.pos+=t.length}function M(e,t){e.lines[t]??=`${e.eol}${e.indent.repeat(t)}`,Ee(e,e.lines[t],()=>t===0?`a line end`:`a line end and ${t===1?``:`${t} times `}${_(e.indent)} of indentation`)}var De=e=>JSON.stringify(e).replaceAll(`\u2028`,`\\u2028`).replaceAll(`\u2029`,`\\u2029`);function Oe(e){let{text:t,pos:n}=e;if(t[n]!==`"`)throw A(e,`expected a string, found ${j(e)}`);let r=n+1;for(;r<t.length&&t[r]!==`"`&&t[r]!==`
|
|
7
|
+
`;)r+=t[r]===`\\`?2:1;if(t[r]!==`"`)throw A(e,`a string with no closing quote`);let i=t.slice(n,r+1);if(e.pos=r+1,!ke.test(i))return i.slice(1,-1);let a=te(()=>JSON.parse(i),()=>{throw A(e,`${_(i)} is not a string as JSON writes it`,n)});if(!a.isWellFormed())throw A(e,`${_(i)} escapes a lone surrogate, which PHP does not read`,n);if(De(a)!==i)throw A(e,`${_(i)} is not written as Composer writes it, ${_(De(a))}`,n);return a}var ke=/[\\\p{Cc}\u2028\u2029\p{Cs}]/u;function Ae(e){if(e===0)return Object.is(e,-0)?`-0`:`0`;let t=e<0?`-`:``,[n,r]=Math.abs(e).toExponential().split(`e`),i=n.replace(`.`,``),a=Number(r)+1;return a<-3||a>17?`${t}${i[0]}.${i.slice(1)||`0`}e${a>0?`+`:`-`}${Math.abs(a-1)}`:a<=0?`${t}0.${`0`.repeat(-a)}${i}`:i.length<=a?`${t}${i}${`0`.repeat(a-i.length)}`:`${t}${i.slice(0,a)}.${i.slice(a)}`}var je=/-?(?:0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/uy,Me=([e,t,n])=>t===void 0&&n===void 0&&ce(BigInt(e));function Ne(e){let t=ie(e,je);if(t===null)throw A(e,`expected a value, found ${j(e)}`);let[n]=t,r=Me(t),i=Number(n);if(!Number.isFinite(i))throw A(e,`${n} is past what PHP reads as a number`);let a=r?BigInt(n).toString():Ae(i);if(a!==n)throw A(e,`${n} is not written as Composer writes it, ${a}`);return r&&!Number.isSafeInteger(i)?BigInt(n):i}var Pe=[[`true`,!0],[`false`,!1],[`null`,null]];function Fe(e){let t=Pe.find(([t])=>e.text.startsWith(t,e.pos));return t!==void 0&&(e.pos+=t[0].length),t}function Ie(e,t){let n=e.text[e.pos];if(n===`{`)return Re(e,t);if(n===`[`)return ze(e,t);if(n===`"`)return Oe(e);let r=Fe(e);return r===void 0?Ne(e):r[1]}function Le(e,t){if(t===D)throw A(e,`nested more than ${D} deep, which PHP does not read`);e.pos++}function Re(e,t){let n=e.pos;Le(e,t);let r=Object.create(null);if(e.text[e.pos]===`}`){if(t!==1)throw A(e,`an empty object, which Composer writes as "[]"`,n);return e.pos++,r}let i=new Map;for(let n=!0;n;){M(e,t+1);let a=e.pos,o=Oe(e);if(i.has(o))throw A(e,`${_(o)} is a key at line ${k(e.text,i.get(o))} too`,a);i.set(o,a),Ee(e,`: `,()=>`": " after ${_(o)}`),r[o]=Ie(e,t+1),n=e.text[e.pos]===`,`,n&&e.pos++}M(e,t),Ee(e,`}`,()=>`"}"`);let a=[...i.keys()];if(Te(a))throw A(e,`an object of the keys 0 to ${a.length-1}, which Composer writes as a list`,n);return Ce.set(r,a),r}function ze(e,t){Le(e,t);let n=[];if(e.text[e.pos]===`]`)return e.pos++,n;for(let r=!0;r;)M(e,t+1),n.push(Ie(e,t+1)),r=e.text[e.pos]===`,`,r&&e.pos++;return M(e,t),Ee(e,`]`,()=>`"]"`),n}var Be=/^<<<<<<< /mu;function Ve(e){let t=Be.exec(e);if(t!==null)throw new g(`a merge conflict at line ${k(e,t.index)}, which Composer reads as a lockfile of no content-hash where its sides differ in that alone`);let[n,r]=re(e,`Composer`),i={text:e,pos:0,eol:n,indent:r,lines:[]},a=Re(i,0);if(M(i,0),i.pos!==e.length)throw A(i,`expected the end of the file after the last "}", found ${j(i)}`);return a}var He=/[ \t\n\r]*/uy,N=e=>ie(e,He),P=(e,t)=>new g(`not JSON as PHP reads it: ${t} at line ${k(e.text,e.pos)}`,e.where);function Ue(e){let{text:t,pos:n}=e,r=n+1;for(;r<t.length&&t[r]!==`"`;)r+=t[r]===`\\`?2:1;if(r>=t.length)throw P(e,`a string with no closing quote`);let i=te(()=>JSON.parse(t.slice(n,r+1)),()=>{throw P(e,`${_(t.slice(n,r+1))} is not a string`)});if(!i.isWellFormed())throw P(e,`a lone surrogate, which is not UTF-8`);return e.pos=r+1,i}function We(e,t){N(e);let n=e.text[e.pos];if(n===`{`||n===`[`){if(t===D)throw P(e,`nested more than ${D} deep`);let r=n===`{`,i=r?`}`:`]`,a=r?new Map:[];if(e.pos++,N(e),e.text[e.pos]===i)return e.pos++,a;for(;;){if(r){if(N(e),e.text[e.pos]!==`"`)throw P(e,`expected a key, found ${j(e)}`);let n=Ue(e);if(N(e),e.text[e.pos]!==`:`)throw P(e,`expected ":", found ${j(e)}`);e.pos++,a.set(n,We(e,t+1))}else a.push(We(e,t+1));N(e);let n=e.text[e.pos];if(n!==i&&n!==`,`)throw P(e,`expected "," or ${_(i)}, found ${j(e)}`);if(e.pos++,n===i)return a}}if(n===`"`)return Ue(e);let r=Fe(e);if(r!==void 0)return r[1];let i=ie(e,je);if(i===null)throw P(e,`expected a value, found ${j(e)}`);return Me(i)?BigInt(i[0]):Number(i[0])}function Ge(e,t){if(typeof e==`number`)return Number.isFinite(e)?void 0:t;if(e instanceof Map||Array.isArray(e))for(let[n,r]of e.entries()){let i=Ge(r,Array.isArray(e)?`${t}[${n}]`:v(t,n));if(i!==void 0)return i}}function Ke(e,t){let n={text:e,pos:0,where:t},r=We(n,0);if(N(n),n.pos!==e.length)throw P(n,`expected the end of the file, found ${j(n)}`);let i=Ge(r,t);if(i!==void 0)throw new g(`a number past what a double holds, which Composer refuses of the file`,i);return r}var qe=e=>`\\u${e.toString(16).padStart(4,`0`)}`;function Je(e){let t=``;for(let n of e){let e=n.codePointAt(0);t+=e<128?n:e<65536?qe(e):qe(55296+(e-65536>>10))+qe(56320+(e-65536&1023))}return t}function F(e){if(e===null||typeof e==`boolean`)return String(e);if(typeof e==`bigint`)return e.toString();if(typeof e==`number`)return Ae(e);if(typeof e==`string`)return Je(JSON.stringify(e).replaceAll(`/`,`\\/`));if(Array.isArray(e))return`[${e.map(F).join(`,`)}]`;let t=[...e.keys()];return Te(t)?`[${[...e.values()].map(F).join(`,`)}]`:`{${t.map(t=>`${F(t)}:${F(e.get(t))}`).join(`,`)}}`}var I=`[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\\d+)*)?)?([.-]?dev)?`,Ye=`stable|RC|beta|alpha|dev`,Xe=`[\\t\\n\\v\\f\\r ]`,Ze=`[^\\t\\n\\v\\f\\r ]`,Qe=`[^,\\t\\n\\v\\f\\r ]`,$e=`9999999-dev`,L=(e,t=``)=>new RegExp(e,t||`u`),et=L(`^(${Qe}+) +as +(${Qe}+)$`),tt=L(`@(?:${Ye})$`,`i`),nt=L(`^([^,\\t\\n\\v\\f\\r +]+)\\+${Ze}+$`),rt=L(`^v?(\\d{1,5})(\\.\\d+)?(\\.\\d+)?(\\.\\d+)?${I}$`,`i`),it=L(`^v?(\\d{4}(?:[.:-]?\\d{2}){1,6}(?:[.:-]?\\d{1,3}){0,2})${I}$`,`i`),at=/^([^\n]*?)[.-]?dev$/iu,ot=/^v?(\d+)(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?$/iu,st=/^((?:\d+\.)*\d+)(?:\.x)?-dev$/iu,ct=L(`${I}(?:\\+[^\\n]*)?$`,`i`);function lt(e){let t=b(e);return{a:`alpha`,b:`beta`,p:`patch`,pl:`patch`,rc:`RC`}[t]??t}function ut(e){let t=e.replace(/#[^\n]+$/u,``);if(t.startsWith(`dev-`)||t.endsWith(`-dev`))return`dev`;let n=ct.exec(b(t));return x(n[3])?{beta:`beta`,b:`beta`,alpha:`alpha`,a:`alpha`,rc:`RC`}[n[1]]??`stable`:`dev`}function dt(e){let t=y(e),n=ot.exec(t);if(n===null)return`dev-${t}`;let r=``;for(let e=1;e<5;e++)r+=n[e]===void 0?`.x`:n[e].replaceAll(`*`,`x`).replaceAll(`X`,`x`);return`${r.replaceAll(`x`,`9999999`)}-dev`}function ft(e){let t=st.exec(e);return t===null?void 0:`${t[1]}.`}function R(e){let t=y(e),n=et.exec(t);if(n!==null&&(t=n[1]),n=tt.exec(t),n!==null&&(t=t.slice(0,t.length-n[0].length)),(t===`master`||t===`trunk`||t==="default")&&(t=`dev-${t}`),/^dev-/iu.test(t))return`dev-${t.slice(4)}`;n=nt.exec(t),n!==null&&(t=n[1]);let r;if((n=rt.exec(t))===null?(n=it.exec(t))!==null&&(t=n[1].replaceAll(/\D/gu,`.`),r=2):(t=`${n[1]}${x(n[2])?`.0`:n[2]}${x(n[3])?`.0`:n[3]}${x(n[4])?`.0`:n[4]}`,r=5),r!==void 0){if(!x(n[r])){if(n[r]===`stable`)return t;let e=n[r+1];t+=`-${lt(n[r])}${(e??``).replace(/^[.-]+/u,``)}`}return x(n[r+2])||(t+=`-dev`),t}if(n=at.exec(t),n!==null){let e=dt(n[1]);if(!e.includes(`dev-`))return e}}var pt={"=":`==`,"==":`==`,"<":`<`,"<=":`<=`,">":`>`,">=":`>=`,"<>":`!=`,"!=":`!=`},z=(e,t)=>({operator:pt[e],version:t}),mt=Object.freeze({all:!0}),ht=e=>e.all?`*`:e.multi===void 0?`${e.operator} ${e.version}`:`[${e.multi.map(ht).join(e.conjunctive?` `:` || `)}]`;function gt(e,t,n=0){let r=[...e];for(let e=4;e>0;e--)if(e>t)r[e]=`0`;else if(e===t&&n!==0){let t=BigInt(r[e])+BigInt(n);if(t>T)return;r[e]=String(t)}return`${r[1]??``}.${r[2]??``}.${r[3]??``}.${r[4]??``}`}var _t=`v?(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:\\.(\\d+))?(?:${I}|\\.([xX*][.-]?dev))(?:\\+${Ze}+)?`,vt=L(`^(${Qe}*?)@(${Ye})$`,`i`),yt=/^(dev-[^,\t\n\v\f\r @]+?|[^,\t\n\v\f\r @]+?\.x-dev)#[^\n]+$/iu,bt=/^(v)?[xX*](\.[xX*])*$/iu,xt=L(`^~>?${_t}$`,`i`),St=L(`^\\^${_t}($)`,`i`),Ct=/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.[xX*])+$/u,wt=L(`^(${_t}) +- +(${_t})($)`,`i`),Tt=L(`^(<>|!=|>=?|<=?|==?)?${Xe}*([^\\n]*)`),Et=L(`-${I}$`,`i`),B=e=>e!==void 0&&e!==``;function Dt(e,t,n){let r=R(`${e}${x(t[5])&&x(t[7])&&x(t[8])?`-dev`:``}`.slice(1)),i=gt(t,n,1);return r===void 0||i===void 0?void 0:[z(`>=`,r),z(`<`,`${i}-dev`)]}function Ot(e){let t=e,n=et.exec(t);n!==null&&(t=n[1]);let r;if(n=vt.exec(t),n!==null&&(t=n[1]===``?`*`:n[1],n[2]!==`stable`&&(r=n[2])),n=yt.exec(t),n!==null&&(t=n[1]),n=bt.exec(t),n!==null)return!x(n[1])||!x(n[2])?[z(`>=`,`0.0.0.0-dev`)]:[mt];if((n=xt.exec(t))!==null){if(t.startsWith(`~>`))return;let e=B(n[4])?4:B(n[3])?3:B(n[2])?2:1;return x(n[8])||e++,Dt(t,n,Math.max(1,e-1))}if((n=St.exec(t))!==null)return Dt(t,n,n[1]!==`0`||!B(n[2])?1:n[2]!==`0`||!B(n[3])?2:3);if((n=Ct.exec(t))!==null){let e=B(n[3])?3:B(n[2])?2:1,t=`${gt(n,e)}-dev`,r=gt(n,e,1);return r===void 0?void 0:t===`0.0.0.0-dev`?[z(`<`,`${r}-dev`)]:[z(`>=`,t),z(`<`,`${r}-dev`)]}if((n=wt.exec(t))!==null){let e=x(n[6])&&x(n[8])&&x(n[9])?`-dev`:``,t=R(n[1]),r=R(n[10]);if(t===void 0||r===void 0)return;let i=z(`>=`,`${t}${e}`);if(B(n[12])&&B(n[13])||!x(n[15])||!x(n[17])||!x(n[18]))return[i,z(`<=`,r)];let a=gt([``,n[11],n[12],n[13],n[14]],B(n[12])?2:1,1);return a===void 0?void 0:[i,z(`<`,`${a}-dev`)]}n=Tt.exec(t);let i=R(n[2]);if(i===void 0&&n[2].endsWith(`-dev`)&&/^[0-9a-zA-Z\-./]+$/u.test(n[2])&&(i=R(`dev-${n[2].slice(0,-4)}`)),i===void 0)return;let a=n[1]||`=`;return a!==`==`&&a!==`=`&&!x(r)&&ut(i)===`stable`?i+=`-${r}`:(a===`<`||a===`>=`)&&!Et.test(n[2])&&!n[2].startsWith(`dev-`)&&(i+=`-dev`),[z(a,i)]}var kt=L(`${Xe}*\\|\\|?${Xe}*`),At=/(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)/u;function jt(e){let t=e[0],n=[],r=!1,i=e=>e.multi!==void 0&&e.conjunctive&&e.multi.length===2;for(let a of e.slice(1)){let[e,o,s,c]=i(t)&&i(a)?[...t.multi,...a.multi].map(ht):[];e?.startsWith(`>=`)&&o.startsWith(`<`)&&s.startsWith(`>=`)&&c.startsWith(`<`)&&o.slice(2)===s.slice(3)?(r=!0,t={multi:[t.multi[0],a.multi[1]],conjunctive:!0}):(n.push(t),t=a)}if(r)return n.push(t),n}function Mt(e){if(e.length===1)return e[0];let t=jt(e);return t?.length===1?t[0]:{multi:t??e,conjunctive:!1}}function Nt(e){let t=y(e).split(kt).map(e=>e.split(At).map(Ot));if(!t.some(e=>e.includes(void 0)))return Mt(t.map(e=>e.flat()).map(e=>e.length===1?e[0]:{multi:e,conjunctive:!0}))}function Pt(e,t,n){let r=e.startsWith(`dev-`),i=t.startsWith(`dev-`);return n===`!=`&&(r||i)?e!==t:r&&i?n===`==`&&e===t:r||i?!1:ge(e,t,n)}var Ft=e=>e.replaceAll(`=`,``);function It(e,t){let n=e.operator===`==`,r=e.operator===`!=`,i=t.operator===`==`,a=t.operator===`!=`;if(r||a)return r&&!a&&!i&&t.version.startsWith(`dev-`)||a&&!r&&!n&&e.version.startsWith(`dev-`)?!1:!n&&!i||Pt(t.version,e.version,`!=`);if(e.operator!==`==`&&Ft(e.operator)===Ft(t.operator))return!(e.version.startsWith(`dev-`)||t.version.startsWith(`dev-`));let[o,s,c]=n?[e.version,t.version,t.operator]:[t.version,e.version,e.operator];return Pt(o,s,c)?t.operator!==Ft(t.operator)||e.operator===Ft(e.operator)||me(t.version,e.version)!==0:!1}function V(e,t){return e.all||t.all?!0:e.multi===void 0?t.multi===void 0?It(e,t):V(t,e):e.conjunctive?t.multi!==void 0&&!t.conjunctive?V(t,e):e.multi.every(e=>V(t,e)):e.multi.some(e=>V(t,e))}var Lt=e=>z(`==`,e),H=(e,t)=>O(e).map(n=>[n,e[n],v(t,n)]);function U(e,t,n,r={}){u(e,t);let i=e=>t===void 0?e:v(t,e),a=-1;for(let o of O(e)){if(Object.hasOwn(r,o))throw new g(r[o],i(o));let e=n.indexOf(o);if(e===-1)throw new g(`unsupported field ${_(o)}`,t);if(e<a)throw new g(`out of the order Composer writes, before ${_(n[a])}`,i(o));a=e}return e}function W(e,t){if(x(f(e,t)))throw new g(`${_(e)}, which Composer reads as no value and does not write`,t);return e}var Rt=/[\p{Cc}]/u;function G(e,t){if(Rt.test(f(e,t)))throw new g(`${_(e)} has a control character in it`,t);return e}var zt=(e,t)=>{if(Array.isArray(e)?e.length===0:!c(e))throw l(`a non-empty mapping or sequence`,e,t);return e},Bt=(e,t)=>{if(d(e,t).length===0)throw new g(`an empty sequence, which Composer does not write`,t);return e},K=(e,t,n=f)=>Bt(e,t).map((e,r)=>n(e,`${t}[${r}]`));function Vt(e,t,n=`Composer sorts the keys in`){let r=O(e);for(let e=1;e<r.length;e++)if(Se(r[e-1],r[e])>0)throw new g(`out of the order ${n}, after ${_(r[e-1])}`,v(t,r[e]));return r}function Ht(e,t){let n=G(e,t),r=/\s|@(?:stable|rc|beta|alpha|dev)$/u.test(b(n))||n===`0`?void 0:R(n);if(r===void 0)throw new g(`${_(n)} is not a version Composer locks a package at`,t);return r}function Ut(e,t){let n=R(G(e,t));if(n===void 0)throw new g(`${_(e)} is not a version Composer reads`,t);return n}function Wt(e,t,n){let r=G(e,t)===`self.version`,i=Nt(r?n:e);if(i!==void 0)return i;throw new g(r?`"self.version", which is ${_(n)}, and not a version constraint Composer reads`:`${_(e)} is not a version constraint Composer reads`,t)}var Gt=/^[a-z0-9](?:[_.-]?[a-z0-9]+)*\/[a-z0-9](?:(?:[_.]|-{1,2})?[a-z0-9]+)*$/u,Kt=new Set([`nul`,`con`,`prn`,`aux`,...[`com`,`lpt`].flatMap(e=>Array.from({length:9},(t,n)=>`${e}${n+1}`))]);function qt(e,t){let n=f(e,t);if(!Gt.test(b(n)))throw new g(`${_(n)} is not a package name, a vendor and a package as Composer takes them`,t);if(b(n).split(`/`).some(e=>Kt.has(e)))throw new g(`${_(n)} has a name Windows reserves in it, which Composer refuses`,t);if(n.endsWith(`.json`))throw new g(`${_(n)} ends in .json, which Composer refuses`,t);return n}var Jt=/^[a-z0-9_./-]+$/u,Yt=/^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[a-z0-9](?:[_.-]?[a-z0-9]+)*|composer(?:-(?:plugin|runtime)-api)?)$/u,q=e=>Yt.test(b(e));function Xt(e,t,n){let r=Object.create(null);return Vt(u(e,t),t),{written:r,links:H(e,t).map(([e,t,i])=>{if(!Jt.test(e))throw new g(`${_(e)} is not a package name in lowercase, as Composer writes a link's`,i);let a=Wt(t,i,n);return r[e]=t,{target:e,pretty:t,constraint:a}})}}function Zt(e,n){let r=G(e,n);if(r.startsWith(`/`)||/^[A-Za-z]:/u.test(r))throw new g(`${_(r)} is an absolute path, of the machine the lockfile was written on`,n);let i=/^[A-Za-z][\d+.A-Za-z-]*:/u.exec(r);if(i!==null)throw new g(`${_(r)} is a URL, of ${i[0]}, and not a path`,n);return t(r.startsWith(`./`)?r.slice(2):r,n),r}function Qt(e,t){if(/^\s*-/u.test(G(e,t)))throw new g(`${_(e)} starts with "-", which a tool would read as an option and Composer refuses`,t);if(e===``)throw new g(`an empty string, of which Composer fetches nothing`,t);return e}var $t={git:[`https:`,`http:`,`ssh:`,`git:`,`git+ssh:`],hg:[`https:`,`http:`,`ssh:`],svn:[`https:`,`http:`,`svn:`,`svn+ssh:`],fossil:[`https:`,`http:`,`ssh:`]},en=/^(?:(?:tcp|ssl)(?:4|6|46|64)?:)?(?:\[[0-9a-f:.]+\]|[a-z0-9._][a-z0-9._-]*)(?::[a-z0-9._][a-z0-9._-]*)?$/u,tn=/^([\w.-]+@)?([\w.-]+):[^\s]/u;function nn(e,t,n){let r=Qt(e,t);if(n===`perforce`){let e=b(r);if(!en.test(e)||/^\s*(?:rsh|jsh)\s*:/u.test(e))throw new g(`${_(r)} is not a Perforce port, [tcp|ssl:][host:]port, as Composer takes one`,t);return r}a(r,t);let i=n===`git`&&!r.includes(`://`)&&!/^[A-Za-z]:/u.test(r)?tn.exec(r):null;if(i!==null){if(i[1]===void 0&&/^(?:file|https?|ssh|git|ftps?)$/u.test(b(i[2])))throw new g(`${_(r)} is of the host ${i[2]} to git, and a URL of ${b(i[2])}: to a URL parser`,t);return r}if(/^[A-Za-z][\d+.A-Za-z-]*:/u.test(r)){let e=URL.parse(r);if(e===null||!$t[n].includes(e.protocol)||/\s/u.test(r))throw new g(`${_(r)} is not a URL ${n} fetches from, ${$t[n].join(` `)}`,t);return r}return Zt(r,t)}function rn(e,t,r){let a=Qt(e,t);return r===`git`&&!n(a)&&i(a,t),a}function an(e,t,n){return Bt(e,t).map((e,r)=>{let i=`${t}[${r}]`;U(e,i,[`url`,`preferred`]);let a=p(e.preferred,v(i,`preferred`));return{url:n(e.url,v(i,`url`)),preferred:a}})}var on=[`git`,`hg`,`svn`,`fossil`,`perforce`];function sn(e,t){U(e,t,[`type`,`url`,`reference`,`mirrors`]);let n=f(e.type,v(t,`type`));if(!on.includes(n))throw new g(`expected one of ${on.join(`, `)}, which Composer clones from`,v(t,`type`));if(e.reference===void 0)throw new g(`expected a reference, without which Composer does not read a source`,t);let r=(e,t)=>nn(e,t,n);return{type:n,url:r(e.url,v(t,`url`)),reference:rn(e.reference,v(t,`reference`),n),mirrors:m(e,`mirrors`,t,(e,t)=>an(e,t,r))??[]}}var cn=[`zip`,`tar`,`gzip`,`xz`,`rar`,`phar`,`file`];function ln(e,t,n){let r=Qt(e,t);return(n===`path`||!o(r))&&Zt(r,t),r}function un(e,t){U(e,t,[`type`,`url`,`reference`,`shasum`,`mirrors`]);let n=f(e.type,v(t,`type`));if(n!==`path`&&!cn.includes(n))throw new g(`expected path or one of ${cn.join(`, `)}, which Composer installs from`,v(t,`type`));let i=(e,t)=>ln(e,t,n),a=m(e,`shasum`,t,f);if(a!==void 0&&a!==``&&!r(a))throw new g(`${_(a)} is not a sha1 in lowercase hex, which Composer compares the download's with`,v(t,`shasum`));return{type:n,url:i(e.url,v(t,`url`)),reference:m(e,`reference`,t,Qt),shasum:a||void 0,mirrors:m(e,`mirrors`,t,(e,t)=>an(e,t,i))??[]}}function dn(e,t){let n=G(e,t);if(n===``||/^(?:[\\/]|[A-Za-z]:)/u.test(n)||/(?:^|[\\/])\.\.(?:[\\/]|$)/u.test(n))throw new g(`${_(n)} is not a path in the package, as Composer installs a bin from`,t);return n}var fn=e=>e.replace(/(?:^|[\\/]+)\.\.?(?:[\\/]+|$)(?:\.\.?(?:[\\/]+|$))*/gu,`/`).replace(/^\/+/u,``);function pn(e,t){let n=G(e,t);if(fn(n)!==n)throw new g(`${_(n)} is not written as Composer writes a target-dir, ${_(fn(n))}`,t);if(n.startsWith(`\\`))throw new g(`${_(n)} is of the drive's root on Windows, and not under the package's directory`,t);return n!==``&&Zt(n.replaceAll(`\\`,`/`),t),n}function mn(e,t){return Vt(u(e,t),t),h(e,t,(e,t)=>{if(y(f(e,t))===`self.version`)throw new g(`"self.version", which Composer writes as the package's version`,t);return e},H)}var hn=(e,t)=>h(u(e,t),t,(e,t)=>{if(!Array.isArray(e))throw l(`a sequence, as Composer writes even one listener`,e,t);return e.map((e,n)=>f(e,`${t}[${n}]`))},H);function gn(e,t){let n=K(e,t);for(let e=1;e<n.length;e++)if(ye(n[e-1],n[e])>0)throw new g(`out of the order Composer sorts keywords in, after ${_(n[e-1])}`,`${t}[${e}]`);return n}function _n(e,t){return U(e,t,[`name`,`exclude`]),{name:m(e,`name`,t,W),exclude:m(e,`exclude`,t,K)??[]}}function vn(e,t){if(e===!0)return!0;if(typeof e!=`string`)throw l(`true or the name of a replacement`,e,t);return W(e,t)}var yn=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})[+-](\d{2}):(\d{2})$/u;function bn(e,t){let n=yn.exec(f(e,t)),[r,i,a,o,s,c,l,u]=n===null?[]:n.slice(1).map(Number),d=new Date(Date.UTC(2e3,i,0)).getUTCDate()-+(i===2&&(r%4!=0||r%100==0&&r%400!=0));if(n===null||i<1||i>12||a<1||a>d||o>23||s>59||c>59||u>59||l>24)throw new g(`${_(e)} is not a time as Composer writes one, as 2026-10-02T00:00:00+00:00`,t);return e}var xn={require:`require`,conflict:`conflict`,provide:`provide`,replace:`replace`,requireDev:`require-dev`},Sn=`name.version.target-dir.source.dist.require.conflict.provide.replace.require-dev.suggest.default-branch.bin.type.extra.autoload.autoload-dev.notification-url.include-path.php-ext.archive.scripts.license.authors.description.homepage.keywords.support.funding.abandoned.transport-options.time`.split(`.`),Cn={version_normalized:"`version_normalized`, which Composer leaves out of a lockfile","installation-source":"`installation-source`, which Composer leaves out of a lockfile",repositories:"`repositories`, which Composer reads of the project's composer.json alone","minimum-stability":"`minimum-stability`, which Composer reads of the project's composer.json alone"};function wn(e,t,n){if(U(e,t,Sn,Cn),e.name===void 0)throw new g(`expected a name`,t);if(e.version===void 0)throw new g(`expected a version`,t);let r=qt(e.name,v(t,`name`)),i=Ht(e.version,v(t,`version`));if(e.type===void 0)throw new g(`expected a type, which Composer always writes`,t);let a=W(G(e.type,v(t,`type`)),v(t,`type`));if(b(a)!==a)throw new g(`${_(a)}, which Composer writes in lowercase`,v(t,`type`));if(e[`default-branch`]!==void 0&&e[`default-branch`]!==!0)throw l(`true, as Composer writes it of the default branch alone`,e[`default-branch`],v(t,`default-branch`));let s=Object.create(null),c={};for(let[n,r]of Object.entries(xn)){let i=m(e,r,t,(t,n)=>Xt(t,n,e.version));s[n]=i?.written??Object.create(null),c[n]=i?.links??[]}let u=n=>m(e,n,t,zt);return{pkg:{name:r,version:e.version,normalized:i,stability:ut(i),dev:n,source:m(e,`source`,t,sn),dist:m(e,`dist`,t,un),...s,suggest:m(e,`suggest`,t,mn)??Object.create(null),defaultBranch:e[`default-branch`]===!0,bin:m(e,`bin`,t,(e,t)=>K(e,t,dn))??[],type:a,targetDir:m(e,`target-dir`,t,pn),extra:u(`extra`),autoload:u(`autoload`),autoloadDev:u(`autoload-dev`),notificationUrl:m(e,`notification-url`,t,(e,t)=>{if(!o(f(e,t)))throw new g(`${_(e)} is not an http(s) URL, which Composer posts installs to`,t);return e}),includePath:m(e,`include-path`,t,K)??[],phpExt:u(`php-ext`),archive:m(e,`archive`,t,_n)??{name:void 0,exclude:[]},scripts:m(e,`scripts`,t,hn)??Object.create(null),license:m(e,`license`,t,K)??[],authors:u(`authors`),description:m(e,`description`,t,W),homepage:m(e,`homepage`,t,W),keywords:m(e,`keywords`,t,gn)??[],support:u(`support`),funding:u(`funding`),abandoned:m(e,`abandoned`,t,vn),transportOptions:u(`transport-options`),time:m(e,`time`,t,bn)},links:c}}var Tn=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21],En=Array.from({length:64},(e,t)=>Math.floor(Math.abs(Math.sin(t+1))*2**32)>>>0);function Dn(e){let t=e.length,n=Math.ceil((t+9)/64),r=new Uint8Array(n*64);for(let n=0;n<t;n++)r[n]=e.codePointAt(n);r[t]=128;let i=new DataView(r.buffer);return i.setUint32(r.length-8,t*8>>>0,!0),i.setUint32(r.length-4,Math.floor(t*8/2**32),!0),Array.from({length:r.length/4},(e,t)=>i.getUint32(t*4,!0))}var On=(e,t)=>(e<<t|e>>>32-t)>>>0;function kn(e){if(/[^\0-\u007F]/u.test(e))throw TypeError(`expected ASCII`);let t=[1732584193,4023233417,2562383102,271733878],n=Dn(e);for(let e=0;e<n.length;e+=16){let[r,i,a,o]=t;for(let t=0;t<64;t++){let s=t>>4,c=[i&a|~i&o,o&i|~o&a,i^a^o,a^(i|~o)][s],l=[t,5*t+1,3*t+5,7*t][s]%16,u=i+On(r+c+En[t]+n[e+l]>>>0,Tn[s*4+t%4])>>>0;[r,i,a,o]=[o,u,i,a]}for(let[e,n]of[r,i,a,o].entries())t[e]=t[e]+n>>>0}return t.map(e=>[0,8,16,24].map(t=>(e>>>t&255).toString(16).padStart(2,`0`)).join(``)).join(``)}var An={string:[e=>typeof e==`string`,`a string`],boolean:[e=>typeof e==`boolean`,`true or false`],object:[e=>e instanceof Map,`a mapping`],array:[Array.isArray,`a sequence`],null:[e=>e===null,`null`]};function J(e,t,n){let r=[t.type].flat();if(!r.some(t=>An[t][0](e)))throw l(r.map(e=>An[e][1]).join(` or `),e,n);if(t.enum!==void 0&&!t.enum.includes(e))throw l(`one of ${t.enum.map(_).join(`, `)}`,e,n);if(t.pattern!==void 0&&!t.pattern.test(e))throw new g(`${_(e)} is not as Composer's schema has it`,n);if(e instanceof Map){for(let r of t.required??[])if(!e.has(r))throw new g(`no ${_(r)}, which Composer's schema requires`,n);for(let[r,i]of e){let e=Object.hasOwn(t.properties??{},r)?t.properties[r]:t.additionalProperties;e!==void 0&&J(i,e,v(n,r))}}Array.isArray(e)&&t.items!==void 0&&e.forEach((e,r)=>J(e,t.items,`${n}[${r}]`))}var Y={type:`string`},X={type:`boolean`},jn={type:`array`,items:Y},Mn={type:[`string`,`boolean`]},Nn={type:`object`,required:[`name`,`version`],properties:{name:Y,version:Y}},Pn={name:Y,canonical:X,only:jn,exclude:jn},Fn={url:Y,"no-api":X,"secure-http":X,"svn-cache-credentials":X,"trunk-path":Mn,"branches-path":Mn,"tags-path":Mn,"package-path":Y,depot:Y,branch:Y,unique_perforce_client_name:Y,p4user:Y,p4password:Y},In={composer:{url:Y,options:{type:`object`},allow_ssl_downgrade:X,"force-lazy-providers":X,filter:{type:[`boolean`,`object`],additionalProperties:X}},...Object.fromEntries([`vcs`,`github`,`git`,`gitlab`,`bitbucket`,`git-bitbucket`,`hg`,`fossil`,`perforce`,`svn`,`forgejo`].map(e=>[e,Fn])),path:{url:Y,options:{type:`object`,properties:{reference:{type:`string`,enum:[`none`,`config`,`auto`]},symlink:{type:[`boolean`,`null`]},relative:X,versions:{type:`object`,additionalProperties:Y}}}},artifact:{url:Y},pear:{url:Y,"vendor-alias":Y},package:{package:{...Nn,type:[`object`,`array`],items:Nn}}};function Ln(e,t,n){J(e,{type:`object`},t);let r=e.get(`type`);if(typeof r!=`string`||!Object.hasOwn(In,r))throw l(`a type of repository Composer knows`,r,v(t,`type`));if(J(e,{type:`object`,required:[r===`package`?`package`:`url`],properties:{...Pn,...In[r]}},t),n&&e.has(`name`))throw new g(`a name, where the key names a repository, which Composer's schema refuses`,v(t,`name`))}function Rn(e,t){if(J(e,{type:[`object`,`array`]},t),Array.isArray(e))e.forEach((e,n)=>{e instanceof Map&&e.size===1&&[...e.values()][0]===!1||Ln(e,`${t}[${n}]`,!1)});else for(let[n,r]of e)r!==!1&&Ln(r,v(t,n),!0)}var zn={version:{type:`string`,pattern:/^[vV]?\d+(?:[.-]\d+){0,3}[._-]?(?:(?:[sS][tT][aA][bB][lL][eE]|[bB][eE][tT][aA]|[bB]|[rR][cC]|[aA][lL][pP][hH][aA]|[aA]|[pP][aA][tT][cC][hH]|[pP][lL]|[pP])(?:[.-]?\d+)*)?(?:[.-]?[dD][eE][vV]|\.x-dev)?(?:\+.*)?$|^dev-.*$/su},"minimum-stability":{type:`string`,enum:[`dev`,`alpha`,`beta`,`rc`,`RC`,`stable`]},"prefer-stable":X,extra:{type:[`object`,`array`]},config:{type:`object`,properties:{platform:{type:`object`,additionalProperties:Mn}}}};function Bn(e,t){for(let[n,r]of Object.entries(zn))e.has(n)&&J(e.get(n),r,v(t,n));e.has(`repositories`)&&Rn(e.get(`repositories`),v(t,`repositories`))}var Z=`composerJson`,Vn=[`name`,`version`,`require`,`require-dev`,`conflict`,`replace`,`provide`,`minimum-stability`,`prefer-stable`,`repositories`,`extra`];function Hn(e){let t=new Map(Vn.filter(t=>e.has(t)).map(t=>[t,e.get(t)])),n=e.get(`config`),r=n instanceof Map?n.get(`platform`):void 0;return r!=null&&t.set(`config`,new Map([[`platform`,r]])),kn(F(new Map([...t].sort(([e],[t])=>Se(e,t)))))}function Un(e,t){let n=qt(e,t);if(/[A-Z]/u.test(n))throw new g(`${_(n)} has capitals, which Composer refuses in composer.json`,t);return n}var Wn=/(?:^|\| *|, *)([^,\t\n\v\f\r #|]+)(?:#[^ ]+)? +as +([^,\t\n\v\f\r |]+)(?:$| *\|| *,)/u;function Gn(e,t,n,r){let i=e.get(t);if(i===void 0)return[];if(!(i instanceof Map))throw l(`a mapping`,i,v(Z,t));let a=new Map;for(let[e,o]of i){let i=b(e),s=v(v(Z,t),e);q(e)||Un(e,s),G(f(o,s),s);let c=o===`self.version`?r===void 0?{all:!0}:Nt(r.pretty):Nt(o);if(c===void 0)throw new g(`${_(o)} is not a version constraint Composer reads`,s);if(t===`require`||t===`require-dev`){let e=Wn.exec(o);if(e===null?o.includes(` as `):R(e[1])===void 0||R(e[2])===void 0)throw new g(`${_(o)} is not an alias of one version as another, which Composer refuses`,s);if(i===n)throw new g(`the root itself, which Composer refuses`,s)}a.set(i,{target:i,pretty:o,constraint:c})}return[...a.values()]}function Kn(e){if(typeof e!=`string`)throw TypeError(`composerJson: expected the text of composer.json`);let t=Ke(e,Z);if(!(t instanceof Map))throw new g(`expected an object`,Z);return t}function qn(e){let t=Kn(e);Bn(t,Z);let n=t.has(`name`)?Un(t.get(`name`),v(Z,`name`)):`__root__`,r=t.get(`version`),i=r===void 0?void 0:{pretty:r,normalized:Ut(r,v(Z,`version`))},a=Object.create(null);for(let[e,r]of Object.entries(xn))a[e]=Gn(t,r,n,i);return{contentHash:Hn(t),name:n,version:i?.normalized,links:a}}var Q={stable:0,RC:5,beta:10,alpha:15,dev:20};function Jn(e,t,n,r){let i=Object.create(null),a=e=>e.pretty===`self.version`,o=e=>({...e,constraint:Lt(t)});for(let t of Object.keys(xn))i[t]=t===`conflict`||t===`provide`||t===`replace`?[...e.links[t],...e.links[t].filter(a).map(o)]:e.links[t].map(e=>a(e)?o(e):e);let s=e.links.require.some(a);return{name:e.name,version:t,exact:Lt(t),pretty:n,stability:ut(t),links:i,alias:r?`root`:`branch`,base:e,selfVersionRequires:s,where:e.where}}function Yn(e,t){let{version:n}=e;if(!n.startsWith(`dev-`)&&!n.endsWith(`-dev`))return;let r=e.extra?.[`branch-alias`];if(typeof r==`object`&&r)for(let e of O(r)){let i=r[e];if(typeof i!=`string`)throw new g(`expected a string, as Composer reads a branch alias of a dev version`,v(v(v(t,`extra`),`branch-alias`),e));if(!i.endsWith(`-dev`))continue;let a=i===$e?i:dt(i.slice(0,-4));if(!a.endsWith(`-dev`)||b(n)!==b(e))continue;let o=ft(e),s=ft(i);if(o===void 0||s===void 0||b(s).startsWith(b(o)))return a}if(e.defaultBranch&&ft(n.replace(/^v/u,``))===void 0)return $e}function Xn(e,t){let n=new Set([e.name]);if(t)for(let t of e.links.provide)n.add(t.target);for(let t of e.links.replace)n.add(t.target);return n}function Zn(e,t,n){if(e.name===t)return e.exact===void 0||V(n,e.exact);let r=e=>e.target===t&&V(n,e.constraint);return e.links.provide.some(r)||e.links.replace.some(r)}function Qn(e){let t=new Map;for(let n of e)for(let e of Xn(n,!0))(t.get(e)??t.set(e,[]).get(e)).push(n);return{entries:e,byName:t,provided:new Map}}var $n=(e,t)=>e.byName.get(t)??[];function $(e,t){return e.provided.has(t)||e.provided.set(t,$n(e,t.target).filter(e=>Zn(e,t.target,t.constraint))),e.provided.get(t)}function er(e){return e.root?`the root`:`${e.base?.pkg.name??e.pkg.name} ${e.alias===void 0?e.pkg.version:`${e.pretty}, an alias of ${e.base.pkg.version}`}`}function tr(e,t,n){let r=Q[e.stability];return[...Xn(e,!0)].some(e=>r<=Q[Object.hasOwn(n,e)?n[e]:t])}function nr(e){let t=new Map;for(let n of e)for(let e of Xn(n,!1)){let r=t.get(e);if(r!==void 0){let t=r.root?`the root`:r.where,i=e===n.name&&e===r.name?`listed twice, first as ${t}`:`${_(e)} is ${e===r.name?`the name`:`replaced by`} of ${t}, and ${e===n.name?`its name`:`replaced by it`} too, which Composer installs neither of`;throw new g(i,n.where)}t.set(e,n)}}function rr(e,t,n,r){for(let i of e)if(i.alias===void 0||i.selfVersionRequires)for(let e of i.links.require){if(q(e.target)||$(t,e).length>0)continue;let a=$n(r,e.target).filter(e=>!e.root),o=i.alias===void 0?``:`, as its alias ${i.pretty} asks for ${e.target} at it`,s=a.length===0?``:`, of ${a.map(er).join(`, `)}, which the lockfile has`;throw new g(`nothing ${n} meets it${o}${s}`,v(v(i.where,`require`),e.target))}}function ir(e){let t=new Set(e.entries.filter(e=>e.alias===void 0).flatMap(e=>[...Xn(e,!1)]));for(let n of e.entries)for(let r of n.links.conflict){if(q(r.target)||!t.has(r.target))continue;let i=$(e,r).find(e=>e!==n&&(e.alias===void 0||e.name===r.target));if(i!==void 0)throw new g(`conflicts with ${er(i)}, which ${i.root?`composer.json is`:`the lockfile has`}`,v(v(n.where,`conflict`),r.target))}}function ar(e,t,n){for(let r of e.links[n])if(!(q(r.target)||r.pretty===`self.version`||$(t,r).length>0))throw new g(`nothing in the lockfile${n===`requireDev`?``:` that composer install --no-dev installs`} meets it, which composer install refuses`,v(v(e.where,xn[n]),r.target))}function or(e,t){let n=Object.create(null);for(let r of e.links.require){let e=[...new Set($(t,r).filter(e=>!e.root).map(e=>(e.base??e).name))];n[r.target]={constraint:r.pretty,platform:q(r.target),targets:e}}return n}function sr(e,t,n,r,i){let a=e.map(({pkg:e,links:t,where:n})=>({name:b(e.name),version:e.normalized,exact:Lt(e.normalized),stability:e.stability,links:t,pkg:e,where:n})),o=i===void 0?[]:[{...i,exact:i.version===void 0?void 0:Lt(i.version),where:Z,root:!0}];nr([...o,...a]);let s=new Map(a.map(e=>[e.name,e])),c=[],l=new Map(a.map(e=>[e,[]])),u=e=>{c.push(e),l.get(e.base).push(e)};for(let e of a){c.push(e);let t=Yn(e.pkg,e.where);t!==void 0&&u(Jn(e,t,t.replaceAll(/(?:\.9{7})+/gu,`.x`),!1))}for(let e of t)u(Jn(s.get(e.package),e.aliasNormalized,e.alias,!0));for(let e of c)if(!tr(e,n,r)){let t=e.alias===void 0?``:`its alias ${e.pretty}, `;throw new g(`${t}of stability ${e.stability}, which minimum-stability, ${n}, and stability-flags do not take, and Composer installs nothing against`,e.where)}let d=e=>(e.base??e).pkg.dev,f=c.filter(e=>!d(e)),p=Qn([...o,...f]),m=Qn([...o,...c]);return ir(m),i!==void 0&&(rr(f,p,`that composer install --no-dev installs`,m),rr(c.filter(d),m,`in the lockfile`,m),ar(o[0],p,`require`),ar(o[0],m,`requireDev`)),new Map(a.map(e=>[e,{require:or(e,d(e)?m:p),aliases:l.get(e).map(e=>({version:e.pretty,normalized:e.version,root:e.alias===`root`}))}]))}var cr=[`_readme`,`content-hash`,`packages`,`packages-dev`,`aliases`,`minimum-stability`,`stability-flags`,`prefer-stable`,`prefer-lowest`,`platform`,`platform-dev`,`platform-overrides`,`plugin-api-version`],lr={hash:"`hash`, the md5 of composer.json that Composer 1.2 and older wrote, which is not read here"},ur=cr.filter(e=>e!==`platform-overrides`),dr=[`This file locks the dependencies of your project to a known state`,`Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies`,`This file is @generated automatically`],fr=[`2.0.0`,`2.1.0`,`2.2.0`,`2.3.0`,`2.6.0`,`2.9.0`],pr=[`stability-flags`,`platform`,`platform-dev`];function mr(e){let t=`plugin-api-version`;if(e===void 0)throw new g(`no plugin-api-version: a lockfile of Composer 1.9 or older, which is not read here`);if(typeof e==`string`&&e.startsWith(`1.`))throw new g(`${_(e)} is Composer 1's, which is not read here`,t);if(!fr.includes(e))throw new g(`unsupported plugin-api-version: expected one of ${fr.join(`, `)}, found ${s(e)}`,t);return e}function hr(e){U(e,void 0,cr,lr);let t=mr(e[`plugin-api-version`]),n=ur.find(t=>e[t]===void 0);if(n!==void 0)throw new g(`expected ${_(n)}, which Composer always writes`,n);let r=e._readme;if(!Array.isArray(r)||r.length!==dr.length||r.some((e,t)=>e!==dr[t]))throw new g(`expected the three lines Composer writes`,`_readme`);let i=f(e[`content-hash`],`content-hash`);if(!/^[\da-f]{32}$/u.test(i))throw new g(`${_(i)} is not an md5 in lowercase hex`,`content-hash`);for(let t of[`prefer-stable`,`prefer-lowest`])p(e[t],t);let a=e[`minimum-stability`];if(typeof a!=`string`||!Object.hasOwn(Q,a))throw l(`one of ${Object.keys(Q).join(`, `)}`,a,`minimum-stability`);return{contentHash:i,pluginApiVersion:t,minimumStability:a}}function gr(e,t){let n=pr.find(t=>we(e[t])),r=pr.find(t=>Array.isArray(e[t])&&e[t].length===0),i=t===`2.9.0`?`{}`:t===`2.6.0`?void 0:`[]`,a=i===`{}`?r:i===`[]`?n:void 0;if(a!==void 0)throw new g(`"${i===`{}`?`[]`:`{}`}", which Composer of plugin-api-version ${t} writes as "${i}"`,a);if(n!==void 0&&r!==void 0)throw new g(`"[]", where ${_(n)} is "{}", as no Composer writes them both`,r);return n!==void 0||t===`2.9.0`}var _r=(e,t)=>Array.isArray(e)&&e.length===0?Object.create(null):u(e,t);function vr(e,t){let n=`stability-flags`,r=_r(e,n);t&&Vt(r,n,`Composer 2.8 and later sort it in`);let i=Object.entries(Q);return h(r,n,(e,t,n)=>{if(b(n)!==n)throw new g(`${_(n)}, which Composer writes in lowercase`,t);let r=i.find(([,t])=>t===e);if(r===void 0)throw l(`one of ${Object.values(Q).join(`, `)}`,e,t);return r[0]},H)}var yr=(e,t)=>h(_r(e,t),t,(e,t,n)=>{if(!q(n)||b(n)!==n)throw new g(`${_(n)} is not a platform package's name in lowercase, as Composer writes one`,t);return Wt(e,t,`1.0.0`),e},H);function br(e){let t=`platform-overrides`;if(e===void 0)return Object.create(null);if(!c(e)||we(e))throw l(`a non-empty mapping, as Composer writes it where there are any`,e,t);let n=new Map;return h(e,t,(e,t,r)=>{if(!q(r))throw new g(`${_(r)} is not a platform package's name`,t);let i=b(r),a=n.get(i);if(a!==void 0)throw new g(`${_(a)} too, of which Composer takes the last, as it takes a name in any case`,t);if(n.set(i,r),e!==!1&&(typeof e!=`string`||R(G(e,t))===void 0))throw l(`a version, or false`,e,t);if(i===`php`&&e===!1)throw new g(`false, which Composer refuses of php, as it cannot be missing`,t);return e},H)}function xr(e,t){let n=e[t];if(t===`packages-dev`&&n===null)throw new g(`null, as Composer 1 writes it after update --no-dev, which Composer 2 does not install from`,t);return d(n,t)}function Sr(e){for(let t=1;t<e.length;t++){let n=e[t-1].pkg,r=e[t].pkg;if(n.dev===r.dev&&(E(n.name,r.name)||E(n.version,r.version))>0)throw new g(`out of the order Composer sorts packages in, by name then version, after ${_(n.name)}`,e[t].where)}}var Cr=[`package`,`version`,`alias`,`alias_normalized`];function wr(e,t){let n=`aliases`;return d(e,n).map((r,i)=>{let a=`${n}[${i}]`;U(r,a,Cr);for(let e of Cr)if(r[e]===void 0)throw new g(`expected ${e}`,a);let o=f(r.package,v(a,`package`));if(!t.has(o))throw new g(`${_(o)} is not a package in the lockfile, by its name in lowercase`,v(a,`package`));if(i>0&&E(e[i-1].package,o)>0)throw new g(`out of the order Composer sorts aliases in, by package, after ${_(e[i-1].package)}`,a);let s=f(r.version,v(a,`version`));if(Ut(s,v(a,`version`))!==s)throw new g(`${_(s)} is not a version normalized, as Composer writes it`,v(a,`version`));if([`dev-master`,`dev-trunk`,`dev-default`].includes(s))throw new g(`${_(s)}, which Composer writes as ${$e}`,v(a,`version`));let c=f(r.alias,v(a,`alias`));if(/\s/u.test(c))throw new g(`${_(c)} has a space, which Composer's alias of a requirement cannot`,v(a,`alias`));let l=Ut(c,v(a,`alias`));if(r.alias_normalized!==l)throw new g(`expected ${_(l)}, the alias normalized`,v(a,`alias_normalized`));return{package:o,version:s,alias:c,aliasNormalized:l}})}function Tr(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{composerJson:n}=ee(t,[`composerJson`]),r=n===void 0?void 0:qn(n),i=Ve(e),{contentHash:a,pluginApiVersion:o,minimumStability:s}=hr(i),c=gr(i,o),l=vr(i[`stability-flags`],c),u=[];for(let[e,t]of[[`packages`,!1],[`packages-dev`,!0]])for(let[n,r]of xr(i,e).entries()){let i=`${e}[${n}]`;u.push({...wn(r,i,t),where:i})}Sr(u);let d=new Map(u.map(({pkg:e})=>[b(e.name),e])),f=wr(i.aliases,d),p=sr(u,f,s,l,r),m=Object.create(null);for(let[{pkg:e},{require:t,aliases:n}]of p)m[b(e.name)]={...e,require:t,aliases:n};return{contentHash:a,fresh:r===void 0?void 0:r.contentHash===a,pluginApiVersion:o,minimumStability:s,stabilityFlags:l,preferStable:i[`prefer-stable`],preferLowest:i[`prefer-lowest`],platform:yr(i.platform,`platform`),platformDev:yr(i[`platform-dev`],`platform-dev`),platformOverrides:br(i[`platform-overrides`]),aliases:f,packages:m}}export{g as LockfileError,Tr as parseComposerLock};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,c as t,f as n,g as r,h as i,i as a,j as o,m as s,o as c,p as l,q as u,r as d}from"./chunk-JFL7WLRV.js";import{a as f,c as p,d as m,e as h,f as g,g as _,i as v,j as y,k as b,l as x,m as S,n as C,o as w,p as T}from"./chunk-JOXLZXMI.js";import{B as E,H as D,I as O,M as k,m as A,t as j}from"./chunk-UCP3JRE2.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as M,e as ee,g as N}from"./chunk-E3LFSUDJ.js";import{d as P,h as F,i as I}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var L=Object.fromEntries([`md5`,`sha1`,`sha224`,`sha256`,`sha384`,`sha512`].map(e=>[e,s[e]]));function R(e,t){let n=URL.parse(k(v(e,t),t));if(!/^[\w.-]+@[\w.-]+:./u.test(e)&&(n===null||![`https:`,`http:`,`ssh:`,`git:`,`file:`].includes(n.protocol)))throw new P(`${F(e)} is not a repository URL`,t);return e}var z={version:[`version`],path:[`path`,`develop`],url:[`url`],git:[`git`,`branch`,`tag`,`rev`,`subdirectory`]},B=Object.keys(z),V=new Set([`extras`,`optional`,`markers`]),H=[...new Set(Object.values(z).flat()),...V];function U(e,t,n){let r=I(n,e);if(e===`version`)return{version:v(t.version,r)};if(e===`path`)return{path:u(t.path,r),develop:A(t,`develop`,n,_)??!1};if(e===`url`)return{url:l(t.url,r)};let i=[`branch`,`tag`,`rev`].filter(e=>t[e]!==void 0);if(i.length>1)throw new P(`${i.join(` and `)}, of which Poetry writes one`,n);return{git:R(t.git,r),reference:i.length===0?void 0:{kind:i[0],name:v(t[i[0]],I(n,i[0]))},subdirectory:A(t,`subdirectory`,n,d)}}function W(e,t){if(typeof e==`string`)return{type:`version`,version:v(e,t),extras:[],optional:!1,markers:void 0};p(e,t,H);let n=w(e,B,t),r=H.find(t=>e[t]!==void 0&&!z[n].includes(t)&&!V.has(t));if(r!==void 0)throw new P(`a field Poetry does not write for a ${n} dependency`,I(t,r));return{type:n,...U(n,e,t),extras:A(e,`extras`,t,x(i))??[],optional:A(e,`optional`,t,_)??!1,markers:A(e,`markers`,t,a)}}function G(e,t){let i=Object.create(null);if(e===void 0)return i;let a=new Map;for(let[o,s,c]of m(e,t)){let e=n(r(o,c));if(a.has(e))throw new P(`${F(o)} and ${F(a.get(e))} are one name`,c);if(a.set(e,o),Array.isArray(s)&&s.length===0)throw new P(`an empty array, where Poetry writes a constraint`,c);i[o]=Array.isArray(s)?b(W)(s,c):[W(s,c)]}return i}function K(e,t){let n=new Set;return b((e,t)=>{p(e,t,[`file`,`hash`]);let r=v(e.file,I(t,`file`));if(!E(r)||r.includes(`/`))throw new P(`${F(r)} is not a file's name`,I(t,`file`));if(n.has(r))throw new P(`${F(r)} is listed twice`,t);return n.add(r),{file:r,hash:c(e.hash,I(t,`hash`),L)}})(e,t)}var q=(e,t)=>C(e,t,i,x(o)),J={legacy:[`url`,`reference`],git:[`url`,`reference`,`resolved_reference`,`subdirectory`],url:[`url`,`subdirectory`],file:[`url`],directory:[`url`]},Y=y(D,`a full commit hash, as Poetry writes`);function X(e,t){let n=g(p(e,t).type,I(t,`type`));if(!Object.hasOwn(J,n))throw new P(`expected one of ${Object.keys(J).join(`, `)}`,I(t,`type`));p(e,t,[`type`,...J[n]]);let r=I(t,`url`),i=A(e,`subdirectory`,t,d);return n===`legacy`?{type:n,url:l(e.url,r),name:v(e.reference,I(t,`reference`))}:n===`url`?{type:n,url:l(e.url,r),subdirectory:i}:n===`file`||n===`directory`?{type:n,path:u(e.url,r)}:{type:n,url:R(e.url,r),reference:A(e,`reference`,t,v),commit:Y(e.resolved_reference,I(t,`resolved_reference`)),subdirectory:i}}var Z=[`package`,`extras`,`metadata`],Q=[`name`,`version`,`description`,`optional`,`python-versions`,`files`,`dependencies`,`extras`,`source`,`develop`],te=[...Q,`groups`,`markers`],ne={category:"`category` is lock-version 1, which Poetry 1.4 and older write and is not read here"};function $(e,t){if(e===`2.0`||e===`2.1`)return e;throw typeof e==`string`&&/^1\.\d+$/u.test(e)?new P(`lock-version ${e} is Poetry 1.4's or older, which is not read here`,t):new P(`unsupported lock-version: expected "2.0" or "2.1", found ${f(e)}`,t)}function re(e){p(e,`metadata`,[`lock-version`,`python-versions`,`content-hash`],{files:`metadata.files is lock-version 1, which is not read here`,hashes:`metadata.hashes is lock-version 1, which is not read here`});let t=e=>I(`metadata`,e),n=y(O,`a hex sha256`)(e[`content-hash`],t(`content-hash`));return{lockVersion:$(e[`lock-version`],t(`lock-version`)),pythonVersions:v(e[`python-versions`],t(`python-versions`)),contentHash:n}}function ie(e,t,n){let r=typeof e==`string`?a(e,n):void 0,i=Object.create(null);for(let e of t)i[e]=r;if(e===void 0||r!==void 0)return i;for(let[t,r,o]of m(e,n)){if(!Object.hasOwn(i,t))throw new P(`${F(t)} is not one of the package's groups`,o);i[t]=a(r,o)}return i}function ae(e,t){let n=S(e,t,i);if(n.length===0)throw new P(`expected a group at least`,t);let r=j(n);if(r!==void 0)throw new P(`${F(r)} is listed twice`,t);return n}function oe(e,n,i){p(e,n,i===`2.1`?te:Q,ne);let a=A(e,`source`,n,X),o=a?.type===`directory`||a?.type===`git`;if(o&&e.develop===void 0)throw new P(`expected develop, which Poetry writes of a directory or a git source`,n);if(!o&&e.develop!==void 0)throw new P(`develop, which Poetry writes of a directory or a git source alone`,I(n,`develop`));let s=i===`2.1`?ae(e.groups,I(n,`groups`)):void 0;return{name:r(e.name,I(n,`name`)),version:t(e.version,I(n,`version`)),description:A(e,`description`,n,g)??``,optional:_(e.optional,I(n,`optional`)),pythonVersions:v(e[`python-versions`],I(n,`python-versions`)),groups:s,markers:s===void 0?void 0:ie(e.markers,s,I(n,`markers`)),files:K(e.files,I(n,`files`)),dependencies:G(e.dependencies,I(n,`dependencies`)),extras:q(e.extras,I(n,`extras`)),source:a,develop:A(e,`develop`,n,_)}}function se(e,t){return C(e,`extras`,i,x((e,i)=>{if(!t.has(n(r(e,i))))throw new P(`${F(e)} names no package in the lockfile`,i);return e}))}var ce=t=>JSON.stringify([n(t.name),e(t.version),t.source??null]);function le(e){let t=p(N(e),void 0,Z);if(!ee(t.metadata))throw new P(`expected a [metadata] table, which Poetry requires`,`metadata`);let{lockVersion:r,pythonVersions:i,contentHash:a}=re(t.metadata),o=h(t.package??[],`package`).map((e,t)=>oe(e,`package[${t}]`,r));return T(o,ce,e=>`${e.name} ${e.version}`),{lockVersion:r,pythonVersions:i,contentHash:a,extras:se(t.extras,new Set(o.map(e=>n(e.name)))),packages:o}}export{P as LockfileError,M as TomlError,le as parsePoetryLock};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e=null){let t=[`anthropic/claude-opus-5.5`,`anthropic/claude-fable-5.2`,`anthropic/claude-sonnet-5.5`,`anthropic/claude-haiku-5.5`,`openai/gpt-6.2-astra`,`openai/gpt-6.2-astra-pro`,`openai/gpt-6.2-sol`,`openai/gpt-6.2-sol-pro`,`openai/gpt-6.1-terra`,`openai/gpt-6.1-terra-pro`,`openai/gpt-6-luna`,`openai/gpt-6-luna-pro`,`moonshotai/kimi-k3.1-pro`,`moonshotai/kimi-k3`,`google/gemini-4-carbon`,`google/gemini-4-argon`,`google/gemini-4-hydrogen`,`google/gemma-4-31b-it`,`x-ai/grok-4.7`,`z-ai/glm-5.3`,`qwen/qwen4-max`,`deepseek/deepseek-v4.1-flash`,`deepseek/deepseek-v4-pro`,`mistralai/mistral-large-4-0`],n=e===`moonshot`?`moonshotai`:e,r=t.filter(t=>![`anthropic`,`openai`,`moonshot`].includes(e??``)||t.startsWith(`${n}/`)).map(e=>({id:e,efforts:[`low`,`medium`,`high`,`xhigh`,`max`]}));return{models:r,defaultModel:r[0].id}}export{e as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{a as e,b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{f as r,g as i}from"./chunk-2XUEZHIP.js";var a=class extends n{constructor(t){if(super(t),this.it=i,t.type!==e.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===i||e==null)return this._t=void 0,this.it=e;if(e===r)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};a.directiveName=`unsafeHTML`,a.resultType=1;var o=t(a),s=/^/u,c=/^true$/u,l=/^[\w .,#%()-]*$/u,u=Object.fromEntries([`fill`,`fill-opacity`,`fill-rule`,`clip-rule`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-opacity`,`stroke-dasharray`,`opacity`,`transform`].map(e=>[e,l])),d=(...e)=>({...u,...Object.fromEntries(e.map(e=>[e,l]))}),f=new Set;function p(e){for(let t of e)f.add(t)}var m=e=>{let[t,...n]=e.split(` `);return t===`token`&&n.every(e=>f.has(e)||/^language-[\w-]+$/u.test(e))},h={__proto__:null,span:{class:{test:e=>m(e)||/^(?:code-control|evd-lineno|report-logo brand-[\w-]+)$/u.test(e)},title:s,"data-tooltip":s,"aria-hidden":c},mark:{class:/^diff-word$/u},code:{class:/^evd-line$/u},button:{type:/^button$/u,class:/^bundle-source-link$/u,"data-bundle-source-link":s},a:{class:/^source-node-doc$/u,href:/^https:\/\/nodejs\.org\/api\/[\w/-]+\.html(?:#[\w-]*)?$/u,target:/^_blank$/u,rel:/^noopener noreferrer$/u,"aria-label":s},svg:{...d(`viewBox`,`width`,`height`),class:/^file-icon(?: brand-[\w-]+)?$/u,"aria-hidden":c},g:u,path:{...d(`d`),class:/^(?:bg|fg)$/u},rect:d(`x`,`y`,`width`,`height`,`rx`,`ry`),circle:d(`cx`,`cy`,`r`),ellipse:d(`cx`,`cy`,`rx`,`ry`),line:d(`x1`,`y1`,`x2`,`y2`),polyline:d(`points`),polygon:d(`points`)},g=/<(?:([a-z]+)((?:[\t\n\f\r ]+[a-zA-Z][\w-]*="[^"]*")*)[\t\n\f\r ]*\/?|\/([a-z]+)[\t\n\f\r ]*)>/uy,_=/([a-zA-Z][\w-]*)="([^"]*)"/gu;function v(e){if(typeof e!=`string`)return!1;for(let t=e.indexOf(`<`);t!==-1;t=e.indexOf(`<`,g.lastIndex)){g.lastIndex=t;let[,n,r,i]=g.exec(e)??[],a=h[n??i];if(!a)return!1;for(let[,e,t]of r?.matchAll(_)??[])if(!Object.hasOwn(a,e)||!a[e].test(t))return!1}return!0}function y(e){return console.error(`Not markup this app writes, shown as text instead:`,e.length>300?`${e.slice(0,300)}\u2026`:e),e}var b=new Set;function x(e){return e==null||e===i?e:b.has(e)?o(e):v(e)?(b.size>=256&&b.clear(),b.add(e),o(e)):y(String(e))}var S=`m5.875 10.154 1.376-.772.023-.067-.023-.037h-.067l-.23-.015-.787-.02-.681-.03-.661-.035-.166-.035-.156-.205.016-.103.14-.094.2.018.442.03.665.046.481.028.714.075h.113l.016-.047-.039-.028-.03-.028-.687-.466-.744-.492-.39-.284-.21-.143-.106-.135-.046-.294.19-.21.258.017.065.018.26.2.557.43.726.535.106.089.042-.03.006-.022-.048-.08-.395-.713-.422-.726-.187-.301-.05-.18a1 1 0 0 1-.03-.213l.218-.296.12-.039.29.039.123.106.18.413.293.65.453.884.133.262.07.242.027.075h.046v-.043l.038-.497.069-.611.067-.787.023-.221.11-.266.218-.143.17.081.14.2-.02.13-.083.54-.163.846-.106.567h.062l.07-.07.287-.382.482-.602.213-.239.248-.264.159-.125h.301l.221.329-.099.34-.31.393-.256.333-.369.496-.23.397.021.032.055-.006.832-.177.45-.081.537-.092.243.113.026.115-.096.236-.573.141-.673.135-1.003.237-.012.01.014.017.452.042.193.01h.473l.88.066.23.153.138.186-.023.141-.354.181-.478-.113-1.116-.266-.383-.096h-.053v.032l.32.312.584.528.731.68.037.168-.094.133-.099-.014-.643-.484-.248-.218-.561-.472H9.08v.05l.129.189.684 1.027.035.315-.05.103-.177.062-.194-.036-.4-.561-.413-.632-.333-.567-.041.023-.197 2.116-.092.108-.212.082-.177-.135-.094-.218.094-.43.113-.561.092-.447.083-.554.05-.184-.004-.013-.04.006-.418.574-.636.858-.503.539-.12.048-.21-.108.02-.193.117-.172.696-.886.42-.549.27-.317-.001-.046h-.016l-1.85 1.201-.328.042-.142-.132.018-.218.067-.071.556-.383Z`,C=`M11.04 8.364a1.72 1.72 0 0 0-.152-1.432 1.8 1.8 0 0 0-1.925-.846 1.8 1.8 0 0 0-.778-.498 1.8 1.8 0 0 0-.927-.05 1.8 1.8 0 0 0-.827.414 1.77 1.77 0 0 0-.507.767 1.8 1.8 0 0 0-.683.297 1.75 1.75 0 0 0-.499.549 1.75 1.75 0 0 0 .22 2.07 1.72 1.72 0 0 0 .151 1.432 1.8 1.8 0 0 0 1.926.846 1.77 1.77 0 0 0 1.333.587c.78 0 1.47-.496 1.707-1.227a1.8 1.8 0 0 0 .684-.298 1.75 1.75 0 0 0 .499-.548 1.75 1.75 0 0 0-.222-2.063m-2.667 3.678a1.33 1.33 0 0 1-.851-.304l.042-.024 1.413-.804a.23.23 0 0 0 .116-.199V8.747l.597.34q.01.005.011.015v1.629a1.323 1.323 0 0 1-1.328 1.31m-2.857-1.203a1.3 1.3 0 0 1-.158-.879l.042.025 1.414.805a.23.23 0 0 0 .23 0l1.729-.982v.68a.02.02 0 0 1-.01.018l-1.431.814a1.34 1.34 0 0 1-1.816-.48m-.372-3.037a1.32 1.32 0 0 1 .7-.574v1.656a.22.22 0 0 0 .114.197l1.72.979-.598.34a.02.02 0 0 1-.021 0L5.63 9.587a1.304 1.304 0 0 1-.487-1.791zm4.907 1.125L8.327 7.94l.596-.34a.02.02 0 0 1 .02 0l1.43.814a1.3 1.3 0 0 1 .512.528 1.3 1.3 0 0 1-.118 1.4 1.33 1.33 0 0 1-.595.436V9.122a.23.23 0 0 0-.12-.195m.594-.881-.042-.025-1.411-.812a.23.23 0 0 0-.232 0l-1.727.983v-.68a.02.02 0 0 1 .008-.018l1.429-.813a1.34 1.34 0 0 1 1.425.061 1.3 1.3 0 0 1 .55 1.298zM6.908 9.252l-.597-.34a.02.02 0 0 1-.012-.016V7.271c0-.249.073-.493.209-.703s.329-.378.557-.483a1.35 1.35 0 0 1 1.415.18l-.042.023-1.413.804a.23.23 0 0 0-.116.2zm.324-.69.77-.438.77.438v.875l-.768.437-.77-.437z`,w=`M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z`,T=`M11.998 24c-.321 0-.641-.084-.922-.247l-2.936-1.737c-.438-.245-.224-.332-.08-.383c.585-.203.703-.25 1.328-.604c.065-.037.151-.023.218.017l2.256 1.339c.082.045.197.045.272 0l8.795-5.076c.082-.047.134-.141.134-.238V6.921c0-.099-.053-.192-.137-.242l-8.791-5.072c-.081-.047-.189-.047-.271 0L3.075 6.68C2.99 6.729 2.936 6.825 2.936 6.921v10.15c0 .097.054.189.139.235l2.409 1.392c1.307.654 2.108-.116 2.108-.89V7.787c0-.142.114-.253.256-.253h1.115c.139 0 .255.112.255.253v10.021c0 1.745-.95 2.745-2.604 2.745c-.508 0-.909 0-2.026-.551L2.28 18.675c-.57-.329-.922-.945-.922-1.604V6.921c0-.659.353-1.275.922-1.603l8.795-5.082c.557-.315 1.296-.315 1.848 0l8.794 5.082c.57.329.924.944.924 1.603v10.15c0 .659-.354 1.273-.924 1.604l-8.794 5.078C12.643 23.916 12.324 24 11.998 24zM19.099 13.993c0-1.9-1.284-2.406-3.987-2.763c-2.731-.361-3.009-.548-3.009-1.187c0-.528.235-1.233 2.258-1.233c1.807 0 2.473.389 2.747 1.607c.024.115.129.199.247.199h1.141c.071 0 .138-.031.186-.081c.048-.054.074-.123.067-.196c-.177-2.098-1.571-3.076-4.388-3.076c-2.508 0-4.004 1.058-4.004 2.833c0 1.925 1.488 2.457 3.895 2.695c2.88.282 3.103.703 3.103 1.269c0 .983-.789 1.402-2.642 1.402c-2.327 0-2.839-.584-3.011-1.742c-.02-.124-.126-.215-.253-.215h-1.137c-.141 0-.254.112-.254.253c0 1.482.806 3.248 4.655 3.248C17.501 17.007 19.099 15.91 19.099 13.993z`,E=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 2 2 5v6l6 3 6-3V5L8 2Z"/><path d="M2 5l6 3 6-3"/><path d="M8 8v6"/></svg>`,D=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,O=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.5" y="4" width="11" height="9" rx="1.2"/><path d="M6 4V3h4v1"/></svg>`,k=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="m4.5 4.5 7 2-5 5z"/><circle cx="4.5" cy="4.5" r="2" fill="currentColor"/><circle cx="11.5" cy="6.5" r="2" fill="currentColor"/><circle cx="6.5" cy="11.5" r="2" fill="currentColor"/></svg>`,A=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><rect x="1" y="1.5" width="14" height="3" rx=".5"/><rect x="1" y="6.5" width="8" height="3" rx=".5"/><rect x="11" y="6.5" width="4" height="3" rx=".5"/><rect x="1" y="11.5" width="4" height="3" rx=".5"/><rect x="7" y="11.5" width="8" height="3" rx=".5"/></svg>`,j=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M1 1h4v4H1zm5 5h4v4H6zm5 5h4v4h-4z"/><path d="M6 1h4v4H6zm5 0h4v4h-4zM1 6h4v4H1zm10 0h4v4h-4zM1 11h4v4H1zm5 0h4v4H6z" opacity=".35"/></svg>`,M=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" aria-hidden="true"><rect x="1" y="1" width="14" height="2.5" rx=".5" fill="currentColor" stroke="none"/><rect x="1" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="6.25" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="11.5" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><path d="M4 3.5c0 4.5-1.25 4-1.25 8.5M8 3.5v8.5M12 3.5c0 4.5 1.25 4 1.25 8.5"/></svg>`,N=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="2.5" r="1.5" fill="currentColor"/><circle cx="3" cy="13" r="1.5" fill="currentColor"/><circle cx="8" cy="13" r="1.5" fill="currentColor"/><circle cx="13" cy="13" r="1.5" fill="currentColor"/><path d="M8 4v3M8 7H3m5 0h5M3 7v4M8 7v4M13 7v4"/></svg>`,P=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,F=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6.67 8.67a3.33 3.33 0 0 0 5.03.36l2-2a3.33 3.33 0 0 0-4.71-4.71l-1.15 1.14"/><path d="M9.33 7.33a3.33 3.33 0 0 0-5.03-.36l-2 2a3.33 3.33 0 0 0 4.71 4.71l1.14-1.14"/></svg>`,I=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 1.5H2.5a1 1 0 0 0-1 1V5m9.5-3.5h2.5a1 1 0 0 1 1 1V5M1.5 11v2.5a1 1 0 0 0 1 1H5m6 0h2.5a1 1 0 0 0 1-1V11"/><circle cx="7.25" cy="7.25" r="2.75"/><path d="m9.25 9.25 2.25 2.25"/></svg>`,L=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 1.5H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5.5L9 1.5ZM9 1.5v4h4M5.5 8h5m-5 3h3.5"/></svg>`,R=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5zM4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5"/></svg>`,z=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4.5 4.5-3 3.5 3 3.5m7-7 3 3.5-3 3.5M9.5 2l-3 12"/></svg>`,B=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6.5 3.5 1.6 3.9L12 9l-3.9 1.6-1.6 3.9-1.6-3.9L1 9l3.9-1.6 1.6-3.9ZM12 1.5v4m-2-2h4"/></svg>`,V=`<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>`,H=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.5v2"/><rect x="2" y="3.5" width="12" height="10" rx="2.5"/><path d="M6 7.5v2m4-2v2"/></svg>`,U=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" aria-hidden="true"><path d="M1 8h3.5m7 0H15"/><circle cx="8" cy="8" r="3.5"/></svg>`,W=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="4" cy="3.5" r="1.5"/><circle cx="4" cy="12.5" r="1.5"/><circle cx="12" cy="12.5" r="1.5"/><path d="M4 5v6M12 11V6a2 2 0 0 0-2-2H7m1.5-1.5L7 4l1.5 1.5"/></svg>`,G=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" aria-hidden="true"><path d="M2 2h5.5l6.5 6.5-5.5 5.5L2 7.5Z"/><circle cx="5" cy="5" r="1"/></svg>`,K=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m10 2 4 4-8 8H2v-4l8-8Zm-1 1 4 4"/></svg>`,q=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h12M6 4V2h4v2M4 4l.6 10h6.8L12 4M6.5 7v4m3-4v4"/></svg>`;export{p as a,v as b,y as c,x as d,S as e,C as f,w as g,T as h,E as i,D as j,O as k,k as l,A as m,j as n,M as o,N as p,P as q,F as r,I as s,L as t,R as u,z as v,B as w,V as x,H as y,U as z,W as A,G as B,K as C,q as D};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
lit-html/directives/unsafe-html.js:
|
|
5
|
+
(**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*)
|
|
10
|
+
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as e}from"./chunk-TUII34K2.js";var t=`/api/config`,n=`http://127.0.0.1:3123/`;function r(e){if(typeof e!=`string`||!e.trim())return null;try{let t=new URL(e);return![`http:`,`https:`].includes(t.protocol)||t.username||t.password||t.search||t.hash?null:(t.pathname=t.pathname.replace(/\/+$/u,``)+`/`,t.href)}catch{return null}}var i=`deepview.sync.serverInfo`,a=`deepview.sync.standaloneProbe`;function o(){try{return localStorage.getItem(a)===`1`}catch{return!1}}function s(){try{localStorage.setItem(a,`1`)}catch{}}function c(e){return e===`managed+e2e`||e===`e2e+managed`}function l(e,t){return(e===`managed`||c(e))&&/^\/(?:team|manage|npm|my|repo)(?:\/|$)/u.test(t)}function u(e,t=null){return t&&(c(e)||e===t)?t:e===`managed`||e===`managed+e2e`?`managed`:`e2e`}function d(e,t){return e&&c(e.mode)&&t.mode===`e2e`?{...e,githubNewIssueLabels:t.githubNewIssueLabels??``,...t.deepviewScanServer?{deepviewScanServer:t.deepviewScanServer}:{}}:t}function f(e){if(typeof e!=`object`||!e)return null;let t=e.mode;if(t!==`e2e`&&t!==`managed`&&t!==`managed+e2e`&&t!==`e2e+managed`)return null;let n=null,i=e.managed;if(typeof i==`object`&&i){let e=i.loginPath,t=i.cookieName;typeof e==`string`&&typeof t==`string`&&(n={loginPath:e,cookieName:t},i.allowShare===!0&&(n.allowShare=!0))}let a=t===`managed`?null:r(e.deepviewScanServer),o=e.githubNewIssueLabels;return{mode:t,managed:n,...a?{deepviewScanServer:a}:{},...typeof o==`string`&&o.length<=4096?{githubNewIssueLabels:o}:{}}}async function p(){try{let e=await fetch(t,{credentials:`same-origin`,cache:`no-store`,headers:{accept:`application/json`}});if(e.status===404)return`standalone`;if(!e.ok)return null;let n=await e.json(),r=f(n);return r&&n.session!==void 0?{...r,session:n.session}:r}catch{return null}}async function m(e,t=3e3){let n;try{return await Promise.race([e,new Promise(e=>{n=setTimeout(()=>e(null),t)})])}catch{return null}finally{clearTimeout(n)}}function h(){try{let e=localStorage.getItem(i);if(e==null)return null;let t=f(JSON.parse(e));return t?{mode:t.mode,managed:t.managed}:null}catch{return null}}function g(e){try{localStorage.setItem(i,JSON.stringify({mode:e.mode,managed:e.managed})),localStorage.removeItem(a)}catch{}}var _=`deepview.objstore-presence.`;function v(e){return _+e}function y(e){try{let t=localStorage.getItem(v(e));if(!t)return null;let n=JSON.parse(t);return!n||typeof n!=`object`?null:{names:n.names&&typeof n.names==`object`?n.names:{},bundles:n.bundles&&typeof n.bundles==`object`?n.bundles:{},bundleNames:n.bundleNames&&typeof n.bundleNames==`object`?n.bundleNames:{},baselines:b(n.baselines,n.localVersions)}}catch{return null}}function b(e,t){let n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isSafeInteger(r)&&r>=0&&(n[e]={version:r,incarnation:null,synced:!0,hash:null});if(e&&typeof e==`object`)for(let[t,r]of Object.entries(e))!r||typeof r!=`object`||!Number.isSafeInteger(r.version)||r.version<0||r.incarnation!=null&&typeof r.incarnation!=`string`||(n[t]={version:r.version,incarnation:r.incarnation??null,synced:r.synced===!0,hash:typeof r.hash==`string`?r.hash:null});return n}function x(e,t,n,r){let i=y(e),a=Object.entries((t===`bundle`?i?.bundles:i?.names)??{}).find(([,e])=>e===n)?.[0],o=i?.baselines?.[a];return{synced:a!==void 0&&(t===`bundle`||o?.synced===!0&&o.hash===r),cached:!0}}var S=`deepview-objstore.v1.put`,C=`deepview-objstore.v1.delete`,w=`deepview-objstore.v1.fetch`,T=`deepview-objstore.v1.fetch-rest`,E=`deepview-objstore.v1.put-rest`,D=`deepview-objstore.v1.delete-rest`;function O(e){return e==null?``:String(e)}function k(e){return e??``}function A(t,n){return e([S,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),t.contentHash,String(t.expectedLength),n].join(`
|
|
2
|
+
`))}function j(t,n){return e([C,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),n].join(`
|
|
3
|
+
`))}function M(t,n,r){return e([w,t,n,r].join(`
|
|
4
|
+
`))}async function N(e,t){return new Uint8Array(await crypto.subtle.sign({name:`Ed25519`},e,t)).toBase64({alphabet:`base64url`,omitPadding:!0})}function P(e,t,n){return N(e,A(t,n))}function F(e,t,n){return N(e,j(t,n))}function I(e,t,n,r){return N(e,M(t,n,r))}function L(t,n,r){return e([T,t,n,String(r)].join(`
|
|
5
|
+
`))}function R(e,t,n,r){return N(e,L(t,n,r))}function z(t,n){return e([E,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),t.contentHash,String(t.expectedLength),String(n)].join(`
|
|
6
|
+
`))}function B(e,t,n){return N(e,z(t,n))}function V(t,n){return e([D,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),String(n)].join(`
|
|
7
|
+
`))}function H(e,t,n){return N(e,V(t,n))}async function U(e){let t=await crypto.subtle.digest(`SHA-256`,e);return new Uint8Array(t).toBase64({alphabet:`base64url`,omitPadding:!0})}export{n as a,r as b,o as c,s as d,c as e,l as f,u as g,d as h,f as i,p as j,m as k,h as l,g as m,v as n,y as o,x as p,P as q,F as r,I as s,R as t,B as u,H as v,U as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e===`inprogress`||e===`fixed`||e===`invalid`||e===`deleted`||e===`ignored`?e:void 0}function t(t){if(t)return e(t.triage)??(t.deleted?`deleted`:void 0)}function n(e){let n=t(e);return n===void 0||n===`ignored`}function r(e){return!e||!e.color&&!t(e)&&!e.comment&&!e.fix&&!(e.ignoredReports&&e.ignoredReports.length>0)&&e.flagged===void 0}function i(e,t,n){let r=e.get(t)?.ignoredReports;return Array.isArray(r)&&r.includes(n)}function a(e,t){return Array.isArray(e?.scopedIgnoredReports)&&e.scopedIgnoredReports.includes(t)}function o(t){if(!t||typeof t!=`object`)return;let n=t,i={};typeof n.color==`string`&&n.color&&(i.color=n.color);let a=e(n.triage)??(n.deleted?`deleted`:void 0);if(a&&(i.triage=a),typeof n.comment==`string`&&n.comment&&(i.comment=n.comment),typeof n.fix==`string`&&n.fix&&(i.fix=n.fix),typeof n.flagged==`boolean`&&(i.flagged=n.flagged),Array.isArray(n.ignoredReports)){let e=n.ignoredReports.filter(e=>typeof e==`string`&&e.length>0);e.length>0&&(i.ignoredReports=e)}if(Array.isArray(n.scopedIgnoredReports)&&i.ignoredReports){let e=[...new Set(n.scopedIgnoredReports.filter(e=>typeof e==`string`&&i.ignoredReports.includes(e)))];e.length>0&&(i.scopedIgnoredReports=e)}return r(i)?void 0:i}function s(e,t){let n=e??[],r=t??[];if(n.length!==r.length)return!1;if(n.length===0)return!0;let i=new Set(n);for(let e of r)if(!i.has(e))return!1;return!0}function c(e,n){let r=e??{},i=n??{};return(r.color??``)===(i.color??``)&&(t(r)??``)===(t(i)??``)&&(r.comment??``)===(i.comment??``)&&(r.fix??``)===(i.fix??``)&&r.flagged===i.flagged&&s(r.ignoredReports,i.ignoredReports)&&s(r.scopedIgnoredReports,i.scopedIgnoredReports)}function l(e,t,n){let r=e.get(t),i=o({...r,...n});return i===void 0?e.delete(t):!c(r,i)&&(e.set(t,i),!0)}function u(e,t,n){let r=o(n),i=e.get(t);return r===void 0?e.delete(t):!c(i,r)&&(e.set(t,r),!0)}function d(e,t,n,r,i=!1){let a=new Set(e.get(t)?.ignoredReports??[]);r?a.add(n):a.delete(n);let o=new Set(e.get(t)?.scopedIgnoredReports??[]);return r&&i&&o.add(n),l(e,t,{ignoredReports:a.size>0?[...a]:void 0,scopedIgnoredReports:[...o]})}async function f(e){let t=await crypto.subtle.digest(`SHA-512`,e);return`sha512-${new Uint8Array(t).toBase64()}`}export{t as a,n as b,i as c,a as d,o as e,l as f,u as g,d as h,f as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$e as e,Ze as t,a as n,bf as r,ua as i,w as a}from"./chunk-OFZYEWBH.js";import{c as o,d as s,g as c}from"./chunk-2XUEZHIP.js";var l=t(s`<path d="M3.5 8.4l2.9 2.9 6.1-6.6"/>`),u=t(s`<circle class="fill" cx="8" cy="8" r="3"/>`),d=t(s`<path d="M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6"/>`),f=t(s`<circle class="dotted" cx="8" cy="8" r="5.5"/>`),p=t(s`<path d="M2.6 3.2h7.6v5.3H6.3L4 10.4V8.5H2.6z"/><path d="M12.2 6.2h1.2v5.3H12v1.9l-2.3-1.9H7"/>`),m={approved:[`approved`,r.approved[1],`Approved`],changes:[`changes`,r.changes[1],`Changes requested`],commented:[`commented`,e,`Commented`],dismissed:[`dismissed`,e,`Review dismissed`]},h={done:[`reviewed`,l,`Reviewed`],running:[`running`,u,`Reviewing`],failed:[`failed`,d,`Review failed`],requested:[`requested`,f,`Asked to review again`]},g=[`requested`,f,`Review requested`],_=e=>e.slice(0,7),v=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),y=(e,t,n=!1)=>`${e.toLocaleString(`en-US`)}${n?`+`:``} ${t}${e===1&&!n?``:`s`}`;function b(e){return e?e.failed?h.failed:e.requested?h.requested:h[e.code?.status]??null:null}function x(e){let t=b(e.codex),n=e.codex?.code?.commit??null;return[...t?[{who:i(e.codex.login,`Codex`),standing:t,commit:n,stale:n!==null&&n!==e.head}]:[],...e.reviewers.map(t=>({who:i(t.login,t.login??`someone`),standing:m[t.state]??g,requested:t.requested&&!!m[t.state],workflow:t.workflow??null,commit:t.commit,at:t.at,stale:t.commit!==null&&t.commit!==e.head}))]}var S=e=>(e.moreReviews??0)+(e.moreRequests??0),C=e=>[e.moreReviews>0?y(e.moreReviews,`more review`):null,e.moreRequests>0?y(e.moreRequests,`more review request`):null].filter(Boolean).join(` and `);function w(e){if(!e.head)return!0;let t=e.codex?.code;return t?.status===`done`&&t.commit===e.head||e.reviewers.some(t=>m[t.state]&&t.state!==`dismissed`&&t.commit===e.head)?!0:e.moreReviews>0&&null}var T=e=>e?o`<span class="${`review-severity is-${e}`}">${e.toUpperCase()}</span>`:c;function E(e){if(!e)return c;let t=x(e),{open:n,more:r,severity:i}=e.threads,a=n>0?`${y(n,`open review thread`,r)}${i?`, the gravest ${i.toUpperCase()}`:``}`:r?`No open review thread among those read; more on GitHub`:null,s=w(e);return o`<span class="issue-reviews">${t.map(({who:e,standing:[t,n,r],commit:i,stale:a,requested:s})=>{let c=`${r}${s?`, and requested again`:``}${a?`, on an earlier commit (${_(i)})`:i?`, on the latest commit`:``}`;return o`<span class="${`review-mark is-${t}${a?` is-stale`:``}`}"><span class="review-glyph" role="img" aria-label="${c}" data-tooltip="${c}">${n}</span><span class="review-who">${e}</span></span>`})} ${S(e)>0?o`<span class="review-more" data-tooltip="${`${C(e)}, on GitHub`}">+${S(e)}</span>`:c} ${a?o`<span class="review-threads" role="img" aria-label="${a}" data-tooltip="${a}">${p}<span>${n}${r?`+`:``}</span>${T(i)}</span>`:c} ${s===!1?o`<span class="review-unreviewed" data-tooltip="${t.length>0?`No review is on the latest commit`:`No reviews yet`}">Unreviewed</span>`:s===null?o`<span class="review-unreviewed" data-tooltip="No review read is on the latest commit; more on GitHub">Unreviewed?</span>`:c}</span>`}function D(e,t,n){if(!e)return c;let r=o`<code>${_(e)}</code>`;return o`<span class="review-on">on ${n?o`<a href="${`https://github.com/${n}/commit/${e}`}" target="_blank" rel="noopener noreferrer">${r}</a>`:r}${e===t?`, the latest commit`:`, an earlier commit`}</span>`}function O(e,t){if(!e)return c;let{head:n,codex:r}=e,a=(e,[a,s,c],l)=>o`<li class="review-row">${i(r.login,`Codex`)} <span class="${`review-state is-${a}`}">${s}${l}: ${c.toLowerCase()}</span>${D(e.commit,n,t)}</li>`,s=[...r?.code?[a(r.code,b(r)??h.done,`Code review`)]:[],...r?.security?[a(r.security,h[r.security.status]??h.done,`Security review`)]:[],...x({...e,codex:null}).map(({who:e,standing:[r,i,a],commit:s,at:l,requested:u,workflow:d})=>o`<li class="review-row">${e} <span class="${`review-state is-${r}`}">${i}${a}${u?`, requested again`:``}</span>${d?o`<span class="review-on">by the workflow <code>${d}</code></span>`:c}${D(s,n,t)}${l?o`<time datetime="${new Date(l).toISOString()}">${v(l)}</time>`:c}</li>`)],{open:l,resolved:u,more:d,list:f=[]}=e.threads;return o`<section class="repo-item-section"><h4>Reviews</h4>${s.length>0?o`<ul>${s}</ul>`:o`<p class="repo-item-quiet">No reviews yet.</p>`} ${S(e)>0?o`<p class="repo-item-quiet">And ${C(e)}, on GitHub.</p>`:c} ${w(e)===null?o`<p class="repo-item-quiet">No review read is on the latest commit, <code>${_(n)}</code>; one of those on GitHub may be.</p>`:s.length>0&&!w(e)?o`<p class="repo-item-quiet">No review is on the latest commit, <code>${_(n)}</code>.</p>`:c}</section>${l>0||u>0?o`<section class="repo-item-section"><h4>Open threads</h4>${f.length>0?o`<ul>${f.map(e=>o`<li><a class="repo-item-row review-thread" href="${e.url??c}" target="_blank" rel="noopener noreferrer">${T(e.severity)}<span class="repo-item-title">${e.title||`(no comment)`}</span> ${e.path?o`<code class="review-path">${e.path}${e.line?`:${e.line}`:``}</code>`:c} ${e.outdated?o`<span class="repo-item-quiet">outdated</span>`:c}</a></li>`)}</ul>`:o`<p class="repo-item-quiet">${d?`None open among those read.`:`None open.`}</p>`} ${u>0||d?o`<p class="repo-item-quiet">${u>0?`${y(u,`thread`)} resolved`:``}${d?`${u>0?`; `:``}more on GitHub`:``}.</p>`:c}</section>`:c}`}var k=n({items:new Map,changes:0}),A=null,j=()=>a.managedSession?`${a.managedSession.id}\0${a.managedSession.role}`:null,M=(e,t,n)=>`${e}\0${t}\0${n}`,N=e=>Number.isSafeInteger(e?.readAt)&&e.readAt>0?e.readAt:Date.now();function P(e,t,n,r=null){let i=j();i!==A&&(k.items.clear(),A=i);let a=!1;for(let o of t){let t=M(i,e,o.number),s=k.items.get(t);if(s&&s.readAt>n)continue;let c=s&&(s.item.state===`open`?`open`:`closed`),l=!c||c===(o.state===`open`?`open`:`closed`)?s?.moved??null:{from:c,before:s.readAt};k.items.set(t,{item:{...o,kind:o.kind??r??s?.item.kind??null},readAt:n,moved:l}),a=!0}a&&k.changes++}var F=(e,t)=>k.items.get(M(j(),e,t))??null;function I(e,t){let n=M(j(),e,``);return k.changes,[...k.items].flatMap(([e,r])=>e.startsWith(n)&&r.item.kind===t?[r]:[])}var L=()=>k.changes,R=e=>e.state===`open`?`open`:`closed`;function z(e,t){let n=R(e.item);if(e.readAt<=t||!e.moved)return n;if(e.moved.before>=t)return e.moved.from;let r=e.item.closedAt??e.item.mergedAt??null;return n===`closed`&&r!==null&&r>t?e.moved.from:n}export{E as a,O as b,N as c,P as d,F as e,I as f,L as g,R as h,z as i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,g as t,h as n,k as r}from"./chunk-JJK5OZG2.js";import{k as i}from"./chunk-W6VOKW2N.js";function a(e,t){return e?e.base===``?`${e.other}${t}`:t.startsWith(e.base)?t.slice(e.base.length):null:t}var o=(e,t)=>`${`../`.repeat(e.base.split(`/`).length-1)}${t}`;function s({root:e,paths:t},n,r){if(!e||n===`.`)return n;for(let e of r){let r=t.get(`${n}/${e}`);if(r?.endsWith(`/${e}`))return r.slice(0,-e.length-1)}let i=a(e,`${n}/`);return i===null?o(e,n):i.slice(0,-1)||`.`}function c(e,t){if(!e)return{prefix:t,from:null,to:null};let n=t.startsWith(e.other)?t:``;return{prefix:n,from:`./${e.base}${n.slice(e.other.length)}`,to:`./${n||e.other}`}}function l(e){let t=i(e),n=new Map;for(let[r,i]of Object.entries(e?.bundle?.reason??{})){let e=new Set(Array.isArray(i)?i.filter(e=>t.has(e)):[]);e.size>0&&n.set(r,e)}return{stasis:e?.kind===`stasis`,files:t,trees:n}}var u=[[`extra`,`add`],[`metro`,`bundle:metro`]];function d(e){if(e.length!==2)return e;let t=(t,n)=>e.find((r,i)=>r.trees.has(n)&&!r.trees.has(t)&&e[1-i].trees.has(t)&&!e[1-i].trees.has(n)),n=e.map(()=>new Map);for(let[r,i]of u){let a=t(r,i);a&&n[e.indexOf(a)].set(i,r)}let r=t(`metro`,`bundle:metro`);return r&&t(`run`,`bundle`)===r&&n[e.indexOf(r)].set(`bundle`,`run`),e.map((e,t)=>n[t].size===0?e:{...e,trees:new Map([...e.trees].map(([e,r])=>[n[t].get(e)??e,r])),actual:new Map([...n[t]].map(([e,t])=>[t,e]))})}function f(e,t){if(!e.stasis||e.trees.size!==1)return null;let[[n,r]]=e.trees;return r.size===e.files.size&&!t.some(t=>t!==e&&t.trees.has(n))?n:null}var p=e=>e.trees.size===0||e.trees.size===1&&[...e.trees.values()][0].size===e.files.size,m=`reasons:`,h=(e,t)=>`${m}${JSON.stringify([e,t].toSorted())}`;function g(e){if(!e.startsWith(m))return null;try{let t=JSON.parse(e.slice(m.length));return Array.isArray(t)&&t.length===2&&t.every(e=>typeof e==`string`)?t:null}catch{return null}}function _(...e){let t=d(e.map(l));if(t.length===2&&!t.some(p)){let[e,n]=t.map(e=>[...e.trees.keys()].toSorted()),r=e.filter(e=>n.includes(e)),[i,a]=[e,n].map(e=>e.filter(e=>!r.includes(e)));if(i.length>0&&a.length>0)return[...r.map(e=>({id:`reason:${e}`,label:e})),...i.flatMap(e=>a.map(t=>({id:h(e,t),label:`${e} \u2192 ${t}`})))]}let n=t.filter(e=>f(e,t)===null),r=new Set(n.flatMap(e=>[...e.trees.keys()])),i=e=>n.some(t=>t.stasis&&(t.trees.get(e)?.size??0)<t.files.size);return[...r].some(i)?[...r].toSorted().map(e=>({id:`reason:${e}`,label:e})):[]}function v(e,t,n=``){if(!n)return[``,``];let r=g(n),i=d([e,t].map(l)),a=n.startsWith(`reason:`)?n.slice(7):null;return i.map(e=>{let t=r?r.find(t=>e.trees.has(t)):f(e,i)??a;return t==null?n:`reason:${e.actual?.get(t)??t}`})}function y(e,t=``){let n=i(e);if(!t||e?.kind!==`stasis`)return n;let r=e?.bundle?.reason?.[t.replace(/^reason:/u,``)],a=new Set(Array.isArray(r)?r:[]);return new Map([...n].filter(([e])=>a.has(e)))}function b(e,t,n,r){return JSON.stringify([e,t,n,r])}function x(e,t=``){let n=new Map;if(e?.kind!==`stasis`||!e.bundle)return n;let r=t?i(e):null,a=t?y(e,t):null;for(let[t,i]of e.bundle.imports)for(let[e,o]of i)for(let[i,s]of o){let o=typeof s==`string`?[[null,s]]:s;for(let[s,c]of o){if(a&&!a.has(e)&&(r.has(e)||!a.has(c)))continue;let o=b(e,i,t,s);n.set(o,{key:o,parent:e,specifier:i,conditions:t,platform:s,target:c})}}return n}var S=(e,{lo:t,start:n},r)=>e[n+(r-t)/2];function C(e,t,{low:n,high:r},i,a){return e===-t||e-1<n||e!==t&&e+1<=r&&S(i,a,e-1)<S(i,a,e+1)?e+1:e-1}function w(e,t,n,{first:r,n:i,m:a,d:o,...s}){e.a.fill(1,0,r).fill(1,i),e.b.fill(1,0,r).fill(1,a);let c=i,l=a;for(let r=o;r>0;r--){let i=c-l,a=C(i,r,s,t,n[r]),o=S(t,n[r],a);for(let t=a>i?o:o+1;t<c;t++)e.a[t]=e.b[t-i]=1;c=o,l=c-a}for(let t=r;t<c;t++)e.a[t]=e.b[t]=1}function T(e,t,n){let r=0,i=t.length,a=e.length,o=2*(a+i);for(;r<a&&r<i&&e[r]===t[r];)r++;for(;a>r&&i>r&&e[a-1]===t[i-1];)a--,i--;let s={high:a-r,low:r-i},c=[r],l=[{lo:1,start:0}];for(let u=0;u<=s.high-s.low;u++){let d=l[u],f=Math.min(u,s.high),p=Math.max(-u,s.low+(s.low+u&1));l.push({lo:p,start:c.length});for(let m=p;m<=f;m+=2){let f=C(m,u,s,c,d),p=S(c,d,f),h=f>m?p:p+1,g=h;for(;h<a&&h-m<i&&e[h]===t[h-m];)h++;if(o+=2+h-g,c.push(h),h>=a&&h-m>=i)return w(n,c,l,{first:r,n:a,m:i,d:u,...s}),o}}throw Error(`no edit script between two lines`)}var E=/[\p{L}\p{N}_$]+|\s+|[^\p{L}\p{N}_$\s]/gu,D=2e3,ee=800,O=.6;function k(e,t){if(e.length>D)return null;let n=e.match(E)??[];return n.length>ee?null:{line:e,tokens:n,words:n.map(e=>(t.has(e)||t.set(e,t.size),t.get(e)))}}function A({tokens:e,line:t},n){let r=[];for(let i=0,a=0;a<e.length;i+=e[a++].length){if(n[a])continue;let o=r.at(-1);o&&/^\s*$/u.test(t.slice(o[1],i))?o[1]=i+e[a].length:r.push([i,i+e[a].length])}return r}var j=(e,t)=>e.reduce((e,[t,n])=>e+n-t,0)/Math.max(1,t.length);function M(e,t){let n={a:e.words.map(()=>0),b:t.words.map(()=>0)},r=T(e.words,t.words,n),i={a:A(e,n.a),b:A(t,n.b)};return{ranges:i,share:n.a.includes(1)?Math.min(j(i.a,e.line),j(i.b,t.line)):1,steps:r}}function te(e,t){if(e===t)return{a:[],b:[]};let n=new Map,r=k(e,n),i=k(t,n);if(r===null||i===null)return null;let{ranges:a,share:o}=M(r,i);return o<=O?a:null}var N=200,P=5e6,F=6,I=60,L=3;function R(e){let t=new Map;for(let n of e?.tokens??[])t.set(n,(t.get(n)??0)+1);return t}function z(e,t){let n=new Map,r=[e,t].map(e=>e.map(e=>k(e,n))),i=r.map(e=>e.map(R)),a=0,o=(e,t,n)=>{let r=0;for(let[i,o]of e)if(a+=L,(r+=i.length*Math.max(0,o-(t.get(i)??0)))>O*n.length)return 1/0;return r/Math.max(1,n.length)},s=(n,a)=>r[0][n]===null||r[1][a]===null?1/0:Math.min(o(i[0][n],i[1][a],e[n]),o(i[1][a],i[0][n],t[a])),c=(e,t)=>{if(a+=I,s(e,t)===1/0)return 1/0;let{share:n,steps:i}=M(r[0][e],r[1][t]);return a+=i,n<=O?n:1/0},l=new Float64Array(e.length*t.length).fill(NaN);return{share:(n,r)=>{let i=n*t.length+r;return Number.isNaN(l[i])&&(l[i]=e[n]===t[r]?0:c(n,r)),l[i]},floor:s,spent:()=>a}}function B(e,t,{share:n,spent:r}){let i=Array.from({length:e+1},()=>new Float64Array(t+1)),a=(e,t)=>n(e,t)===1/0?-1/0:1e3-n(e,t)+i[e][t];for(let n=0;n<e;n++)for(let e=0;e<t;e++)if(i[n+1][e+1]=Math.max(i[n][e+1],i[n+1][e],a(n,e)),r()>P)return null;let o=[];for(let n=e,r=t;n>0&&r>0;)i[n][r]===i[n][r-1]?r--:i[n][r]===i[n-1][r]?n--:o.push([--n,--r]);return o.toReversed()}function V(e,t,{share:n,floor:r}){let i=[];for(let a=0,o=0;a<e&&o<t;a++){let e=null,s=1/0,c=Array.from({length:Math.min(t,o+F)-o},(e,t)=>[o+t,r(a,o+t)]);for(let[t,r]of c.toSorted((e,t)=>e[1]-t[1]||e[0]-t[0])){if(r>s)break;(n(a,t)<s||n(a,t)===s&&t<e)&&([e,s]=[t,n(a,t)])}e!==null&&(i.push([a,e]),o=e+1)}return i}function H(e,t){if(e.length>N||t.length>N)return[];let n=z(e,t);return B(e.length,t.length,n)??V(e.length,t.length,n)}var U=(e,n,r)=>t(e,n,{...r,discard:!1});function W(e){if(e===null)return``;let t=e.type===`symlink`?e.target:e.data;if(typeof t==`string`)return t.includes(`\0`)?void 0:t;if(!t.includes(0))try{return r(t)}catch{return}}var G=new Set([`none`,`all`,`change`,`trailing`]);function K({horizon:e=1/0,whitespace:t=`none`,ignoreCase:n=!1}={}){if(e!==1/0&&!(Number.isSafeInteger(e)&&e>=0))throw RangeError(`horizon must be a whole number or Infinity, not ${e}`);if(!G.has(t))throw RangeError(`whitespace must be 'none', 'all', 'change' or 'trailing', not ${t}`);if(typeof n!=`boolean`)throw TypeError(`ignoreCase must be a boolean, not ${typeof n}`);return{horizon:e,whitespace:t,ignoreCase:n}}var q=e=>e.reduce((e,{a0:t,a1:n,b0:r,b1:i})=>e+n-t+i-r,0),J=e=>e===``?[]:e.split(/(?<=\n)/u),Y=e=>({...e,ignoreCase:!1,whitespace:`none`}),X=e=>(e.whitespace??`none`)!==`none`||!!e.ignoreCase;function Z(t,r,i,a,o){let s=J(t),c=J(r),l=(e,t,n,r)=>({a0:e,a1:t,b0:n,b1:r,remove:s.slice(e,t),insert:c.slice(n,r)}),u=o.flatMap(({a0:e,a1:t,b0:n,b1:r})=>e===t||n===r?[l(e,t,n,r)]:U(s.slice(e,t).join(``),c.slice(n,r).join(``),i).map(t=>l(e+t.a0,e+t.a1,n+t.b0,n+t.b1))),d=q(u)<q(a)&&(a=>{try{return n(t,r,a,{format:`normal`,ignoreCase:i.ignoreCase,whitespace:i.whitespace}),!0}catch(t){if(t instanceof e)return!1;throw t}})(u)?u:a;return q(d)<q(o)?d:o}function ne(e,t,n){let r=U(e,t,n);return X(n)?Z(e,t,n,r,U(e,t,Y(n))):r}function re(e,t,n){let r=W(e),i=W(t);if(r===void 0||i===void 0)return{binary:!0,blocks:[],insertions:null,deletions:null};let a=r===i?[]:ne(r,i,n),o=(e,t)=>a.reduce((n,r)=>n+r[t]-r[e],0);return{binary:!1,blocks:a,insertions:o(`b0`,`b1`),deletions:o(`a0`,`a1`)}}function ie(t,r,i,a){let{whitespace:o,ignoreCase:s}=K(a);try{return n(t,r,i,{format:`normal`,whitespace:o,ignoreCase:s}),!0}catch(t){if(t instanceof e)return!1;throw t}}var Q=/[ \t\n\v\f\r]/u,$=e=>{let t=e.split(`
|
|
2
|
+
`);return t.at(-1)===``&&t.pop(),t};function ae(e,t){for(let n=0,r=0;;n++,r++){let i=``,a=``;for(;n<e.length&&Q.test(e[n]);)i+=e[n++];for(;r<t.length&&Q.test(t[r]);)a+=t[r++];if(i!==a&&new Set(i+a).size>1)return!0;if(n>=e.length||r>=t.length)return!1}}function oe(e,t,n){try{if(!ie(e,t,n,{whitespace:`all`}))return!0}catch{return!0}let r=$(e),i=$(t),a=0,o=0;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e].a0:r.length;for(;a<t;a++,o++)if(r[a]!==i[o]&&ae(r[a],i[o]))return!0;e<n.length&&({a1:a,b1:o}=n[e])}return!1}function se(e,t,{extension:n=!0}={}){let r=e.split(`/`),i=t.split(`/`),a=0;for(;a<r.length-1&&a<i.length-1&&r[a]===i[a];)a++;let o=0;for(;o<r.length-a-1&&o<i.length-a-1&&r.at(-1-o)===i.at(-1-o);)o++;let s={head:a?`${r.slice(0,a).join(`/`)}/`:``,from:r.slice(a,r.length-o).join(`/`),to:i.slice(a,i.length-o).join(`/`),tail:o?`/${r.slice(-o).join(`/`)}`:``},c=s.from.lastIndexOf(`.`);return n&&!s.from.includes(`/`)&&!s.to.includes(`/`)&&c>0&&s.to.lastIndexOf(`.`)===c&&s.from.slice(0,c)===s.to.slice(0,c)?{...s,head:s.head+s.from.slice(0,c),from:s.from.slice(c),to:s.to.slice(c)}:s}export{te as a,H as b,W as c,K as d,re as e,oe as f,se as g,a as h,o as i,s as j,c as k,_ as l,v as m,y as n,b as o,x as p};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{b as e,h as t}from"./chunk-IZ6MYRYB.js";import{a as n}from"./chunk-WCPJDAYA.js";import{a as r,b as i,e as a}from"./chunk-IYPY47MC.js";import{A as o,B as s,D as c,E as l,b as u,c as d,d as f,j as p,m,p as h,s as g,t as _,w as v,z as y}from"./chunk-QRKFPLA4.js";import{B as b,b as x,c as S,i as C,x as w,z as T}from"./chunk-74AEKRES.js";import{a as E,b as D,c as O}from"./chunk-C4Z6ZBXV.js";import{c as k,f as A,g as j,i as ee}from"./chunk-2XUEZHIP.js";var te=D(class extends O{constructor(e){if(super(e),e.type!==E.ATTRIBUTE||e.name!==`class`||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return` `+Object.keys(e).filter(t=>e[t]).join(` `)+` `}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(` `).split(/\s/).filter(e=>e!==``)));for(let e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return A}});function ne(e){let t=typeof e==`string`?e.trim():``;return/^[0-9a-f]{7,64}$/iu.test(t)?t:``}function re(e){return ne(e?.commit)}function ie(e,t){return typeof e==`string`&&typeof t==`string`&&e!==``&&e.toLowerCase()===t.toLowerCase()}function ae(e,t){return ie(t,c(e))?re(e?.repo):``}var oe=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`),se=e=>x(e)?e:oe(S(String(e))),M=globalThis.trustedTypes?.createPolicy(`deepview`,{createHTML:se,createScriptURL:e=>{let t=new URL(e,globalThis.location.href);if(t.origin!==globalThis.location.origin)throw TypeError(`Not a same-origin script: ${t.href}`);return t.href}}),N=e=>M?M.createHTML(e):se(e),ce=e=>M?M.createScriptURL(String(e)):e,P={showAll:!1,packagesView:!1,dependencyPackagesView:!1,flowPackagesView:!1,bundleIssues:!1,bundleLayout:`graph`,lockfileLayout:`dependencies`,bundleReason:null,bundleReasonFor:null,selected:null,focusedPkg:null,topPkgsTab:`issues`,edgeOpacity:.22,nodeSize:1,showLabels:!1,selectedSeverities:new Set,selectedColors:new Set,pathFilter:``,hidden:new Set,solo:null,graphState:null,layoutCache:null,keptViewport:null};function le({keepViewport:e=!1}={}){P.graphState?._cleanup?P.graphState._cleanup({keepViewport:e}):e||(P.keptViewport=null),P.graphState=null}function F(e){return e.id??String(e._id)}function ue(e){let t=h(e);return t!==``&&t!==`revalidation`}var de=[{value:`confirmed`,label:`Confirmed`,kinds:[`confirmed`,`partial`,`revalidation`]},{value:`unreachable`,label:`Unreachable`,kinds:[`unreachable`]},{value:`refuted`,label:`Refuted`,kinds:[`refuted`]}];function fe(e){return de.find(t=>t.value===e)?.kinds??null}var pe=[``,`exclude`,`only`];function me(e,t){let n=fe(e);return n?.includes(`partial`)?t===`only`?[`partial`]:t===`exclude`?[`confirmed`]:n:n}function I(e){if(e.confidence!==void 0)return e.confidence;if(e.critical===!0||e._source)return 10}var he=e=>e.confidence!==void 0||e.critical===!0;function ge(e){return e.every(e=>e.every(e=>I(e)!==void 0))&&e.some(e=>e.some(he))}function _e(e,t,n){return e.some(e=>{let r=[`refuted`,`unreachable`].includes(n(e))?0:I(e);return r===void 0?t===0:r>=t})}function ve(e,t){let n=e.map(t).filter(e=>e.length>0);if(!n.some(e=>e.some(e=>I(e)!==void 0)))return 0;let r=e=>n.reduce((t,n)=>t+ +!!n.some(t=>(I(t)??-1)>=e),0),i;for(i=r(6)<=25?6:r(7)<=25?7:8;i>0&&r(i-1)===r(i);)i--;return i}function ye(e,t){return ge(e)?t:0}function be(e,t,n){let r=new Set(e.ruledOutIds??[]);for(let t of e)for(let e of t)[`refuted`,`unreachable`].includes(n(e))&&r.add(F(e));for(let i of e){let e=t(i);if(e.length!==0&&e.some(e=>me(`confirmed`,``).includes(n(e)||(e._source&&!e._sourcePass?`revalidation`:``)))){for(let e of i)if(r.add(F(e)),e.isApp&&Array.isArray(e.revalidateInputs))for(let t of e.revalidateInputs)t&&r.add(t)}}return r}function xe(e,t,n,r){let i=ye(e,t),a=e.filter(e=>_e(e,i,r));if(a.length===0)return!1;let o=new Set(me(`confirmed`,``));return e.some(e=>e.some(e=>o.has(r(e))))?a.every(e=>e.every(e=>n.has(F(e)))):!1}function Se(e,{tabs:t,kindOf:n,severityMode:r}){let i=e.map(t).filter(e=>e.length>0),a=be(e,t,n);if(!xe(i,ve(e,t),a,n))return!1;let o=ye(i,6);return i.every(e=>!_e(e,o,n)||!e.some(e=>m(e,r)!==`low`)||e.every(e=>a.has(F(e))))}function Ce(e){if(!e)return e;let t="`".repeat(Math.max(0,...[...e.matchAll(/`+/gu)].map(e=>e[0].length))+1),n=/^`|`$/u.test(e)||e.startsWith(` `)&&e.endsWith(` `)&&e.trim()!==``?` `:``;return`${t}${n}${e}${n}${t}`}var L=!0;function we(e,t=!1){L=e!==!1&&!t}function Te(){return L}function R(e){return L?h(e):``}function Ee(e){return h(e)!==``}function De(e){return e.some(e=>(e.groups??[]).some(e=>e.some(ue)))}function Oe(e){let t=R(e);return t&&t!==`revalidation`?t:null}function ke(e){return R(e)===`revalidation`}var Ae=new Set([`refuted`,`unreachable`]);function je(e){return Ae.has(R(e))}function Me(e){return Ae.has(R(e))}function Ne(e){let t=new Set(e);return de.filter(e=>e.kinds.some(e=>t.has(e)))}function z(e){return RegExp(`(^|/)${e}/`,`u`)}function Pe(e){return RegExp(`^(?:.*/)?${e}/(?:@[^/]+/[^/]+|[^/]+)/(.*)$`,`u`)}var Fe=z(`node_modules`),Ie=z(`vendor`),B=`node_modules`,Le=z(B),Re=Pe(B);function ze(e){e!==B&&(B=e,Le=z(e),Re=Pe(e))}var Be=null;function Ve(t){Be?.length===t.length&&Be.every((e,n)=>e===t[n])||(Be=[...t],ze(e(t)))}function He(){return B}function V(e){return Le.test(e)}var Ue=new WeakSet;function We(e){let t=!1;for(let n of e??[])for(let e of n.groups??[])for(let n of e){if(n.isApp!==!1)continue;let e=Ue.has(n);`isUpstream`in n&&!e||(V(n.file)?(n.isUpstream!==!0&&(t=!0),n.isUpstream=!0,Ue.add(n)):e&&(t=!0,delete n.isUpstream,Ue.delete(n)))}return t}function Ge(e){let t=typeof e==`string`?e:``;return Fe.test(t)||Ie.test(t)||Le.test(t)}var Ke=/^(.*(?:^|\/)node_modules\/(?:@[^/]+\/[^/]+|[^/]+))(?:\/|$)/u;function qe(e){return Ke.exec(typeof e==`string`?e:``)?.[1]??null}function Je(e){return typeof e!=`number`||!Number.isFinite(e)?null:n(e)}function Ye(e){if(e.length<=1)return{prefix:``,stripped:[...e]};let t=e.map(e=>e.split(`/`)),n=Math.min(...t.map(e=>e.length)),r=0;for(let e=0;e<n-1&&t.every(n=>n[e]===t[0][e]);e++)r=e+1;return r>0&&t[0][r-1].startsWith(`@`)&&r--,r>0&&t[0][r-1]===`node_modules`&&r--,r===0?{prefix:``,stripped:[...e]}:{prefix:`${t[0].slice(0,r).join(`/`)}/`,stripped:t.map(e=>e.slice(r).join(`/`))}}function Xe(e){return e.match(Re)?.[1]??e}var H={on:new WeakMap,off:new WeakMap};function Ze(e){let t=L?H.on:H.off,n=t.get(e);if(n===void 0){let r=L?[Oe(e),e.revalidateVerdict,e.revalidateRecommendation]:[];n=[e.file,e.title,e.description,e.impact,e.reproduction,Kt(e),e.recommendation,e.confidenceReason,...r,e.discoveredIn,e.repo?.github].filter(Boolean).join(`
|
|
2
|
+
`).toLowerCase(),t.set(e,n)}return n}function Qe(e){H.on.delete(e),H.off.delete(e)}function $e(e){return[typeof e?.category==`string`?e.category.trim():``,g(e,L)].filter(Boolean).join(` · `)}function et(e){if(e.length===0)return``;let t=e[0];for(let n=1;n<e.length;n++){for(;t&&!e[n].startsWith(t);)t=t.slice(0,-1);if(!t)return``}return t}function tt(e){if(!e)return``;let t=e.match(/github\.com\/([^/?#]+\/[^/?#]+?)(?:\.git)?(?:[/?#]|$)/iu);return t?t[1]:e}function nt(e){if(!e)return null;let t=e.trim().replace(/\/$/u,``);return t?/^https?:\/\//iu.test(t)?t:/^github\.com\//iu.test(t)?`https://${t}`:`https://github.com/${t}`:null}var rt=/^(?:@[\w.-]+\/)?[\w.-]+@[^/\s@]+$/u;function it(e){return rt.test(e||``)}function at(e){if(e==null||typeof e==`string`)return{id:e??``,prefix:``,commit:``};let t=l(e);return{id:typeof e.github==`string`?e.github:``,prefix:t?`${t}/`:``,commit:re(e)}}function ot(e,t,n,r=``){if(it(e))return null;let i=at(t),a=at(n),o=ne(r);if(i.id){let t=c({repo:{github:i.id}}),n=nt(t??i.id),r=ie(t,c({repo:{github:a.id}}));return`${n}/blob/${i.commit||(r?a.commit:``)||(r||!Ge(e)?o:``)||`HEAD`}/${i.prefix}${Xe(e)}`}if(V(e))return null;let s=nt(a.id);return s?`${s}/blob/${a.commit||o||`HEAD`}/${a.prefix}${e}`:null}function st(e,t){let n=e?.file??``,r=U(e,t);return r?k`<a href="${ct(r)}" target="_blank" rel="noopener">${n}</a>`:n}function ct(e){return e.replace(/#L\d+(?:-L?\d+)?$/u,``)}function lt({start:e,end:t}){return t>e?`#L${e}-L${t}`:`#L${e}`}function U(e,t){if(!e)return null;if(s(e.location))return e.location;let n=ot(e.file,e.repo,t,e.auditedCommit);if(!n)return null;let r=K(e.line);if(r)return`${n}${lt(r)}`;let i=parseInt(e.line,10);return Number.isFinite(i)?`${n}#L${i}`:n}var ut=/^https?:\/\/(?:www\.)?github\.com\/([^/\s]+\/[^/\s]+)\/(?:blob|tree|blame)\/[^/\s]+\/(\S+)$/u,dt=/#L(\d+)(?:-L?(\d+))?$/u;function ft(e){let t=typeof e==`string`?ut.exec(e):null;if(!t)return``;let n=t[2],r=dt.exec(n);if(!r)return`${t[1]}/${n}`;n=n.slice(0,r.index);let i=r[2]?`${r[1]}-${r[2]}`:r[1];return`${t[1]}/${n}:${i}`}var pt=/^(?:\s+\S|[-*+] |\d+[.)] |>|#{1,6}(?:[ \t]|$)|\||`{3}|~{3})/u;function mt(e){return e.split(/(\n{2,})/u).map(e=>{if(/^\n+$/u.test(e))return e;let t=e.split(`
|
|
3
|
+
`);return t.some(e=>pt.test(e)||G.test(e))?e:t.map(e=>e.trim()).filter(Boolean).join(` `)}).join(``)}function ht(e,t,n){let r=t?/^\n*/u.exec(e)[0]:``,i=e.slice(r.length),a=n?/\n*$/u.exec(i)[0]:``;return r+mt(i.slice(0,i.length-a.length))+a}function gt(e){if(!e)return e;let t=e.replaceAll(`\r
|
|
4
|
+
`,`
|
|
5
|
+
`),n=u(t);if(n.length===0)return mt(t);let r=[],i=0;for(let[e,a]of n)e>i&&r.push(ht(t.slice(i,e),i>0,!0)),r.push(t.slice(e,a)),i=a;return i<t.length&&r.push(ht(t.slice(i),!0,!1)),r.join(``)}var _t=/^( *)(`{3,}|~{3,})(.*)$/u,vt=/^[a-z0-9+#._-]{1,20}$/u;function yt(e,t){let n=0;for(;n<t&&e[n]===` `;)n++;return e.slice(n)}function bt(e){let t=e.split(`
|
|
6
|
+
`),n=_t.exec(t[0]),r=(n?.[2]??"```").slice(0,3),i=(n?.[3]??``).trim().split(/\s+/u)[0].toLowerCase(),a=!!(t.length>1?_t.exec(t.at(-1)):null)?.[2].startsWith(r),o=n?.[1].length??0,s=t.slice(1,a?-1:void 0);return{lang:vt.test(i)?i:``,code:(o>0?s.map(e=>yt(e,o)):s).join(`
|
|
7
|
+
`)}}function xt(e){let t=u(e||``);if(t.length===0)return[e];let n=[],r=0,i=(e,t)=>{let r=(t?e.replace(/^\n+/u,``):e).replace(/\n+$/u,``);r&&n.push(r)};for(let[a,o]of t)a>r&&i(e.slice(r,a),r>0),n.push(bt(e.slice(a,o))),r=o;return r<e.length&&i(e.slice(r),!0),n}var W=/^( *)(?:[-*+]|(\d{1,9})[.)]) +(?=\S)/u,G=/^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/u;function St(e){return/^ */u.exec(e)[0].length}function Ct(e){let t=e.length;for(;t>0&&!e[t-1].trim();)t--;return e.slice(0,t).join(`
|
|
8
|
+
`)}function wt(e){let t=[],n=0;for(let r of e)t.push(n),n+=r.length+1;return t}function Tt(e){let t=typeof e==`string`?e:``;if(!t)return[e];let n=u(t),r=t.split(`
|
|
9
|
+
`),i=wt(r),a=e=>!d(n,i[e])&&!G.test(r[e])&&W.test(r[e]),o=[],s=0,c=0,l=e=>{let t=r.slice(s,e).join(`
|
|
10
|
+
`).replace(/^\n+/u,``).replace(/\n+$/u,``);t.trim()&&o.push(t)};for(;c<r.length;){if(!a(c)){c++;continue}l(c);let e=W.exec(r[c]),t=!!e[2],u=[],f=null,p=!1;for(;c<r.length;){let e=r[c];if(!d(n,i[c])){if(!e.trim()){f.lines.push(``),p=!0,c++;continue}let n=St(e),r=G.test(e)?null:W.exec(e);if(r&&(!f||n<f.column)){if(!!r[2]!==t)break;f&&u.push(Ct(f.lines)),f={column:r[0].length,lines:[e.slice(r[0].length)]},p=!1,c++;continue}if(n<f.column&&(p||Et.test(e)||G.test(e)||kt.test(e)))break}f.lines.push(yt(e,f.column)),p=!1,c++}f&&u.push(Ct(f.lines)),o.push({ordered:t,start:t?Number(e[2]):null,items:u}),s=c}return o.length===0?[e]:(l(r.length),o)}var Et=/^ {0,3}(#{1,6})[ \t]+(\S.*?)(?:[ \t]+#+)?[ \t]*$/u,Dt=/^ {0,3}-+[ \t]*$/u;function Ot(e){let t=e.split(`
|
|
11
|
+
`),n=[],r=0,i=e=>{let i=t.slice(r,e).join(`
|
|
12
|
+
`).replaceAll(/^(?:[ \t]*\n)+|(?:\n[ \t]*)+$/gu,``);i.trim()&&n.push(i)};return t.forEach((e,a)=>{let o=Et.exec(e),s=G.test(e)&&(a===r||!t[a-1].trim()||!Dt.test(e));!o&&!s||(i(a),n.push(o?{level:o[1].length,text:o[2]}:{rule:!0}),r=a+1)}),n.length===0?[e]:(i(t.length),n)}var kt=/^ {0,3}>/u,At=/^ {0,3}> ?/u,jt=/^[ \t]*\[!(note|tip|important|warning|caution)\][ \t]*$/iu,Mt=/^ {0,3}(?:`{3}|~{3})/u,Nt=/^(?: {0,3}> ?| *(?:[-*+]|\d{1,9}[.)])(?: +|$))*/u,Pt=16,Ft=e=>Et.test(e)||G.test(e)||Mt.test(e);function It(e,t){let n=_t.exec(t);return n?e?n[2][0]===e[0]&&n[2].length>=e.length&&!n[3].trim()?``:e:n[2][0]==="`"&&n[3].includes("`")?``:n[2]:e}function Lt(e){let t=0,n=e.length;for(;t<n&&!e[t].trim();)t++;for(;n>t&&!e[n-1].trim();)n--;return e.slice(t,n).join(`
|
|
13
|
+
`)}function Rt(e,{alerts:t=!0}={}){let n=typeof e==`string`?e:``;if(!/^ {0,3}>/mu.test(n))return[e];let r=u(n),i=n.split(`
|
|
14
|
+
`),a=wt(i),o=e=>kt.test(i[e])&&!d(r,a[e]),s=[],c=0,l=0;for(;l<i.length;){if(!o(l)){l++;continue}l>c&&s.push(i.slice(c,l).join(`
|
|
15
|
+
`));let e=[],n=``,r=!1;for(;l<i.length;l++){let t=i[l];if(o(l)){let i=t.replace(At,``),a=n!==``;n=It(n,i);let o=i.replace(Nt,``);r=!a&&!n&&o.trim()!==``&&!Ft(o),e.push(i)}else if(r&&t.trim()&&!Ft(t)&&!W.test(t))e.push(t);else break}let a=t?jt.exec(e[0]):null,u=a?Lt(e.slice(1)):``;s.push({quote:!0,alert:u?a[1].toLowerCase():null,body:u||Lt(e)}),c=l}return c<i.length&&s.push(i.slice(c).join(`
|
|
16
|
+
`)),s}function zt(e,t=Pt){return t<=0?e:Rt(e).map(e=>typeof e==`string`?e:zt(e.body,t-1)).join(`
|
|
17
|
+
`)}var Bt=/^(\d+)(?:\s*-\s*(\d+))?$/u;function K(e){if(typeof e==`number`)return Number.isFinite(e)&&e>=1?{start:Math.floor(e),end:Math.floor(e)}:null;let t=Bt.exec(String(e??``).trim());if(!t)return null;let n=parseInt(t[1],10),r=t[2]===void 0?n:parseInt(t[2],10);return!Number.isFinite(n)||n<1||!Number.isFinite(r)||r<1?null:{start:Math.min(n,r),end:Math.max(n,r)}}function Vt(e){return e?e.start===e.end?String(e.start):`${e.start}-${e.end}`:``}function Ht(e){if(e&&typeof e==`object`){let t=K(e.start);if(!t)return null;let n=K(e.end)??t;return{start:t.start,end:Math.max(t.start,n.end)}}return K(e)}function Ut(e,t,n=4){let r=typeof e==`string`&&e!==``?e.split(`
|
|
18
|
+
`):[];if(r.length===0)return{text:``,startLine:1,lines:[]};let i=Ht(t),a=i&&{start:Math.min(i.start,r.length),end:Math.min(i.end,r.length)},o=a?Math.max(1,a.start-n):1,s=a?Math.min(r.length,a.end+n):Math.min(r.length,n*2+1),c=r.slice(o-1,s);return{text:c.join(`
|
|
19
|
+
`),startLine:o,lines:c}}function Wt(e,t,n,r){if(s(e?.url))return e.url;let i=e?.file;if(typeof i!=`string`||i===``)return null;let a=t?.file??``,o=t?.repo?.github,c=t?.auditedCommit,l=()=>o?U({file:i,line:e?.line,repo:t.repo,auditedCommit:c},n):null;if(r===0&&i===a)return l();let u=qe(i);return u!==null&&u===qe(a)?l():Ge(i)?null:o&&!Ge(a)?l():U({file:i,line:e?.line,auditedCommit:c},n)}function Gt(e,{spaced:t=!1,link:n=e=>e.url,lineLinks:r=!1}={}){let i=Array.isArray(e?.evidence)?e.evidence:[];return i.length===0?``:i.map((e,t)=>{let i=y(e),a=n(e,t),s=[`${t+1}. ${a?`[${i}](${a})`:r?Ce(i):i}`],c=r?Jt(o(e),a):o(e);if(c)for(let e of c.split(`
|
|
20
|
+
`))s.push(` ${e}`);return s.join(`
|
|
21
|
+
`)}).join(t?`
|
|
22
|
+
|
|
23
|
+
`:`
|
|
24
|
+
`)}function Kt(e,{repoFallback:t}={}){let n=t!==void 0,r=Gt(e,{link:n?(n,r)=>Wt(n,e,t,r):void 0,lineLinks:n});return r?`**Evidence:**
|
|
25
|
+
${r}`:``}var qt=/\(\s*(?:lines?|L)\s*(\d+)(?:\s*(?:-|–|—|to)\s*L?(\d+))?\s*\)/giu;function Jt(e,t){if(!e||!t||!ut.test(t)||!/\(\s*(?:lines?|L)\s*\d/iu.test(e))return e;let n=ct(t),r=e=>{let t=Yt(e);return e.replace(qt,(e,r,i,a)=>{let o=d(t,a)?null:K(i?`${r}-${i}`:r);return o?`([${e.slice(1,-1).trim()}](${n}${lt(o)}))`:e})},i=``,a=0;for(let[t,n]of u(e))i+=r(e.slice(a,t))+e.slice(t,n),a=n;return i+r(e.slice(a))}function Yt(e){let t=[],n=[...e.matchAll(/`+/gu)].map(e=>[e.index,e.index+e[0].length]),r=[],i=new Map;for(let e=n.length-1;e>=0;e--){let t=n[e][1]-n[e][0];r[e]=i.get(t),i.set(t,e)}for(let e=0;e<n.length;e++)r[e]!==void 0&&(t.push([n[e][0],n[r[e]][1]]),e=r[e]);let[a,o,s,c]=[`
|
|
26
|
+
`,`]`,`)`,`>`].map(t=>{let n=Array.from({length:e.length+1},()=>1/0);for(let r=e.length-1;r>=0;r--)n[r]=e[r]===t?r:n[r+1];return n}),l=t.length,u=0;for(let n=0;n<e.length;n++){for(;u<l&&t[u][1]<=n;)u++;if(u<l&&t[u][0]<=n){n=t[u][1]-1;continue}let r=-1;if(e[n]===`[`&&o[n+1]<a[n]){r=o[n+1]+1;let t=e[r]===`(`?s[r]:e[r]===`[`?o[r+1]:1/0;t<a[r]&&(r=t+1)}else if(e[n]===`<`&&c[n+1]<a[n])r=c[n+1]+1;else if((e[n]===`h`||e[n]===`H`)&&/^https?:\/\//iu.test(e.slice(n,n+8))&&!/\w/u.test(e[n-1]??``))for(r=n;r<e.length&&!/\s/u.test(e[r]);)r++;r>n&&(t.push([n,r]),n=r-1)}t.sort((e,t)=>e[0]-t[0]);let d=[];for(let[e,n]of t){let t=d.at(-1);t&&e<t[1]?t[1]=Math.max(t[1],n):d.push([e,n])}return d}function Xt(e){let t=/^\[([^\]]+)\]\(([^)\s]+)\)$/u.exec(e);return!t||!s(t[2])?null:{label:f(t[1].trim())||t[2],url:t[2]}}function Zt(e,t){let n=parseInt(e?.line,10);if(!Number.isFinite(n))return j;let r=U(e,t),i=`line ${n}`;return r?k`<a href="${r}" target="_blank" rel="noopener">${i}</a>`:i}function Qt(e,t){return!e||!t?null:`${/^https?:/iu.test(e)?e.replace(/\/$/u,``):`https://github.com/${e}`}/commit/${t}`}var $t=[[`Impact`,`impact`],[`Reproduction`,`reproduction`],[`Recommendation`,`recommendation`],[`Confidence reason`,`confidenceReason`],[`Revalidation verdict`,`revalidateVerdict`],[`Revalidation recommendation`,`revalidateRecommendation`]];function en(e,t){let n=[];t&&n.push(`Repo: ${t}`);let r=y(e);r&&n.push(`Location: ${r}`),e?.confidence!=null&&n.push(`Confidence: ${e.confidence}/10`);let i=R(e);i&&n.push(`Revalidation: ${i}`);let a=[];n.length>0&&a.push(n.join(`
|
|
27
|
+
`));let{title:o,body:s}=v(e);o&&a.push(`# ${o}`),s&&a.push(s.trim());let c=Gt(e,{spaced:!0});c&&a.push(`# Evidence
|
|
28
|
+
|
|
29
|
+
${c}`);for(let[t,n]of $t){if(!L&&n.startsWith(`revalidate`))continue;let r=_(e?.[n],e)?.trim();r&&a.push(`# ${t}
|
|
30
|
+
|
|
31
|
+
${r}`)}return a.join(`
|
|
32
|
+
|
|
33
|
+
`)}function tn(e,{title:t,body:n,labels:r=[]}={}){let i=nt(e);if(!i)return null;let a;try{a=new URL(i).host.toLowerCase()}catch{return null}if(a!==`github.com`)return null;let o=new URLSearchParams;t&&o.set(`title`,t),n&&o.set(`body`,n),r.length>0&&o.set(`labels`,r.join(`,`));let s=o.toString();return s?`${i}/issues/new?${s}`:`${i}/issues/new`}var nn=/^[a-zA-Z\d](?:-?[a-zA-Z\d])*$/u,rn=/^[a-zA-Z\d._-]+$/u,an=/^[1-9]\d{0,9}$/u,on=/^[a-fA-F\d]{7,40}$/u,sn=/^#[\w-]+$/u,cn=/^GHSA(?:-[0-9a-z]{4}){3}$/u;function ln(e){return e.length<=39&&nn.test(e)}function un(e){return e.length<=100&&e!==`.`&&e!==`..`&&rn.test(e)}function dn(e){let t;try{t=new URL(e)}catch{return null}if(t.href!==e||t.protocol!==`https:`||t.hostname.toLowerCase()!==`github.com`||t.port||t.username||t.password)return null;let n=t.pathname.split(`/`);if(n.at(-1)===``&&n.pop(),n.length===3&&n[1]===`advisories`){let e=n[2];return cn.test(e)?{url:`https://github.com/advisories/${e}`,label:e}:null}if(n.length===6&&n[3]===`security`&&n[4]===`advisories`){let[,e,t,,,r]=n;return!ln(e)||!un(t)||!cn.test(r)?null:{url:`https://github.com/${e}/${t}/security/advisories/${r}`,label:r}}if(n.length!==5)return null;let[,r,i,a,o]=n;if(!ln(r)||!un(i))return null;let s;if(a===`issues`||a===`pull`){if(!an.test(o))return null;s=`${r}/${i}#${o}`}else if(a===`commit`){if(!on.test(o))return null;s=`${r}/${i}@${o.slice(0,7)}`}else return null;return{url:`https://github.com/${r}/${i}/${a}/${o}${sn.test(t.hash)?t.hash:``}`,label:s}}var fn=/^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/u;function pn(e){if(typeof e!=`string`)return null;let t=mn(e);return t!==e||fn.test(e)?t.slice(0,8):null}function mn(e){let t=String(e);return t.startsWith(`https://chatgpt.com/codex/cloud/security/findings/`)?t.slice(50):t}function hn(e,n){let r=t(e,{managed:n});if(!r)return null;let i=pn(r.id);return{url:n?r.path:`#${r.fragment}`,label:i?`finding ${i}`:`finding`,self:!0}}var gn=/https?:\/\/[^\s<>"'`(){}[\]|\\^]+/giu,_n=new Set([`)`,`.`,`,`,`!`,`?`,`;`,`:`,`'`,`"`,`*`,`]`,`}`,`>`]);function vn(e){let t=e.length;for(;t>0&&_n.has(e[t-1]);)t--;return t===e.length?e:e.slice(0,t)}function yn(e,{managed:t=!1}={}){if(typeof e!=`string`||e.length===0)return[];let n=[],r=0;gn.lastIndex=0;let i;for(;(i=gn.exec(e))!==null;){let a=vn(i[0]),o=a?dn(a)??hn(a,t):null;o&&(i.index>r&&n.push(e.slice(r,i.index)),n.push(o),r=i.index+a.length,gn.lastIndex=r)}return r<e.length&&n.push(e.slice(r)),n}var bn={commit:T},xn=8;function Sn(e){let t;try{t=e?JSON.parse(e):null}catch{return null}let n=e=>typeof e==`string`&&e?e:null;return t&&{tags:Array.isArray(t.tags)?t.tags.filter(n):[],details:typeof t.title==`string`?{title:t.title,authorName:n(t.authorName),authorLogin:n(t.authorLogin),date:Number.isSafeInteger(t.date)?t.date:null}:null}}function Cn({title:e,authorName:t,authorLogin:n,date:r}){let i=document.createElement(`div`);i.className=`tooltip-commit-details`;let a=document.createElement(`span`);a.className=`tooltip-commit-message`,a.textContent=e;let o=document.createElement(`span`);return o.className=`tooltip-commit-meta`,o.textContent=[t&&n&&t!==n?`${t} (@${n})`:t??(n&&`@${n}`),r===null?``:new Date(r).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})].filter(Boolean).join(` · `),i.append(...e?[a]:[],o),i}var q;function wn(){return q||(q=document.createElement(`div`),q.id=`styled-tooltip`,q.setAttribute(`popover`,`manual`),document.body.append(q),q)}function Tn(e){typeof e.showPopover==`function`&&(e.matches(`:popover-open`)&&e.hidePopover(),e.showPopover())}var J=null,En=``,Y=null,X=null,Dn=0,On=0,kn=!1;function Z(){if(!kn){kn=!0,document.addEventListener(`mousemove`,e=>{Dn=e.clientX,On=e.clientY},{passive:!0});for(let e of[`pointerdown`,`wheel`,`scroll`])document.addEventListener(e,()=>$(),{capture:!0,passive:!0});document.addEventListener(`keydown`,e=>{e.key===`Escape`&&$()}),window.addEventListener(`blur`,()=>$())}}var An=100,jn=14,Mn=8,Q=8;function Nn(e,{placement:t=`cursor`}={}){Z(),clearTimeout(Y),Y=null,X=null,e.prepareTooltip?.(e),t=e.dataset.tooltipPlacement??t;let n=wn(),i=e.dataset.tooltip??``,a=Object.hasOwn(bn,e.dataset.tooltipIcon??``)?e.dataset.tooltipIcon:``,o=e.dataset.tooltipRepo??``,s=r(e.dataset.tooltipCommit),c=Sn(e.dataset.tooltipCommitInfo),l=[`stasis`,`sourcemap`].includes(e.dataset.tooltipBundle)?e.dataset.tooltipBundle:``,u=e.dataset.tooltipStats??``,d=e.dataset.tooltipBuilt===`true`,f=e.dataset.tooltipPackage??``,p=e.dataset.tooltipEcosystem??``,m=e.dataset.tooltipVersion??``,h=e.dataset.tooltipFiles??``,g=e.dataset.tooltipLoc??``,_=e.dataset.tooltipSize??``,v=e.tooltipContent??null,y=v??JSON.stringify([i,a,o,s,c,l,u,d,f,p,m,h,g,_]);if(!i){$();return}if(J===e&&En===y)return;if(n.textContent=a||v?``:i,v){let e=document.createElement(`div`);e.className=`tooltip-rich`,ee(v,e),n.append(e)}if(a){let e=document.createElement(`span`);e.className=`tooltip-text`,e.innerHTML=N(bn[a]);let t=document.createElement(`span`);t.textContent=i,e.append(t),n.append(e)}if(f){let t=document.createElement(`div`);t.className=`tooltip-package`;let r=(e.querySelector(`[data-tooltip-package-icon] svg`)??e.querySelector(`svg`))?.cloneNode(!0);r&&t.append(r);let i=document.createElement(`span`);i.className=`tooltip-package-details`;let a=(e,t)=>/^\d+$/u.test(e)?`${Number(e).toLocaleString()} ${t}`:``;for(let e of[f,m,a(h,h===`1`?`file`:`files`),a(g,`LoC`),_].filter(Boolean)){let t=document.createElement(`span`);t.textContent=e,i.append(t)}t.append(i),n.append(t)}if(o||s){let e=document.createElement(`div`);if(e.className=`tooltip-repo`,o){e.innerHTML=N(w);let t=document.createElement(`span`);t.textContent=o,e.append(t)}if(s){let t=document.createElement(`span`);t.className=`tooltip-commit`,t.innerHTML=N(T);let n=document.createElement(`span`);n.textContent=s.slice(0,7),t.append(n),e.append(t)}if(n.append(e),s&&c?.tags.length){let e=document.createElement(`div`);e.className=`tooltip-tags`;for(let t of c.tags.slice(0,xn)){let n=document.createElement(`span`);n.className=`tooltip-tag`,n.innerHTML=N(b);let r=document.createElement(`span`);r.textContent=t,n.append(r),e.append(n)}if(c.tags.length>xn){let t=document.createElement(`span`);t.className=`tooltip-tag-more`,t.textContent=`+${(c.tags.length-xn).toLocaleString()} more`,e.append(t)}n.append(e)}}if(c?.details&&n.append(Cn(c.details)),l||u||d){let e=document.createElement(`div`);if(e.className=`tooltip-bundle`,l===`stasis`){let t=document.createElement(`img`);t.src=`./stasis.svg`,t.alt=``,e.append(t)}else e.innerHTML=N(C);let t=document.createElement(`span`);t.textContent=[l===`stasis`?`Stasis`:l===`sourcemap`?`Sourcemap`:``,d?`Built on server`:``,u].filter(Boolean).join(` · `),e.append(t),n.append(e)}Tn(n),n.style.left=`0px`,n.style.top=`0px`,n.style.transform=`none`,n.classList.add(`visible`);let x=Dn,S=On+jn;if(t===`right`||t===`right-start`){let n=e.getBoundingClientRect();x=n.right+Mn,S=n.top+(t===`right`?n.height/2:0)}let E=window.innerWidth-n.offsetWidth-Q,D=Math.max(Q,Math.min(x,E));n.style.left=`${Math.round(D)}px`;let O=n.offsetHeight,k=t===`right`?S-O/2:S,A=window.innerHeight-O-Q,j=Math.max(Q,Math.min(k,A));n.style.top=`${Math.round(j)}px`,J=e,En=y}function $(e){e&&!e.contains(J)&&!e.contains(X)||(clearTimeout(Y),Y=null,X=null,q&&(q.classList.remove(`visible`),typeof q.hidePopover==`function`&&q.matches(`:popover-open`)&&q.hidePopover()),J=null)}function Pn(e,{gate:t,placement:n}={}){Z();let r=()=>e.isConnected!==!1&&(!Object.hasOwn(e.dataset,`tooltipTruncated`)||e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)&&(!t||t(e));if(!r()){$();return}e===J||e===X||($(),X=e,Y=setTimeout(()=>{Y=null,X=null,r()&&Nn(e,{placement:n})},An))}var Fn=new WeakSet;function In(e,t){for(let n of e.composedPath()){if(n===t)break;if(n.nodeType===1&&Object.hasOwn(n.dataset,`tooltip`))return n}return null}function Ln(e,t){!e||Fn.has(e)||(Fn.add(e),e.ownerDocument&&Z(),e.addEventListener(`mouseover`,n=>{if(n.buttons){$();return}let r=In(n,e);if(!r){$();return}r!==J&&Pn(r,t)}),e.addEventListener(`mouseout`,t=>{let n=In(t,e),r=t.relatedTarget?.closest?.(`[data-tooltip]`)??null;n&&n===r||$()}),e.addEventListener(`scroll`,()=>$(e),{capture:!0,passive:!0}))}var Rn=!1;function zn(){Rn||(Rn=!0,Z(),document.addEventListener(`tooltip-root-connected`,e=>{Ln(e.composedPath()[0]?.shadowRoot)}),document.body.addEventListener(`mouseover`,e=>{if(e.target.closest(`[data-tooltip-managed]`))return;if(e.buttons){$();return}let t=e.target.closest(`[data-tooltip]`);!t||t===J||Pn(t)}),document.body.addEventListener(`mouseout`,e=>{e.target.closest(`[data-tooltip-managed]`)||e.relatedTarget?.closest?.(`[data-tooltip-managed]`)||!J&&!Y||(J??X)?.contains(e.relatedTarget)||$()}))}function Bn(e){return`tree-`+e.replaceAll(/[^\w-]+/gu,`_`)}var Vn=()=>Object.fromEntries(p.map(e=>[e,0]));function Hn(e,t){let n=new Map;for(let r of e)for(let e of r){n.has(e.file)||n.set(e.file,Vn());let r=n.get(e.file),i=m(e,t);r[i]!==void 0&&r[i]++}return n}var Un={trees:[],merged:null};function Wn(e){let t=e.map(e=>e?.tree??null);return t.length===Un.trees.length&&t.every((e,t)=>e===Un.trees[t])||(Un={trees:t,merged:Gn(e)}),Un.merged}function Gn(e){let t=null;for(let n of e)if(n?.tree){t||={};for(let e of Object.keys(n.tree)){let r=n.tree[e];if(!t[e]){t[e]={...r,imports:[...r.imports??[]]};continue}let i=new Set(t[e].imports);for(let n of r.imports??[])i.has(n)||(i.add(n),t[e].imports.push(n));t[e].size==null&&r.size!=null&&(t[e].size=r.size)}}return t}function Kn(e,t){let n=Object.keys(e),r=new Map(n.map((e,t)=>[e,t])),i=n.map(()=>Vn()),a=n.map(()=>[]);for(let[t,i]of n.entries())for(let n of e[i].imports??[]){let e=r.get(n);e!==void 0&&a[e].push(t)}let o=new Uint32Array(n.length),s=0;for(let[e,n]of t){let t=r.get(e);if(t===void 0||!n)continue;let c=p.map(e=>[e,n[e]??0]).filter(([,e])=>e!==0);if(c.length===0)continue;let l=++s,u=[],d=e=>{o[e]!==l&&(o[e]=l,u.push(e))};for(let e of a[t])d(e);for(;u.length>0;){let e=u.pop();for(let[t,n]of c)i[e][t]+=n;for(let t of a[e])d(t)}}return new Map(n.map((e,t)=>[e,i[t]]))}function qn(e,t,n){let r=t.get(e),i=n.get(e);return Jn(r)>0||Jn(i)>0}function Jn(e){if(!e)return 0;let t=0;for(let n of p)t+=e[n]??0;return t}function Yn(e){if(!e)return null;let t=He(),n=RegExp(`^(?:.*/)?${t}/(@[^/]+/[^/]+|[^/]+)`,`u`),r=e.match(n);return r?r[1]:`__own__`}function Xn(e){return new Set(e.filter(e=>!V(e)))}var Zn=[`#4e9af1`,`#f28e2b`,`#59a14f`,`#e15759`,`#76b7b2`,`#edc948`,`#b07aa1`,`#ff9da7`,`#9c755f`,`#5cd1e5`,`#f1ce63`,`#d37295`,`#a0cbe8`,`#86bcb6`,`#8cd17d`,`#b6992d`,`#499894`,`#e15759`,`#e879c7`,`#d4a6c8`],Qn=[`#2f8aef`,`#d2691e`,`#2ea043`,`#e63946`,`#2e9a92`,`#b88817`,`#9560e8`,`#d24a9c`,`#8a5d40`,`#0891b2`,`#a07a14`,`#c14e8e`,`#1f7ad0`,`#549b94`,`#3fb95f`,`#a07a14`,`#2a8278`,`#cb2c40`,`#c026d3`,`#965f93`];function $n(){if(typeof document>`u`)return!1;let e=document.body?.classList;return!!e&&(e.contains(`theme-light`)||e.contains(`theme-pink`)||e.contains(`theme-w95`)||e.contains(`theme-paper`))}var er=new Map;function tr(e){let t=$n()?Qn:Zn;return t[e%t.length]}var nr=()=>$n()?`#8c959f`:`#6e7681`;function rr(e){let t=$n(),n=t?Qn:Zn,r=e??`__own__`,i=`${t?`l`:`d`}:${r}`;if(er.has(i))return er.get(i);let a=0;for(let e of r)a=a*37+e.codePointAt(0)|0;let o=n[((a%n.length+n.length)%n.length*7+3)%n.length];return er.set(i,o),o}function ir(e,t){if(!t||t===`/`||t===`__own__`)return e;for(let n of[`node_modules`,`dependencies`,He()]){let r=n+`/`+t+`/`,i=e.indexOf(r);if(i>=0)return e.slice(i+r.length)}return e.startsWith(t+`/`)?e.slice(t.length+1):e}function ar(e){let t=e.origFile??e.file,n=ir(t,e.pkg),r=n===t?t:`${a(e.pkg)}/${n}`;return r===t?e.file:r}var or={package:`@babel/core`,path:/^lib\/config\//u},sr={package:`@babel/core`,path:/^lib\/config\/files\/(?:module-types|plugins)\.js$/u},cr=Object.freeze([{id:`react-native-codegen-discovery`,reason:`Codegen discovers package metadata and React Native configuration.`,from:{package:`react-native`,path:/^scripts\/codegen\/generate-artifacts-executor\.js$/u},to:{path:/(?:^|\/)(?:package\.json|react-native\.config\.js)$/u}},{id:`react-native-release-version`,reason:`The CLI release checker reads the installed React Native version.`,from:{package:`@react-native-community/cli-tools`,path:/^build\/releaseChecker\/index\.js$/u},to:{package:`react-native`,path:/^package\.json$/u}},{id:`react-native-platform-config`,reason:`React Native configuration loads platform CLIs supplied by the host project.`,from:{package:`react-native`,path:/^react-native\.config\.js$/u},to:{package:/^@react-native-community\/cli-platform-(?:android|ios)$/u,path:/^build\/index\.js$/u}},{id:`babel-project-config`,reason:`Babel discovers project configuration.`,from:or,to:{path:/(?:^|\/)babel\.config\.js$/u}},{id:`babel-typescript-preset`,reason:`Babel configuration loads the TypeScript preset.`,from:or,to:{package:`@babel/preset-typescript`,path:/./u}},{id:`babel-react-native-preset`,reason:`Babel config loaders load the configured React Native preset.`,from:sr,to:{package:`@react-native/babel-preset`,path:/^(?:src\/)?index\.js$/u}},{id:`babel-reanimated-plugin`,reason:`Babel config loaders load the configured Reanimated plugin, including scoped copies.`,from:sr,to:{package:/^(?:@[^/]+\/)?react-native-reanimated$/u,path:/^plugin\/index\.js$/u}},{id:`babel-transform-plugin`,reason:`Babel config loaders load configured transform plugins.`,from:sr,to:{package:/^@babel\/plugin-transform-[^/]+$/u,path:/^lib\/index\.js$/u}},{id:`cosmiconfig-config`,reason:`Cosmiconfig loads discovered configuration, including dependency configuration.`,from:{package:`cosmiconfig`,path:/^dist\/loaders\.js$/u},to:{path:/\.config\.js$/u}},{id:`import-fresh-own-config`,reason:`import-fresh loads host-project configuration.`,from:{package:`import-fresh`,path:/./u},to:{path:/\.config\.js$/u},ownSourceOnly:!0}].map(e=>Object.freeze({...e,from:Object.freeze(e.from),to:Object.freeze(e.to)})));function lr(e){return typeof e==`string`&&!e.includes(`\\`)&&!e.includes(`:`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e!==`node_modules`)}function ur(e,t){let n=e.package;return n!==void 0&&t.ownSource===!0?!1:(n===void 0||(typeof n==`string`?n===t.package:n.test(t.package??``)))&&e.path.test(t.path)}function dr(e,t){if(e?.ownSource!==!0&&lr(e?.path)&&lr(t?.path))return cr.find(n=>(!n.ownSourceOnly||t.ownSource===!0)&&ur(n.from,e)&&ur(n.to,t))}function fr(e,t){let n=e.split(/(?:^|\/)node_modules\//u).slice(1).at(-1)?.match(/^(@[^/]+\/[^/]+|[^/]+)\/(.+)$/u);return{package:n?.[1],path:n?.[2]??e.replace(/^\/+/u,``),ownSource:t??i(e)===`__own__`}}function pr(e,t,n,r){return!dr(fr(e,r),fr(t,n))}function mr(e,t=e=>e.file){let n=new Map(e.nodes.map(e=>[e.file,e])),r=new Map(e.nodes.map(e=>[t(e),new Set]));for(let[i,a]of e.importsOf){let o=n.get(i);if(o)for(let s of a){let a=n.get(s);a&&pr(o.origFile??i,a.origFile??s,e.ownSourceFiles?.has(s),e.ownSourceFiles?.has(i))&&r.get(t(o)).add(t(a))}}return r}var hr=class{constructor(e){this.nodes=[...e];for(let[e,t]of this.nodes.entries())t.position=e;for(let e=(this.nodes.length>>1)-1;e>=0;e--)this.down(e)}before(e,t){return Math.abs(e.balance)>Math.abs(t.balance)||Math.abs(e.balance)===Math.abs(t.balance)&&(e.balance>t.balance||e.balance===t.balance&&e.tie<t.tie)}swap(e,t){let n=this.nodes,r=n[e];n[e]=n[t],n[t]=r,n[e].position=e,n[t].position=t}down(e){let t=this.nodes;for(;2*e+1<t.length;){let n=2*e+1;if(n+1<t.length&&this.before(t[n+1],t[n])&&n++,!this.before(t[n],t[e]))break;this.swap(e,n),e=n}}update(e){if(e.position<0)return;let t=e.position;for(;t>0;){let n=t-1>>1;if(!this.before(e,this.nodes[n]))break;this.swap(t,n),t=n}this.down(t)}take(){let e=this.nodes[0],t=this.nodes.pop();return e.position=-1,this.nodes.length>0&&(this.nodes[0]=t,t.position=0,this.down(0)),e}};function gr(e,t){for(let n=0;n<8;n++){let r=!1;for(let i=0;i<e.length-1;i++){let a=n%2?e.length-2-i:i,o=e[a],s=e[a+1];(t.get(s)?.get(o)?.cycleCount??0)<=(t.get(o)?.get(s)?.cycleCount??0)||(e[a]=s,e[a+1]=o,r=!0)}if(!r)break}return e}function _r(e){let t=[],n=new Set;for(let t of e.values())t.outgoing.sort((e,t)=>t[1]-e[1]||e[0].tie-t[0].tie);for(let r of e.values()){if(n.has(r))continue;let e=[{node:r,next:0}];for(n.add(r);e.length>0;){let r=e.at(-1);if(r.next===r.node.outgoing.length){t.push(r.node.id),e.pop();continue}let i=r.node.outgoing[r.next++][0];n.has(i)||(n.add(i),e.push({node:i,next:0}))}}return t.toReversed()}function vr(e,t){let n=new Map(e.map((e,t)=>[e,t])),r=0;for(let e of t.values())for(let[t,i]of e.outgoing)n.get(e.id)<n.get(t.id)&&(r+=i);return r}function yr(e,t){let n=vr(e,t),r=n,i=0;for(let a=0;a<e.length-1;a++)n-=t.get(e[a]).originalBalance,n>r&&(r=n,i=a+1);return[...e.slice(i),...e.slice(0,i)]}function br(e,t){if(e.length<2)return e;let n=new Map(e.map((e,t)=>[e,{id:e,tie:t,balance:0,incoming:[],outgoing:[]}]));for(let e of n.values())for(let r of t.get(e.id)?.values()??[]){let t=n.get(r.to);!t||t===e||!r.cycleCount||(e.outgoing.push([t,r.cycleCount]),t.incoming.push([e,r.cycleCount]),e.balance+=r.cycleCount,t.balance-=r.cycleCount)}for(let e of n.values())e.originalBalance=e.balance;let r=[],i=new hr(n.values()),a=[];for(;i.nodes.length>0;){let e=i.take();e.balance>=0?r.push(e.id):a.push(e.id);for(let[t,n]of e.outgoing)t.position<0||(t.balance+=n,i.update(t));for(let[t,n]of e.incoming)t.position<0||(t.balance-=n,i.update(t))}let o=e,s=vr(e,n);for(let i of[[...r,...a.toReversed()],_r(n),e,e.toReversed()]){let e=gr(yr(i,n),t),r=vr(e,n);r>s&&(o=e,s=r)}return o}function xr(e,t){let n=new Set(e),r=new Map(e.map(e=>[e,[]]));for(let[e,i]of t)for(let t of i)n.has(e)&&n.has(t)&&r.get(t).push(e);let i=[],a=new Set;for(let r of e){if(a.has(r))continue;a.add(r);let e=[[r,(t.get(r)??[])[Symbol.iterator]()]];for(;e.length>0;){let[r,o]=e.at(-1),s=o.next();if(s.done){i.push(r),e.pop();continue}n.has(s.value)&&!a.has(s.value)&&(a.add(s.value),e.push([s.value,(t.get(s.value)??[])[Symbol.iterator]()]))}}let o=new Map,s=[];for(let e of i.toReversed()){if(o.has(e))continue;let t=[],n=s.length,i=[e];for(o.set(e,n);i.length>0;){let e=i.pop();t.push(e);for(let t of r.get(e))o.has(t)||(o.set(t,n),i.push(t))}s.push(t.toSorted())}return{groups:s,componentOf:o}}function Sr(e,{expanded:t=new Set,order:n=`structure`,query:r=``,neighborhood:i=null,cyclesOnly:o=!1}={}){let s=new Map,c=new Map,l=new Map;for(let n of e.nodes){let e=t.has(n.pkg),r=`${e?`f`:`p`}:${e?n.file:n.pkg}`;s.has(r)||s.set(r,{id:r,pkg:n.pkg,file:e?n.file:null,label:e?ar(n):a(n.pkg),files:[],size:0,issues:0,incoming:0,outgoing:0,importers:0,dependencies:0});let i=s.get(r);i.files.push(n.file),i.size+=n.size??0,i.issues+=n.totalIssues??0,c.set(n.file,r),l.set(n.file,n.origFile??n.file)}let u=new Map,d=new Set,f=new Set,p=new Map([...s.keys()].map(e=>[e,new Set])),m=0;for(let[t,n]of e.importsOf){let r=c.get(t);if(r)for(let i of new Set(n)){let n=c.get(i);if(!n)continue;u.has(r)||u.set(r,new Map),u.get(r).has(n)||u.get(r).set(n,{from:r,to:n,count:0,cycleCount:0,examples:[]});let a=u.get(r).get(n);a.count++;let h=pr(l.get(t),l.get(i),e.ownSourceFiles?.has(i),e.ownSourceFiles?.has(t));a.examples.length<80&&(!o||h)&&a.examples.push([t,i]),m++,s.get(r).outgoing++,s.get(n).incoming++,r!==n&&(f.add(r),d.add(n)),h&&(a.cycleCount++,(r!==n||s.get(r).file)&&p.get(r).add(n))}}let h=[...s.keys()].toSorted(),{groups:g,componentOf:_}=xr(h,p),v=new Set(g.flatMap(e=>e.length>1||p.get(e[0]).has(e[0])?e:[]));for(let e of s.values())e.cyclic=v.has(e.id),e.component=_.get(e.id);let y=e.ownSourcePackages??new Set(e.layerRoots?.roots??[]),b=e=>e.pkg===`__own__`?0:y.has(e.pkg)?1:2,x=e=>d.has(e.id)&&f.has(e.id)?0:1,S=new Map(g.map((e,t)=>[t,e.reduce((e,t)=>Math.min(e,b(s.get(t))),2)])),C=(e,t)=>e.pkg.localeCompare(t.pkg)||e.label.localeCompare(t.label),w=new Map;if(n===`structure`){for(let e of g)if(!(e.length<2))for(let t of Map.groupBy(e,e=>b(s.get(e))).values())br(t.toSorted((e,t)=>C(s.get(e),s.get(t))),u).forEach((e,t)=>w.set(e,t))}if(o){m=0,d.clear(),f.clear();for(let e of s.values())e.incoming=0,e.outgoing=0}for(let[e,t]of u){for(let n of t.values())if(n.cyclic=n.cycleCount>0&&v.has(e)&&_.get(e)===_.get(n.to)&&(e!==n.to||s.get(e).file!==null),o){if(!n.cyclic){t.delete(n.to);continue}n.count=n.cycleCount,m+=n.count,s.get(e).outgoing+=n.count,s.get(n.to).incoming+=n.count,e!==n.to&&(f.add(e),d.add(n.to))}t.size===0&&u.delete(e)}for(let[e,t]of u)for(let n of t.keys())e!==n&&(s.get(e).dependencies++,s.get(n).importers++);let T=r.trim().toLowerCase(),E=new Set(h.filter(e=>!T||s.get(e).files.some(e=>e.toLowerCase().includes(T))||s.get(e).label.toLowerCase().includes(T))),D=new Set(i?[i]:E);if(T||i)for(let[e,t]of u)for(let n of t.keys())(i?e===i:E.has(e))&&D.add(n),(i?n===i:E.has(n))&&D.add(e);let O=(e,t)=>{if(n===`structure`){let n=S.get(e.component)-S.get(t.component);if(n)return n;let r=x(e)-x(t);if(r)return r;let i=e.component-t.component;if(i)return i}let r=b(e)-b(t);if(r)return r;if(n===`importers`)return t.importers-e.importers||C(e,t);if(n===`imports`)return t.dependencies-e.dependencies||C(e,t);let i=x(e)-x(t);if(i)return i;if(n===`structure`&&e.component===t.component){let n=(w.get(e.id)??0)-(w.get(t.id)??0);if(n)return n}return C(e,t)},k=[...s.values()].filter(e=>D.has(e.id)&&(!o||e.cyclic)).toSorted(O),A=new Map(k.map((e,t)=>[e.id,t])),j=[];for(let[e,t]of u)if(A.has(e))for(let n of t.values())A.has(n.to)&&j.push({...n,row:A.get(e),col:A.get(n.to)});return{rows:k,byId:s,cells:u,visibleCells:j,index:A,matches:E,importCount:m,totalRows:s.size,cycleCount:g.filter(e=>v.has(e[0])).length}}export{te as a,ie as b,ae as c,N as d,ce as e,P as f,le as g,F as h,ue as i,de as j,fe as k,pe as l,me as m,I as n,ge as o,ve as p,be as q,xe as r,Se as s,Ce as t,we as u,Te as v,R as w,Ee as x,De as y,Oe as z,ke as A,je as B,Me as C,Ne as D,Ve as E,He as F,V as G,We as H,Je as I,Ye as J,Ze as K,Qe as L,$e as M,et as N,tt as O,st as P,U as Q,ft as R,gt as S,xt as T,Tt as U,Ot as V,Pt as W,Rt as X,zt as Y,K as Z,Vt as _,Ut as $,Wt as aa,Kt as ba,Xt as ca,Zt as da,Qt as ea,en as fa,tn as ga,pn as ha,mn as ia,yn as ja,Nn as ka,$ as la,Pn as ma,Ln as na,zn as oa,Bn as pa,Hn as qa,Wn as ra,Kn as sa,qn as ta,Jn as ua,Yn as va,Xn as wa,tr as xa,nr as ya,rr as za,br as Aa,ir as Ba,ar as Ca,pr as Da,mr as Ea,xr as Fa,Sr as Ga};
|
|
34
|
+
/*! Bundled license information:
|
|
35
|
+
|
|
36
|
+
lit-html/directives/class-map.js:
|
|
37
|
+
(**
|
|
38
|
+
* @license
|
|
39
|
+
* Copyright 2018 Google LLC
|
|
40
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
+
*)
|
|
42
|
+
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var e={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},t=e=>(...t)=>({_$litDirective$:e,values:t}),n=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};export{e as a,t as b,n as c};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
lit-html/directive.js:
|
|
5
|
+
(**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*)
|
|
10
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,c as t}from"./chunk-ZQHLECTI.js";import{f as n,g as r,i,j as a,k as o,m as s}from"./chunk-PXK7EU4V.js";var c,l,u,d=12336,f=26214,p=`0123456789ABCDEFabcdef`,m=`Input is not a hex string`;function h(t){c||=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));let n=t.length;if(r){if(!l){l=new Uint16Array(256);let e=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);for(let t=0;t<256;t++){let n=c[t];e[2*t]=n.charCodeAt(0),e[2*t+1]=n.charCodeAt(1)}}let r=new Uint16Array(n),i=0;for(let e=t.length-3;!(i>=e);i+=4){let e=t[i],n=t[i+1],a=t[i+2],o=t[i+3];r[i]=l[e],r[i+1]=l[n],r[i+2]=l[a],r[i+3]=l[o]}for(;i<n;i++)r[i]=l[t[i]];return e(r)}return i(t,0,n,c)}function g(e){if(typeof e!=`string`)throw TypeError(o);if(e.length%2!=0)throw SyntaxError(m);let r=e.length/2,i=new Uint8Array(r);if(n){if(!u){u=new Uint8Array(f+1);let e=new Uint8Array(2),t=new Uint16Array(e.buffer,e.byteOffset,1),n=[...p].map(e=>[e.charCodeAt(0),parseInt(e,16)]);for(let[r,i]of n){e[0]=r;for(let[r,a]of n)e[1]=r,u[t[0]]=i<<4|a}}let n=t(e,m),a=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2),o=0;for(let e=r-3;o<e;o+=4){let e=a[o],t=a[o+1],n=a[o+2],r=a[o+3],s=u[e],c=u[t],l=u[n],f=u[r];if(!s&&e!==d||!c&&t!==d||!l&&n!==d||!f&&r!==d)throw SyntaxError(m);i[o]=s,i[o+1]=c,i[o+2]=l,i[o+3]=f}for(;o<r;){let e=a[o],t=u[e];if(!t&&e!==d)throw SyntaxError(m);i[o++]=t}}else{if(!u){u=new Int8Array(128).fill(-1);for(let e=0;e<16;e++){let t=e.toString(16);u[t.charCodeAt(0)]=u[t.toUpperCase().charCodeAt(0)]=e}}let t=0;for(let n=0;n<r;n++){let r=e.charCodeAt(t++),a=e.charCodeAt(t++),o=u[r]<<4|u[a];if(o<0||(127|r|a)!=127)throw SyntaxError(m);i[n]=o}}return i}var{toHex:_}=Uint8Array.prototype;function v(e){return a(e),e.length===0?``:_&&e.toHex===_?e.toHex():h(e)}var y=Uint8Array.fromHex?(e,t=`uint8`)=>s(Uint8Array.fromHex(e),t):(e,t=`uint8`)=>s(g(e),t);export{v as a,y as b};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as e,b as t,c as n,n as r}from"./chunk-JMG5DXII.js";var i=class extends n{};function a(e,t,n){if(!e)throw new i(typeof n==`function`?n():n,t.line)}var o=/^(\d{4})-(\d\d)-(\d\d)([Tt])(\d\d):(\d\d):(\d\d)(\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))$/u,s=/^(?:\d{4}-\d\d-\d\d(?:[Tt]\d\d:\d\d:\d\d(?:\.\d+)?)?|\d\d:\d\d:\d\d(?:\.\d+)?)$/u,c=/^(?:\d{4}-\d\d-\d\d[Tt])?\d\d:\d\d(?:[Zz]|[+-]\d\d:\d\d)?$/u,l=[31,28,31,30,31,30,31,31,30,31,30,31];function u(e){let t=o.exec(e);if(t===null)return;let[n,r,i,a,s,c]=[t[1],t[2],t[3],t[5],t[6],t[7]].map(Number),u=n%4==0&&n%100!=0||n%400==0;if(r<1||r>12||i<1||i>(r===2&&u?29:l[r-1])||a>23||s>59||c>60||t[10]!==void 0&&(Number(t[11])>23||Number(t[12])>59))return;let d=[];(t[4]===`t`||t[9]===`z`)&&d.push(`a date-time with a lower-case "t" or "z" is not supported`),n===0&&d.push(`the year 0000 is not supported`),c===60&&d.push(`a leap second is not supported`);let f=t[10]===void 0?0:(t[10]===`-`?-1:1)*(Number(t[11])*60+Number(t[12]));return{year:n,month:r,day:i,hour:a,minute:s,second:c,fraction:t[8]?.slice(1)??``,offset:f,unsupported:d}}var d=class{constructor(e){if(typeof e!=`string`||u(e)?.unsupported.length!==0)throw TypeError(`expected an RFC 3339 offset date-time`);this.text=e,Object.freeze(this)}toString(){return this.text}toJSON(){return this.text}toDate(){let{year:e,month:t,day:n,hour:r,minute:i,second:a,fraction:o,offset:s}=u(this.text),c=new Date(0);return c.setUTCFullYear(e,t-1,n),c.setUTCHours(r,i-s,a,Number(o.padEnd(3,`0`).slice(0,3))),c}},f=e=>u(e)?.unsupported.length===0;function ee(e,n){if(!/^(?:\d{4}-\d\d-\d\d|\d\d:\d\d)/u.test(e))return;let r=u(e);if(r?.unsupported.length===0)return new d(e);throw a(!(/^\d{4}-\d\d-\d\d$/u.test(e)&&/^ \d\d:/u.test(n.text.slice(n.pos,n.pos+4))),n,`a date-time with a space in place of "T" is not supported`),a(!s.test(e),n,()=>`local dates and times are not supported: ${t(e)}`),a(!c.test(e),n,()=>`a date-time or a time without seconds is not supported: ${t(e)}`),a(r?.unsupported.length!==1,n,()=>`${r.unsupported[0]}: ${t(e)}`),new i(`${t(e)} is not a date-time of the form YYYY-MM-DDTHH:MM:SS[.fraction](Z|\xB1HH:MM)`,n.line)}var p=/^[+-]?(?:0|[1-9](?:_?\d)*)$/u,m=/^0(?:x[\dA-Fa-f](?:_?[\dA-Fa-f])*|o[0-7](?:_?[0-7])*|b[01](?:_?[01])*)$/u,h=/^[+-]?(?:inf|nan|(?:0|[1-9](?:_?\d)*)(?:\.\d(?:_?\d)*(?:[Ee][+-]?\d(?:_?\d)*)?|[Ee][+-]?\d(?:_?\d)*))$/u,g=2n**63n,_=BigInt(2**53-1),te={__proto__:null,x:16,o:21,b:63};function v(e,n){let r=p.test(e);if(!r&&!m.test(e))return;let i=e.replaceAll(`_`,``),o=r?i.replace(/^[+-]/u,``):i.slice(2).replace(/^0+/u,``),s=o.length<=(r?19:te[i[1]])?BigInt(r?i:`${i.slice(0,2)}${o||`0`}`):void 0;return a(s!==void 0&&s>=-g&&s<g,n,()=>`integer out of range ${t(e)}`),s>=-_&&s<=_?Number(s):s}var y={__proto__:null,inf:1/0,"+inf":1/0,"-inf":-1/0,nan:NaN,"+nan":NaN,"-nan":NaN};function b(e){if(typeof e!=`string`||!h.test(e))return;if(e in y)return y[e];let t=Number(e.replaceAll(`_`,``)),n=!/[1-9]/u.test(e.split(/[Ee]/u)[0]);return Number.isFinite(t)&&(t!==0||n)?t:null}var x=class{constructor(e){let t=b(e);if(t==null)throw TypeError(`expected a TOML float that a double can hold`);this.text=e,this.value=t,Object.freeze(this)}valueOf(){return this.value}toString(){return this.text}toJSON(){return this.value}};function S(e,n){let r=b(e);if(r!==void 0)return a(r!==null,n,()=>`float out of range ${t(e)}`),new x(e)}var C=64;function w(e){for(;e.text[e.pos]===` `||e.text[e.pos]===` `;)e.pos++}function T(e){if(e.pos>=e.text.length)return`the end of the text`;let n=/^[^\n]*/u.exec(e.text.slice(e.pos,e.pos+64+1))[0].replace(/\r$/u,``);return n===``?`the end of the line`:t(n)}var E=`a carriage return must be followed by a line feed`;function D(t,n,r){throw new i(n===`\r`?E:`${e(n)} is not allowed in ${r}`,t.line)}var O=e=>e.pos>=e.text.length||e.text[e.pos]===`
|
|
2
|
+
`||e.text.startsWith(`\r
|
|
3
|
+
`,e.pos),k=/#[^[\p{Cc}--[\t\u0080-\u009F]]]*/vy;function A(e){e.text[e.pos]===`#`&&(r(e,k),O(e)||D(e,e.text[e.pos],`a comment`))}function j(e){if(e.text[e.pos]===`
|
|
4
|
+
`)e.pos+=1;else if(e.text.startsWith(`\r
|
|
5
|
+
`,e.pos))e.pos+=2;else return!1;return e.line++,!0}function M(e){do w(e),A(e);while(j(e))}var N={__proto__:null,b:`\b`,t:` `,n:`
|
|
6
|
+
`,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`},ne={__proto__:null,'"':/[^"\\[\p{Cc}--[\t\u0080-\u009F]]]*/vy,"'":/[^'[\p{Cc}--[\t\u0080-\u009F]]]*/vy},re=/u([\dA-Fa-f]{4})|U([\dA-Fa-f]{8})/uy;function P(e){let n=e.text[e.pos];if(n in N)return N[e.text[e.pos++]];let i=r(e,re);a(i!==null,e,()=>`unsupported escape ${t(`\\${n??``}`)}`);let o=Number.parseInt(i[1]??i[2],16);return a(o<=1114111&&(o<55296||o>57343),e,()=>`\\${i[0]} is not a Unicode scalar value`),String.fromCodePoint(o)}var ie=/[\t ]*\r?\n(?:[\t ]|\r?\n)*/uy;function ae(e){let t=r(e,ie);return t===null?P(e):(e.line+=t[0].split(`
|
|
7
|
+
`).length-1,``)}var F=(e,t)=>e.text[e.pos+1]===t&&e.text[e.pos+2]===t,I={__proto__:null,'"':/"/uy,"'":/'/uy,'"""':/"{3,5}/uy,"'''":/'{3,5}/uy};function L(e,t){let n=F(e,t),i=I[n?t.repeat(3):t];e.pos+=n?3:1,n&&j(e);let o=``;for(;;){if(o+=r(e,ne[t])[0],n&&j(e)){o+=`
|
|
8
|
+
`;continue}a(!O(e),e,`unterminated string`);let s=r(e,i);if(s!==null)return o+s[0].slice(3);let c=e.text[e.pos++];c===t?o+=c:c===`\\`?o+=n?ae(e):P(e):D(e,c,`a string`)}}var R=/[\w-]+/uy;function z(e){let t=e.text[e.pos];if(t===`"`||t===`'`)return a(!F(e,t),e,`a multi-line string cannot be a key`),L(e,t);let n=r(e,R);return a(n!==null,e,()=>`expected a key, found ${T(e)}`),n[0]}function B(e){let t=[z(e)];for(;;){if(w(e),e.text[e.pos]!==`.`)return t;e.pos++,w(e),t.push(z(e)),a(t.length<=C,e,`a key with too many parts`)}}var V=/[\w+.:-]+/uy;function H(e){let n=r(e,V);a(n!==null,e,()=>`expected a value, found ${T(e)}`);let i=n[0];if(i===`true`)return!0;if(i===`false`)return!1;let o=v(i,e)??S(i,e)??ee(i,e);return a(o!==void 0,e,()=>`expected a value, found ${t(i)}`),o}function U(e,n,r,i){a(n[r]===void 0,e,()=>`duplicate key ${t(r)}`),n[r]=i}function W(e,t){let n=B(e);return a(e.text[e.pos]===`=`,e,()=>`expected "=" after the key, found ${T(e)}`),e.pos++,w(e),{header:!1,keys:n,value:X(e,t)}}function G(e,t){e.pos++;let n=[];for(M(e);e.text[e.pos]!==`]`&&(n.push(X(e,t+1)),M(e),e.text[e.pos]!==`]`);M(e))a(e.text[e.pos]===`,`,e,()=>`expected "," or "]", found ${T(e)}`),e.pos++;return e.pos++,n}var K=e=>typeof e==`object`&&!!e&&Object.getPrototypeOf(e)===null,q=new WeakSet,oe=e=>q.has(e);function J(e,t,n,r,i,o){let s=t;for(let t of r.slice(0,-1)){t in s||n.add(s[t]=Object.create(null));let r=s[t];a(n.has(r),e,()=>o(t,r)),s=r}U(e,s,r.at(-1),i)}var se=e=>Array.isArray(e)?`an array`:K(e)?`an inline table`:`a value`,ce=(e,n)=>`${t(e)} is ${se(n)}, which a dotted key cannot add to`;function Y(e){w(e),a(!O(e)&&e.text[e.pos]!==`#`,e,`an inline table across lines is not supported`)}function le(e,t){e.pos++;let n=Object.create(null);q.add(n);let r=new Set;if(Y(e),e.text[e.pos]===`}`)e.pos++;else do{Y(e),a(e.text[e.pos]!==`}`,e,`a trailing comma in an inline table is not supported`);let{keys:i,value:o}=W(e,t+1);J(e,n,r,i,o,ce),Y(e);let s=e.text[e.pos];a(s===`,`||s===`}`,e,()=>`expected "," or "}" on the inline table's line, found ${T(e)}`)}while(e.text[e.pos++]===`,`);return n}function X(e,t){a(t<=C,e,`nested too deep`);let n=e.text[e.pos];return n===`"`||n===`'`?L(e,n):n===`[`?G(e,t):n===`{`?le(e,t):H(e)}function ue(e){let t=e.text.startsWith(`[[`,e.pos);e.pos+=t?2:1,w(e);let n=B(e),r=t?`]]`:`]`;return a(e.text.startsWith(r,e.pos),e,()=>`expected "${r}", found ${T(e)}`),e.pos+=r.length,{header:!0,keys:n,array:t}}function de(e){w(e);let t=e.text[e.pos];if(t===`[`)return ue(e);if(!(t===`#`||t===`\r`||O(e)))return W(e,0)}function fe(e){if(w(e),A(e),!(j(e)||e.pos===e.text.length))throw a(e.text[e.pos]!==`\r`,e,E),new i(`expected the end of the line, found ${T(e)}`,e.line)}function Z(e,t){return e.arrays.has(t)?`an array of tables`:Array.isArray(t)?`an array`:K(t)?e.fixed.has(t)?`an inline table`:`a table`:`a value`}var Q=e=>t(e.join(`.`));function pe(e,n,r){let i=e.root;for(let o of r){o in i||e.implicit.add(i[o]=Object.create(null));let r=e.arrays.has(i[o])?i[o].at(-1):i[o];a(K(r)&&!e.fixed.has(r),n,()=>`${t(o)} is ${Z(e,r)}, which a header cannot add to`),i=r}return i}function $(e,t,n,r){e.pending.clear();let i=pe(e,t,n.slice(0,-1)),o=n.at(-1);if(r){o in i||e.arrays.add(i[o]=[]),a(e.arrays.has(i[o]),t,()=>`${Q(n)} is ${Z(e,i[o])}, not an array of tables`),i[o].push(e.current=Object.create(null));return}o in i?a(e.implicit.delete(i[o]),t,()=>`${Q(n)} is ${Z(e,i[o])} already`):i[o]=Object.create(null),e.current=i[o]}function me(e,n,r){return!K(r)||e.fixed.has(r)?`${t(n)} is ${Z(e,r)}, which a dotted key cannot add to`:e.implicit.has(r)?`a dotted key through ${t(n)}, a table a header made on its way, is not supported`:`${t(n)} is a table declared elsewhere, which a dotted key cannot add to`}function he(e,t,n,r){J(t,e.current,e.pending,n,r,(t,n)=>me(e,t,n)),K(r)&&e.fixed.add(r)}var ge={__proto__:null,"":`a byte order mark is not read`,"�":`U+FFFD is not supported: a decoder puts it where bytes are not UTF-8`};function _e(e){if(typeof e!=`string`)throw TypeError(`expected a string`);let t=/\p{Cs}|^\uFEFF|\uFFFD/u.exec(e);if(t===null)return;let n=e.slice(0,t.index).split(`
|
|
9
|
+
`).length-1;throw new i(ge[t[0]]??`a lone surrogate is not well-formed Unicode`,n)}function ve(e){_e(e);let t=Object.create(null),n={text:e,pos:0,line:0},r={root:t,current:t,implicit:new Set,pending:new Set,arrays:new Set,fixed:new Set};for(;n.pos<e.length;){let e=de(n);e?.header===!0?$(r,n,e.keys,e.array):e!==void 0&&he(r,n,e.keys,e.value),fe(n)}return t}export{i as a,d as b,f as c,x as d,K as e,oe as f,ve as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=/^\d+(?:\.[\dA-Za-z]+)*$/u,t=t=>e.test(t),n=e=>/[A-Za-z]/u.test(e),r=e=>(e.match(/\d+|[A-Za-z]+/gu)??[]).map(e=>/^\d/u.test(e)?BigInt(e):e),i=e=>Array.from(e.matchAll(/[.0]+/gu),e=>[e.index,e.index+e[0].length]);function a(e,[t,n],r){for(let i=t;i<n;i++)if(r(e[i-1]))return i}function o(e){let t=e.length;for(;e[t-1]===`.`||e[t-1]===`0`;)t--;let o=t<e.length?a(e,[t,e.length],e=>e!==void 0&&/[A-Za-z.]/u.test(e)):void 0,s=e.slice(0,o);if(!n(e))return r(s);for(let e of i(s)){let t=/[A-Za-z]/u.test(s[e[1]]??``)?a(s,e,e=>e===void 0||e===`.`):void 0;if(t!==void 0)return r(`${s.slice(0,t)}${s.slice(e[1])}`)}return r(s)}var s=(e,t)=>e<t?-1:+(e>t);function c(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let[r,i]=[e[n]??0n,t[n]??0n];if(r!==i)return typeof r==typeof i?s(r,i):typeof r==`string`?-1:1}return 0}var l=(e,t)=>e===t?0:c(o(e),o(t));function u(e){let t=r(e),n=t.findIndex(e=>typeof e==`string`);return n===-1?t:t.slice(0,n)}var d=e=>n(e)?u(e).join(`.`):e;function f(e){let t=u(e);return t.length>1&&t.pop(),t[t.length-1]+=1n,t.join(`.`)}var p={__proto__:null,"=":e=>e===0,"!=":e=>e!==0,">":e=>e>0,"<":e=>e<0,">=":e=>e>=0,"<=":e=>e<=0},m=/^(=|!=|>|<|>=|<=|~>) (\S+)$/u;function h(e,n=t){let r=m.exec(e);return r===null||!n(r[2])?void 0:[r[1],r[2]]}function g(e,[t,n]){return t===`~>`?l(e,n)>=0&&l(d(e),f(n))<0:p[t](l(e,n))}function _(e){let t=e.map(o),r=e.map((e,r)=>n(e)?o(d(e)):t[r]);return{sorted:t.sort(c),release:r.sort(c).at(-1),keys:void 0}}function v(e,[t,n]){let r=o(n);if(t===`!=`)return!(e.keys??=new Set(e.sorted.map(e=>e.join(`.`)))).has(r.join(`.`));let i=c(e.sorted[0],r);return t===`~>`?i>=0&&c(e.release,o(f(n)))<0:p[t](i)&&p[t](c(e.sorted.at(-1),r))}export{t as a,l as b,h as c,g as d,_ as e,v as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,d as t,j as n}from"./chunk-PXK7EU4V.js";function r(){let e=new(t?Uint32Array:Int32Array)(4096);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}for(let t=0;t<256;t++){let n=e[t];for(let r=256+t;r<e.length;r+=256)n=e[r]=n>>>8^e[n&255]}return e}var i=r(),[a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]=Array.from({length:16},(e,t)=>i.subarray(t*256,t*256+256));function x(r){n(r);let x=-1,S=0,C=r.length;if(e&&C>1024){let e=4-(r.byteOffset&3)&3;for(;S<e;S++)x=a[(x^r[S])&255]^x>>>8;let n=C-S>>>2,o=new(t?Uint32Array:Int32Array)(r.buffer,r.byteOffset+S,n),s=0;for(let e=n-3;s<e;s+=4){let e=o[s]^x,t=o[s+1],n=o[s+2],r=o[s+3];x=i[3840+(e&255)]^i[3584+(e>>>8&255)]^i[3328+(e>>>16&255)]^i[3072+(e>>>24)]^i[2816+(t&255)]^i[2560+(t>>>8&255)]^i[2304+(t>>>16&255)]^i[2048+(t>>>24)]^i[1792+(n&255)]^i[1536+(n>>>8&255)]^i[1280+(n>>>16&255)]^i[1024+(n>>>24)]^i[768+(r&255)]^i[512+(r>>>8&255)]^i[256+(r>>>16&255)]^i[r>>>24]}S+=s*4}else for(let e=C-15;S<e;S+=16)x=b[(r[S]^x)&255]^y[(r[S+1]^x>>>8)&255]^v[(r[S+2]^x>>>16)&255]^_[r[S+3]^x>>>24]^g[r[S+4]]^h[r[S+5]]^m[r[S+6]]^p[r[S+7]]^f[r[S+8]]^d[r[S+9]]^u[r[S+10]]^l[r[S+11]]^c[r[S+12]]^s[r[S+13]]^o[r[S+14]]^a[r[S+15]];for(let e=S;e<C;e++)x=a[(x^r[e])&255]^x>>>8;return~x>>>0}export{x as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Jb as e,Kb as t,Lb as n,Nb as r,Ob as i,Pb as a,Ub as o,jc as s,pc as c,w as l}from"./chunk-OFZYEWBH.js";import{j as u,k as d}from"./chunk-BRO77PQY.js";import{e as f,f as p,g as m,j as h}from"./chunk-QRKFPLA4.js";import{c as g}from"./chunk-2XUEZHIP.js";var _=`.md-quote,.md-alert{margin:0;&:not(:first-child),+*{margin-top:.5lh}>:first-child{margin-top:0}>:last-child{margin-bottom:0}}.md-quote{padding-inline-start:.85em;border-inline-start:.25em solid rgb(from currentcolor r g b / .3);color:rgb(from currentcolor r g b / calc(alpha*.78));.md-quote{color:inherit}}.md-alert{--md-alert: var(--info);padding:.35lh .85em;border-inline-start:.25em solid var(--md-alert);background:rgb(from var(--md-alert) r g b / .06);border-radius:0 var(--ui-radius, 4px) var(--ui-radius, 4px) 0}.md-alert-tip{--md-alert: var(--green)}.md-alert-important{--md-alert: var(--purple)}.md-alert-warning{--md-alert: var(--warning)}.md-alert-caution{--md-alert: var(--critical)}.md-alert-title{display:flex;align-items:center;gap:.45em;margin-bottom:.2lh;color:var(--md-alert);font-weight:600}.md-alert-icon{flex:none;width:1.05em;height:1.05em}
|
|
2
|
+
`,v=`.token.comment,.token.prolog,.token.cdata{color:var(--code-comment);font-style:italic}.token.punctuation{color:var(--muted)}.token.string,.token.attr-value,.token.char,.token.regex{color:var(--code-string)}.token.number,.token.boolean,.token.constant,.token.symbol{color:var(--code-number)}.token.keyword,.token.builtin,.token.important,.token.atrule{color:var(--code-keyword)}.token.function,.token.class-name,.token.tag{color:var(--code-function)}.token.operator,.token.entity,.token.url,.token.attr-name,.token.selector{color:var(--code-operator)}.token.variable,.token.property,.token.parameter{color:var(--code-variable)}.token.annotation{color:var(--code-function)}.token.deleted{color:var(--code-deleted)}.token.inserted{color:var(--code-inserted)}.token.italic{font-style:italic}.token.bold{font-weight:700}.code-control{padding:0 .3em;margin:0 .1em;border-radius:3px;font-size:.8em;line-height:0;font-style:normal;font-weight:400;color:var(--warning);background:rgb(from var(--warning) r g b / .14);box-shadow:inset 0 0 0 1px rgb(from var(--warning) r g b / .45);white-space:nowrap;user-select:none}
|
|
3
|
+
`,y=g`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,b=g`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="1.8" y="5" width="20.4" height="14" rx="2"/><path d="M5.6 15.6V8.4l3.1 3.6 3.1-3.6v7.2"/><path d="M16.9 8.4v7.2m-2.6-2.9 2.6 2.9 2.6-2.9"/></svg>`,x=g`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M6 9V2h12v7"/><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><rect x="6" y="14" width="12" height="8"/></svg>`;function S(e,t){let n=u.find(t=>t.value===e)?.label??e;return d(e)?.includes(`partial`)?t===`exclude`?`${n} (full only)`:t===`only`?`${n} (partial only)`:n:n}function C(e){return h.filter(t=>e.has(t)).map(e=>f[e]??e).join(`, `)}function w(r=l){let i=[];if(r.filterSeverities.size>0&&i.push({key:`severity`,label:`Severity`,value:C(r.filterSeverities),clear:{filterSeverities:new Set}}),r.filterColors.size>0&&i.push({key:`marks`,label:`Marks`,value:[...r.filterColors].map(e=>m[e]??e).join(`, `),clear:{filterColors:new Set}}),r.filterSources.size===1&&i.push({key:`source`,label:`Source`,value:r.filterSources.has(`own`)?`Sources only`:`Dependencies only`,clear:{filterSources:new Set}}),r.filterAnalyzer&&i.push({key:`analyzer`,label:`Analyzer`,value:r.filterAnalyzer===e?`(none)`:r.filterAnalyzer,clear:{filterAnalyzer:``}}),r.filterModel&&i.push({key:`model`,label:`Model`,value:r.filterModel===n?`(none)`:r.filterModel,clear:{filterModel:``}}),r.filterValidationModel&&i.push({key:`validationModel`,label:`Validation model`,value:r.filterValidationModel===n?`(none)`:r.filterValidationModel,clear:{filterValidationModel:``}}),r.filterRepo&&i.push({key:`repo`,label:`Repository`,value:r.filterRepo===t?`(no repo)`:r.filterRepo,clear:{filterRepo:``}}),d(r.filterRevalidate)&&i.push({key:`revalidate`,label:`Revalidation`,value:S(r.filterRevalidate,r.filterPartial),clear:{filterRevalidate:``,filterPartial:``}}),!r.filterRevalidate&&(r.filterConfMin>0||r.filterConfMax<10)){let e;e=r.filterConfMin>0&&r.filterConfMax<10?`${r.filterConfMin}\u2013${r.filterConfMax}`:r.filterConfMin>0?`\u2265 ${r.filterConfMin}`:`\u2264 ${r.filterConfMax}`,i.push({key:`confidence`,label:`Confidence`,value:e,clear:{filterConfMin:0,filterConfMax:10}})}r.filterInclude&&i.push({key:`search`,label:r.filterIncludeNegate?`Excluding`:`Search`,value:`"${r.filterInclude}"`,clear:{filterInclude:``,filterIncludeNegate:!1}});for(let[e,t]of[[`filterComment`,`comment`],[`filterIssue`,`issue`],[`filterFix`,`fix`],[`filterFlagged`,`flag`]]){let n=r[e];n&&i.push({key:`annotation:${t}`,label:`Annotation`,value:`${n===`with`?`With`:`Without`} ${t}`,clear:{[e]:``}})}return!l.currentWorkspace&&r.filterDuplicates&&i.push({key:`duplicates`,label:`Duplicates`,value:r.filterDuplicates===`with`?`Only rows linked to other reports`:`Exclude rows linked to other reports`,clear:{filterDuplicates:``}}),r.filterCrossContext&&i.push({key:`cross-context`,label:`Context`,value:r.filterCrossContext===`with`?`Only rows across multiple repos or packages`:`Exclude rows across multiple repos or packages`,clear:{filterCrossContext:``}}),r.filterAppStacked&&i.push({key:`app-stacked`,label:`App stack`,value:r.filterAppStacked===`with`?`Only rows with multiple App findings`:`Exclude rows with multiple App findings`,clear:{filterAppStacked:``}}),r.filterSecurity&&i.push({key:`security`,label:`Security`,value:r.filterSecurity===`with`?`Only security-related rows`:`Exclude security-related rows`,clear:{filterSecurity:``}}),i}function T(){return c().filter(e=>s(e).commonTriage===l.shownTriage)}function E(){return l.shownTriage?p[l.shownTriage]??l.shownTriage:null}function D(e,t=r()){let n=T(),s=n.length;i(t);let c;try{c=o(n).length}finally{a()}return{included:c,total:s,excluded:s-c,fields:t,filters:w(t),bucketLabel:E(),focusedOnly:e===`print`&&l.viewMode===`focus`}}var O=`.managed-comment{container:managed-comment / inline-size;white-space:normal}.managed-comment-row{display:grid;grid-template-columns:minmax(0,max-content) minmax(0,1fr) auto;align-items:start;gap:.35rem .65rem;line-height:1.5}.managed-comment-author{grid-column:1;grid-row:1;display:flex;align-items:center;gap:.45rem;min-width:0;max-width:14rem;& strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}}.managed-comment-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.3rem;height:1.3rem;overflow:hidden;border-radius:50%;background:rgb(from var(--muted) r g b / .15);color:var(--muted);font-size:.65rem;font-weight:600;& img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}& img[hidden]{display:none}}.managed-comment-body{grid-column:2;grid-row:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;& a{color:var(--accent);text-decoration:none}& a:hover{text-decoration:underline}& a.comment-self-ref{text-decoration:underline dotted;text-underline-offset:2px}& a.comment-self-ref:hover{text-decoration:underline solid}}.managed-comment-time{color:var(--muted);font-size:.7rem;font-weight:400;white-space:nowrap;text-align:right}.managed-comment-meta{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:.5rem;min-height:1.3rem}.managed-comment-actions{display:flex;align-items:center;gap:.15rem}.managed-comment-row:not(:has(.managed-comment-author)){grid-template-columns:minmax(0,1fr) auto;.managed-comment-body{grid-column:1}.managed-comment-meta{grid-column:2}}@container managed-comment (max-width: 28rem){.managed-comment-row:has(.managed-comment-meta){grid-template-columns:minmax(0,max-content) minmax(0,1fr);.managed-comment-meta{grid-column:1 / -1;grid-row:1}.managed-comment-author,.managed-comment-body{grid-row:2}}.managed-comment-row:not(:has(.managed-comment-author)){grid-template-columns:minmax(0,1fr)}.managed-comment-author{max-width:9rem}}
|
|
4
|
+
`;export{_ as a,v as b,y as c,b as d,x as e,w as f,T as g,E as h,D as i,O as j};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as e,b as t,c as n,d as r}from"./chunk-M3Y6SLC4.js";import{a as i,b as a,c as o,d as s,e as c}from"./chunk-PAD2JHZT.js";import{C as l,F as u,H as d,J as f,M as p,O as m,Q as h,S as g,e as _,f as v,h as y,k as b,m as x,n as S,o as C,p as w,u as T,v as E,w as D,x as O,z as k}from"./chunk-UCP3JRE2.js";import{b as ee}from"./chunk-DEVAORP2.js";import{d as te}from"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as ne,d as A,h as j,i as M,j as N,k as P,l as re,o as ie,p as F,r as ae,s as I,t as oe}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var se=[`name`,`version`,`uid`,`resolved`,`integrity`,`dependencies`,`optionalDependencies`];function ce(e,t){let n=e.indexOf(`@`,1);if(n===-1)throw new A(`${j(e)} is not a pattern of the form name@range`,t);return{name:O(e.slice(0,n),t),range:e.slice(n+1)}}function le(e){if(!e.startsWith(`npm:`))return;let t=e.slice(4),n=t.indexOf(`@`,1);return n===-1?{name:t,range:``}:{name:t.slice(0,n),range:t.slice(n+1)}}var ue=new Set([`github.com`,`gitlab.com`,`bitbucket.com`,`bitbucket.org`]);function L(e){if(/^(?:git:|git\+.+:|ssh:|https?:.+\.git(?:$|#.))/u.test(e))return!0;let t=URL.parse(e);return t!==null&&ue.has(t.hostname)&&`${t.pathname}${t.search}`.split(`/`).filter(Boolean).length===2}var de=/^[^:@%/\s.-][^:@%/\s]*\/[^:@\s/%][^:@\s/%#]*(?:#.*)?$/u;function R(e){return L(e)?`git`:/^https?:\/\//u.test(e)||!e.includes(`@`)&&/\.(?:tgz|tar\.gz)$/u.test(e)?`tarball`:e.startsWith(`github:`)||de.test(e)?`github`:/^(?:file:|\.{1,2}\/|\/)/u.test(e)?`file`:/^(link|gitlab|gist|bitbucket):/u.exec(e)?.[1]??`registry`}var fe={github:{host:`github.com`,archive:e=>[`https://codeload.github.com/${e}/tar.gz/`,``]},gitlab:{host:`gitlab.com`,archive:e=>[`https://gitlab.com/${e}/repository/archive.tar.gz?ref=`,``]},bitbucket:{host:`bitbucket.org`,archive:e=>[`https://bitbucket.org/${e}/get/`,`.tar.gz`]}};function pe(e){let t=e.split(`@`),n=(t.length>2?`${t[1]}@${t[2]}`:e).replace(/#.*/u,``).replace(/^.*:/u,``).replace(/.git$/u,``).split(`/`);return n.length<2?void 0:n.slice(-2).join(`/`)}function z(e){let t=e.replace(/^(?:file|link):/u,``);return t.startsWith(`/`)?`/${t.split(`/`).filter(e=>e!==``&&e!==`.`).join(`/`)}`:u(`.`,t)}function me(e,t,n){let r=k(e,t);if(n!==void 0&&n.valid(r)===null)throw new A(`${j(r)} is not a version semver reads`,t);return r}function he(e,t,n,r,i){if(e.startsWith(`file:`))l(e.slice(e.startsWith(`file:./`)?7:5),r);else if(!h(e))throw new A(`${j(e)} is not an http(s) URL, a file: path or a git URL`,r);if(t!==void 0&&!f(t))throw new A(`${j(t)} is not the hex sha1 of a tarball`,r);let a=n===void 0?void 0:m(n,i).get(`sha1`);if(t!==void 0&&a!==void 0&&a.slice(5)!==te(ee(t)))throw new A(`${j(a)} is not the sha1 after the "#" of resolved`,i);return{type:`tarball`,tarball:e,sha1:t,integrity:n}}function ge(e,t){let n=M(t,`resolved`),r=M(t,`integrity`);if(e.resolved===void 0){if(e.integrity!==void 0)throw new A(`an integrity, with nothing resolved`,r);return}let[i,a,...o]=S(e.resolved,n).split(`#`);if(o.length>0)throw new A(`more than one "#", of which yarn reads the first alone`,n);if(!L(i))return he(i,a,e.integrity,n,r);if(e.integrity!==void 0)throw new A(`an integrity, which yarn does not check for a git repository`,r);if(a===void 0||!d(a))throw new A(`expected a full commit hash after the "#" of ${j(i)}`,n);return{type:`git`,repo:p(i,n),commit:a}}function B(e){if(e!==void 0)return e.type===`git`?`${e.repo}#${e.commit}`:e.tarball.replace(/^file:\.\//u,`file:`)}var _e=e=>e===void 0?`nothing, as for a directory`:e.type===`git`?`a git repository`:`a file: tarball`;function ve(e,t,n){let[r]=e,i=e.find(e=>e.name!==r.name);if(i!==void 0)throw new A(`${j(r.key)} and ${j(i.key)} give it two names, of which yarn installs it under one alone`,n);if(t.name!==void 0){let e=y(t.name,M(n,`name`)),i=e===r.name?`the name its patterns give, which yarn does not write`:`yarn installs this as ${j(e)}, and leaves ${j(r.name)} out, which its patterns ask for`;throw new A(i,M(n,`name`))}let a=e.filter(e=>e.source===`registry`).map(({key:e,name:t,alias:r})=>[e,r===void 0?t:O(r.name,n)]),o=a.find(([,e])=>e!==a[0][1]);if(o!==void 0)throw new A(`${j(a[0][0])} and ${j(o[0])} ask for two packages, ${j(a[0][1])} and ${j(o[1])}`,n);return a[0]?.[1]}function ye({range:e,source:t},n){let r=e.split(`#`)[0];if(t===`file`||t===`link`)return n===void 0;if(t===`tarball`)return n?.tarball===r;if(t===`git`)return n?.repo===r;if(t===`gist`)return n?.repo===`https://gist.github.com/${r.slice(5)}.git`;let{host:i,archive:a}=fe[t],o=pe(e);if(o===void 0||n===void 0)return!1;if(n.type===`git`)return n.repo===`git+ssh://git@${i}/${o}.git`;let[s,c]=a(o),{tarball:l}=n;return l.startsWith(s)&&l.endsWith(c)&&d(l.slice(s.length,l.length-c.length))}function be(e,t){let[n,...r]=e.filter(e=>e.source===`file`||e.source===`link`),i=r.find(e=>n.source===`link`||e.source===`link`||z(e.range)!==z(n.range));if(i!==void 0)throw new A(`${j(n.key)} and ${j(i.key)} share an entry, where yarn writes one for each`,t)}function xe(e,t,{asks:n,version:r},i){let a=e.filter(e=>e.source!==`registry`),o=a.find(e=>!ye(e,t));if(o!==void 0)throw new A(`${j(o.key)} resolves to another source than it names`,M(i,`resolved`));be(e,i);let s=e.find(e=>e.source===`registry`);if((a.length===0||a.some(e=>e.source===`tarball`))&&t?.type===`tarball`&&t.sha1===void 0&&t.integrity===void 0)throw new A(`a tarball with no hash, neither a sha1 after "#" nor an integrity, where yarn writes the sha1`,M(i,`resolved`));if(s!==void 0){if(a.length>0)return{registry:s.key,sources:a.map(e=>e.key)};if(t===void 0&&e.length===1)return{registry:s.key,sources:[]};if(t?.type!==`tarball`||t.tarball.startsWith(`file:`))throw new A(`${j(s.key)} asks for the registry, and resolves to ${_e(t)}`,i);g(t.tarball,n,r,M(i,`resolved`))}}function Se(e,t,n){let r=Object.create(null);for(let[i,a,o]of v(b(e),t)){let e=`${O(i,o)}@${y(a,o)}`;r[i]=e,n.push({targets:r,name:i,range:a,pattern:e,where:o})}return r}function Ce({keys:e,fields:n},r,i){_(n,r,se);let a=e.map(e=>{let{name:t,range:n}=ce(e,M(``,e));return{key:e,name:t,range:n,source:R(n),alias:le(n)}}),o=ve(a,n,r),s=me(n.version,M(r,`version`),i),c=ge(n,r),l=xe(a,c,{asks:o,version:s},r),u=[],{dependencies:d,optionalDependencies:f}=t(n,r,(e,t)=>Se(e,t,u)),p=x(n,`uid`,r,y);if(p===s)throw new A(`the version, which yarn does not write as a uid`,M(r,`uid`));return{pkg:{patterns:e,name:a[0].name,version:s,uid:p,resolution:c,dependencies:d,optionalDependencies:f},patterns:a,handed:l,requests:u}}var we=/^(?![vV=]?\d|[xX*](?:\.|$))[A-Za-z][\w.-]*$/u;function V(e,t){return t===void 0?!/[:/@#]/u.test(e)&&!we.test(e):t.validRange(e)!==null}function Te(e,t,n,r,i){let a=e=>e.source===`registry`&&V(e.range,r),o=t.find(a)??n.patterns.find(a);if(o!==void 0)throw new A(`is ${e.name} ${e.version}, as ${j(n.key)} is, and yarn gives ${j(o.key)} whichever it resolves first`,i)}var H=({integrity:e})=>e===void 0?new Map:m(e),U=e=>JSON.stringify(Object.entries(e).sort(([e],[t])=>e<t?-1:1));function W(e,t,n,r){for(let i of[`dependencies`,`optionalDependencies`])if(U(e[i])!==U(t[i]))throw new A(`other ${i} ${n}`,M(r,i))}function Ee(e,t,n){let r=`than ${j(t.patterns[0])}, of the same ${e.resolution.type===`git`?`commit`:`tarball`}`;if(e.version!==t.version)throw new A(`another version ${r}`,M(n,`version`));W(e,t,r,n);let[i,a]=[e.resolution,t.resolution];if(i.sha1!==void 0&&a.sha1!==void 0&&i.sha1!==a.sha1)throw new A(`another sha1 ${r}`,M(n,`resolved`));let o=H(a);for(let[e,t]of H(i))if(o.has(e)&&o.get(e)!==t)throw new A(`another ${e} integrity ${r}`,M(n,`integrity`))}function De(e,t){let n=Object.create(null),r=[],i=[],a=[],o=new Map,s=new Map,c=new Map;for(let l of e){let[e]=l.keys,u=M(``,e),d=Ce(l,u,t),{pkg:f}=d;for(let e of l.keys)n[e]=f;r.push(...d.patterns),i.push(...d.requests),d.handed!==void 0&&a.push({pkg:f,...d.handed});let p=d.patterns.find(e=>e.source===`file`),m=l.fields.resolved??(p===void 0?void 0:`
|
|
2
|
+
${z(p.range)}`),h=m===void 0?void 0:`${f.name}
|
|
3
|
+
${m}`;if(o.has(h))throw new A(`resolves as ${j(o.get(h))} does, which yarn writes as one entry`,u);h!==void 0&&o.set(h,e);let g=B(f.resolution);if(g!==void 0){let e=s.get(g)??s.set(g,[]).get(g);e.length>0&&Ee(f,e[0],u),e.push(f)}if(d.handed?.sources.length===0)continue;let _=`${f.name}
|
|
4
|
+
${f.version}`,v=c.get(_);v===void 0?c.set(_,{key:e,patterns:d.patterns}):Te(f,d.patterns,v,t,u)}for(let e of a)e.other=s.get(B(e.pkg.resolution))?.find(t=>t!==e.pkg);return{packages:n,patterns:r,requests:i,mixed:a}}var G=`manifests`;function Oe(e,t,n){let r=/^(?:file|link):/u.exec(e)?.[0];if(r===void 0&&!e.startsWith(`/`))return e;let i=e.slice(r?.length??0);if(i.startsWith(`/`)||/^[A-Za-z]:/u.test(i))throw new A(`${j(e)} is an absolute path`,n);let a=l(u(t,i),n);return`${r}${a!==`.`&&/^\.(?:\/|$)/u.test(i)&&!/^\.{0,2}\//u.test(a)?`./`:``}${a}`}var K=(e,t,n)=>n===void 0?e.version===t||void 0:n.satisfies(e.version,t,{loose:!0});function q({name:e,range:t,pattern:n,where:r},i,a){let o=i.get(e);if(o!==void 0&&K(o,t,a)===!0)throw new A(`${j(n)} is satisfied by the workspace ${j(o.dir)}, which yarn links instead`,r)}function J({name:e,range:t,pattern:n,where:r},i,a){let o=i?.get(e);if(o===void 0)throw new A(`${j(n)} is not a pattern of the lockfile${i===void 0?`, nor a workspace's, as only the manifests may say`:``}`,r);if(K(o,t,a)===!1)throw new A(`${j(n)} is not a pattern of the lockfile, nor satisfied by the workspace ${j(o.dir)}, ${o.version}`,r);return`link:${o.dir}`}function Y(e,t,n,r){for(let i of e)i.pattern in t||(i.targets[i.name]=J(i,n,r))}function X(e,{packages:t,workspaces:n,semver:r}){return e.pattern in t?(q(e,n,r),e.pattern):J(e,n,r)}var ke=[`optionalDependencies`,`dependencies`,`devDependencies`];function Ae(t,n,r,i){let a=new Map;for(let e of ke)for(let[n,i,o]of v(b(t[e]),M(r,e))){if(n===`//`)continue;let t=y(i,o),r=a.get(n)??a.set(n,{kind:e,value:t,here:o,range:void 0}).get(n);r.range===void 0&&t!==``&&t!==`*`&&(r.range=t)}let o=Object.create(null);for(let t of e)o[t]=Object.create(null);for(let[e,{kind:t,value:r,here:s,range:c}]of a){let a=Oe(c??r,n,s);o[t][e]=X({name:e,range:a,pattern:`${O(e,s)}@${a}`,where:s},i)}return o}function je(e,t,n){let r=[];for(let[a,o,s]of v(b(e),t)){if(a===`//`)continue;if(/\/$|\/\/|\*$/u.test(a))throw new A(`${j(a)} is a path yarn ignores`,s);let e=a.match(/(?:@[^/]+\/)?[^/]+/gu)??[a],t=i(e.length===1?`**/${a}`:a,s),c=O(e.at(-1),s),l=e.slice(0,-1).find(e=>e!==`**`&&!D(e.replaceAll(/[*?]/gu,`x`)));if(l!==void 0)throw new A(`${j(l)} is not a package name, or a glob of one`,s);let u=y(o,s);if(R(u)===`registry`&&!V(u,n))throw new A(`${j(u)} is a range yarn ignores in a resolution: neither a semver range nor a source`,s);r.push({path:a,tests:t,name:c,range:u,pattern:`${c}@${u}`,where:s})}return r}function Me(t,r,i){let a=Object.values(t).flatMap(t=>e.map(e=>t[e])),o=n([i.map(e=>e.pattern).filter(e=>e in r),...a],r);if(o!==void 0)throw new A(`nothing asks for it: no manifest, no package and no resolution`,M(``,o))}function Ne(e,t){let n=e.workspaces;if(n===void 0)return[];let r=M(t,`workspaces`),a=n;Array.isArray(n)||(_(n,r,[`packages`,`nohoist`]),x(n,`nohoist`,r,C),a=n.packages===void 0?[]:n.packages,r=M(r,`packages`));let o=C(a,r);if(o.length>0&&e.private!==!0)throw new A(`expected true, as yarn has workspaces in a private project alone`,M(t,`private`));return o.map((e,t)=>i(e.replace(/^(?:\.\/)+/u,``).replace(/(?<!\/)\/+$/u,``),`${r}[${t}]`))}var Pe={__proto__:null,depdenencies:`dependencies`,dependancies:`dependencies`,dependecies:`dependencies`,depends:`dependencies`,"dev-dependencies":`devDependencies`,devDependences:`devDependencies`,devDepenencies:`devDependencies`,devEependencies:`devDependencies`,devdependencies:`devDependencies`},Fe=/^[\s\dA-Za-z.+=-]{1,256}$/u;function Ie(e,t,n){let r=S(e,t);if(!Fe.test(r))throw new A(`${j(r)} is not a version`,t);if(n===void 0)return r;let i=n.clean(r,{loose:!0});if(i===null)throw new A(`${j(r)} is not a version semver reads`,t);return i}function Le(e,t,n,r,i){for(let e of Object.keys(Pe))if(Object.hasOwn(t,e))throw new A(`a field yarn does not read, for ${j(Pe[e])}`,M(n,e));if(l(e,n)===`.`)return;if(r.length===0)throw new A(`expected workspaces, as there are manifests of workspaces`,M(M(G,`.`),`workspaces`));if(e.split(`/`).includes(`node_modules`)||!r.some(t=>c(t,e)))throw new A("not a workspace the root's `workspaces` finds",n);if(t.resolutions!==void 0)throw new A(`a workspace's, which yarn does not read`,M(n,`resolutions`));let a=M(n,`name`),o=O(y(t.name,a),a);if(t.version===void 0)throw new A(`expected a version, without which yarn ignores the workspace`,M(n,`version`));return{name:o,dir:e,version:Ie(t.version,M(n,`version`),i)}}function Re(e,t,n,r){_(e,G);let i=M(G,`.`),a=e[`.`];if(a===void 0)throw new A(`expected the manifest beside the lockfile, "."`,G);let o=Ne(_(a,i),i),s=new Map;for(let[t,n,i]of v(e,G)){let e=Le(t,_(n,i),i,o,r);if(e!==void 0){if(s.has(e.name))throw new A(`the name of the workspace ${j(s.get(e.name).dir)} too`,M(i,`name`));s.set(e.name,e)}}for(let e of n)e.pattern in t&&q(e,s,r);Y(n,t,s,r);let c={packages:t,workspaces:s,semver:r},l=w(e,G,(e,t,n)=>Ae(e,n,t,c)),u=je(a.resolutions,M(i,`resolutions`),r);for(let e of u){if(!(e.pattern in t)&&!s.has(e.name))throw new A(`${j(e.pattern)} is not a pattern of the lockfile, where yarn records every resolution's`,e.where);e.target=X(e,c)}return Me(l,t,u),{importers:l,workspaces:s,rules:u,aggregated:Array.isArray(a.workspaces?.packages??a.workspaces)}}var ze=`workspace-aggregator-00000000-0000-0000-0000-000000000000`;function Be(t,{importers:n,workspaces:r,rules:i,aggregated:c},l){let u=i.map(e=>e.tests),d=(e,t)=>t.split(`/`).reduce((e,t)=>e.map((e,n)=>o(u[n],e,t)),e),f=e=>e.startsWith(`link:`)?n[e.slice(5)]:t[e],p=(e,t,r,i)=>{let a=e.patterns===void 0?M(G,Object.keys(n).find(t=>n[t]===e)):M(``,e.patterns[0]);return new A(`${j(e[t][r])} ${i}`,M(M(a,t),r))},m=new Map,h=[],g=new Set,_=new Map,v=(e,t,n,r)=>{let i=e[t][n],a=r===void 0||r.pattern===i,o=a?_.get(i):g.has(i)?r:void 0;if(o!==void 0)throw p(e,t,n,`is asked for both where the resolution ${j(o.path)} applies and where none does, and yarn writes one entry for both`);a?g.add(i):_.set(i,r)},y=new Set,x=(e,t)=>{if(y.has(e))return;let n=m.get(e)??new Set,r=t.join();n.has(r)||(m.set(e,n.add(r)),h.push([e,t]))},S=n[`.`],C=u.map(e=>a(e,1)),w=d(C,ze),T=new Map,E=[],D=(e,n)=>t[e.target]===n||l.get(n)?.sources[0]===e.target,O=(e,n,a,o)=>{let m=e[n][a],h=d(o,a),g=t[m],_=l.get(g),y=_===void 0?``:`the resolution ${j(_.rule.path)} resolves to`,b=e===S&&(!c||r.has(a)),C=e===S&&!b?d(w,a):h,O=i.find((e,t)=>e.name===a&&s(u[t],C[t]));if(b){if(_!==void 0)throw p(e,n,a,`is given what ${y}, which yarn applies to no dependency of the root's own`);if(O!==void 0&&!D(O,g))throw p(e,n,a,`is not given ${j(O.pattern)} as the resolution ${j(O.path)} says, which yarn ignores for the root's own dependencies`);return v(e,n,a,void 0),x(f(m),h)}if(O!==void 0&&!D(O,g))throw p(e,n,a,`is not given ${j(O.pattern)}, which the resolution ${j(O.path)} resolves it to`);if(_?.sources.includes(m))throw p(e,n,a,`asks for what ${y}, as a dependency of its own`);if(_!==void 0&&!_.sources.includes(O?.target))throw p(e,n,a,`is given what ${y}, which yarn does not apply to it here`);v(e,n,a,O),e===S&&O!==void 0&&T.set(m,O),O===void 0?x(f(m),h):O.target.startsWith(`link:`)&&E.push([e[n],a,O.target])},k=()=>{for(;h.length>0;){let[t,n]=h.pop();for(let r of e)for(let e of Object.keys(b(t[r])))O(t,r,e,n)}};for(let e of i)e.pattern in t&&(g.add(e.pattern),x(t[e.pattern],d(C,e.name)));k(),y=new Set(m.keys());for(let t of e)for(let e of Object.keys(S[t]))O(S,t,e,C);for(let[e,{dir:t}]of r)x(n[t],d(w,e));k();for(let[e,t,n]of E)e[t]=n;return{plain:g,own:T}}function Ve(e,t,n,r,i){for(let{key:a,range:o,source:s,alias:c}of t){let t=n?.own.get(a);if(s!==`registry`||t===void 0&&n?.plain.has(a)===!1)continue;let l=c?.range??o,{version:u}=e[a];if(l===``||r.satisfies(u,l)||r.validRange(l)===null)continue;let d=i?`and no resolution gives it`:`which only a resolution may excuse, as the manifests would say`;throw t!==void 0&&(d=`which the root asks for before the resolution ${j(t.path)} applies, so yarn takes it as outdated`),new A(`${u} does not satisfy ${j(l)}, ${d}`,M(``,a))}}function He(e,t,n){let r=t?.workspaces.get(e.name);if(r===void 0)return;let i=t.rules.find(e=>e.target===`link:${r.dir}`);if(i===void 0)return;let a=`than the workspace ${j(r.dir)}, which the resolution ${j(i.path)} gives it`;if(e.version!==r.version)throw new A(`another version ${a}, ${r.version}`,M(n,`version`));return W(e,t.importers[r.dir],a,n),i}function Ue({packages:e,patterns:t,mixed:n},r,i){let a=new Map;for(let{pkg:e,registry:t,sources:i,other:o}of n){let n=M(``,e.patterns[0]);if(i.length===0){let i=He(e,r,n);if(i===void 0)throw new A(`${j(t)} asks for the registry, and resolves to nothing, ${r===void 0?`which only a resolution to a workspace may, as the manifests would say`:`as for a directory`}`,n);a.set(e,{sources:[i.target],rule:i});continue}if(r===void 0)throw new A(`${j(t)} asks for the registry, and is given what ${j(i[0])} names, which only a resolution may, as the manifests would say`,n);let s=i.find(e=>!r.rules.some(t=>t.pattern===e));if(s!==void 0)throw new A(`${j(t)} asks for the registry, and is given what ${j(s)} names, which no resolution does`,n);let c=r.rules.find(e=>i.includes(e.pattern));if(o!==void 0)throw new A(`asks for what the resolution ${j(c.path)} resolves to, as a dependency of its own`,M(``,o.patterns[0]));a.set(e,{sources:i,rule:c})}let o=r!==void 0&&r.rules.length>0?Be(e,r,a):void 0;i!==void 0&&Ve(e,t,o,i,r!==void 0);for(let[t,{sources:n}]of a)n[0].startsWith(`link:`)&&delete e[t.patterns[0]]}var We=[`# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.`,`# yarn lockfile v1`],Ge=/^# yarn lockfile v(\d+)$/u,Ke=/[:\s\\",[\]]/u,qe=e=>e.startsWith(`true`)||e.startsWith(`false`)||Ke.test(e)||!/^[A-Za-z]/u.test(e),Je=/[A-Za-z][^\s:\\",[\]]*/uy;function Ye(e,t,n){let[r,i]=oe(e,t,n);if(r.includes(`\\"`))throw N(`${j(r)} is a string yarn reads to another quote`,n);let a=P.exec(r)?.[0];if(a!==void 0)throw N(`an escape for ${ne(a)}, which is not allowed`,n);if(!qe(r))throw N(`${j(r)} is quoted, where yarn writes it bare`,n);return[r,i]}function Xe(e,t,n){if(e[t]===`"`)return Ye(e,t,n);Je.lastIndex=t;let r=Je.exec(e)?.[0];if(r===void 0)throw N(`expected a string, found ${ie(e,t)}`,n);if(qe(r))throw N(`${j(r)} is bare, where yarn quotes it`,n);return[r,t+r.length]}function Z(e,t,n){let[r,i]=Xe(e,t,n);if(r===``)throw N(`an empty key, which yarn does not read`,n);return[r,i]}function Ze(e,t,n){let[r,i]=Xe(e,t,n);if(r.startsWith(`null`)&&e[t]!==`"`)throw N(`${j(r)} is bare, and read as null by some readers`,n);return Q(e,i,n),r}function Q(e,t,n){if(t!==e.length)throw N(`expected the end of the line, found ${j(e.slice(t))}`,n)}function Qe(e,t){if(e.line!==t)throw N(`expected yarn's header, ${j(t)}`,e.number);I(e)}function $e(e){Qe(e,We[0]);let t=Ge.exec(e.line??``)?.[1];if(t!==void 0&&t!==`1`)throw N(`unsupported version: expected "1", found ${j(t)}`,e.number);for(Qe(e,We[1]);e.line?.startsWith(`#`);I(e)){if(/^yarn lockfile v\d+$/u.test(e.line.slice(1).trim()))throw N(`a second lockfile version`,e.number);if(e.line===`#`)throw N(`a comment of "#" alone, which @yarnpkg/parsers does not read`,e.number)}}function $(e,t,n,r,i){let a=Object.create(null);for(let n=e.line;n?.startsWith(` `)&&F(n)>t-2;n=e.line){if(F(n)!==t)throw N(`expected ${t} spaces of indentation, found ${F(n)}`,e.number);let[r,o]=Z(n,t,e.number);i(a,r,o,n,e.number)}if(Object.keys(a).length===0)throw N(n,r);return a}var et=(e,t,n)=>$(e,4,`expected what ${j(t)} holds below it`,n,(n,r,i,a,o)=>{if(a[i]!==` `)throw N(`expected a space and a range after ${j(r)}`,o);let s=Ze(a,i+1,o);if(r in n)throw N(`${j(r)} is in ${j(t)} twice`,o);n[r]=s,I(e)}),tt=(e,t)=>$(e,2,`expected the fields of the entry below it`,t,(t,n,r,i,a)=>{if(n in t)throw N(`the field ${j(n)} twice`,a);if(i[r]===`:`){Q(i,r+1,a),I(e),t[n]=et(e,n,a);return}if(i[r]!==` `)throw N(`expected a space and a value, or ":", after ${j(n)}`,a);t[n]=Ze(i,r+1,a),I(e)});function nt(e,t){let{line:n,number:r}=e,i=[];for(let e=0;;){let[a,o]=Z(n,e,r);if(t.has(a))throw N(`${j(a)} is a key ${t.get(a)===r?`twice`:`at line ${t.get(a)+1} too`}`,r);if(t.set(a,r),i.push(a),n[o]===`:`){Q(n,o+1,r);break}if(!n.startsWith(`, `,o))throw N(`expected ", " and a pattern, or ":", after ${j(a)}`,r);e=o+2}return I(e),{keys:i,fields:tt(e,r)}}function rt(e){re(e,`yarn`);let t=ae(e,P);I(t),$e(t);let n=[],r=new Map,i;for(let e=t.line;e!==void 0;e=t.line){if(e===``){n.length>0&&(i??=t.number),I(t);continue}if(e.startsWith(` `))throw i===void 0?N(`expected an entry, at column 0`,t.number):N(`a blank line within an entry`,i);if(e.startsWith(`#`))throw N(`a comment, which yarn writes in the header alone`,t.number);i=void 0,n.push(nt(t,r))}return n}var it=[`manifests`,`checkVersions`,`semver`],at=[`clean`,`satisfies`,`valid`,`validRange`];function ot(e,t){let n=t===void 0?()=>({dev:void 0,optional:void 0,devOptional:void 0}):r(e,t);for(let t of new Set(Object.values(e)))Object.assign(t,n(t))}function st(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{manifests:n,semver:r}=T(t,it);E(t,at);let i=De(rt(e),r),{packages:a,requests:o}=i;n===void 0&&Y(o,a);let s=n===void 0?void 0:Re(n,a,o,r);return Ue(i,s,r),ot(a,s?.importers),{packages:a,importers:s?.importers}}export{A as LockfileError,st as parseYarn1Lockfile};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=2n**64n-1n,t=`0|[1-9]\\d*`,n=`\\d*[A-Za-z-][\\dA-Za-z-]*|${t}`,r=`(?:${n})(?:\\.(?:${n}))*`,i=`[\\dA-Za-z-]+(?:\\.[\\dA-Za-z-]+)*`,a=`[*Xx]`,o=RegExp(`^(${t})\\.(${t})\\.(${t})(?:-(${r}))?(?:\\+(${i}))?$`,`u`),s=RegExp(`^(?:${r})?$`,`u`),c=RegExp(`^(?:${i})?$`,`u`),l=RegExp(`^ *${a} *$`,`u`),u=RegExp(`^ *(?:(>=|<=|=|>|<|~|\\^) *)?(${t})(?:\\.(?:(${a})(?:\\.${a})?|(${t})(?:\\.(?:(${a})|(${t})(?:-(${r}))?(?:\\+${i})?))?))? *$`,`u`);function d(t){if(t===void 0)return;if(t.length>20)return null;let n=BigInt(t);return n>e?null:n}var f=t=>typeof t==`bigint`&&t>=0n&&t<=e;function p(e){if(typeof e!=`string`)throw TypeError(`expected a string`);return e}function m(e){let t=o.exec(p(e));if(t===null)return;let[n,r,i]=t.slice(1,4).map(d);if(![n,r,i].includes(null))return{major:n,minor:r,patch:i,pre:t[4]??``,build:t[5]??``}}function h(e){let t=u.exec(e);if(t===null)return;let[,n,r,i,a,o,s,c=``]=t,[l,f,p]=[r,a,s].map(d);if(![l,f,p].includes(null))return{op:n??(i||o?`*`:`^`),major:l,minor:f,patch:p,pre:c}}var g=32;function _(e){if(l.test(p(e)))return[];let t=e.split(`,`,g+1);if(t.length>g)return;let n=t.map(h);return n.includes(void 0)?void 0:n}var v=(e,t)=>e===t?0:e<t?-1:1;function y(e,t){if(e===t)return 0;if(e===``)return 1;if(t===``)return-1;let[n,r]=[e.split(`.`),t.split(`.`)];for(let[e,t]of n.entries()){let n=r[e];if(n===void 0)return 1;let[i,a]=[/^\d+$/u.test(t),/^\d+$/u.test(n)];if(i!==a)return i?-1:1;let o=i&&v(t.length,n.length)||v(t,n);if(o!==0)return o}return n.length===r.length?0:-1}function b(e,t){for(let n of[`major`,`minor`,`patch`]){if(e[n]===void 0)return t.pre===e.pre?0:NaN;if(t[n]!==e[n])return v(t[n],e[n])}return y(t.pre,e.pre)}var x=(e,t)=>t.major===e.major&&(e.minor===void 0||t.minor===e.minor)&&b(e,t)>=0;function S(e,t){return t.major===e.major?e.minor===void 0?!0:e.patch===void 0?e.major>0n?t.minor>=e.minor:t.minor===e.minor:(e.major>0n||t.minor===e.minor&&(e.minor>0n||t.patch===e.patch))&&b(e,t)>=0:!1}var C=new Map([[`=`,(e,t)=>b(e,t)===0],[`*`,(e,t)=>b(e,t)===0],[`>`,(e,t)=>b(e,t)>0],[`>=`,(e,t)=>b(e,t)>=0],[`<`,(e,t)=>b(e,t)<0],[`<=`,(e,t)=>b(e,t)<=0],[`~`,x],[`^`,S]]);function w(e){let{major:t,minor:n,patch:r,pre:i,build:a}=e??{};return f(t)&&f(n)&&f(r)&&typeof i==`string`&&s.test(i)&&typeof a==`string`&&c.test(a)?{major:t,minor:n,patch:r,pre:i,build:a}:void 0}function T(e){let{op:t,major:n,minor:r,patch:i,pre:a}=e??{};return C.has(t)&&f(n)&&(r===void 0||f(r))&&(i===void 0||r!==void 0&&t!==`*`&&f(i))&&typeof a==`string`&&s.test(a)&&(a===``||i!==void 0)?{op:t,major:n,minor:r,patch:i,pre:a}:void 0}function E(e){if(!Array.isArray(e))return;let{length:t}=e;if(t>g)return;let n=Array.from({length:t},(t,n)=>T(e[n]));return n.includes(void 0)?void 0:n}function D(e,t){let n=E(e);if(n===void 0)throw TypeError(`expected comparators, as parseVersionReq makes`);let r=w(t);if(r===void 0)throw TypeError(`expected a version, as parseVersion makes`);return n.every(e=>C.get(e.op)(e,r))?r.pre===``||n.some(e=>e.major===r.major&&e.minor===r.minor&&e.patch===r.patch&&e.pre!==``):!1}export{p as a,m as b,_ as c,D as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,{packageDir:t=null}={}){if(t){if(t!==`.`){let e=t.match(/(?:^|\/)node_modules\/(@[^/]+\/[^/]+|[^/]+)$/u);return e&&e[1]!==`.pnpm`?e[1]:t}}else{let t=/\.sol$/iu.test(e)?/(?:^|\/)(?:node_modules\/(@[^/]+\/[^/]+|[^/]+)|dependencies\/(@[^/]+\/[^/]+|[^/]+)\/)/gu:/(?:^|\/)node_modules\/(@[^/]+\/[^/]+|[^/]+)/gu,n;for(;(n=t.exec(e))!==null;){let e=n[1]??n[2];if(e!==`.pnpm`)return e}}return`__own__`}function t(t,n=null){return e(t,{packageDir:n})===`__own__`||!!n&&!/(?:^|\/)(?:node_modules|dependencies|vendor)(?:\/|$)/u.test(n)}function n(e,n=null){let r=[],i=[];for(let a of e)(t(a,n?.get(a))?r:i).push(a);return[...r,...i]}function r(e){return e===`__own__`?`Own source`:typeof e==`string`?e.match(/^(?:.*\/)?vendor\/(.+)$/u)?.[1]??e:e}function i(e){return typeof e==`string`&&/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u.test(e)?e:null}export{i as a,e as b,t as c,n as d,r as e};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{b as e,c as t,m as n,r}from"./chunk-PTFQKLKO.js";import{a as i}from"./chunk-TUII34K2.js";var a=3,o=4,s=/^[\w-]{4}$/u,c=/^[\w-]{8}$/u,l=`AAAA`,u={report:`deepview/finding-link/report/v1
|
|
2
|
+
`,workspace:`deepview/finding-link/workspace/v1
|
|
3
|
+
`},d=new Map;function f(e,t){return`${e}\0${t}`}function p(e){return typeof e==`string`&&s.test(e)}async function m(e,t){let n=u[e];if(!n||typeof t!=`string`||!t)return null;let r=f(e,t),o=d.get(r);if(o!==void 0)return o;let s;try{let e=await crypto.subtle.digest(`SHA-256`,i(n+t));s=new Uint8Array(e).slice(0,a).toBase64({alphabet:`base64url`,omitPadding:!0})}catch{return null}return d.set(r,s),s}function h(e,t){return typeof t!=`string`||!t?null:d.get(f(e,t))??null}function g(e,t){let n=[];for(let[r,i]of[[`report`,e],[`workspace`,t]]){if(i==null||i===``){n.push(l);continue}if(!p(i))throw TypeError(`encodeFindingRef: ${r} must be a link hint token, not a name`);n.push(i)}return n.every(e=>e===l)?null:n[0]===l?`w${n[1]}`:n.join(``)}function _(e){let t=[e.slice(0,o),e.slice(o)].map(e=>e===l?null:e);return{report:t[0],workspace:t[1]}}function v({id:e,report:n,workspace:r}={}){if(!t(e))throw TypeError(`encodeFindingRef: a persistent finding id is required`);let i=[`finding=${encodeURIComponent(e)}`],a=g(n,r);return a&&i.push(`v=${a}`),i.join(`&`)}function y(e,t){let n=v(e);return typeof location>`u`?`${t??``}#${n}`:`${location.origin}${t??location.pathname}#${n}`}function b(n){let r=typeof n==`string`?n:typeof location>`u`?``:location.hash;if(!r)return null;let i=r.replace(/^#/u,``);if(!i)return null;let a={id:null,report:null,workspace:null};for(let n of i.split(`&`)){let r=n.indexOf(`=`);if(r<0)continue;let i=n.slice(0,r),o=n.slice(r+1);if(!o)continue;if(i===`v`){if(o.length===5&&o[0]===`w`&&p(o.slice(1))){let e=o.slice(1);Object.assign(a,{report:null,workspace:e===l?null:e});continue}if(!c.test(o))continue;Object.assign(a,_(o));continue}if(i!==`finding`||o.length>e*3)continue;let s;try{s=decodeURIComponent(o)}catch{continue}t(s)&&(a.id=s)}return a.id?a:null}function x(e,{managed:t=!1}={}){if(typeof location>`u`)return null;let i;try{i=new URL(e)}catch{return null}if(i.href!==e||i.protocol!==location.protocol||i.host!==location.host||i.username||i.password)return null;let a=r(i);if(a?.finding)return{id:a.finding.id,fragment:v(a.finding),path:n(a)};if(t&&a?.view!==`home`&&!/\/(?:index|view)\.html$/u.test(i.pathname))return null;let o=b(i.hash);if(!o)return null;let s=v(o);return{id:o.id,fragment:s,path:`/#${s}`}}function S(e,t){if(typeof e!=`string`)return!1;let n=e.replaceAll(`\\`,`/`);return n.startsWith(`${t}/`)||n.includes(`/${t}/`)}function C(e){let t=!1;for(let n of e){for(let e of n.groups??[])for(let n of e){if(S(n.file,`node_modules`))return`node_modules`;S(n.file,`vendor`)&&(t=!0)}let e=n.tree?w(n.tree):n.treeDependencies;if(e===`node_modules`)return`node_modules`;e===`vendor`&&(t=!0)}return t?`vendor`:`dependencies`}function w(e){let t=!1;for(let n of Object.keys(e??{})){if(S(n,`node_modules`))return`node_modules`;S(n,`vendor`)&&(t=!0)}return t?`vendor`:null}export{S as a,C as b,m as c,h as d,v as e,y as f,b as g,x as h};
|