From 511dcd706791e551243fd2682765825f82473afc Mon Sep 17 00:00:00 2001 From: Thomas Durieux <5577568+tdurieux@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:37:29 +0100 Subject: [PATCH] feat(admin): billing tab to monitor subscriptions and sales (#952) * feat(admin): add a Billing tab for subscriptions and sales The admin can now follow subscriptions and sales without opening Stripe: - Summary tiles: active subscriptions (monthly/annual), MRR with annual plans counted as 1/12, sales and revenue for 7d/30d/90d/12m/all time, all-time sales, subscriptions cancelling at period end, and refunds and disputes. - A stacked chart of sales per day, week or month by plan family. - A by-plan table: active grants, period and all-time sales and revenue. - A paginated list of grants with plan, Stripe status, active/expired/ revoked and user filters, linked to the admin user, repository or conference. - One row of webhook health: pending, failed, oldest pending event, last error and unreviewed payment reversals. A sale is one checkout or subscription, so a paper pack's three grants count once. Revenue is each sale's Stripe list price, resolved once per price and cached in memory. Currencies are never added together. Without Stripe the page shows counts and marks revenue as unavailable. GET /api/admin/billing/summary and /grants sit behind the admin check. Grants get a { purchasedAt, _id } index for the list. Co-Authored-By: Claude Opus 5.5 * fix: preserve payment history in admin billing totals * fix: scope billing history and preserve original sale prices --------- Co-authored-by: Claude Opus 5.5 --- public/asset-manifest.json | 4 +- public/css/all.min.css | 2 +- public/css/style.css | 91 +++++++++ public/partials/admin/billing.htm | 246 ++++++++++++++++++++++ public/partials/admin/conferences.htm | 1 + public/partials/admin/errors.htm | 1 + public/partials/admin/overview.htm | 1 + public/partials/admin/queues.htm | 1 + public/partials/admin/repositories.htm | 1 + public/partials/admin/user.htm | 1 + public/partials/admin/users.htm | 1 + public/partials/icons.htm | 1 + public/script/admin.js | 184 +++++++++++++++++ public/script/routes.js | 1 + public/script/templates.js | 2 + public/script/vendor.min.js | 102 +++++----- scripts/dev-mock.js | 140 +++++++++++++ src/core/billing/models.ts | 9 +- src/core/billing/report.ts | 272 +++++++++++++++++++++++++ src/core/billing/stripe.ts | 18 +- src/server/routes/admin-billing.ts | 30 +++ src/server/routes/admin.ts | 2 + test/admin-billing.test.js | 250 +++++++++++++++++++++++ test/billing-integration.test.js | 15 ++ test/vue-ui.test.js | 54 ++++- 25 files changed, 1371 insertions(+), 59 deletions(-) create mode 100644 public/partials/admin/billing.htm create mode 100644 src/core/billing/report.ts create mode 100644 src/server/routes/admin-billing.ts create mode 100644 test/admin-billing.test.js diff --git a/public/asset-manifest.json b/public/asset-manifest.json index e0c5a5e..33274a4 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,8 +1,8 @@ { "core.min.js": "core.d23af1c652.min.js", - "vendor.min.js": "vendor.f7ae54550a.min.js", + "vendor.min.js": "vendor.023a865c47.min.js", "mermaid.min.js": "mermaid.a7356d5ed1.min.js", - "all.min.css": "all.f1b027597b.min.css", + "all.min.css": "all.d641dcb5c8.min.css", "markdown.min.js": "markdown.6c8dfb7b1d.min.js", "pdf.min.js": "pdf.4d9cc6ff49.min.js", "notebook.min.js": "notebook.c3144c18ae.min.js", diff --git a/public/css/all.min.css b/public/css/all.min.css index 89c6142..2a692cc 100644 --- a/public/css/all.min.css +++ b/public/css/all.min.css @@ -10,4 +10,4 @@ @container explorer-file (max-width: 700px) { .reviewer-preview .file-card-head .file-card-meta, .reviewer-preview .file-card-head .symbols { display: none !important; } } -.reviewer-preview .rp-main{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reviewer-preview .rp-document{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;position:relative}.reviewer-preview button.rp-count{background:0 0;border:0;padding:0;font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}.reviewer-preview button.rp-count:hover{text-decoration-color:currentColor}@media (max-width:767px){.reviewer-preview .file-card-head .rp-preserved-tag{display:none}}.breadcrumb .redact-slot,.files .tree-name .redact-slot{position:relative;top:-.15em}.dark-mode .markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip,.markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip{vertical-align:.04em!important} \ No newline at end of file +.reviewer-preview .rp-main{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reviewer-preview .rp-document{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;position:relative}.reviewer-preview button.rp-count{background:0 0;border:0;padding:0;font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px}.reviewer-preview button.rp-count:hover{text-decoration-color:currentColor}@media (max-width:767px){.reviewer-preview .file-card-head .rp-preserved-tag{display:none}}.billing-page{--bl-subscription:#008C7E;--bl-repository:#D0652A;--bl-conference:#6250D6}.dark-mode .billing-page{--bl-subscription:#16A091;--bl-repository:#D95926;--bl-conference:#9085E9}.billing-page .bl-subscription{background:var(--bl-subscription)!important}.billing-page .bl-repository{background:var(--bl-repository)!important}.billing-page .bl-conference{background:var(--bl-conference)!important}.billing-page .bl-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:4px 0 0}.billing-page .bl-basis{margin:0;font-size:12px;color:var(--ink-muted)}.billing-page .bl-message{display:flex;align-items:center;gap:8px;margin:14px 0 0;padding:10px 14px;border:1px solid var(--border-color);border-radius:var(--radius-control,8px);font-size:13px;color:var(--color);background:var(--paper-card)}.billing-page .bl-message .ui-icon{width:16px;height:16px;flex:none;color:var(--ink-muted)}.billing-page .bl-message.ov-performance-warning{border-color:color-mix(in srgb,var(--status-progress) 45%,var(--border-color));background:color-mix(in srgb,var(--status-progress) 8%,var(--paper-card))}.billing-page .bl-message.ov-performance-warning .ui-icon{color:var(--status-progress)}.billing-page .bl-message .btn{margin-left:auto}.overview-page .bl-kpi-row{grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 16px}.overview-page .bl-kpi-row .ov-kpi-card{min-width:0;padding:16px 18px}.overview-page .bl-kpi-row .ov-kpi-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-page .bl-kpi-row .ov-kpi-sub{white-space:normal;overflow-wrap:anywhere;line-height:1.4}.overview-page .bl-kpi-row .ov-kpi-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-page .bl-kpi-row .bl-muted-value{color:var(--ink-muted);font-size:20px;line-height:28px}.overview-page .bl-kpi-row.is-loading .ov-kpi-card{opacity:.6}.billing-page .bl-skeleton-value{display:block;width:50%;height:28px;margin:4px 0;border-radius:6px}@media (max-width:1279px){.overview-page .bl-kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media (max-width:767px){.overview-page .bl-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}}.billing-page .bl-health{display:flex;align-items:center;flex-wrap:wrap;gap:6px 20px;padding:10px 16px;margin:0 0 16px;border:1px solid var(--border-color);border-radius:var(--radius-control,8px);background:var(--paper-card);font-size:13px;font-variant-numeric:tabular-nums}.billing-page .bl-health-title{display:inline-flex;align-items:center;gap:8px;font-weight:600}.billing-page .bl-health-title .ov-svc-dot{width:8px;height:8px;margin:0;border-radius:50%}.billing-page .bl-dot-bad{background:var(--st-bad,#b42318)}.billing-page .bl-health-item .k{color:var(--ink-muted);margin-right:2px}.billing-page .bl-health-item.is-bad{color:var(--st-bad,#b42318);font-weight:600}.billing-page .bl-health-item.is-warn{color:#946519;font-weight:600}.dark-mode .billing-page .bl-health-item.is-warn{color:var(--status-progress)}.dark-mode .billing-page .bl-health-item.is-bad{color:#f08a82}.billing-page .bl-health-error{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.billing-page .bl-health-error code{font-size:12px;color:inherit;background:var(--paper-bg-alt);padding:1px 5px;border-radius:4px}.billing-page .bl-chart-card{margin-bottom:16px}.billing-page .bl-swatch{display:inline-block;width:8px;height:8px;border-radius:2px;flex:none}.billing-page .bl-bars{position:relative;gap:3px}.billing-page .bl-bars.is-dense{gap:1px}.billing-page .bl-col{min-width:0}.billing-page .bl-stack{display:flex;flex-direction:column-reverse;width:100%;gap:1px;border-radius:2px 2px 0 0;overflow:hidden}.billing-page .bl-stack>i{display:block;min-height:2px;flex-basis:0}.billing-page .bl-col:hover .bl-stack{filter:brightness(1.08)}.billing-page .bl-col.is-zero .bl-stack{height:1px!important;background:var(--border-color)}.billing-page .bl-empty{margin:8px 0 4px;padding:32px 0;text-align:center;color:var(--ink-muted)}.billing-page .bl-plans{margin-bottom:24px}.billing-page .ov-metrics-table thead th.bl-group{text-align:center;border-bottom:1px solid var(--border-color)}.billing-page .ov-metrics-table tfoot td,.billing-page .ov-metrics-table tfoot th{border-top:1px solid var(--border-color);border-bottom:0;font-weight:600;background:var(--paper-bg-alt)}.billing-page .ov-metrics-table tbody tr:last-child>*{border-bottom:0}.billing-page .bl-plan-name{font-weight:500;text-align:left}.billing-page .bl-plan-cell .bl-swatch,.billing-page .bl-plan-name .bl-swatch{margin-right:8px;vertical-align:1px}.billing-page .bl-link{padding:0;border:0;background:0 0;font:inherit;color:var(--link-color);cursor:pointer;text-align:left}.billing-page .bl-link:hover{text-decoration:underline}.billing-page .bl-idle .bl-link,.billing-page .bl-idle td{color:var(--ink-faint)}.billing-page .ov-muted{color:var(--ink-faint)}.billing-page .bl-note{margin:10px 0 0}.billing-page .bl-grants{margin:8px 0 24px;scroll-margin-top:16px}.billing-page .bl-section-head{margin:0 0 8px}.billing-page .bl-section-head h2{margin:0}.billing-page .bl-grant-scroll{margin-top:12px}.billing-page .bl-grant-table th[scope=row]{font-weight:500;text-align:left;max-width:200px;overflow:hidden;text-overflow:ellipsis}.billing-page .bl-grant-table td,.billing-page .bl-grant-table th{padding:9px 12px}.billing-page .bl-grant-table th[scope=row] a,.billing-page .bl-scope a{color:var(--link-color)}.billing-page .bl-grant-table .sortable{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:0 0;font:inherit;color:inherit;cursor:pointer}.billing-page .bl-grant-table .sortable.active{color:var(--color)}.billing-page .bl-state{display:inline-flex;align-items:center;gap:6px}.billing-page .bl-state .status-dot{margin:0}.billing-page .bl-plan-cell{white-space:nowrap}.billing-page .bl-flag{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;background:color-mix(in srgb,var(--status-progress) 14%,transparent);color:#7a5212}.dark-mode .billing-page .bl-flag{color:var(--status-progress)}.billing-page .bl-flag.is-bad{background:color-mix(in srgb,var(--st-bad,#b42318) 12%,transparent);color:#a1251b}.dark-mode .billing-page .bl-flag.is-bad{color:#f08a82}.billing-page .bl-scope a{display:inline-flex;align-items:center;gap:6px;max-width:200px;min-width:0}.billing-page .bl-scope a>span{overflow:hidden;text-overflow:ellipsis}.billing-page .bl-scope .ui-icon{width:14px;height:14px;flex:none;color:var(--ink-muted)}.billing-page .bl-page{font-family:var(--font-mono);font-size:12px;color:var(--ink-muted)}.billing-page .bl-alert{display:flex;align-items:center;gap:8px;margin:8px 0}.billing-page .bl-alert .btn{margin-left:auto}.billing-page .bl-pager{justify-content:space-between;border-bottom:none;margin-top:8px}.billing-page .paper-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:12px}@media (max-width:767px){.billing-page .bl-health{gap:4px 14px}.billing-page .bl-health-title{flex-basis:100%}.billing-page .bl-toolbar .seg-filter{max-width:100%;overflow-x:auto}}.breadcrumb .redact-slot,.files .tree-name .redact-slot{position:relative;top:-.15em}.dark-mode .markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip,.markdown-body :is(p,li,td,th,blockquote,dd) mark.redact-chip{vertical-align:.04em!important} \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css index 1f9b90a..67fe091 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -14233,6 +14233,97 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191, @media (max-width: 767px) { .reviewer-preview .file-card-head .rp-preserved-tag { display: none; } } + +/* ── Admin billing (reuses the overview tiles, chart and tables) ─────────── */ +.billing-page { --bl-subscription: #008C7E; --bl-repository: #D0652A; --bl-conference: #6250D6; } +.dark-mode .billing-page { --bl-subscription: #16A091; --bl-repository: #D95926; --bl-conference: #9085E9; } +.billing-page .bl-subscription { background: var(--bl-subscription) !important; } +.billing-page .bl-repository { background: var(--bl-repository) !important; } +.billing-page .bl-conference { background: var(--bl-conference) !important; } +.billing-page .bl-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 0; } +.billing-page .bl-basis { margin: 0; font-size: 12px; color: var(--ink-muted); } +.billing-page .bl-message { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-control, 8px); font-size: 13px; color: var(--color); background: var(--paper-card); } +.billing-page .bl-message .ui-icon { width: 16px; height: 16px; flex: none; color: var(--ink-muted); } +.billing-page .bl-message.ov-performance-warning { border-color: color-mix(in srgb, var(--status-progress) 45%, var(--border-color)); background: color-mix(in srgb, var(--status-progress) 8%, var(--paper-card)); } +.billing-page .bl-message.ov-performance-warning .ui-icon { color: var(--status-progress); } +.billing-page .bl-message .btn { margin-left: auto; } +.overview-page .bl-kpi-row { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 16px 0 16px; } +.overview-page .bl-kpi-row .ov-kpi-card { min-width: 0; padding: 16px 18px; } +.overview-page .bl-kpi-row .ov-kpi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.overview-page .bl-kpi-row .ov-kpi-sub { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; } +.overview-page .bl-kpi-row .ov-kpi-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.overview-page .bl-kpi-row .bl-muted-value { color: var(--ink-muted); font-size: 20px; line-height: 28px; } +.overview-page .bl-kpi-row.is-loading .ov-kpi-card { opacity: .6; } +.billing-page .bl-skeleton-value { display: block; width: 50%; height: 28px; margin: 4px 0; border-radius: 6px; } +@media (max-width: 1279px) { .overview-page .bl-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } } +@media (max-width: 767px) { .overview-page .bl-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } } + +/* Webhook health: one status row. */ +.billing-page .bl-health { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; padding: 10px 16px; margin: 0 0 16px; border: 1px solid var(--border-color); border-radius: var(--radius-control, 8px); background: var(--paper-card); font-size: 13px; font-variant-numeric: tabular-nums; } +.billing-page .bl-health-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; } +.billing-page .bl-health-title .ov-svc-dot { width: 8px; height: 8px; margin: 0; border-radius: 50%; } +.billing-page .bl-dot-bad { background: var(--st-bad, #B42318); } +.billing-page .bl-health-item .k { color: var(--ink-muted); margin-right: 2px; } +.billing-page .bl-health-item.is-bad { color: var(--st-bad, #B42318); font-weight: 600; } +.billing-page .bl-health-item.is-warn { color: #946519; font-weight: 600; } +.dark-mode .billing-page .bl-health-item.is-warn { color: var(--status-progress); } +.dark-mode .billing-page .bl-health-item.is-bad { color: #F08A82; } +.billing-page .bl-health-error { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.billing-page .bl-health-error code { font-size: 12px; color: inherit; background: var(--paper-bg-alt); padding: 1px 5px; border-radius: 4px; } + +/* Stacked sales chart. */ +.billing-page .bl-chart-card { margin-bottom: 16px; } +.billing-page .bl-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; } +.billing-page .bl-bars { position: relative; gap: 3px; } +.billing-page .bl-bars.is-dense { gap: 1px; } +.billing-page .bl-col { min-width: 0; } +.billing-page .bl-stack { display: flex; flex-direction: column-reverse; width: 100%; gap: 1px; border-radius: 2px 2px 0 0; overflow: hidden; } +.billing-page .bl-stack > i { display: block; min-height: 2px; flex-basis: 0; } +.billing-page .bl-col:hover .bl-stack { filter: brightness(1.08); } +.billing-page .bl-col.is-zero .bl-stack { height: 1px !important; background: var(--border-color); } +.billing-page .bl-empty { margin: 8px 0 4px; padding: 32px 0; text-align: center; color: var(--ink-muted); } + +/* By plan and grant tables. */ +.billing-page .bl-plans { margin-bottom: 24px; } +.billing-page .ov-metrics-table thead th.bl-group { text-align: center; border-bottom: 1px solid var(--border-color); } +.billing-page .ov-metrics-table tfoot th, .billing-page .ov-metrics-table tfoot td { border-top: 1px solid var(--border-color); border-bottom: 0; font-weight: 600; background: var(--paper-bg-alt); } +.billing-page .ov-metrics-table tbody tr:last-child > * { border-bottom: 0; } +.billing-page .bl-plan-name { font-weight: 500; text-align: left; } +.billing-page .bl-plan-name .bl-swatch, .billing-page .bl-plan-cell .bl-swatch { margin-right: 8px; vertical-align: 1px; } +.billing-page .bl-link { padding: 0; border: 0; background: none; font: inherit; color: var(--link-color); cursor: pointer; text-align: left; } +.billing-page .bl-link:hover { text-decoration: underline; } +.billing-page .bl-idle td, .billing-page .bl-idle .bl-link { color: var(--ink-faint); } +.billing-page .ov-muted { color: var(--ink-faint); } +.billing-page .bl-note { margin: 10px 0 0; } +.billing-page .bl-grants { margin: 8px 0 24px; scroll-margin-top: 16px; } +.billing-page .bl-section-head { margin: 0 0 8px; } +.billing-page .bl-section-head h2 { margin: 0; } +.billing-page .bl-grant-scroll { margin-top: 12px; } +.billing-page .bl-grant-table th[scope="row"] { font-weight: 500; text-align: left; max-width: 200px; overflow: hidden; text-overflow: ellipsis; } +.billing-page .bl-grant-table th, .billing-page .bl-grant-table td { padding: 9px 12px; } +.billing-page .bl-grant-table th[scope="row"] a, .billing-page .bl-scope a { color: var(--link-color); } +.billing-page .bl-grant-table .sortable { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; } +.billing-page .bl-grant-table .sortable.active { color: var(--color); } +.billing-page .bl-state { display: inline-flex; align-items: center; gap: 6px; } +.billing-page .bl-state .status-dot { margin: 0; } +.billing-page .bl-plan-cell { white-space: nowrap; } +.billing-page .bl-flag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--status-progress) 14%, transparent); color: #7A5212; } +.dark-mode .billing-page .bl-flag { color: var(--status-progress); } +.billing-page .bl-flag.is-bad { background: color-mix(in srgb, var(--st-bad, #B42318) 12%, transparent); color: #A1251B; } +.dark-mode .billing-page .bl-flag.is-bad { color: #F08A82; } +.billing-page .bl-scope a { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; min-width: 0; } +.billing-page .bl-scope a > span { overflow: hidden; text-overflow: ellipsis; } +.billing-page .bl-scope .ui-icon { width: 14px; height: 14px; flex: none; color: var(--ink-muted); } +.billing-page .bl-page { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); } +.billing-page .bl-alert { display: flex; align-items: center; gap: 8px; margin: 8px 0; } +.billing-page .bl-alert .btn { margin-left: auto; } +.billing-page .bl-pager { justify-content: space-between; border-bottom: none; margin-top: 8px; } +.billing-page .paper-table-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; } +@media (max-width: 767px) { + .billing-page .bl-health { gap: 4px 14px; } + .billing-page .bl-health-title { flex-basis: 100%; } + .billing-page .bl-toolbar .seg-filter { max-width: 100%; overflow-x: auto; } +} /* Tree and breadcrumb: the slot centers on the name's capitals, not below the baseline. */ .files .tree-name .redact-slot, .breadcrumb .redact-slot { position: relative; top: -.15em; } /* Text: the slot centers on the line's letters, level with parentheses and punctuation. */ diff --git a/public/partials/admin/billing.htm b/public/partials/admin/billing.htm new file mode 100644 index 0000000..5160438 --- /dev/null +++ b/public/partials/admin/billing.htm @@ -0,0 +1,246 @@ +
+
+
Admin  /  Billing
+
+

Billing

+
+
+ + + +
+
+ +
+

Sales are new checkouts and subscriptions. Revenue uses Stripe list prices; renewals count toward MRR.

+
+ + +
+ + Revenue unavailable. Stripe is not configured on this server, so amounts can't be looked up. Counts are complete. +
+
+ + Some Stripe prices are unavailable. Affected totals are marked incomplete: {{ fmt?.number(summary.revenue.missingSales || 0) }} period sales, {{ fmt?.number(summary.revenue.missingAllTimeSales || 0) }} historical sales, {{ fmt?.number(summary.revenue.missingSubscriptions || 0) }} active subscriptions. +
+ + +
+ + +
+ + +
+ Stripe webhooks + Pending {{ fmt?.number(summary.webhooks.pending) }} + Failed {{ fmt?.number(summary.webhooks.failed) }} + Last error {{ summary.webhooks.lastError.error }} on {{ summary.webhooks.lastError.type }} · {{ fmt?.humanTime(summary.webhooks.lastError.receivedAt) }} + Last error none + Unreviewed reversals {{ fmt?.number(summary.webhooks.unreviewedRevocations) }} +
+ + +
+
+ Sales per {{ bucketName() }} · {{ periodPhrase() }} + + {{ f.label }} · {{ fmt?.number(familyTotal(f.id)) }} + +
+ +

No sales {{ period === 'all' ? 'yet' : 'in the ' + periodPhrase() }}.

+
+ + +
+
+

By plan

+ {{ fmt?.number(plansWithActivity().length) }} of {{ fmt?.number(summary.plans.length) }} plans sold +
+
+ + + + + + + + + + + + + + + + + + +
Active grants, sales and revenue per plan
PlanActive{{ periodPhrase().replace(/^./, c => c.toUpperCase()) }}All time
SalesRevenue
{{ fmt?.number(p.active) }}{{ fmt?.number(p.allTimeSales) }}{{ revenueOn() ? (p.allTimeRevenueComplete === false ? 'Incomplete' : moneyText(p.allTimeRevenue)) : '—' }}
Total{{ fmt?.number(planTotals().active) }}{{ fmt?.number(planTotals().allTimeSales) }}{{ revenueOn() ? (summary.allTime.complete === false ? 'Incomplete' : moneyText(summary.allTime.revenue)) : '—' }}
+
+

A paper pack counts once, under Paper pack. Active means paid time remains and the payment wasn't reversed.

+
+ + +
+
+

Subscriptions and purchases

+
+
+
+ + + + +
+

{{ total >= 0 ? fmt.number(total) : '…' }} shown

+
+ +
+ {{ grantsError }} +
+ +
+ +
+
+ +
+ + + + + + + + + + {{ query?.page }}/{{ totalPage || 1 }} + + +
+
+
+ + {{ chip?.label }} + {{ chip?.value }} + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Subscriptions and purchases
UserPlanStatusCancellingRevokedApplies to
{{ g.user }}Deleted user{{ planName(g.planId) }}Part of a paper pack{{ g.state === 'active' ? 'Active' : g.state === 'revoked' ? 'Revoked' : 'Expired' }}Stripe: {{ statusText(g) }}{{ g.purchasedAt ? fmt?.date(g.purchasedAt) : '—' }}{{ g.cancelAtPeriodEnd ? 'Ends' : 'Renews' }}Cancelling——{{ g.scope.id }}Account
+
+
+ + {{ hasFilters() ? 'No subscriptions or purchases match these filters.' : 'No subscriptions or purchases yet.' }} + +
+
Loading subscriptions and purchases…
+ +
+ +
+ + + of {{ totalPage }} + +
+ + + + +
+
+
diff --git a/public/partials/admin/conferences.htm b/public/partials/admin/conferences.htm index 74ba46a..5ec49b3 100644 --- a/public/partials/admin/conferences.htm +++ b/public/partials/admin/conferences.htm @@ -7,6 +7,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/admin/errors.htm b/public/partials/admin/errors.htm index eed8799..a56a47a 100644 --- a/public/partials/admin/errors.htm +++ b/public/partials/admin/errors.htm @@ -14,6 +14,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/admin/overview.htm b/public/partials/admin/overview.htm index 6c4af44..d297b81 100644 --- a/public/partials/admin/overview.htm +++ b/public/partials/admin/overview.htm @@ -13,6 +13,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/admin/queues.htm b/public/partials/admin/queues.htm index ddd46e7..5a5f6d5 100644 --- a/public/partials/admin/queues.htm +++ b/public/partials/admin/queues.htm @@ -14,6 +14,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/admin/repositories.htm b/public/partials/admin/repositories.htm index 2a50517..7781c74 100644 --- a/public/partials/admin/repositories.htm +++ b/public/partials/admin/repositories.htm @@ -7,6 +7,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/admin/user.htm b/public/partials/admin/user.htm index b00d86b..99c4b96 100644 --- a/public/partials/admin/user.htm +++ b/public/partials/admin/user.htm @@ -7,6 +7,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/admin/users.htm b/public/partials/admin/users.htm index 83b3ff3..bd4e784 100644 --- a/public/partials/admin/users.htm +++ b/public/partials/admin/users.htm @@ -7,6 +7,7 @@ Repositories Users Conferences + Billing Queues Errors diff --git a/public/partials/icons.htm b/public/partials/icons.htm index 7845285..d85b25a 100644 --- a/public/partials/icons.htm +++ b/public/partials/icons.htm @@ -49,6 +49,7 @@ + diff --git a/public/script/admin.js b/public/script/admin.js index bf7b444..a7bde8c 100644 --- a/public/script/admin.js +++ b/public/script/admin.js @@ -2245,3 +2245,187 @@ function watchMetaLines(timers, listen) { if (document.fonts?.ready) document.fonts.ready.then(queue); queue(); } + +// Billing: subscriptions, sales and webhook health. Amounts arrive in minor units per currency +// (Stripe's unit_amount) and are never added across currencies. +const ZERO_DECIMAL = ["bif", "clp", "djf", "gnf", "jpy", "kmf", "krw", "mga", "pyg", "rwf", "ugx", "vnd", "vuv", "xaf", "xof", "xpf"]; +export const BILLING_FAMILIES = [ + { id: "subscription", label: "Subscriptions" }, + { id: "repository", label: "Repository purchases" }, + { id: "conference", label: "Conferences" }, +]; +// Names from src/core/billing/config.ts, used until the summary (which carries them) arrives. +const BILLING_PLAN_NAMES = { author_monthly: "Author monthly", author_annual: "Author annual", author_pass: "Live updates", repo_extend: "Extended expiration", + repo_never: "Never expire", repo_slot: "Extra repository", repo_pack: "Paper pack", conference_workshop: "Workshop", conference: "Conference", conference_large: "Large conference" }; +export function moneyParts(amounts) { + return Object.entries(amounts || {}).filter(([, v]) => v).sort((a, b) => b[1] - a[1]).map(([currency, minor]) => { + const value = ZERO_DECIMAL.includes(currency) ? minor : minor / 100; + try { return new Intl.NumberFormat(undefined, { style: "currency", currency: currency.toUpperCase(), minimumFractionDigits: value % 1 ? 2 : 0, maximumFractionDigits: 2 }).format(value); } + catch (e) { return value + " " + currency.toUpperCase(); } + }); +} +export const billingAdminController = function (state, http, location) { + const timers = createTimers(); + state.Math = Math; + state.watch("user.status", () => { if (state.user == null) location.url("/"); }); + if (state.user == null) { location.url("/"); return; } + + state.families = BILLING_FAMILIES; + state.periods = [{ id: "7d", label: "7 days" }, { id: "30d", label: "30 days" }, { id: "90d", label: "90 days" }, { id: "12m", label: "12 months" }, { id: "all", label: "All time" }]; + const savedPeriod = (() => { try { return localStorage.getItem("admin.billing.period"); } catch (e) { return null; } })(); + state.period = state.periods.some((p) => p.id === savedPeriod) ? savedPeriod : "30d"; + state.summary = null; + state.summaryError = null; + state.summaryLoading = true; + + state.periodLabel = () => (state.periods.find((p) => p.id === state.period) || {}).label || ""; + // "in 30 days" reads wrong for All time. + state.periodPhrase = () => state.period === "all" ? "all time" : "last " + state.periodLabel(); + state.money = (amounts) => moneyParts(amounts); + state.moneyText = (amounts, empty = "—") => moneyParts(amounts).join(" · ") || empty; + state.revenueOn = () => !!state.summary?.revenue?.available; + state.planName = (id) => ((state.summary?.plans || []).find((p) => p.planId === id) || {}).name || BILLING_PLAN_NAMES[id] || id; + + // Stacked sales chart: one column per bucket, scaled to a rounded axis maximum. + state.bucketTotal = (d) => d ? d.subscription + d.repository + d.conference : 0; + state.chartMax = () => { + const peak = Math.max(0, ...(state.summary?.series || []).map(state.bucketTotal)); + if (peak <= 4) return 4; + const step = Math.pow(10, Math.floor(Math.log10(peak))); + // An even maximum keeps the midline label a whole number. + return [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10].map((m) => m * step).find((v) => v >= peak && v % 2 === 0) || 10 * step; + }; + state.segmentPct = (d, family) => d && d[family] ? (d[family] / state.chartMax()) * 100 : 0; + state.familyTotal = (family) => (state.summary?.series || []).reduce((n, d) => n + d[family], 0); + state.bucketLabel = (d) => { + if (!d) return ""; + const date = new Date(d.date); + const opts = { timeZone: "UTC", day: "numeric", month: "short" }; + if (state.summary?.bucket === "month") return date.toLocaleDateString(undefined, { timeZone: "UTC", month: "short", year: "numeric" }); + if (state.period === "12m" || state.period === "all" || date.getUTCFullYear() !== new Date().getUTCFullYear()) opts.year = "numeric"; + return (state.summary?.bucket === "week" ? "Week of " : "") + date.toLocaleDateString(undefined, opts); + }; + state.bucketTip = (d) => { + const total = state.bucketTotal(d); + if (!total) return state.bucketLabel(d) + ": no sales"; + const parts = BILLING_FAMILIES.filter((f) => d[f.id]).map((f) => d[f.id] + " " + f.label.toLowerCase()); + return state.bucketLabel(d) + ": " + total + (total === 1 ? " sale" : " sales") + " (" + parts.join(", ") + ")"; + }; + state.bucketName = () => ({ day: "day", week: "week", month: "month" })[state.summary?.bucket] || "day"; + state.seriesSales = () => (state.summary?.series || []).reduce((n, d) => n + state.bucketTotal(d), 0); + + state.plansWithActivity = () => (state.summary?.plans || []).filter((p) => p.active || p.allTimeSales || p.sales); + state.planTotals = () => { + const sum = (key) => (state.summary?.plans || []).reduce((n, p) => n + (p[key] || 0), 0); + return { active: sum("active"), sales: sum("sales"), allTimeSales: sum("allTimeSales") }; + }; + + state.webhookState = () => { + const w = state.summary?.webhooks; + if (!w) return "ok"; + if (w.failed || w.reconciliationFailed) return "bad"; + if (w.oldestPendingSeconds > 900 || w.unreviewedRevocations) return "warn"; + return "ok"; + }; + state.age = (seconds) => seconds ? duration(seconds * 1000) : "—"; + + let summaryRequest = 0; + state.loadSummary = () => { + const request = ++summaryRequest; + state.summaryLoading = true; + state.summaryError = null; + http.get("/api/admin/billing/summary", { params: { period: state.period } }).then((res) => { + if (request !== summaryRequest) return; + state.summaryLoading = false; + const data = res.data; + if (!data || !data.subscriptions || !data.sales || !Array.isArray(data.plans)) { state.summaryError = "The billing summary had an unexpected format."; return; } + state.summary = data; + }, (err) => { + if (request !== summaryRequest) return; + state.summaryLoading = false; + state.summaryError = (err && err.data && err.data.error) || "Could not load billing figures."; + }); + }; + state.setPeriod = (id) => { + if (state.period === id) return; + state.period = id; + try { localStorage.setItem("admin.billing.period", id); } catch (e) { /* private mode */ } + state.loadSummary(); + }; + + // -------- grant list -------- + state.grants = []; + state.total = -1; + state.totalPage = 0; + state.stateCounts = {}; + state.statuses = []; + state.grantsError = null; + state.filtersOpen = false; + state.query = { page: 1, limit: 25, search: "", plan: "", status: "", state: "", sort: "purchasedAt", direction: "desc" }; + const urlParams = location.search(); + if (urlParams.search) state.query.search = urlParams.search; + state.stateView = () => state.query.state || "all"; + state.setStateView = (view) => { state.query.state = view === "all" ? "" : view; state.query.page = 1; }; + state.stateCount = (view) => view === "all" + ? ["active", "expired", "revoked"].reduce((n, k) => n + (state.stateCounts[k] || 0), 0) + : state.stateCounts[view] || 0; + state.sortBy = (field) => { + if (state.query.sort === field) state.query.direction = state.query.direction === "asc" ? "desc" : "asc"; + else { state.query.sort = field; state.query.direction = "desc"; } + state.query.page = 1; + }; + state.sortIcon = (field) => state.query.sort === field ? (state.query.direction === "asc" ? "fa-arrow-up" : "fa-arrow-down") : ""; + state.chips = []; + const recomputeChips = () => { + const out = []; + if (state.query.plan) out.push({ key: "plan", label: "Plan", value: state.planName(state.query.plan) }); + if (state.query.status) out.push({ key: "status", label: "Stripe status", value: state.query.status.replace(/_/g, " ") }); + state.chips = out; + }; + state.clearFilter = (key) => { state.query[key] = ""; state.query.page = 1; }; + state.filterPlan = (planId) => { + Object.assign(state.query, { plan: planId, page: 1 }); + const list = document.getElementById("bl-grants"); + if (list && list.scrollIntoView) list.scrollIntoView({ behavior: "smooth", block: "start" }); + }; + state.clearFilters = () => Object.assign(state.query, { search: "", plan: "", status: "", state: "", page: 1 }); + state.hasFilters = () => !!(state.query.search || state.query.plan || state.query.status || state.query.state); + state.statusText = (g) => (g.status || "unknown").replace(/_/g, " "); + state.revocationText = (reason) => reason === "dispute" ? "Disputed" : reason === "full_refund" ? "Refunded" : "Revoked"; + state.scopeHref = (scope) => scope?.kind === "repo" ? "/admin/repositories?search=" + encodeURIComponent(scope.id) + : scope?.kind === "conference" ? "/conference/" + encodeURIComponent(scope.id) : null; + + let grantsRequest = 0; + function getGrants() { + const request = ++grantsRequest; + state.grantsError = null; + const params = Object.fromEntries(Object.entries(state.query).filter(([, v]) => v !== "" && v != null)); + http.get("/api/admin/billing/grants", { params }).then((res) => { + if (request !== grantsRequest) return; + state.total = res.data?.total ?? 0; + state.totalPage = Math.ceil(state.total / state.query.limit); + state.grants = res.data?.results || []; + state.stateCounts = res.data.stateCounts || {}; + state.statuses = res.data.statuses || []; + }, (err) => { + if (request !== grantsRequest) return; + state.grantsError = (err && err.data && err.data.error) || "Could not load subscriptions and purchases."; + }); + } + state.reloadGrants = getGrants; + + state.loadSummary(); + getGrants(); + recomputeChips(); + let timeClear = null; + let lastFilters = JSON.stringify({ ...state.query, page: 0 }); + state.watch("query", () => { + // A filter change returns to page 1 before fetching. + const filters = JSON.stringify({ ...state.query, page: 0 }); + if (filters !== lastFilters && state.query.page !== 1) { lastFilters = filters; state.query.page = 1; return; } + lastFilters = filters; + timers.timeout.cancel(timeClear); + timeClear = timers.timeout(getGrants, 300); + recomputeChips(); + }, true); + }; diff --git a/public/script/routes.js b/public/script/routes.js index c7ca3a9..42d8d2b 100644 --- a/public/script/routes.js +++ b/public/script/routes.js @@ -29,6 +29,7 @@ export const pageRoutes = [ {path: "/admin/users", template: "partials/admin/users.htm", title: "Admin · Users – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => admin.usersAdminController(state, services.http, services.location)}, {path: "/admin/users/:username", template: "partials/admin/user.htm", title: "Admin · User details – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => admin.userAdminController(state, services.http, services.location, services.params)}, {path: "/admin/conferences", template: "partials/admin/conferences.htm", title: "Admin · Conferences – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => admin.conferencesAdminController(state, services.http, services.location)}, +{path: "/admin/billing", template: "partials/admin/billing.htm", title: "Admin · Billing – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => admin.billingAdminController(state, services.http, services.location)}, {path: "/admin/queues", template: "partials/admin/queues.htm", title: "Admin · Queues – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => admin.queuesAdminController(state, services.http, services.location, services.interval, services.timeout)}, {path: "/admin/errors", template: "partials/admin/errors.htm", title: "Admin · Errors – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => admin.errorsAdminController(state, services.http, services.location, services.interval)}, {path: "/404", template: "partials/404.htm", title: "Page not found – Anonymous GitHub", preserveExplorer: false, setup: () => {}}, diff --git a/public/script/templates.js b/public/script/templates.js index 2bcb399..60154f2 100644 --- a/public/script/templates.js +++ b/public/script/templates.js @@ -27,12 +27,14 @@ import { render as template22 } from "../partials/pr-dashboard.htm"; import { render as template23 } from "../partials/profile.htm"; import { render as template24 } from "../partials/pullRequest.htm"; import { render as template25 } from "../partials/status.htm"; +import { render as adminBillingTemplate } from "../partials/admin/billing.htm"; import { render as footerTemplate } from "../partials/footer.htm"; export const templates = { "partials/reviewConsent.htm": reviewConsentTemplate, "partials/connections.htm": connectionsTemplate, "partials/signin.htm": signinTemplate, "partials/404.htm": template0, + "partials/admin/billing.htm": adminBillingTemplate, "partials/admin/conferences.htm": template1, "partials/admin/errors.htm": template2, "partials/admin/overview.htm": template3, diff --git a/public/script/vendor.min.js b/public/script/vendor.min.js index 3f5c1e7..efacbce 100644 --- a/public/script/vendor.min.js +++ b/public/script/vendor.min.js @@ -1,52 +1,52 @@ -"use strict";(()=>{var el=Object.defineProperty;var tl=e=>{throw TypeError(e)};var Zp=(e,t,o)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var xp=(e,t)=>{for(var o in t)el(e,o,{get:t[o],enumerable:!0})};var xe=(e,t,o)=>Zp(e,typeof t!="symbol"?t+"":t,o),mr=(e,t,o)=>t.has(e)||tl("Cannot "+o);var re=(e,t,o)=>(mr(e,t,"read from private field"),o?o.call(e):t.get(e)),_e=(e,t,o)=>t.has(e)?tl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),Le=(e,t,o,i)=>(mr(e,t,"write to private field"),i?i.call(e,o):t.set(e,o),o),Ve=(e,t,o)=>(mr(e,t,"access private method"),o);var nl=(e,t,o,i)=>({set _(s){Le(e,t,s,o)},get _(){return re(e,t,i)}});var ve=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ye={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function ol(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let o=new URLSearchParams(t);if([...o.keys()].length!==3||[...o.keys()].some(d=>!["clientId","intentId","token"].includes(d)))return null;let i=o.get("clientId"),s=o.get("intentId"),r=o.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(s||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:s,token:r}}function sl(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),d=r?{clientId:r.clientId,intentId:r.intentId}:null,c,u,y,h,b,g=!0,k,R=i.defer(),S=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(_=>_.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>g&&e.user?.username===b;function m(){g=!1,r=c=u=void 0,R.resolve(),s.clearTimeout(k)}e.on("dispose",m),e.on("routeLeave",m),e.watch(()=>e.user?.username,_=>{!b&&_?b=_:b&&_!==b&&(m(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let E=()=>({timeout:R.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":u}}),M=_=>_?.status===404?"Artifact linking is not available on this server.":_?.status===401?"Sign in, then open a new artifact link from your submission.":_?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!g||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;b=e.user.username;let _=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(_)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,c=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(k),h||(h=S());try{let V=(await o.get("/api/review-consent/csrf",{timeout:R.promise})).data;if(!N())return;if(u=V.csrf,e.handoffEnabled=V.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(u||""))throw new Error("invalid_csrf");let G=(await o.post("/api/review-consent/preview",{repositoryId:_,intent:{...r,requestId:h}},E())).data;if(!N())return;if(!G||typeof G.ticket!="string"||!G.ticket||G.ticket.length>8192||typeof G.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(G.policy?.access)||!Number.isSafeInteger(G.policy.version)||!Number.isFinite(Date.parse(G.policy.retainUntil))||!Number.isFinite(Date.parse(G.expiresAt))||Date.parse(G.expiresAt)<=Date.now()||Date.parse(G.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");c=G.ticket,y=S(),e.preview={repositoryName:G.repositoryName,policy:{...G.policy},expiresAt:G.expiresAt},k=s.setTimeout(()=>{g&&(e.expired=!0)},Math.max(0,Date.parse(G.expiresAt)-Date.now()))}catch(V){N()&&(e.error=M(V))}finally{N()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!N()||e.busy||e.saved||!c||!e.acceptAccess||!e.acceptRetention)){if(Date.parse(e.preview.expiresAt)<=Date.now()){e.expired=!0;return}e.busy=!0,e.error="";try{let _=(await o.post("/api/review-consent/confirm",{ticket:c,requestId:y,acceptAccess:!0,acceptRetention:!0},E())).data;if(!N())return;if(_?.requestId!==y||!Number.isFinite(Date.parse(_.confirmedAt)))throw new Error("invalid_receipt");e.saved=!0,e.uncertain=!1,r=void 0,e.handoffEnabled||(c=void 0)}catch{N()&&(e.uncertain=!0,e.error="The confirmation was not verified. Retry with the same approval, or return to your submission to check its status.")}finally{N()&&(e.busy=!1)}}},e.continueReview=async()=>{if(!N()||e.busy||!e.saved||!e.handoffEnabled||!c||!d)return;e.busy=!0,e.error="";let _,V=()=>{_?.remove(),s.removeEventListener("securitypolicyviolation",G)},G=ee=>{ee.violatedDirective?.startsWith("form-action")&&(V(),N()&&(e.busy=!1,e.error="The return address was blocked. Return to your submission to check the artifact status."))};try{let ee=(await o.post("/api/review-consent/handoff",{ticket:c},E())).data;if(!N())return;let X=ee?.completion,O=new URL(ee?.callbackUrl);if(!X||Object.keys(X).sort().join(",")!=="clientId,code,contract,expiresAt,intentId"||X.contract!=="4open.artifacts/1"||X.clientId!==d.clientId||X.intentId!==d.intentId||!/^[a-f0-9]{64}$/.test(X.code||"")||!Number.isFinite(Date.parse(X.expiresAt))||Date.parse(X.expiresAt)<=Date.now()||Date.parse(X.expiresAt)>Date.now()+3e5||O.protocol!=="https:"||O.href!==ee.callbackUrl||O.username||O.password||ee.callbackUrl.includes("?")||ee.callbackUrl.includes("#"))throw new Error("invalid_handoff");_=s.document.createElement("form"),_.method="POST",_.action=O.href;let U=s.document.createElement("input");U.type="hidden",U.name="completion",U.value=JSON.stringify(X),_.appendChild(U),s.document.body.appendChild(_),s.addEventListener("securitypolicyviolation",G),e.on("dispose",V),_.submit()}catch{V(),N()&&(e.busy=!1,e.error="The return to review could not be prepared. Retry from this page, or return to your submission to check its status.")}}}var ti=new Map,nf=ye;function Xn(e){if(!ti.has(e)){let t=document.createElement("script");t.src=nf[e];let o=new Promise((i,s)=>{t.onload=i,t.onerror=()=>{ti.delete(e),t.remove(),s(new Error(`Unable to load ${e}. Please retry.`))}});ti.set(e,o),document.head.appendChild(t)}return ti.get(e)}async function ni(){await Xn("editor"),ace.config.set("basePath","/script/external/ace/")}function Ro(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Ze={},In=[],Tt=()=>{},vr=()=>!1,Do=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Po=e=>e.startsWith("onUpdate:"),ct=Object.assign,ts=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},of=Object.prototype.hasOwnProperty,je=(e,t)=>of.call(e,t),Ne=Array.isArray,yn=e=>ns(e)==="[object Map]",Yt=e=>ns(e)==="[object Set]",il=e=>ns(e)==="[object Date]";var Te=e=>typeof e=="function",it=e=>typeof e=="string",qt=e=>typeof e=="symbol",Ye=e=>e!==null&&typeof e=="object",yr=e=>(Ye(e)||Te(e))&&Te(e.then)&&Te(e.catch),dl=Object.prototype.toString,ns=e=>dl.call(e),br=e=>ns(e).slice(8,-1),oi=e=>ns(e)==="[object Object]",si=e=>it(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ao=Ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var ii=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},sf=/-\w/g,ht=ii(e=>e.replace(sf,t=>t.slice(1).toUpperCase())),rf=/\B([A-Z])/g,on=ii(e=>e.replace(rf,"-$1").toLowerCase()),Qn=ii(e=>e.charAt(0).toUpperCase()+e.slice(1)),os=ii(e=>e?`on${Qn(e)}`:""),zt=(e,t)=>!Object.is(e,t),To=(e,...t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:o})},Oo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var rl,ss=()=>rl||(rl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $e(e){if(Ne(e)){let t={};for(let o=0;oo.startsWith("/*")?"":o).split(af).forEach(o=>{if(o){let i=o.split(lf);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function P(e){let t="";if(it(e))t=e;else if(Ne(e))for(let o=0;oXt(o,t))}var pl=e=>!!(e&&e.__v_isRef===!0),p=e=>it(e)?e:e==null?"":Ne(e)||Ye(e)&&(e.toString===dl||!Te(e.toString))?pl(e)?p(e.value):JSON.stringify(e,fl,2):String(e),fl=(e,t)=>pl(t)?fl(e,t.value):yn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[i,s],r)=>(o[gr(i,r)+" =>"]=s,o),{})}:Yt(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>gr(o))}:qt(t)?gr(t):Ye(t)&&!Ne(t)&&!oi(t)?String(t):t,gr=(e,t="")=>{var o;return qt(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function hf(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var mt,ls=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&mt&&(mt.active?(this.parent=mt,this.index=(mt.scopes||(mt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let i=this.scopes.slice();for(t=0,o=i.length;t0&&--this._on===0){if(mt===this)mt=this.prevScope;else{let t=mt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let o,i;for(o=0,i=this.effects.length;o0)return;if(as){let t=as;for(as=void 0;t;){let o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;rs;){let t=rs;for(rs=void 0;t;){let o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=o}}if(e)throw e}function wl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function kl(e){let t,o=e.depsTail,i=o;for(;i;){let s=i.prevDep;i.version===-1?(i===o&&(o=s),Mr(i),mf(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}e.deps=t,e.depsTail=o}function Er(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Cl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Cl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ds)||(e.globalVersion=ds,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Er(e))))return;e.flags|=2;let t=e.dep,o=nt,i=Qt;nt=e,Qt=!0;try{wl(e);let s=e.fn(e._value);(t.version===0||zt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{nt=o,Qt=i,kl(e),e.flags&=-3}}function Mr(e,t=!1){let{dep:o,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),o.subs===e&&(o.subs=i,!i&&o.computed)){o.computed.flags&=-5;for(let r=o.computed.deps;r;r=r.nextDep)Mr(r,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function mf(e){let{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}var Qt=!0,El=[];function Jt(){El.push(Qt),Qt=!1}function Zt(){let e=El.pop();Qt=e===void 0?!0:e}function hl(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let o=nt;nt=void 0;try{t()}finally{nt=o}}}var ds=0,Sr=class{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},us=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!nt||!Qt||nt===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==nt)o=this.activeLink=new Sr(nt,this),nt.deps?(o.prevDep=nt.depsTail,nt.depsTail.nextDep=o,nt.depsTail=o):nt.deps=nt.depsTail=o,Sl(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){let i=o.nextDep;i.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=i),o.prevDep=nt.depsTail,o.nextDep=void 0,nt.depsTail.nextDep=o,nt.depsTail=o,nt.deps===o&&(nt.deps=i)}return o}trigger(t){this.version++,ds++,this.notify(t)}notify(t){Or();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{Ir()}}};function Sl(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Sl(i)}let o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}var Nr=new WeakMap,Zn=Symbol(""),Rr=Symbol(""),cs=Symbol("");function Ct(e,t,o){if(Qt&&nt){let i=Nr.get(e);i||Nr.set(e,i=new Map);let s=i.get(o);s||(i.set(o,s=new us),s.map=i,s.key=o),s.track()}}function rn(e,t,o,i,s,r){let d=Nr.get(e);if(!d){ds++;return}let c=u=>{u&&u.trigger()};if(Or(),t==="clear")d.forEach(c);else{let u=Ne(e),y=u&&si(o);if(u&&o==="length"){let h=Number(i);d.forEach((b,g)=>{(g==="length"||g===cs||!qt(g)&&g>=h)&&c(b)})}else switch((o!==void 0||d.has(void 0))&&c(d.get(o)),y&&c(d.get(cs)),t){case"add":u?y&&c(d.get("length")):(c(d.get(Zn)),yn(e)&&c(d.get(Rr)));break;case"delete":u||(c(d.get(Zn)),yn(e)&&c(d.get(Rr)));break;case"set":yn(e)&&c(d.get(Zn));break}}Ir()}function Io(e){let t=We(e);return t===e||(Ct(t,"iterate",cs),Ot(e))?t:Ht(e)?ln(e)?t.map(o=>wn($t(o))):t.map(wn):t.map($t)}function ps(e){return Ct(e=We(e),"iterate",cs),e}function sn(e,t){return Ht(e)?wn(ln(e)?$t(t):t):$t(t)}var gf={__proto__:null,[Symbol.iterator](){return kr(this,Symbol.iterator,e=>sn(this,e))},concat(...e){return Io(this).concat(...e.map(t=>Ne(t)?Io(t):t))},entries(){return kr(this,"entries",e=>(e[1]=sn(this,e[1]),e))},every(e,t){return bn(this,"every",e,t,void 0,arguments)},filter(e,t){return bn(this,"filter",e,t,o=>o.map(i=>sn(this,i)),arguments)},find(e,t){return bn(this,"find",e,t,o=>sn(this,o),arguments)},findIndex(e,t){return bn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return bn(this,"findLast",e,t,o=>sn(this,o),arguments)},findLastIndex(e,t){return bn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return bn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Cr(this,"includes",e)},indexOf(...e){return Cr(this,"indexOf",e)},join(e){return Io(this).join(e)},lastIndexOf(...e){return Cr(this,"lastIndexOf",e)},map(e,t){return bn(this,"map",e,t,void 0,arguments)},pop(){return is(this,"pop")},push(...e){return is(this,"push",e)},reduce(e,...t){return gl(this,"reduce",e,t)},reduceRight(e,...t){return gl(this,"reduceRight",e,t)},shift(){return is(this,"shift")},some(e,t){return bn(this,"some",e,t,void 0,arguments)},splice(...e){return is(this,"splice",e)},toReversed(){return Io(this).toReversed()},toSorted(e){return Io(this).toSorted(e)},toSpliced(...e){return Io(this).toSpliced(...e)},unshift(...e){return is(this,"unshift",e)},values(){return kr(this,"values",e=>sn(this,e))}};function kr(e,t,o){let i=ps(e),s=i[t],r=s.call(i);if(i!==e&&!Ot(e)){if(r[Symbol.toStringTag]==="Array Iterator"){let d=Object.create(Object.getPrototypeOf(r));return d.next=()=>ml(r.next(),o),s!==Nl[t]&&Object.defineProperties(d,{return:{get(){let c=r.return;return typeof c=="function"?c.bind(r):c}},throw:{get(){let c=r.throw;return typeof c=="function"?c.bind(r):c}}}),d}r._next=r.next,r.next=()=>ml(r._next(),o)}return r}function ml(e,t){return e.done||(e.value=t(e.value)),e}var Nl=Array.prototype;function bn(e,t,o,i,s,r){let d=ps(e),c=d!==e&&!Ot(e),u=d[t];if(u!==Nl[t]){let b=u.apply(e,r);return c?$t(b):b}let y=o;d!==e&&(c?y=function(b,g){return o.call(this,sn(e,b),g,e)}:o.length>2&&(y=function(b,g){return o.call(this,b,g,e)}));let h=u.call(d,y,i);return c&&s?s(h):h}function gl(e,t,o,i){let s=ps(e),r=s!==e&&!Ot(e),d=o,c=!1;s!==e&&(r?(c=i.length===0,d=function(y,h,b){return c&&(c=!1,y=sn(e,y)),o.call(this,y,sn(e,h),b,e)}):o.length>3&&(d=function(y,h,b){return o.call(this,y,h,b,e)}));let u=s[t](d,...i);return c?sn(e,u):u}function Cr(e,t,o){let i=We(e);Ct(i,"iterate",cs);let s=i[t](...o);return(s===-1||s===!1)&&hs(o[0])?(o[0]=We(o[0]),i[t](...o)):s}function is(e,t,o=[]){Jt(),Or();let i=We(e)[t].apply(e,o);return Ir(),Zt(),i}var vf=Ro("__proto__,__v_isRef,__isVue"),Rl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(qt));function yf(e){qt(e)||(e=String(e));let t=We(this);return Ct(t,"has",e),t.hasOwnProperty(e)}var pi=class{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,i){if(o==="__v_skip")return t.__v_skip;let s=this._isReadonly,r=this._isShallow;if(o==="__v_isReactive")return!s;if(o==="__v_isReadonly")return s;if(o==="__v_isShallow")return r;if(o==="__v_raw")return i===(s?r?Df:Al:r?Pl:Dl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;let d=Ne(t);if(!s){let u;if(d&&(u=gf[o]))return u;if(o==="hasOwnProperty")return yf}let c=Reflect.get(t,o,wt(t)?t:i);if((qt(o)?Rl.has(o):vf(o))||(s||Ct(t,"get",o),r))return c;if(wt(c)){let u=d&&si(o)?c:c.value;return s&&Ye(u)?hi(u):u}return Ye(c)?s?hi(c):ot(c):c}},fi=class extends pi{constructor(t=!1){super(!1,t)}set(t,o,i,s){let r=t[o],d=Ne(t)&&si(o);if(!this._isShallow){let y=Ht(r);if(!Ot(i)&&!Ht(i)&&(r=We(r),i=We(i)),!d&&wt(r)&&!wt(i))return y||(r.value=i),!0}let c=d?Number(o)e,di=e=>Reflect.getPrototypeOf(e);function Cf(e,t,o){return function(...i){let s=this.__v_raw,r=We(s),d=yn(r),c=e==="entries"||e===Symbol.iterator&&d,u=e==="keys"&&d,y=s[e](...i),h=o?Pr:t?wn:$t;return!t&&Ct(r,"iterate",u?Rr:Zn),ct(Object.create(y),{next(){let{value:b,done:g}=y.next();return g?{value:b,done:g}:{value:c?[h(b[0]),h(b[1])]:h(b),done:g}}})}}function ui(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ef(e,t){let o={get(s){let r=this.__v_raw,d=We(r),c=We(s);e||(zt(s,c)&&Ct(d,"get",s),Ct(d,"get",c));let{has:u}=di(d),y=t?Pr:e?wn:$t;if(u.call(d,s))return y(r.get(s));if(u.call(d,c))return y(r.get(c));r!==d&&r.get(s)},get size(){let s=this.__v_raw;return!e&&Ct(We(s),"iterate",Zn),s.size},has(s){let r=this.__v_raw,d=We(r),c=We(s);return e||(zt(s,c)&&Ct(d,"has",s),Ct(d,"has",c)),s===c?r.has(s):r.has(s)||r.has(c)},forEach(s,r){let d=this,c=d.__v_raw,u=We(c),y=t?Pr:e?wn:$t;return!e&&Ct(u,"iterate",Zn),c.forEach((h,b)=>s.call(r,y(h),y(b),d))}};return ct(o,e?{add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear")}:{add(s){let r=We(this),d=di(r),c=We(s),u=!t&&!Ot(s)&&!Ht(s)?c:s;return d.has.call(r,u)||zt(s,u)&&d.has.call(r,s)||zt(c,u)&&d.has.call(r,c)||(r.add(u),rn(r,"add",u,u)),this},set(s,r){!t&&!Ot(r)&&!Ht(r)&&(r=We(r));let d=We(this),{has:c,get:u}=di(d),y=c.call(d,s);y||(s=We(s),y=c.call(d,s));let h=u.call(d,s);return d.set(s,r),y?zt(r,h)&&rn(d,"set",s,r,h):rn(d,"add",s,r),this},delete(s){let r=We(this),{has:d,get:c}=di(r),u=d.call(r,s);u||(s=We(s),u=d.call(r,s));let y=c?c.call(r,s):void 0,h=r.delete(s);return u&&rn(r,"delete",s,void 0,y),h},clear(){let s=We(this),r=s.size!==0,d=void 0,c=s.clear();return r&&rn(s,"clear",void 0,void 0,d),c}}),["keys","values","entries",Symbol.iterator].forEach(s=>{o[s]=Cf(s,e,t)}),o}function _r(e,t){let o=Ef(e,t);return(i,s,r)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_isShallow"?t:s==="__v_raw"?i:Reflect.get(je(o,s)&&s in i?o:i,s,r)}var Sf={get:_r(!1,!1)},Nf={get:_r(!1,!0)},Rf={get:_r(!0,!1)};var Dl=new WeakMap,Pl=new WeakMap,Al=new WeakMap,Df=new WeakMap;function Pf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ot(e){return Ht(e)?e:Vr(e,!1,bf,Sf,Dl)}function fs(e){return Vr(e,!1,kf,Nf,Pl)}function hi(e){return Vr(e,!0,wf,Rf,Al)}function Vr(e,t,o,i,s){if(!Ye(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let r=s.get(e);if(r)return r;let d=Pf(br(e));if(d===0)return e;let c=new Proxy(e,d===2?i:o);return s.set(e,c),c}function ln(e){return Ht(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function Ht(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function hs(e){return e?!!e.__v_raw:!1}function We(e){let t=e&&e.__v_raw;return t?We(t):e}function dn(e){return!je(e,"__v_skip")&&Object.isExtensible(e)&&ri(e,"__v_skip",!0),e}var $t=e=>Ye(e)?ot(e):e,wn=e=>Ye(e)?hi(e):e;function wt(e){return e?e.__v_isRef===!0:!1}function Et(e){return Tl(e,!1)}function gi(e){return Tl(e,!0)}function Tl(e,t){return wt(e)?e:new Ar(e,t)}var Ar=class{constructor(t,o){this.dep=new us,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:We(t),this._value=o?t:$t(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){let o=this._rawValue,i=this.__v_isShallow||Ot(t)||Ht(t);t=i?t:We(t),zt(t,o)&&(this._rawValue=t,this._value=i?t:$t(t),this.dep.trigger())}};function kn(e){return wt(e)?e.value:e}var Af={get:(e,t,o)=>t==="__v_raw"?e:kn(Reflect.get(e,t,o)),set:(e,t,o,i)=>{let s=e[t];return wt(s)&&!wt(o)?(s.value=o,!0):Reflect.set(e,t,o,i)}};function vi(e){return ln(e)?e:new Proxy(e,Af)}var Tr=class{constructor(t,o,i){this.fn=t,this.setter=o,this._value=void 0,this.dep=new us(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ds-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&nt!==this)return bl(this,!0),!0}get value(){let t=this.dep.track();return Cl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Ol(e,t,o=!1){let i,s;return Te(e)?i=e:(i=e.get,s=e.set),new Tr(i,s,o)}var ci={},mi=new WeakMap,Jn;function Il(e,t=!1,o=Jn){if(o){let i=mi.get(o);i||mi.set(o,i=[]),i.push(e)}}function Ml(e,t,o=Ze){let{immediate:i,deep:s,once:r,scheduler:d,augmentJob:c,call:u}=o,y=V=>{(o.onWarn||hf)("Invalid watch source: ",V,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},h=V=>s?V:Ot(V)||s===!1||s===0?an(V,1):an(V),b,g,k,R,S=!1,N=!1;if(wt(e)?(g=()=>e.value,S=Ot(e)):ln(e)?(g=()=>h(e),S=!0):Ne(e)?(N=!0,S=e.some(V=>ln(V)||Ot(V)),g=()=>e.map(V=>{if(wt(V))return V.value;if(ln(V))return h(V);if(Te(V))return u?u(V,2):V()})):Te(e)?t?g=u?()=>u(e,2):e:g=()=>{if(k){Jt();try{k()}finally{Zt()}}let V=Jn;Jn=b;try{return u?u(e,3,[R]):e(R)}finally{Jn=V}}:g=Tt,t&&s){let V=g,G=s===!0?1/0:s;g=()=>an(V(),G)}let m=vl(),E=()=>{b.stop(),m&&m.active&&ts(m.effects,b)};if(r&&t){let V=t;t=(...G)=>{try{return V(...G)}finally{E()}}}let M=N?new Array(e.length).fill(ci):ci,_=V=>{if(!(!(b.flags&1)||!b.dirty&&!V))if(t){let G=b.run();if(V||s||S||(N?G.some((ee,X)=>zt(ee,M[X])):zt(G,M))){let ee=Jn;Jt();try{k&&k(),Jn=b;let X=[G,M===ci?void 0:N&&M[0]===ci?[]:M,R];M=G,u?u(t,3,X):t(...X)}finally{Jn=ee,Zt()}}}else b.run()};return c&&c(_),b=new Mo(g),b.scheduler=d?()=>d(_,!1):_,R=V=>Il(V,!1,b),k=b.onStop=()=>{let V=mi.get(b);if(V){if(u)u(V,4);else for(let G of V)G();mi.delete(b)}},t?i?_(!0):M=b.run():d?d(_.bind(null,!0),!0):b.run(),E.pause=b.pause.bind(b),E.resume=b.resume.bind(b),E.stop=E,E}function an(e,t=1/0,o){if(t<=0||!Ye(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,wt(e))an(e.value,t,o);else if(Ne(e))for(let i=0;i{an(i,t,o)});else if(oi(e)){for(let i in e)an(e[i],t,o);for(let i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&an(e[i],t,o)}return e}function Rs(e,t,o,i){try{return i?e(...i):e()}catch(s){Ds(s,t,o)}}function jt(e,t,o,i){if(Te(e)){let s=Rs(e,t,o,i);return s&&yr(s)&&s.catch(r=>{Ds(r,t,o)}),s}if(Ne(e)){let s=[];for(let r=0;r>>1,s=Pt[i],r=ks(s);r=ks(o)?Pt.push(e):Pt.splice(_f(t),0,e),e.flags|=1,Ql()}}function Ql(){wi||(wi=Xl.then(ed))}function Jl(e){if(!Ne(e))Mn&&e.id===-1?Mn.splice(_o+1,0,e):e.flags&1||(cn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Pt.splice(i,1),i=e?i-1:xt,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function xl(e,t,o=0){if(cn.length){let i=cn,s=0;if(t){i=[];for(let d=0;dks(d)-ks(c));if(cn.length=s,Mn){for(let d=0;de.id==null?e.flags&2?-1:1/0:e.id;function ed(e){let t=Tt;try{for(xt=0;xt{i._d&&Si(-1);let r=ki(t),d=no.length,c;try{c=e(...s)}finally{for(let u=no.length;u>d;u--)Td();ki(r),i._d&&Si(1)}return c};return i._n=!0,i._c=!0,i._d=!0,i}function T(e,t){if(Lt===null)return e;let o=Ii(Lt),i=e.dirs||(e.dirs=[]);for(let s=0;s1)return o&&Te(t)?t.call(i&&i.proxy):t}}var $f=Symbol.for("v-scx"),Lf=()=>{{let e=Mt($f);return e}};function dt(e,t,o){return nd(e,t,o)}function nd(e,t,o=Ze){let{immediate:i,deep:s,flush:r,once:d}=o,c=ct({},o),u=t&&i||!t&&r!=="post",y;if($o){if(r==="sync"){let k=Lf();y=k.__watcherHandles||(k.__watcherHandles=[])}else if(!u){let k=()=>{};return k.stop=Tt,k.resume=Tt,k.pause=Tt,k}}let h=St;c.call=(k,R,S)=>jt(k,h,R,S);let b=!1;r==="post"?c.scheduler=k=>{k.i=h,It(k,h&&h.suspense)}:r!=="sync"&&(b=!0,c.scheduler=(k,R)=>{R?k():Kr(k)}),c.augmentJob=k=>{t&&(k.flags|=4),b&&(k.flags|=2,h&&(k.id=h.uid,k.i=h))};let g=Ml(e,t,c);return $o&&(y?y.push(g):u&&g()),g}function Ff(e,t,o){let i=this.proxy,s=it(e)?e.includes(".")?od(i,e):()=>i[e]:e.bind(i,i),r;Te(t)?r=t:(r=t.handler,o=t);let d=Ts(this),c=nd(s,r.bind(i),o);return d(),c}function od(e,t){let o=t.split(".");return()=>{let i=e;for(let s=0;se.__isTeleport;var $r=Symbol("_leaveCb");function Bf(e){let t=e[0];if(e.length>1){let o=!1;for(let i of e)if(i.type!==en){t=i,o=!0;break}}return t}function sd(e){if(!Pi(e))return Di(e.type)&&e.children?Bf(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&Te(o.default))return o.default()}}function Cs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let o=e.component.subTree;Cs(Di(o.type)&&sd(o)||o,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===F&&Ne(e.children)){let o=gd(e.children,!1);o&&Cs(o,t)}}function Br(e){if(e.component)return Br(e.component.subTree);if(e.type===F){let t=Ne(e.children)&&gd(e.children,!1);return t?Br(t):void 0}if(e.type!==en)return e}function Ps(e,t){return Te(e)?ct({name:e.name},t,{setup:e}):e}function Yr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function _l(e,t){let o;return!!((o=Object.getOwnPropertyDescriptor(e,t))&&!o.configurable)}var Ci=new WeakMap;function vs(e,t,o,i,s=!1){if(Ne(e)){e.forEach((S,N)=>vs(S,t&&(Ne(t)?t[N]:t),o,i,s));return}if(ys(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&vs(e,t,o,i.component.subTree);return}let r=i.shapeFlag&4?Ii(i.component):i.el,d=s?null:r,{i:c,r:u}=e,y=t&&t.r,h=c.refs===Ze?c.refs={}:c.refs,b=c.setupState,g=We(b),k=b===Ze?vr:S=>_l(h,S)?!1:je(g,S),R=(S,N)=>!(N&&_l(h,N));if(y!=null&&y!==u){if(Vl(t),it(y))h[y]=null,k(y)&&(b[y]=null);else if(wt(y)){let S=t;R(y,S.k)&&(y.value=null),S.k&&(h[S.k]=null)}}if(Te(u))Rs(u,c,12,[d,h]);else{let S=it(u),N=wt(u);if(S||N){let m=()=>{if(e.f){let E=S?k(u)?b[u]:h[u]:R(u)||!e.k?u.value:h[e.k];if(s)Ne(E)&&ts(E,r);else if(Ne(E))E.includes(r)||E.push(r);else if(S)h[u]=[r],k(u)&&(b[u]=h[u]);else{let M=[r];R(u,e.k)&&(u.value=M),e.k&&(h[e.k]=M)}}else S?(h[u]=d,k(u)&&(b[u]=d)):N&&(R(u,e.k)&&(u.value=d),e.k&&(h[e.k]=d))};if(d){let E=()=>{m(),Ci.delete(e)};E.id=-1,Ci.set(e,E),It(E,o)}else Vl(e),m()}}}function Vl(e){let t=Ci.get(e);t&&(t.flags|=8,Ci.delete(e))}var ql=e=>e.nodeType===8;var rX=ss().requestIdleCallback||(e=>setTimeout(e,1)),aX=ss().cancelIdleCallback||(e=>clearTimeout(e));function zf(e,t){if(ql(e)&&e.data==="["){let o=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(ql(i))if(i.data==="]"){if(--o===0)break}else i.data==="["&&o++;i=i.nextSibling}}else t(e)}var ys=e=>!!e.type.__asyncLoader;function id(e){Te(e)&&(e={loader:e});let{loader:t,loadingComponent:o,errorComponent:i,delay:s=200,hydrate:r,timeout:d,suspensible:c=!0,onError:u}=e,y=null,h,b=0,g=()=>(b++,y=null,k()),k=()=>{let R;return y||(R=y=t().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),u)return new Promise((N,m)=>{u(S,()=>N(g()),()=>m(S),b+1)});throw S}).then(S=>R!==y&&y?y:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),h=S,S)))};return Ps({name:"AsyncComponentWrapper",__asyncLoader:k,__asyncHydrate(R,S,N){let m=R.isConnected,E=!1;(S.bu||(S.bu=[])).push(()=>E=!0);let M=()=>{E||!R.parentNode||m&&!R.isConnected||N()},_=r?()=>{let V=r(M,G=>zf(R,G));V&&(S.bum||(S.bum=[])).push(V)}:M;h?_():k().then(()=>!S.isUnmounted&&_())},get __asyncResolved(){return h},setup(){let R=St;if(Yr(R),h)return()=>yi(h,R);let S=V=>{y=null,Ds(V,R,13,!i)};if(c&&R.suspense||$o)return k().then(V=>()=>yi(V,R)).catch(V=>(S(V),()=>i?Oe(i,{error:V}):null));let N=Et(!1),m=Et(),E=Et(!!s),M,_;return As(()=>{M!=null&&clearTimeout(M),_!=null&&clearTimeout(_)}),s&&(_=setTimeout(()=>{R.isUnmounted||(E.value=!1)},s)),d!=null&&(M=setTimeout(()=>{if(!R.isUnmounted&&!N.value&&!m.value){let V=new Error(`Async component timed out after ${d}ms.`);S(V),m.value=V}},d)),k().then(()=>{R.isUnmounted||(N.value=!0,R.parent&&Pi(R.parent.vnode)&&R.parent.update())}).catch(V=>{if(R.isUnmounted){y=null;return}S(V),m.value=V}),()=>{if(N.value&&h)return yi(h,R);if(m.value&&i)return Oe(i,{error:m.value});if(o&&!E.value)return yi(o,R)}}})}function yi(e,t){let{ref:o,props:i,children:s,ce:r}=t.vnode,d=Oe(e,i,s);return d.ref=o,d.ce=r,delete t.vnode.ce,d}var Pi=e=>e.type.__isKeepAlive;function rd(e,t){ld(e,"a",t)}function ad(e,t){ld(e,"da",t)}function ld(e,t,o=St){let i=e.__wdc||(e.__wdc=()=>{let s=o;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ai(t,i,o),o){let s=o.parent;for(;s&&s.parent;)Pi(s.parent.vnode)&&Hf(i,t,o,s),s=s.parent}}function Hf(e,t,o,i){let s=Ai(t,e,i,!0);As(()=>{ts(i[t],s)},o)}function Ai(e,t,o=St,i=!1){if(o){let s=o[e]||(o[e]=[]),r=t.__weh||(t.__weh=(...d)=>{Jt();let c=Ts(o),u=jt(t,o,e,d);return c(),Zt(),u});return i?s.unshift(r):s.push(r),r}}var En=e=>(t,o=St)=>{(!$o||e==="sp")&&Ai(e,(...i)=>t(...i),o)},jf=En("bm"),fn=En("m"),dd=En("bu"),ud=En("u"),so=En("bum"),As=En("um"),Gf=En("sp"),Wf=En("rtg"),Kf=En("rtc");function Yf(e,t=St){Ai("ec",e,t)}var cd="components",Xf="directives";function Xe(e,t){return pd(cd,e,!0,t)||e}var Qf=Symbol.for("v-ndc");function Pe(e){return pd(Xf,e)}function pd(e,t,o=!0,i=!1){let s=Lt||St;if(s){let r=s.type;if(e===cd){let c=Mh(r,!1);if(c&&(c===t||c===ht(t)||c===Qn(ht(t))))return r}let d=$l(s[e]||r[e],t)||$l(s.appContext[e],t);return!d&&i?r:d}}function $l(e,t){return e&&(e[t]||e[ht(t)]||e[Qn(ht(t))])}function se(e,t,o,i){let s,r=o&&o[i],d=Ne(e);if(d||it(e)){let c=d&&ln(e),u=!1,y=!1;c&&(u=!Ot(e),y=Ht(e),e=ps(e)),s=new Array(e.length);for(let h=0,b=e.length;ht(c,u,void 0,r&&r[u]));else{let c=Object.keys(e);s=new Array(c.length);for(let u=0,y=c.length;ue?_d(e)?Ii(e):zr(e.parent):null;var bs=ct(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zr(e.parent),$root:e=>zr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xr(e),$forceUpdate:e=>e.f||(e.f=()=>{Kr(e.update)}),$nextTick:e=>e.n||(e.n=tt.bind(e.proxy)),$watch:e=>Ff.bind(e)});var Lr=(e,t)=>e!==Ze&&!e.__isScriptSetup&&je(e,t),Jf={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:o,setupState:i,data:s,props:r,accessCache:d,type:c,appContext:u}=e;if(t[0]!=="$"){let g=d[t];if(g!==void 0)switch(g){case 1:return i[t];case 2:return s[t];case 4:return o[t];case 3:return r[t]}else{if(Lr(i,t))return d[t]=1,i[t];if(s!==Ze&&je(s,t))return d[t]=2,s[t];if(je(r,t))return d[t]=3,r[t];if(o!==Ze&&je(o,t))return d[t]=4,o[t];Hr&&(d[t]=0)}}let y=bs[t],h,b;if(y)return t==="$attrs"&&Ct(e.attrs,"get",""),y(e);if((h=c.__cssModules)&&(h=h[t]))return h;if(o!==Ze&&je(o,t))return d[t]=4,o[t];if(b=u.config.globalProperties,je(b,t))return b[t]},set({_:e},t,o){let{data:i,setupState:s,ctx:r}=e;return Lr(s,t)?(s[t]=o,!0):i!==Ze&&je(i,t)?(i[t]=o,!0):je(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:i,appContext:s,props:r,type:d}},c){let u;return!!(o[c]||e!==Ze&&c[0]!=="$"&&je(e,c)||Lr(t,c)||je(r,c)||je(i,c)||je(bs,c)||je(s.config.globalProperties,c)||(u=d.__cssModules)&&u[c])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:je(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Ll(e){return Ne(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}var Hr=!0;function Zf(e){let t=Xr(e),o=e.proxy,i=e.ctx;Hr=!1,t.beforeCreate&&Fl(t.beforeCreate,e,"bc");let{data:s,computed:r,methods:d,watch:c,provide:u,inject:y,created:h,beforeMount:b,mounted:g,beforeUpdate:k,updated:R,activated:S,deactivated:N,beforeDestroy:m,beforeUnmount:E,destroyed:M,unmounted:_,render:V,renderTracked:G,renderTriggered:ee,errorCaptured:X,serverPrefetch:O,expose:U,inheritAttrs:C,components:q,directives:z,filters:K}=t;if(y&&xf(y,i,null),d)for(let Y in d){let he=d[Y];Te(he)&&(i[Y]=he.bind(o))}if(s){let Y=s.call(o,o);Ye(Y)&&(e.data=ot(Y))}if(Hr=!0,r)for(let Y in r){let he=r[Y],Ee=Te(he)?he.bind(o,o):Te(he.get)?he.get.bind(o,o):Tt,Ue=!Te(he)&&Te(he.set)?he.set.bind(o):Tt,Be=Nt({get:Ee,set:Ue});Object.defineProperty(i,Y,{enumerable:!0,configurable:!0,get:()=>Be.value,set:Je=>Be.value=Je})}if(c)for(let Y in c)fd(c[Y],i,o,Y);if(u){let Y=Te(u)?u.call(o):u;Reflect.ownKeys(Y).forEach(he=>{oo(he,Y[he])})}h&&Fl(h,e,"c");function ne(Y,he){Ne(he)?he.forEach(Ee=>Y(Ee.bind(o))):he&&Y(he.bind(o))}if(ne(jf,b),ne(fn,g),ne(dd,k),ne(ud,R),ne(rd,S),ne(ad,N),ne(Yf,X),ne(Kf,G),ne(Wf,ee),ne(so,E),ne(As,_),ne(Gf,O),Ne(U))if(U.length){let Y=e.exposed||(e.exposed={});U.forEach(he=>{Object.defineProperty(Y,he,{get:()=>o[he],set:Ee=>o[he]=Ee,enumerable:!0})})}else e.exposed||(e.exposed={});V&&e.render===Tt&&(e.render=V),C!=null&&(e.inheritAttrs=C),q&&(e.components=q),z&&(e.directives=z),O&&Yr(e)}function xf(e,t,o=Tt){Ne(e)&&(e=jr(e));for(let i in e){let s=e[i],r;Ye(s)?"default"in s?r=Mt(s.from||i,s.default,!0):r=Mt(s.from||i):r=Mt(s),wt(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:d=>r.value=d}):t[i]=r}}function Fl(e,t,o){jt(Ne(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,o)}function fd(e,t,o,i){let s=i.includes(".")?od(o,i):()=>o[i];if(it(e)){let r=t[e];Te(r)&&dt(s,r)}else if(Te(e))dt(s,e.bind(o));else if(Ye(e))if(Ne(e))e.forEach(r=>fd(r,t,o,i));else{let r=Te(e.handler)?e.handler.bind(o):t[e.handler];Te(r)&&dt(s,r,e)}}function Xr(e){let t=e.type,{mixins:o,extends:i}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:d}}=e.appContext,c=r.get(t),u;return c?u=c:!s.length&&!o&&!i?u=t:(u={},s.length&&s.forEach(y=>Ei(u,y,d,!0)),Ei(u,t,d)),Ye(t)&&r.set(t,u),u}function Ei(e,t,o,i=!1){let{mixins:s,extends:r}=t;r&&Ei(e,r,o,!0),s&&s.forEach(d=>Ei(e,d,o,!0));for(let d in t)if(!(i&&d==="expose")){let c=eh[d]||o&&o[d];e[d]=c?c(e[d],t[d]):t[d]}return e}var eh={data:Ul,props:Bl,emits:Bl,methods:gs,computed:gs,beforeCreate:Dt,created:Dt,beforeMount:Dt,mounted:Dt,beforeUpdate:Dt,updated:Dt,beforeDestroy:Dt,beforeUnmount:Dt,destroyed:Dt,unmounted:Dt,activated:Dt,deactivated:Dt,errorCaptured:Dt,serverPrefetch:Dt,components:gs,directives:gs,watch:nh,provide:Ul,inject:th};function Ul(e,t){return t?e?function(){return ct(Te(e)?e.call(this,this):e,Te(t)?t.call(this,this):t)}:t:e}function th(e,t){return gs(jr(e),jr(t))}function jr(e){if(Ne(e)){let t={};for(let o=0;ot==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${on(t)}Modifiers`];function rh(e,t,...o){if(e.isUnmounted)return;let i=e.vnode.props||Ze,s=o,r=t.startsWith("update:"),d=r&&ih(i,t.slice(7));d&&(d.trim&&(s=o.map(h=>it(h)?h.trim():h)),d.number&&(s=s.map(Oo)));let c,u=i[c=os(t)]||i[c=os(ht(t))];!u&&r&&(u=i[c=os(on(t))]),u&&jt(u,e,6,s);let y=i[c+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,jt(y,e,6,s)}}var ah=new WeakMap;function md(e,t,o=!1){let i=o?ah:t.emitsCache,s=i.get(e);if(s!==void 0)return s;let r=e.emits,d={},c=!1;if(!Te(e)){let u=y=>{let h=md(y,t,!0);h&&(c=!0,ct(d,h))};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!c?(Ye(e)&&i.set(e,null),null):(Ne(r)?r.forEach(u=>d[u]=null):ct(d,r),Ye(e)&&i.set(e,d),d)}function Ti(e,t){return!e||!Do(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),je(e,t[0].toLowerCase()+t.slice(1))||je(e,on(t))||je(e,t))}function Fr(e){let{type:t,vnode:o,proxy:i,withProxy:s,propsOptions:[r],slots:d,attrs:c,emit:u,render:y,renderCache:h,props:b,data:g,setupState:k,ctx:R,inheritAttrs:S}=e,N=ki(e),m,E;try{if(o.shapeFlag&4){let V=s||i,G=V;m=pn(y.call(G,V,h,b,k,g,R)),E=c}else{let V=t;m=pn(V.length>1?V(b,{attrs:c,slots:d,emit:u}):V(b,null)),E=t.props?c:lh(c)}}catch(V){no.length=0,Ds(V,e,1),m=Oe(en)}let M=m,_;if(E&&S!==!1){let V=Object.keys(E),{shapeFlag:G}=M;V.length&&G&7&&(r&&V.some(Po)&&(E=dh(E,r)),M=qo(M,E,!1,!0))}if(o.dirs&&(M=qo(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(o.dirs):o.dirs),o.transition){let V=Di(M.type)&&sd(M)||M;Cs(V,o.transition)}return m=M,ki(N),m}function gd(e,t=!0){let o;for(let i=0;i{let t;for(let o in e)(o==="class"||o==="style"||Do(o))&&((t||(t={}))[o]=e[o]);return t},dh=(e,t)=>{let o={};for(let i in e)(!Po(i)||!(i.slice(9)in t))&&(o[i]=e[i]);return o};function uh(e,t,o){let{props:i,children:s,component:r}=e,{props:d,children:c,patchFlag:u}=t,y=r.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&u>=0){if(u&1024)return!0;if(u&16)return i?zl(i,d,y):!!d;if(u&8){let h=t.dynamicProps;for(let b=0;bObject.create(yd),wd=e=>Object.getPrototypeOf(e)===yd;function ph(e,t,o,i=!1){let s={},r=bd();e.propsDefaults=Object.create(null),kd(e,t,s,r);for(let d in e.propsOptions[0])d in s||(s[d]=void 0);o?e.props=i?s:fs(s):e.type.props?e.props=s:e.props=r,e.attrs=r}function fh(e,t,o,i){let{props:s,attrs:r,vnode:{patchFlag:d}}=e,c=We(s),[u]=e.propsOptions,y=!1;if((i||d>0)&&!(d&16)){if(d&8){let h=e.vnode.dynamicProps;for(let b=0;b{u=!0;let[g,k]=Cd(b,t,!0);ct(d,g),k&&c.push(...k)};!o&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!r&&!u)return Ye(e)&&i.set(e,In),In;if(Ne(r))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Jr=e=>Ne(e)?e.map(pn):[pn(e)],mh=(e,t,o)=>{if(t._n)return t;let i=qf((...s)=>Jr(t(...s)),o);return i._c=!1,i},Ed=(e,t,o)=>{let i=e._ctx;for(let s in e){if(Qr(s))continue;let r=e[s];if(Te(r))t[s]=mh(s,r,i);else if(r!=null){let d=Jr(r);t[s]=()=>d}}},Sd=(e,t)=>{let o=Jr(t);e.slots.default=()=>o},Nd=(e,t,o)=>{for(let i in t)(o||!Qr(i))&&(e[i]=t[i])},gh=(e,t,o)=>{let i=e.slots=bd();if(e.vnode.shapeFlag&32){let s=t._;s?(Nd(i,t,o),o&&ri(i,"_",s,!0)):Ed(t,i)}else t&&Sd(e,t)},vh=(e,t,o)=>{let{vnode:i,slots:s}=e,r=!0,d=Ze;if(i.shapeFlag&32){let c=t._;c?o&&c===1?r=!1:Nd(s,t,o):(r=!t.$stable,Ed(t,s)),d=t}else t&&(Sd(e,t),d={default:1});if(r)for(let c in s)!Qr(c)&&d[c]==null&&delete s[c]};function yh(){let e=[]}var It=Ch;function Rd(e){return bh(e)}function bh(e,t){yh();let o=ss();o.__VUE__=!0;let{insert:i,remove:s,patchProp:r,createElement:d,createText:c,createComment:u,setText:y,setElementText:h,parentNode:b,nextSibling:g,setScopeId:k=Tt,insertStaticContent:R}=e,S=(D,A,L,Q=null,H=null,J=null,ae=void 0,te=null,oe=!!A.dynamicChildren)=>{if(D===A)return;D&&!ms(D,A)&&(Q=fe(D),He(D,H,J,!0),D=null),A.patchFlag===-2&&(oe=!1,A.dynamicChildren=null),A.dynamicChildren&&D&&D.dynamicChildren&&D.dynamicChildren.hasOnce&&(A.dynamicChildren===In&&(A.dynamicChildren=[]),A.dynamicChildren.hasOnce=!0);let{type:x,ref:ke,shapeFlag:pe}=A;switch(x){case Oi:N(D,A,L,Q);break;case en:m(D,A,L,Q);break;case ws:D==null&&E(A,L,Q,ae);break;case F:z(D,A,L,Q,H,J,ae,te,oe);break;default:pe&1?G(D,A,L,Q,H,J,ae,te,oe):pe&6?K(D,A,L,Q,H,J,ae,te,oe):(pe&64||pe&128)&&x.process(D,A,L,Q,H,J,ae,te,oe,ce)}ke!=null&&H?vs(ke,D&&D.ref,J,A||D,!A):ke==null&&D&&D.ref!=null&&vs(D.ref,null,J,D,!0)},N=(D,A,L,Q)=>{if(D==null)i(A.el=c(A.children),L,Q);else{let H=A.el=D.el;A.children!==D.children&&y(H,A.children)}},m=(D,A,L,Q)=>{D==null?i(A.el=u(A.children||""),L,Q):A.el=D.el},E=(D,A,L,Q)=>{[D.el,D.anchor]=R(D.children,A,L,Q,D.el,D.anchor)},M=(D,A,L,Q)=>{if(A.children!==D.children){let H=g(D.anchor);V(D),[A.el,A.anchor]=R(A.children,L,H,Q)}else A.el=D.el,A.anchor=D.anchor},_=({el:D,anchor:A},L,Q)=>{let H;for(;D&&D!==A;)H=g(D),i(D,L,Q),D=H;i(A,L,Q)},V=({el:D,anchor:A})=>{let L;for(;D&&D!==A;)L=g(D),s(D),D=L;s(A)},G=(D,A,L,Q,H,J,ae,te,oe)=>{if(A.type==="svg"?ae="svg":A.type==="math"&&(ae="mathml"),D==null)ee(A,L,Q,H,J,ae,te,oe);else{let x=D.el&&D.el._isVueCE?D.el:null;try{x&&x._beginPatch(),U(D,A,H,J,ae,te,oe)}finally{x&&x._endPatch()}}},ee=(D,A,L,Q,H,J,ae,te)=>{let oe,x,{props:ke,shapeFlag:pe,transition:Ce,dirs:De}=D;if(oe=D.el=d(D.type,J,ke&&ke.is,ke),pe&8?h(oe,D.children):pe&16&&O(D.children,oe,null,Q,H,Ur(D,J),ae,te),De&&eo(D,null,Q,"created"),X(oe,D,D.scopeId,ae,Q),ke){for(let Ge in ke)Ge!=="value"&&!Ao(Ge)&&r(oe,Ge,null,ke[Ge],J,Q);"value"in ke&&r(oe,"value",null,ke.value,J),(x=ke.onVnodeBeforeMount)&&un(x,Q,D)}De&&eo(D,null,Q,"beforeMount");let Me=wh(H,Ce);Me&&Ce.beforeEnter(oe),i(oe,A,L),((x=ke&&ke.onVnodeMounted)||Me||De)&&It(()=>{let ze;x&&un(x,Q,D),Me&&Ce.enter(oe),De&&eo(D,null,Q,"mounted")},H)},X=(D,A,L,Q,H)=>{if(L&&k(D,L),Q)for(let J=0;J{for(let x=oe;x{let te=A.el=D.el,{patchFlag:oe,dynamicChildren:x,dirs:ke}=A;oe|=D.patchFlag&16;let pe=D.props||Ze,Ce=A.props||Ze,De;if(L&&to(L,!1),(De=Ce.onVnodeBeforeUpdate)&&un(De,L,A,D),ke&&eo(A,D,L,"beforeUpdate"),L&&to(L,!0),x&&(!D.dynamicChildren||D.dynamicChildren.length!==x.length)&&(oe=0,ae=!1,x=null),(pe.innerHTML&&Ce.innerHTML==null||pe.textContent&&Ce.textContent==null)&&h(te,""),x?C(D.dynamicChildren,x,te,L,Q,Ur(A,H),J):ae||Ee(D,A,te,null,L,Q,Ur(A,H),J,!1),oe>0){if(oe&16)q(te,pe,Ce,L,H);else if(oe&2&&pe.class!==Ce.class&&r(te,"class",null,Ce.class,H),oe&4&&r(te,"style",pe.style,Ce.style,H),oe&8){let Me=A.dynamicProps;for(let Ge=0;Ge{De&&un(De,L,A,D),ke&&eo(A,D,L,"updated")},Q)},C=(D,A,L,Q,H,J,ae)=>{for(let te=0;te{if(A!==L){if(A!==Ze)for(let J in A)!Ao(J)&&!(J in L)&&r(D,J,A[J],null,H,Q);for(let J in L){if(Ao(J))continue;let ae=L[J],te=A[J];ae!==te&&J!=="value"&&r(D,J,te,ae,H,Q)}"value"in L&&r(D,"value",A.value,L.value,H)}},z=(D,A,L,Q,H,J,ae,te,oe)=>{let x=A.el=D?D.el:c(""),ke=A.anchor=D?D.anchor:c(""),{patchFlag:pe,dynamicChildren:Ce,slotScopeIds:De}=A;De&&(te=te?te.concat(De):De),D==null?(i(x,L,Q),i(ke,L,Q),O(A.children||[],L,ke,H,J,ae,te,oe)):pe>0&&pe&64&&Ce&&D.dynamicChildren&&D.dynamicChildren.length===Ce.length?(C(D.dynamicChildren,Ce,L,H,J,ae,te),(A.key!=null||H&&A===H.subTree)&&Dd(D,A,!0)):Ee(D,A,L,ke,H,J,ae,te,oe)},K=(D,A,L,Q,H,J,ae,te,oe)=>{A.slotScopeIds=te,D==null?A.shapeFlag&512?H.ctx.activate(A,L,Q,ae,oe):ie(A,L,Q,H,J,ae,oe):ne(D,A,oe)},ie=(D,A,L,Q,H,J,ae)=>{let te=D.component=Ph(D,Q,H);if(Pi(D)&&(te.ctx.renderer=ce),Ah(te,!1,ae),te.asyncDep){if(H&&H.registerDep(te,Y,ae,J),!D.el){let oe=te.subTree=Oe(en);m(null,oe,A,L),D.placeholder=oe.el}}else Y(te,D,A,L,H,J,ae)},ne=(D,A,L)=>{let Q=A.component=D.component;if(uh(D,A,L))if(Q.asyncDep&&!Q.asyncResolved){A.el=D.el,A.placeholder=D.placeholder,he(Q,A,L);return}else Q.next=A,Q.update();else A.el=D.el,A.placeholder=D.placeholder,Q.vnode=A},Y=(D,A,L,Q,H,J,ae)=>{let te=()=>{if(D.isMounted){let{next:pe,bu:Ce,u:De,parent:Me,vnode:Ge}=D;{let rt=Pd(D);if(rt){pe&&(pe.el=Ge.el,he(D,pe,ae)),rt.asyncDep.then(()=>{It(()=>{D.isUnmounted||x()},H)});return}}let ze=pe,we;to(D,!1),pe?(pe.el=Ge.el,he(D,pe,ae)):pe=Ge,Ce&&To(Ce),(we=pe.props&&pe.props.onVnodeBeforeUpdate)&&un(we,Me,pe,Ge),to(D,!0);let be=Fr(D),st=D.subTree;D.subTree=be,S(st,be,b(st.el),fe(st),D,H,J),pe.el=be.el,ze===null&&ch(D,be.el),De&&It(De,H),(we=pe.props&&pe.props.onVnodeUpdated)&&It(()=>un(we,Me,pe,Ge),H)}else{let pe,{el:Ce,props:De}=A,{bm:Me,m:Ge,parent:ze,root:we,type:be}=D,st=ys(A);if(to(D,!1),Me&&To(Me),!st&&(pe=De&&De.onVnodeBeforeMount)&&un(pe,ze,A),to(D,!0),Ce&&Ie){let rt=()=>{D.subTree=Fr(D),Ie(Ce,D.subTree,D,H,null)};st&&be.__asyncHydrate?be.__asyncHydrate(Ce,D,rt):rt()}else{we.ce&&we.ce._hasShadowRoot()&&we.ce._injectChildStyle(be,D.parent?D.parent.type:void 0);let rt=D.subTree=Fr(D);S(null,rt,L,Q,D,H,J),A.el=rt.el}if(Ge&&It(Ge,H),!st&&(pe=De&&De.onVnodeMounted)){let rt=A;It(()=>un(pe,ze,rt),H)}(A.shapeFlag&256||ze&&ys(ze.vnode)&&ze.vnode.shapeFlag&256)&&D.a&&It(D.a,H),D.isMounted=!0,A=L=Q=null}};D.scope.on();let oe=D.effect=new Mo(te);D.scope.off();let x=D.update=oe.run.bind(oe),ke=D.job=oe.runIfDirty.bind(oe);ke.i=D,ke.id=D.uid,oe.scheduler=()=>Kr(ke),to(D,!0),x()},he=(D,A,L)=>{A.component=D;let Q=D.vnode.props;D.vnode=A,D.next=null,fh(D,A.props,Q,L),vh(D,A.children,L),Jt(),Zl(D),Zt()},Ee=(D,A,L,Q,H,J,ae,te,oe=!1)=>{let x=D&&D.children,ke=D?D.shapeFlag:0,pe=A.children,{patchFlag:Ce,shapeFlag:De}=A;if(Ce>0){if(Ce&128){Be(x,pe,L,Q,H,J,ae,te,oe);return}else if(Ce&256){Ue(x,pe,L,Q,H,J,ae,te,oe);return}}De&8?(ke&16&&W(x,H,J),pe!==x&&h(L,pe)):ke&16?De&16?Be(x,pe,L,Q,H,J,ae,te,oe):W(x,H,J,!0):(ke&8&&h(L,""),De&16&&O(pe,L,Q,H,J,ae,te,oe))},Ue=(D,A,L,Q,H,J,ae,te,oe)=>{D=D||In,A=A||In;let x=D.length,ke=A.length,pe=Math.min(x,ke),Ce;for(Ce=0;Ceke?W(D,H,J,!0,!1,pe):O(A,L,Q,H,J,ae,te,oe,pe)},Be=(D,A,L,Q,H,J,ae,te,oe)=>{let x=0,ke=A.length,pe=D.length-1,Ce=ke-1;for(;x<=pe&&x<=Ce;){let De=D[x],Me=A[x]=oe?Cn(A[x]):pn(A[x]);if(ms(De,Me))S(De,Me,L,null,H,J,ae,te,oe);else break;x++}for(;x<=pe&&x<=Ce;){let De=D[pe],Me=A[Ce]=oe?Cn(A[Ce]):pn(A[Ce]);if(ms(De,Me))S(De,Me,L,null,H,J,ae,te,oe);else break;pe--,Ce--}if(x>pe){if(x<=Ce){let De=Ce+1,Me=DeCe)for(;x<=pe;)He(D[x],H,J,!0),x++;else{let De=x,Me=x,Ge=new Map;for(x=Me;x<=Ce;x++){let lt=A[x]=oe?Cn(A[x]):pn(A[x]);lt.key!=null&&Ge.set(lt.key,x)}let ze,we=0,be=Ce-Me+1,st=!1,rt=0,yt=new Array(be);for(x=0;x=be){He(lt,H,J,!0);continue}let ft;if(lt.key!=null)ft=Ge.get(lt.key);else for(ze=Me;ze<=Ce;ze++)if(yt[ze-Me]===0&&ms(lt,A[ze])){ft=ze;break}ft===void 0?He(lt,H,J,!0):(yt[ft-Me]=x+1,ft>=rt?rt=ft:st=!0,S(lt,A[ft],L,null,H,J,ae,te,oe),we++)}let at=st?kh(yt):In;for(ze=at.length-1,x=be-1;x>=0;x--){let lt=Me+x,ft=A[lt],_t=A[lt+1],Kn=lt+1{let{el:J,type:ae,transition:te,children:oe,shapeFlag:x}=D;if(x&6){Je(D.component.subTree,A,L,Q);return}if(x&128){D.suspense.move(A,L,Q);return}if(x&64){ae.move(D,A,L,ce);return}if(ae===F){i(J,A,L);for(let pe=0;pete.enter(J),H));else{let{leave:pe,delayLeave:Ce,afterLeave:De}=te,Me=()=>{D.ctx.isUnmounted?s(J):i(J,A,L)},Ge=()=>{let ze=J._isLeaving||!!J[$r];J._isLeaving&&J[$r](!0),te.persisted&&!ze?Me():pe(J,()=>{Me(),De&&De()})};Ce?Ce(J,Me,Ge):Ge()}else i(J,A,L)},He=(D,A,L,Q=!1,H=!1)=>{let{type:J,props:ae,ref:te,children:oe,dynamicChildren:x,shapeFlag:ke,patchFlag:pe,dirs:Ce,cacheIndex:De,memo:Me}=D;if((pe===-2||x&&x.hasOnce)&&(H=!1),te!=null&&(Jt(),vs(te,null,L,D,!0),Zt()),De!=null&&(!D.ctx||D.ctx===A)&&(A.renderCache[De]=void 0),ke&256){A.ctx.deactivate(D);return}let Ge=ke&1&&Ce,ze=!ys(D),we;if(ze&&(we=ae&&ae.onVnodeBeforeUnmount)&&un(we,A,D),ke&6)Fe(D.component,L,Q);else{if(ke&128){D.suspense.unmount(L,Q);return}Ge&&eo(D,null,A,"beforeUnmount"),ke&64?D.type.remove(D,A,L,ce,Q):x&&!x.hasOnce&&(J!==F||pe>0&&pe&64)?W(x,A,L,!1,!0):(J===F&&pe&384||!H&&ke&16)&&W(oe,A,L),Q&&et(D)}let be=Me!=null&&De==null;(ze&&(we=ae&&ae.onVnodeUnmounted)||Ge||be)&&It(()=>{we&&un(we,A,D),Ge&&eo(D,null,A,"unmounted"),be&&(D.el=null)},L)},et=D=>{let{type:A,el:L,anchor:Q,transition:H}=D,J=A===F;if(J&&!H){Re(L,Q);return}if(A===ws){V(D),H&&!H.persisted&&H.afterLeave&&H.afterLeave();return}let ae=J?Br(D):D,te=()=>{J?b(L)&&Re(L,Q):s(L),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(ae&&ae.shapeFlag&1&&H&&!H.persisted){let{leave:oe,delayLeave:x}=H,ke=ae.el,pe=()=>oe(ke,te);x?x(ke,te,pe):pe()}else te()},Re=(D,A)=>{let L;for(;D!==A;)L=g(D),s(D),D=L;s(A)},Fe=(D,A,L)=>{let{bum:Q,scope:H,job:J,subTree:ae,um:te,m:oe,a:x}=D;jl(oe),jl(x),Q&&To(Q),H.stop(),J?(J.flags|=8,He(ae,D,A,L)):D.vnode.el&&ae&&(ae.transition=D.vnode.transition,He(ae,D,A,L)),te&&It(te,A),It(()=>{D.isUnmounted=!0},A)},W=(D,A,L,Q=!1,H=!1,J=0)=>{for(let ae=J;ae{if(D.shapeFlag&6)return fe(D.component.subTree);if(D.shapeFlag&128)return D.suspense.next();let A=g(D.anchor||D.el),L=A&&A[Uf];return L?g(L):A},de=(D,A,L)=>{let Q=D&&A._vnode?void 0:D&&D.component?D.component.uid:Dh();Vf(()=>{D==null?A._vnode&&He(A._vnode,null,null,!0):S(A._vnode||null,D,A,null,null,null,L),A._vnode=D},Q)},ce={p:S,um:He,m:Je,r:et,mt:ie,mc:O,pc:Ee,pbc:C,n:fe,o:e},me,Ie;return t&&([me,Ie]=t(ce)),{render:de,hydrate:me,createApp:sh(de,me)}}function Ur({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function to({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wh(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Dd(e,t,o=!1){let i=e.children,s=t.children;if(Ne(i)&&Ne(s))for(let r=0;r>1,e[o[c]]0&&(t[i]=o[r-1]),o[r]=i)}}for(r=o.length,d=o[r-1];r-- >0;)o[r]=d,d=t[d];return o}function Pd(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Pd(t)}function jl(e){if(e)for(let t=0;te.__isSuspense;function Ch(e,t){t&&t.pendingBranch?Ne(e)?t.effects.push(...e):t.effects.push(e):Jl(e)}var F=Symbol.for("v-fgt"),Oi=Symbol.for("v-txt"),en=Symbol.for("v-cmt"),ws=Symbol.for("v-stc"),no=[],Ft=null;function a(e=!1){no.push(Ft=e?null:[])}function Td(){no.pop(),Ft=no[no.length-1]||null}var Es=1;function Si(e,t=!1){Es+=e,e<0&&Ft&&t&&(Ft.hasOnce=!0)}function Od(e){return e.dynamicChildren=Es>0?Ft||In:null,Td(),Es>0&&Ft&&Ft.push(e),e}function l(e,t,o,i,s,r){return Od(n(e,t,o,i,s,r,!0))}function Gt(e,t,o,i,s){return Od(Oe(e,t,o,i,s,!0))}function Ss(e){return e?e.__v_isVNode===!0:!1}function ms(e,t){return e.type===t.type&&e.key===t.key}var Id=({key:e})=>e??null,bi=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?it(e)||wt(e)||Te(e)?{i:Lt,r:e,k:t,f:!!o}:e:null);function n(e,t=null,o=null,i=0,s=null,r=e===F?0:1,d=!1,c=!1){let u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Id(t),ref:t&&bi(t),scopeId:td,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Lt};return c?(Ni(u,o),r&128&&e.normalize(u)):o&&(u.shapeFlag|=it(o)?8:16),Es>0&&!d&&Ft&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&Ft.push(u),u}var Oe=Eh;function Eh(e,t=null,o=null,i=0,s=null,r=!1){if((!e||e===Qf)&&(e=en),Ss(e)){let c=qo(e,t,!0);return o&&Ni(c,o),Es>0&&!r&&Ft&&(c.shapeFlag&6?Ft[Ft.indexOf(e)]=c:Ft.push(c)),c.patchFlag=-2,c}if(_h(e)&&(e=e.__vccOpts),t){t=Sh(t);let{class:c,style:u}=t;c&&!it(c)&&(t.class=P(c)),Ye(u)&&(hs(u)&&!Ne(u)&&(u=ct({},u)),t.style=$e(u))}let d=it(e)?1:Ad(e)?128:Di(e)?64:Ye(e)?4:Te(e)?2:0;return n(e,t,o,i,s,d,r,!0)}function Sh(e){return e?hs(e)||wd(e)?ct({},e):e:null}function qo(e,t,o=!1,i=!1){let{props:s,ref:r,patchFlag:d,children:c,transition:u}=e,y=t?Nh(s||{},t):s,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Id(y),ref:t&&t.ref?o&&r?Ne(r)?r.concat(bi(t)):[r,bi(t)]:bi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==F?d===-1?16:d|16:d,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qo(e.ssContent),ssFallback:e.ssFallback&&qo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return u&&i&&Cs(h,u.clone(h)),h}function v(e=" ",t=0){return Oe(Oi,null,e,t)}function Se(e,t){let o=Oe(ws,null,e);return o.staticCount=t,o}function f(e="",t=!1){return t?(a(),Gt(en,null,e)):Oe(en,null,e)}function pn(e){return e==null||typeof e=="boolean"?Oe(en):Ne(e)?Oe(F,null,e.slice()):Ss(e)?Cn(e):Oe(Oi,null,String(e))}function Cn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qo(e)}function Ni(e,t){let o=0,{shapeFlag:i}=e;if(t==null)t=null;else if(Ne(t))o=16;else if(typeof t=="object")if(i&65){let s=t.default;s&&(s._c&&(s._d=!1),Ni(e,s()),s._c&&(s._d=!0));return}else{o=32;let s=t._;!s&&!wd(t)?t._ctx=Lt:s===3&&Lt&&(Lt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Te(t)){if(i&65){Ni(e,{default:t});return}t={default:t,_ctx:Lt},o=32}else t=String(t),i&64?(o=16,t=[v(t)]):o=8;e.children=t,e.shapeFlag|=o}function Nh(...e){let t={};for(let o=0;oSt||Lt,Ri,Ns;{let e=ss(),t=(o,i)=>{let s;return(s=e[o])||(s=e[o]=[]),s.push(i),r=>{s.length>1?s.forEach(d=>d(r)):s[0](r)}};Ri=t("__VUE_INSTANCE_SETTERS__",o=>St=o),Ns=t("__VUE_SSR_SETTERS__",o=>$o=o)}var Ts=e=>{let t=St;return Ri(e),e.scope.on(),()=>{e.scope.off(),Ri(t)}},Gl=()=>{St&&St.scope.off(),Ri(null)};function _d(e){return e.vnode.shapeFlag&4}var $o=!1;function Ah(e,t=!1,o=!1){t&&Ns(t);let{props:i,children:s}=e.vnode,r=_d(e);ph(e,i,r,t),gh(e,s,o||t);let d=r?Th(e,t):void 0;return t&&Ns(!1),d}function Th(e,t){let o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Jf);let{setup:i}=o;if(i){Jt();let s=e.setupContext=i.length>1?Ih(e):null,r=Ts(e),d=Rs(i,e,0,[e.props,s]),c=yr(d);if(Zt(),r(),(c||e.sp)&&!ys(e)&&Yr(e),c){if(d.then(Gl,Gl),t)return d.then(u=>{Ns(!0);try{Wl(e,u,t)}finally{Ns(!1)}}).catch(u=>{Ds(u,e,0)});e.asyncDep=d}else Wl(e,d,t)}else Vd(e,t)}function Wl(e,t,o){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ye(t)&&(e.setupState=vi(t)),Vd(e,o)}var Kl,Yl;function Vd(e,t,o){let i=e.type;if(!e.render){if(!t&&Kl&&!i.render){let s=i.template||Xr(e).template;if(s){let{isCustomElement:r,compilerOptions:d}=e.appContext.config,{delimiters:c,compilerOptions:u}=i,y=ct(ct({isCustomElement:r,delimiters:c},d),u);i.render=Kl(s,y)}}e.render=i.render||Tt,Yl&&Yl(e)}{let s=Ts(e);Jt();try{Zf(e)}finally{Zt(),s()}}}var Oh={get(e,t){return Ct(e,"get",""),e[t]}};function Ih(e){let t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,Oh),slots:e.slots,emit:e.emit,expose:t}}function Ii(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vi(dn(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in bs)return bs[o](e)},has(t,o){return o in t||o in bs}})):e.proxy}function Mh(e,t=!0){return Te(e)?e.displayName||e.name:e.name||t&&e.__name}function _h(e){return Te(e)&&"__vccOpts"in e}var Nt=(e,t)=>Ol(e,t,$o);function Ae(e,t,o){try{Si(-1);let i=arguments.length;return i===2?Ye(t)&&!Ne(t)?Ss(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(i>3?o=Array.prototype.slice.call(arguments,2):i===3&&Ss(o)&&(o=[o]),Oe(e,t,o))}finally{Si(1)}}var Vh="3.5.44";var na,qd=typeof window<"u"&&window.trustedTypes;if(qd)try{na=qd.createPolicy("vue",{createHTML:e=>e})}catch{}var Yd=na?e=>na.createHTML(e):e=>e,qh="http://www.w3.org/2000/svg",$h="http://www.w3.org/1998/Math/MathML",Sn=typeof document<"u"?document:null,$d=Sn&&Sn.createElement("template"),Lh={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,i)=>{let s=t==="svg"?Sn.createElementNS(qh,e):t==="mathml"?Sn.createElementNS($h,e):o?Sn.createElement(e,{is:o}):Sn.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>Sn.createTextNode(e),createComment:e=>Sn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,i,s,r){let d=o?o.previousSibling:t.lastChild;if(s&&(s===r||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),o),!(s===r||!(s=s.nextSibling)););else{$d.innerHTML=Yd(i==="svg"?`${e}`:i==="mathml"?`${e}`:e);let c=$d.content;if(i==="svg"||i==="mathml"){let u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}t.insertBefore(c,o)}return[d?d.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};var Fh=Symbol("_vtc");function Uh(e,t,o){let i=e[Fh];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}var Vi=Symbol("_vod"),Xd=Symbol("_vsh"),Z={name:"show",beforeMount(e,{value:t},{transition:o}){e[Vi]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):Os(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:i}){!t!=!o&&(i?t?(i.beforeEnter(e),Os(e,!0),i.enter(e)):i.leave(e,()=>{Os(e,!1)}):Os(e,t))},beforeUnmount(e,{value:t}){Os(e,t)}};function Os(e,t){e.style.display=t?e[Vi]:"none",e[Xd]=!t}var Bh=Symbol("");var zh=/(?:^|;)\s*display\s*:/;function Hh(e,t,o){let i=e.style,s=it(o),r=!1;if(o&&!s){if(t)if(it(t))for(let d of t.split(";")){let c=d.slice(0,d.indexOf(":")).trim();o[c]==null&&Is(i,c,"")}else for(let d in t)o[d]==null&&Is(i,d,"");for(let d in o){d==="display"&&(r=!0);let c=o[d];c!=null?Gh(e,d,!it(t)&&t?t[d]:void 0,c)||Is(i,d,c):Is(i,d,"")}}else if(s){if(t!==o){let d=i[Bh];d&&(o+=";"+d),i.cssText=o,r=zh.test(o)}}else t&&e.removeAttribute("style");Vi in e&&((!s||t!==o)&&(e[Vi]=r?i.display:""),e[Xd]&&(i.display="none"))}var Mi=/\s*!important$/;function Is(e,t,o){if(Ne(o))o.forEach(i=>Is(e,t,i));else if(o==null&&(o=""),t.startsWith("--"))Mi.test(o)?e.setProperty(t,o.replace(Mi,""),"important"):e.setProperty(t,o);else{let i=jh(e,t);Mi.test(o)?e.setProperty(on(i),o.replace(Mi,""),"important"):e[i]=o}}var Ld=["Webkit","Moz","ms"],xr={};function jh(e,t){let o=xr[t];if(o)return o;let i=ht(t);if(i!=="filter"&&i in e)return xr[t]=i;i=Qn(i);for(let s=0;sea||(Jh.then(()=>ea=0),ea=Date.now());function xh(e,t){let o=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=o.attached)return;let s=o.value;if(Ne(s)){let r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};let d=s.slice(),c=[i];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,em=(e,t,o,i,s,r)=>{let d=s==="svg";t==="class"?Uh(e,i,d):t==="style"?Hh(e,o,i):Do(t)?Po(t)||Kh(e,t,o,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):tm(e,t,i,d))?(Bd(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ud(e,t,i,d,r,t!=="value")):e._isVueCE&&(nm(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!it(i)))?Bd(e,ht(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Ud(e,t,i,d))};function tm(e,t,o,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Hd(t)&&Te(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Hd(t)&&it(o)?!1:t in e}function nm(e,t){let o=e._def.props;if(!o)return!1;let i=ht(t);return Array.isArray(o)?o.some(s=>ht(s)===i):Object.keys(o).some(s=>ht(s)===i)}var Lo=e=>{let t=e.props["onUpdate:modelValue"]||!1;return Ne(t)?o=>To(t,o):t};function om(e){e.target.composing=!0}function jd(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var hn=Symbol("_assign"),_i=Symbol("_initialValue");function ta(e,t,o){return t&&(e=e.trim()),o&&(e=Oo(e)),e}var pt={created(e,{modifiers:{lazy:t,trim:o,number:i}},s){e.parentNode&&(e.type==="text"?e[_i]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[_i]=e.defaultValue.replace(/\r\n?/g,` -`))),e[hn]=Lo(s);let r=i||s.props&&s.props.type==="number";_n(e,t?"change":"input",d=>{d.target.composing||e[hn](ta(e.value,o,r))}),(o||r)&&_n(e,"change",()=>{e.value=ta(e.value,o,r)}),t||(_n(e,"compositionstart",om),_n(e,"compositionend",jd),_n(e,"change",jd))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[_i];delete e[_i],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[hn](ta(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},d){if(e[hn]=Lo(d),e.composing)return;let c=(r||e.type==="number")&&!/^0\d/.test(e.value)?Oo(e.value):e.value,u=t??"";if(c===u)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===u)||(e.value=u)}},oa={deep:!0,created(e,t,o){e[hn]=Lo(o),_n(e,"change",()=>{let i=e._modelValue,s=Ms(e),r=e.checked,d=e[hn];if(Ne(i)){let c=li(i,s),u=c!==-1;if(r&&!u)d(i.concat(s));else if(!r&&u){let y=[...i];y.splice(c,1),d(y)}}else if(Yt(i)){let c=new Set(i);r?c.add(s):c.delete(s),d(c)}else d(Qd(e,r))})},mounted:Gd,beforeUpdate(e,t,o){e[hn]=Lo(o),Gd(e,t,o)}};function Gd(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(Ne(t))s=li(t,i.props.value)>-1;else if(Yt(t))s=t.has(i.props.value);else{if(t===o)return;s=Xt(t,Qd(e,!0))}e.checked!==s&&(e.checked=s)}var mn={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,_n(e,"change",()=>{let s=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>o?Oo(Ms(u)):Ms(u)),r=e.multiple,d=r?Yt(e._modelValue)?new Set(s):s:s[0],c=e._pendingValue=[r,r?Ne(d)?s.slice():s:d];try{e[hn](d)}finally{tt(()=>{e._pendingValue===c&&(e._pendingValue=void 0)})}}),e[hn]=Lo(i)},mounted(e,{value:t}){Wd(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[hn]=Lo(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!sm(t,o[1],o[0]))&&Wd(e,t)}};function sm(e,t,o){if(!o)return Xt(e,t);if(Ne(e))return Xt(e,t);if(Yt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Wd(e,t){let o=e.multiple,i=Ne(t);if(!(o&&!i&&!Yt(t))){for(let s=0,r=e.options.length;sString(y)===String(c)):d.selected=li(t,c)>-1}else d.selected=t.has(c);else if(Xt(Ms(d),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(e){return"_value"in e?e._value:e.value}function Qd(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var im=["ctrl","shift","alt","meta"],rm={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>im.some(o=>e[`${o}Key`]&&!t.includes(o))},le=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),i=t.join(".");return o[i]||(o[i]=((s,...r)=>{for(let d=0;d{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=on(s.key);if(t.some(d=>d===r||am[d]===r))return e(s)}))},lm=ct({patchProp:em},Lh),Kd;function dm(){return Kd||(Kd=Rd(lm))}var Jd=((...e)=>{let t=dm().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=cm(i);if(!s)return;let r=t._component;!Te(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let d=o(s,!1,um(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),d},t});function um(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function cm(e){return it(e)?document.querySelector(e):e}var ao=typeof document<"u";function xd(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function pm(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xd(e.default)}var Qe=Object.assign;function qi(e,t){let o={};for(let i in t){let s=t[i];o[i]=Wt(s)?s.map(e):e(s)}return o}var Uo=()=>{},Wt=Array.isArray;function ra(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var eu=/#/g,fm=/&/g,hm=/\//g,mm=/=/g,gm=/\?/g,tu=/\+/g,vm=/%5B/g,ym=/%5D/g,nu=/%5E/g,bm=/%60/g,ou=/%7B/g,wm=/%7C/g,su=/%7D/g,km=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(wm,"|").replace(vm,"[").replace(ym,"]")}function iu(e){return aa(e).replace(ou,"{").replace(su,"}").replace(nu,"^")}function sa(e){return aa(e).replace(tu,"%2B").replace(km,"+").replace(eu,"%23").replace(fm,"%26").replace(bm,"`").replace(ou,"{").replace(su,"}").replace(nu,"^")}function Cm(e){return sa(e).replace(mm,"%3D")}function Em(e){return aa(e).replace(eu,"%23").replace(gm,"%3F")}function ru(e){return Em(e).replace(hm,"%2F")}function Fo(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Sm=/\/$/,Nm=e=>e.replace(Sm,"");function $i(e,t,o="/"){let i,s={},r="",d="",c=t.indexOf("#"),u=t.indexOf("?");return u=c>=0&&u>c?-1:u,u>=0&&(i=t.slice(0,u),r=t.slice(u,c>0?c:t.length),s=e(r.slice(1))),c>=0&&(i=i||t.slice(0,c),d=t.slice(c,t.length)),i=Dm(i??t,o),{fullPath:i+r+d,path:i,query:s,hash:Fo(d)}}function au(e,t){let o=t.query?e(t.query):"";return t.path+(o&&"?")+o+(t.hash||"")}function la(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lu(e,t,o){let i=t.matched.length-1,s=o.matched.length-1;return i>-1&&i===s&&io(t.matched[i],o.matched[s])&&da(t.params,o.params)&&e(t.query)===e(o.query)&&t.hash===o.hash}function io(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function da(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!Rm(e[o],t[o]))return!1;return!0}function Rm(e,t){return Wt(e)?Zd(e,t):Wt(t)?Zd(t,e):e?.valueOf()===t?.valueOf()}function Zd(e,t){return Wt(t)?e.length===t.length&&e.every((o,i)=>o===t[i]):e.length===1&&e[0]===t}function Dm(e,t){if(e.startsWith("/"))return e;if(!e)return t;let o=t.split("/"),i=e.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=o.length-1,d,c;for(d=0;d1&&r--;else break;return o.slice(0,r).join("/")+"/"+i.slice(d).join("/")}var Rn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Li=(function(e){return e.pop="pop",e.push="push",e})({}),Fi=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function du(e){if(!e)if(ao){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Nm(e)}var Pm=/^[^#]+#/;function uu(e,t){return e.replace(Pm,"#")+t}function Am(e,t){let o=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:t.behavior,left:i.left-o.left-(t.left||0),top:i.top-o.top-(t.top||0)}}var _s=()=>({left:window.scrollX,top:window.scrollY});function cu(e){let t;if("el"in e){let o=e.el,i=typeof o=="string"&&o.startsWith("#"),s=typeof o=="string"?i?document.getElementById(o.slice(1)):document.querySelector(o):o;if(!s)return;t=Am(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ua(e,t){return(history.state?history.state.position-t:-1)+e}var ia=new Map;function pu(e,t){ia.set(e,t)}function fu(e){let t=ia.get(e);return ia.delete(e),t}function Tm(e){return typeof e=="string"||e&&typeof e=="object"}function ca(e){return typeof e=="string"||typeof e=="symbol"}var ut=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),hu=Symbol("");var LX={[ut.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for +"use strict";(()=>{var el=Object.defineProperty;var tl=e=>{throw TypeError(e)};var nf=(e,t,s)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var sf=(e,t)=>{for(var s in t)el(e,s,{get:t[s],enumerable:!0})};var xe=(e,t,s)=>nf(e,typeof t!="symbol"?t+"":t,s),mr=(e,t,s)=>t.has(e)||tl("Cannot "+s);var re=(e,t,s)=>(mr(e,t,"read from private field"),s?s.call(e):t.get(e)),qe=(e,t,s)=>t.has(e)?tl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Le=(e,t,s,i)=>(mr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),_e=(e,t,s)=>(mr(e,t,"access private method"),s);var nl=(e,t,s,i)=>({set _(o){Le(e,t,o,s)},get _(){return re(e,t,i)}});var ge=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};function sl(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let s=new URLSearchParams(t);if([...s.keys()].length!==3||[...s.keys()].some(d=>!["clientId","intentId","token"].includes(d)))return null;let i=s.get("clientId"),o=s.get("intentId"),r=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(o||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:o,token:r}}function ol(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),d=r?{clientId:r.clientId,intentId:r.intentId}:null,p,u,y,m,b,h=!0,w,R=i.defer(),S=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(V=>V.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>h&&e.user?.username===b;function v(){h=!1,r=p=u=void 0,R.resolve(),o.clearTimeout(w)}e.on("dispose",v),e.on("routeLeave",v),e.watch(()=>e.user?.username,V=>{!b&&V?b=V:b&&V!==b&&(v(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let E=()=>({timeout:R.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":u}}),M=V=>V?.status===404?"Artifact linking is not available on this server.":V?.status===401?"Sign in, then open a new artifact link from your submission.":V?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!h||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;b=e.user.username;let V=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(V)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,o.clearTimeout(w),m||(m=S());try{let _=(await s.get("/api/review-consent/csrf",{timeout:R.promise})).data;if(!N())return;if(u=_.csrf,e.handoffEnabled=_.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(u||""))throw new Error("invalid_csrf");let G=(await s.post("/api/review-consent/preview",{repositoryId:V,intent:{...r,requestId:m}},E())).data;if(!N())return;if(!G||typeof G.ticket!="string"||!G.ticket||G.ticket.length>8192||typeof G.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(G.policy?.access)||!Number.isSafeInteger(G.policy.version)||!Number.isFinite(Date.parse(G.policy.retainUntil))||!Number.isFinite(Date.parse(G.expiresAt))||Date.parse(G.expiresAt)<=Date.now()||Date.parse(G.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");p=G.ticket,y=S(),e.preview={repositoryName:G.repositoryName,policy:{...G.policy},expiresAt:G.expiresAt},w=o.setTimeout(()=>{h&&(e.expired=!0)},Math.max(0,Date.parse(G.expiresAt)-Date.now()))}catch(_){N()&&(e.error=M(_))}finally{N()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!N()||e.busy||e.saved||!p||!e.acceptAccess||!e.acceptRetention)){if(Date.parse(e.preview.expiresAt)<=Date.now()){e.expired=!0;return}e.busy=!0,e.error="";try{let V=(await s.post("/api/review-consent/confirm",{ticket:p,requestId:y,acceptAccess:!0,acceptRetention:!0},E())).data;if(!N())return;if(V?.requestId!==y||!Number.isFinite(Date.parse(V.confirmedAt)))throw new Error("invalid_receipt");e.saved=!0,e.uncertain=!1,r=void 0,e.handoffEnabled||(p=void 0)}catch{N()&&(e.uncertain=!0,e.error="The confirmation was not verified. Retry with the same approval, or return to your submission to check its status.")}finally{N()&&(e.busy=!1)}}},e.continueReview=async()=>{if(!N()||e.busy||!e.saved||!e.handoffEnabled||!p||!d)return;e.busy=!0,e.error="";let V,_=()=>{V?.remove(),o.removeEventListener("securitypolicyviolation",G)},G=te=>{te.violatedDirective?.startsWith("form-action")&&(_(),N()&&(e.busy=!1,e.error="The return address was blocked. Return to your submission to check the artifact status."))};try{let te=(await s.post("/api/review-consent/handoff",{ticket:p},E())).data;if(!N())return;let X=te?.completion,O=new URL(te?.callbackUrl);if(!X||Object.keys(X).sort().join(",")!=="clientId,code,contract,expiresAt,intentId"||X.contract!=="4open.artifacts/1"||X.clientId!==d.clientId||X.intentId!==d.intentId||!/^[a-f0-9]{64}$/.test(X.code||"")||!Number.isFinite(Date.parse(X.expiresAt))||Date.parse(X.expiresAt)<=Date.now()||Date.parse(X.expiresAt)>Date.now()+3e5||O.protocol!=="https:"||O.href!==te.callbackUrl||O.username||O.password||te.callbackUrl.includes("?")||te.callbackUrl.includes("#"))throw new Error("invalid_handoff");V=o.document.createElement("form"),V.method="POST",V.action=O.href;let U=o.document.createElement("input");U.type="hidden",U.name="completion",U.value=JSON.stringify(X),V.appendChild(U),o.document.body.appendChild(V),o.addEventListener("securitypolicyviolation",G),e.on("dispose",_),V.submit()}catch{_(),N()&&(e.busy=!1,e.error="The return to review could not be prepared. Retry from this page, or return to your submission to check its status.")}}}var ti=new Map,af=ve;function Jn(e){if(!ti.has(e)){let t=document.createElement("script");t.src=af[e];let s=new Promise((i,o)=>{t.onload=i,t.onerror=()=>{ti.delete(e),t.remove(),o(new Error(`Unable to load ${e}. Please retry.`))}});ti.set(e,s),document.head.appendChild(t)}return ti.get(e)}async function ni(){await Jn("editor"),ace.config.set("basePath","/script/external/ace/")}function Ns(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var Ze={},In=[],Tt=()=>{},vr=()=>!1,Rs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ps=e=>e.startsWith("onUpdate:"),ct=Object.assign,eo=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},lf=Object.prototype.hasOwnProperty,je=(e,t)=>lf.call(e,t),Ne=Array.isArray,yn=e=>to(e)==="[object Map]",Yt=e=>to(e)==="[object Set]",il=e=>to(e)==="[object Date]";var Te=e=>typeof e=="function",it=e=>typeof e=="string",_t=e=>typeof e=="symbol",Ye=e=>e!==null&&typeof e=="object",yr=e=>(Ye(e)||Te(e))&&Te(e.then)&&Te(e.catch),dl=Object.prototype.toString,to=e=>dl.call(e),br=e=>to(e).slice(8,-1),si=e=>to(e)==="[object Object]",oi=e=>it(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,As=Ns(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var ii=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},df=/-\w/g,ht=ii(e=>e.replace(df,t=>t.slice(1).toUpperCase())),uf=/\B([A-Z])/g,sn=ii(e=>e.replace(uf,"-$1").toLowerCase()),Qn=ii(e=>e.charAt(0).toUpperCase()+e.slice(1)),no=ii(e=>e?`on${Qn(e)}`:""),zt=(e,t)=>!Object.is(e,t),Ds=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},Ts=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var rl,so=()=>rl||(rl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ie(e){if(Ne(e)){let t={};for(let s=0;ss.startsWith("/*")?"":s).split(cf).forEach(s=>{if(s){let i=s.split(pf);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function P(e){let t="";if(it(e))t=e;else if(Ne(e))for(let s=0;sXt(s,t))}var pl=e=>!!(e&&e.__v_isRef===!0),c=e=>it(e)?e:e==null?"":Ne(e)||Ye(e)&&(e.toString===dl||!Te(e.toString))?pl(e)?c(e.value):JSON.stringify(e,fl,2):String(e),fl=(e,t)=>pl(t)?fl(e,t.value):yn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[i,o],r)=>(s[gr(i,r)+" =>"]=o,s),{})}:Yt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>gr(s))}:_t(t)?gr(t):Ye(t)&&!Ne(t)&&!si(t)?String(t):t,gr=(e,t="")=>{var s;return _t(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function yf(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var mt,ao=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&mt&&(mt.active?(this.parent=mt,this.index=(mt.scopes||(mt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){let i=this.scopes.slice();for(t=0,s=i.length;t0&&--this._on===0){if(mt===this)mt=this.prevScope;else{let t=mt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,i;for(s=0,i=this.effects.length;s0)return;if(ro){let t=ro;for(ro=void 0;t;){let s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;io;){let t=io;for(io=void 0;t;){let s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=s}}if(e)throw e}function wl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function kl(e){let t,s=e.depsTail,i=s;for(;i;){let o=i.prevDep;i.version===-1?(i===s&&(s=o),Mr(i),bf(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=s}function Er(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Cl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Cl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===lo)||(e.globalVersion=lo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Er(e))))return;e.flags|=2;let t=e.dep,s=nt,i=Jt;nt=e,Jt=!0;try{wl(e);let o=e.fn(e._value);(t.version===0||zt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{nt=s,Jt=i,kl(e),e.flags&=-3}}function Mr(e,t=!1){let{dep:s,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),s.subs===e&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)Mr(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function bf(e){let{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}var Jt=!0,El=[];function Qt(){El.push(Jt),Jt=!1}function Zt(){let e=El.pop();Jt=e===void 0?!0:e}function hl(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let s=nt;nt=void 0;try{t()}finally{nt=s}}}var lo=0,Sr=class{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},uo=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!nt||!Jt||nt===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==nt)s=this.activeLink=new Sr(nt,this),nt.deps?(s.prevDep=nt.depsTail,nt.depsTail.nextDep=s,nt.depsTail=s):nt.deps=nt.depsTail=s,Sl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){let i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=nt.depsTail,s.nextDep=void 0,nt.depsTail.nextDep=s,nt.depsTail=s,nt.deps===s&&(nt.deps=i)}return s}trigger(t){this.version++,lo++,this.notify(t)}notify(t){Or();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Ir()}}};function Sl(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Sl(i)}let s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}var Nr=new WeakMap,xn=Symbol(""),Rr=Symbol(""),co=Symbol("");function Et(e,t,s){if(Jt&&nt){let i=Nr.get(e);i||Nr.set(e,i=new Map);let o=i.get(s);o||(i.set(s,o=new uo),o.map=i,o.key=s),o.track()}}function rn(e,t,s,i,o,r){let d=Nr.get(e);if(!d){lo++;return}let p=u=>{u&&u.trigger()};if(Or(),t==="clear")d.forEach(p);else{let u=Ne(e),y=u&&oi(s);if(u&&s==="length"){let m=Number(i);d.forEach((b,h)=>{(h==="length"||h===co||!_t(h)&&h>=m)&&p(b)})}else switch((s!==void 0||d.has(void 0))&&p(d.get(s)),y&&p(d.get(co)),t){case"add":u?y&&p(d.get("length")):(p(d.get(xn)),yn(e)&&p(d.get(Rr)));break;case"delete":u||(p(d.get(xn)),yn(e)&&p(d.get(Rr)));break;case"set":yn(e)&&p(d.get(xn));break}}Ir()}function Os(e){let t=We(e);return t===e||(Et(t,"iterate",co),Ot(e))?t:Ht(e)?ln(e)?t.map(s=>wn($t(s))):t.map(wn):t.map($t)}function po(e){return Et(e=We(e),"iterate",co),e}function on(e,t){return Ht(e)?wn(ln(e)?$t(t):t):$t(t)}var wf={__proto__:null,[Symbol.iterator](){return kr(this,Symbol.iterator,e=>on(this,e))},concat(...e){return Os(this).concat(...e.map(t=>Ne(t)?Os(t):t))},entries(){return kr(this,"entries",e=>(e[1]=on(this,e[1]),e))},every(e,t){return bn(this,"every",e,t,void 0,arguments)},filter(e,t){return bn(this,"filter",e,t,s=>s.map(i=>on(this,i)),arguments)},find(e,t){return bn(this,"find",e,t,s=>on(this,s),arguments)},findIndex(e,t){return bn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return bn(this,"findLast",e,t,s=>on(this,s),arguments)},findLastIndex(e,t){return bn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return bn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Cr(this,"includes",e)},indexOf(...e){return Cr(this,"indexOf",e)},join(e){return Os(this).join(e)},lastIndexOf(...e){return Cr(this,"lastIndexOf",e)},map(e,t){return bn(this,"map",e,t,void 0,arguments)},pop(){return oo(this,"pop")},push(...e){return oo(this,"push",e)},reduce(e,...t){return gl(this,"reduce",e,t)},reduceRight(e,...t){return gl(this,"reduceRight",e,t)},shift(){return oo(this,"shift")},some(e,t){return bn(this,"some",e,t,void 0,arguments)},splice(...e){return oo(this,"splice",e)},toReversed(){return Os(this).toReversed()},toSorted(e){return Os(this).toSorted(e)},toSpliced(...e){return Os(this).toSpliced(...e)},unshift(...e){return oo(this,"unshift",e)},values(){return kr(this,"values",e=>on(this,e))}};function kr(e,t,s){let i=po(e),o=i[t],r=o.call(i);if(i!==e&&!Ot(e)){if(r[Symbol.toStringTag]==="Array Iterator"){let d=Object.create(Object.getPrototypeOf(r));return d.next=()=>ml(r.next(),s),o!==Nl[t]&&Object.defineProperties(d,{return:{get(){let p=r.return;return typeof p=="function"?p.bind(r):p}},throw:{get(){let p=r.throw;return typeof p=="function"?p.bind(r):p}}}),d}r._next=r.next,r.next=()=>ml(r._next(),s)}return r}function ml(e,t){return e.done||(e.value=t(e.value)),e}var Nl=Array.prototype;function bn(e,t,s,i,o,r){let d=po(e),p=d!==e&&!Ot(e),u=d[t];if(u!==Nl[t]){let b=u.apply(e,r);return p?$t(b):b}let y=s;d!==e&&(p?y=function(b,h){return s.call(this,on(e,b),h,e)}:s.length>2&&(y=function(b,h){return s.call(this,b,h,e)}));let m=u.call(d,y,i);return p&&o?o(m):m}function gl(e,t,s,i){let o=po(e),r=o!==e&&!Ot(e),d=s,p=!1;o!==e&&(r?(p=i.length===0,d=function(y,m,b){return p&&(p=!1,y=on(e,y)),s.call(this,y,on(e,m),b,e)}):s.length>3&&(d=function(y,m,b){return s.call(this,y,m,b,e)}));let u=o[t](d,...i);return p?on(e,u):u}function Cr(e,t,s){let i=We(e);Et(i,"iterate",co);let o=i[t](...s);return(o===-1||o===!1)&&ho(s[0])?(s[0]=We(s[0]),i[t](...s)):o}function oo(e,t,s=[]){Qt(),Or();let i=We(e)[t].apply(e,s);return Ir(),Zt(),i}var kf=Ns("__proto__,__v_isRef,__isVue"),Rl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_t));function Cf(e){_t(e)||(e=String(e));let t=We(this);return Et(t,"has",e),t.hasOwnProperty(e)}var pi=class{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,i){if(s==="__v_skip")return t.__v_skip;let o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(o?r?Of:Dl:r?Al:Pl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;let d=Ne(t);if(!o){let u;if(d&&(u=wf[s]))return u;if(s==="hasOwnProperty")return Cf}let p=Reflect.get(t,s,wt(t)?t:i);if((_t(s)?Rl.has(s):kf(s))||(o||Et(t,"get",s),r))return p;if(wt(p)){let u=d&&oi(s)?p:p.value;return o&&Ye(u)?hi(u):u}return Ye(p)?o?hi(p):st(p):p}},fi=class extends pi{constructor(t=!1){super(!1,t)}set(t,s,i,o){let r=t[s],d=Ne(t)&&oi(s);if(!this._isShallow){let y=Ht(r);if(!Ot(i)&&!Ht(i)&&(r=We(r),i=We(i)),!d&&wt(r)&&!wt(i))return y||(r.value=i),!0}let p=d?Number(s)e,di=e=>Reflect.getPrototypeOf(e);function Rf(e,t,s){return function(...i){let o=this.__v_raw,r=We(o),d=yn(r),p=e==="entries"||e===Symbol.iterator&&d,u=e==="keys"&&d,y=o[e](...i),m=s?Ar:t?wn:$t;return!t&&Et(r,"iterate",u?Rr:xn),ct(Object.create(y),{next(){let{value:b,done:h}=y.next();return h?{value:b,done:h}:{value:p?[m(b[0]),m(b[1])]:m(b),done:h}}})}}function ui(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Pf(e,t){let s={get(o){let r=this.__v_raw,d=We(r),p=We(o);e||(zt(o,p)&&Et(d,"get",o),Et(d,"get",p));let{has:u}=di(d),y=t?Ar:e?wn:$t;if(u.call(d,o))return y(r.get(o));if(u.call(d,p))return y(r.get(p));r!==d&&r.get(o)},get size(){let o=this.__v_raw;return!e&&Et(We(o),"iterate",xn),o.size},has(o){let r=this.__v_raw,d=We(r),p=We(o);return e||(zt(o,p)&&Et(d,"has",o),Et(d,"has",p)),o===p?r.has(o):r.has(o)||r.has(p)},forEach(o,r){let d=this,p=d.__v_raw,u=We(p),y=t?Ar:e?wn:$t;return!e&&Et(u,"iterate",xn),p.forEach((m,b)=>o.call(r,y(m),y(b),d))}};return ct(s,e?{add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear")}:{add(o){let r=We(this),d=di(r),p=We(o),u=!t&&!Ot(o)&&!Ht(o)?p:o;return d.has.call(r,u)||zt(o,u)&&d.has.call(r,o)||zt(p,u)&&d.has.call(r,p)||(r.add(u),rn(r,"add",u,u)),this},set(o,r){!t&&!Ot(r)&&!Ht(r)&&(r=We(r));let d=We(this),{has:p,get:u}=di(d),y=p.call(d,o);y||(o=We(o),y=p.call(d,o));let m=u.call(d,o);return d.set(o,r),y?zt(r,m)&&rn(d,"set",o,r,m):rn(d,"add",o,r),this},delete(o){let r=We(this),{has:d,get:p}=di(r),u=d.call(r,o);u||(o=We(o),u=d.call(r,o));let y=p?p.call(r,o):void 0,m=r.delete(o);return u&&rn(r,"delete",o,void 0,y),m},clear(){let o=We(this),r=o.size!==0,d=void 0,p=o.clear();return r&&rn(o,"clear",void 0,void 0,d),p}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Rf(o,e,t)}),s}function Vr(e,t){let s=Pf(e,t);return(i,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?i:Reflect.get(je(s,o)&&o in i?s:i,o,r)}var Af={get:Vr(!1,!1)},Df={get:Vr(!1,!0)},Tf={get:Vr(!0,!1)};var Pl=new WeakMap,Al=new WeakMap,Dl=new WeakMap,Of=new WeakMap;function If(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function st(e){return Ht(e)?e:qr(e,!1,Ef,Af,Pl)}function fo(e){return qr(e,!1,Nf,Df,Al)}function hi(e){return qr(e,!0,Sf,Tf,Dl)}function qr(e,t,s,i,o){if(!Ye(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let r=o.get(e);if(r)return r;let d=If(br(e));if(d===0)return e;let p=new Proxy(e,d===2?i:s);return o.set(e,p),p}function ln(e){return Ht(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function Ht(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function ho(e){return e?!!e.__v_raw:!1}function We(e){let t=e&&e.__v_raw;return t?We(t):e}function dn(e){return!je(e,"__v_skip")&&Object.isExtensible(e)&&ri(e,"__v_skip",!0),e}var $t=e=>Ye(e)?st(e):e,wn=e=>Ye(e)?hi(e):e;function wt(e){return e?e.__v_isRef===!0:!1}function St(e){return Tl(e,!1)}function gi(e){return Tl(e,!0)}function Tl(e,t){return wt(e)?e:new Dr(e,t)}var Dr=class{constructor(t,s){this.dep=new uo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:We(t),this._value=s?t:$t(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){let s=this._rawValue,i=this.__v_isShallow||Ot(t)||Ht(t);t=i?t:We(t),zt(t,s)&&(this._rawValue=t,this._value=i?t:$t(t),this.dep.trigger())}};function kn(e){return wt(e)?e.value:e}var Mf={get:(e,t,s)=>t==="__v_raw"?e:kn(Reflect.get(e,t,s)),set:(e,t,s,i)=>{let o=e[t];return wt(o)&&!wt(s)?(o.value=s,!0):Reflect.set(e,t,s,i)}};function vi(e){return ln(e)?e:new Proxy(e,Mf)}var Tr=class{constructor(t,s,i){this.fn=t,this.setter=s,this._value=void 0,this.dep=new uo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=lo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&nt!==this)return bl(this,!0),!0}get value(){let t=this.dep.track();return Cl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function Ol(e,t,s=!1){let i,o;return Te(e)?i=e:(i=e.get,o=e.set),new Tr(i,o,s)}var ci={},mi=new WeakMap,Zn;function Il(e,t=!1,s=Zn){if(s){let i=mi.get(s);i||mi.set(s,i=[]),i.push(e)}}function Ml(e,t,s=Ze){let{immediate:i,deep:o,once:r,scheduler:d,augmentJob:p,call:u}=s,y=_=>{(s.onWarn||yf)("Invalid watch source: ",_,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},m=_=>o?_:Ot(_)||o===!1||o===0?an(_,1):an(_),b,h,w,R,S=!1,N=!1;if(wt(e)?(h=()=>e.value,S=Ot(e)):ln(e)?(h=()=>m(e),S=!0):Ne(e)?(N=!0,S=e.some(_=>ln(_)||Ot(_)),h=()=>e.map(_=>{if(wt(_))return _.value;if(ln(_))return m(_);if(Te(_))return u?u(_,2):_()})):Te(e)?t?h=u?()=>u(e,2):e:h=()=>{if(w){Qt();try{w()}finally{Zt()}}let _=Zn;Zn=b;try{return u?u(e,3,[R]):e(R)}finally{Zn=_}}:h=Tt,t&&o){let _=h,G=o===!0?1/0:o;h=()=>an(_(),G)}let v=vl(),E=()=>{b.stop(),v&&v.active&&eo(v.effects,b)};if(r&&t){let _=t;t=(...G)=>{try{return _(...G)}finally{E()}}}let M=N?new Array(e.length).fill(ci):ci,V=_=>{if(!(!(b.flags&1)||!b.dirty&&!_))if(t){let G=b.run();if(_||o||S||(N?G.some((te,X)=>zt(te,M[X])):zt(G,M))){let te=Zn;Qt();try{w&&w(),Zn=b;let X=[G,M===ci?void 0:N&&M[0]===ci?[]:M,R];M=G,u?u(t,3,X):t(...X)}finally{Zn=te,Zt()}}}else b.run()};return p&&p(V),b=new Is(h),b.scheduler=d?()=>d(V,!1):V,R=_=>Il(_,!1,b),w=b.onStop=()=>{let _=mi.get(b);if(_){if(u)u(_,4);else for(let G of _)G();mi.delete(b)}},t?i?V(!0):M=b.run():d?d(V.bind(null,!0),!0):b.run(),E.pause=b.pause.bind(b),E.resume=b.resume.bind(b),E.stop=E,E}function an(e,t=1/0,s){if(t<=0||!Ye(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,wt(e))an(e.value,t,s);else if(Ne(e))for(let i=0;i{an(i,t,s)});else if(si(e)){for(let i in e)an(e[i],t,s);for(let i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&an(e[i],t,s)}return e}function Ro(e,t,s,i){try{return i?e(...i):e()}catch(o){Po(o,t,s)}}function jt(e,t,s,i){if(Te(e)){let o=Ro(e,t,s,i);return o&&yr(o)&&o.catch(r=>{Po(r,t,s)}),o}if(Ne(e)){let o=[];for(let r=0;r>>1,o=At[i],r=ko(o);r=ko(s)?At.push(e):At.splice(Lf(t),0,e),e.flags|=1,Jl()}}function Jl(){wi||(wi=Xl.then(ed))}function Ql(e){if(!Ne(e))Mn&&e.id===-1?Mn.splice(Ms+1,0,e):e.flags&1||(cn.push(e),e.flags|=1);else for(let t=0;t=t))continue;At.splice(i,1),i=e?i-1:xt,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function xl(e,t,s=0){if(cn.length){let i=cn,o=0;if(t){i=[];for(let d=0;dko(d)-ko(p));if(cn.length=o,Mn){for(let d=0;de.id==null?e.flags&2?-1:1/0:e.id;function ed(e){let t=Tt;try{for(xt=0;xt{i._d&&Si(-1);let r=ki(t),d=ss.length,p;try{p=e(...o)}finally{for(let u=ss.length;u>d;u--)Td();ki(r),i._d&&Si(1)}return p};return i._n=!0,i._c=!0,i._d=!0,i}function D(e,t){if(Lt===null)return e;let s=Ii(Lt),i=e.dirs||(e.dirs=[]);for(let o=0;o1)return s&&Te(t)?t.call(i&&i.proxy):t}}var Bf=Symbol.for("v-scx"),zf=()=>{{let e=Mt(Bf);return e}};function dt(e,t,s){return nd(e,t,s)}function nd(e,t,s=Ze){let{immediate:i,deep:o,flush:r,once:d}=s,p=ct({},s),u=t&&i||!t&&r!=="post",y;if(_s){if(r==="sync"){let w=zf();y=w.__watcherHandles||(w.__watcherHandles=[])}else if(!u){let w=()=>{};return w.stop=Tt,w.resume=Tt,w.pause=Tt,w}}let m=Nt;p.call=(w,R,S)=>jt(w,m,R,S);let b=!1;r==="post"?p.scheduler=w=>{w.i=m,It(w,m&&m.suspense)}:r!=="sync"&&(b=!0,p.scheduler=(w,R)=>{R?w():Kr(w)}),p.augmentJob=w=>{t&&(w.flags|=4),b&&(w.flags|=2,m&&(w.id=m.uid,w.i=m))};let h=Ml(e,t,p);return _s&&(y?y.push(h):u&&h()),h}function Hf(e,t,s){let i=this.proxy,o=it(e)?e.includes(".")?sd(i,e):()=>i[e]:e.bind(i,i),r;Te(t)?r=t:(r=t.handler,s=t);let d=To(this),p=nd(o,r.bind(i),s);return d(),p}function sd(e,t){let s=t.split(".");return()=>{let i=e;for(let o=0;oe.__isTeleport;var $r=Symbol("_leaveCb");function Gf(e){let t=e[0];if(e.length>1){let s=!1;for(let i of e)if(i.type!==en){t=i,s=!0;break}}return t}function od(e){if(!Ai(e))return Pi(e.type)&&e.children?Gf(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&Te(s.default))return s.default()}}function Co(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let s=e.component.subTree;Co(Pi(s.type)&&od(s)||s,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===q&&Ne(e.children)){let s=gd(e.children,!1);s&&Co(s,t)}}function Br(e){if(e.component)return Br(e.component.subTree);if(e.type===q){let t=Ne(e.children)&&gd(e.children,!1);return t?Br(t):void 0}if(e.type!==en)return e}function Ao(e,t){return Te(e)?ct({name:e.name},t,{setup:e}):e}function Yr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Vl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}var Ci=new WeakMap;function vo(e,t,s,i,o=!1){if(Ne(e)){e.forEach((S,N)=>vo(S,t&&(Ne(t)?t[N]:t),s,i,o));return}if(yo(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&vo(e,t,s,i.component.subTree);return}let r=i.shapeFlag&4?Ii(i.component):i.el,d=o?null:r,{i:p,r:u}=e,y=t&&t.r,m=p.refs===Ze?p.refs={}:p.refs,b=p.setupState,h=We(b),w=b===Ze?vr:S=>Vl(m,S)?!1:je(h,S),R=(S,N)=>!(N&&Vl(m,N));if(y!=null&&y!==u){if(ql(t),it(y))m[y]=null,w(y)&&(b[y]=null);else if(wt(y)){let S=t;R(y,S.k)&&(y.value=null),S.k&&(m[S.k]=null)}}if(Te(u))Ro(u,p,12,[d,m]);else{let S=it(u),N=wt(u);if(S||N){let v=()=>{if(e.f){let E=S?w(u)?b[u]:m[u]:R(u)||!e.k?u.value:m[e.k];if(o)Ne(E)&&eo(E,r);else if(Ne(E))E.includes(r)||E.push(r);else if(S)m[u]=[r],w(u)&&(b[u]=m[u]);else{let M=[r];R(u,e.k)&&(u.value=M),e.k&&(m[e.k]=M)}}else S?(m[u]=d,w(u)&&(b[u]=d)):N&&(R(u,e.k)&&(u.value=d),e.k&&(m[e.k]=d))};if(d){let E=()=>{v(),Ci.delete(e)};E.id=-1,Ci.set(e,E),It(E,s)}else ql(e),v()}}}function ql(e){let t=Ci.get(e);t&&(t.flags|=8,Ci.delete(e))}var _l=e=>e.nodeType===8;var NQ=so().requestIdleCallback||(e=>setTimeout(e,1)),RQ=so().cancelIdleCallback||(e=>clearTimeout(e));function Wf(e,t){if(_l(e)&&e.data==="["){let s=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(_l(i))if(i.data==="]"){if(--s===0)break}else i.data==="["&&s++;i=i.nextSibling}}else t(e)}var yo=e=>!!e.type.__asyncLoader;function id(e){Te(e)&&(e={loader:e});let{loader:t,loadingComponent:s,errorComponent:i,delay:o=200,hydrate:r,timeout:d,suspensible:p=!0,onError:u}=e,y=null,m,b=0,h=()=>(b++,y=null,w()),w=()=>{let R;return y||(R=y=t().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),u)return new Promise((N,v)=>{u(S,()=>N(h()),()=>v(S),b+1)});throw S}).then(S=>R!==y&&y?y:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),m=S,S)))};return Ao({name:"AsyncComponentWrapper",__asyncLoader:w,__asyncHydrate(R,S,N){let v=R.isConnected,E=!1;(S.bu||(S.bu=[])).push(()=>E=!0);let M=()=>{E||!R.parentNode||v&&!R.isConnected||N()},V=r?()=>{let _=r(M,G=>Wf(R,G));_&&(S.bum||(S.bum=[])).push(_)}:M;m?V():w().then(()=>!S.isUnmounted&&V())},get __asyncResolved(){return m},setup(){let R=Nt;if(Yr(R),m)return()=>yi(m,R);let S=_=>{y=null,Po(_,R,13,!i)};if(p&&R.suspense||_s)return w().then(_=>()=>yi(_,R)).catch(_=>(S(_),()=>i?Oe(i,{error:_}):null));let N=St(!1),v=St(),E=St(!!o),M,V;return Do(()=>{M!=null&&clearTimeout(M),V!=null&&clearTimeout(V)}),o&&(V=setTimeout(()=>{R.isUnmounted||(E.value=!1)},o)),d!=null&&(M=setTimeout(()=>{if(!R.isUnmounted&&!N.value&&!v.value){let _=new Error(`Async component timed out after ${d}ms.`);S(_),v.value=_}},d)),w().then(()=>{R.isUnmounted||(N.value=!0,R.parent&&Ai(R.parent.vnode)&&R.parent.update())}).catch(_=>{if(R.isUnmounted){y=null;return}S(_),v.value=_}),()=>{if(N.value&&m)return yi(m,R);if(v.value&&i)return Oe(i,{error:v.value});if(s&&!E.value)return yi(s,R)}}})}function yi(e,t){let{ref:s,props:i,children:o,ce:r}=t.vnode,d=Oe(e,i,o);return d.ref=s,d.ce=r,delete t.vnode.ce,d}var Ai=e=>e.type.__isKeepAlive;function rd(e,t){ld(e,"a",t)}function ad(e,t){ld(e,"da",t)}function ld(e,t,s=Nt){let i=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Di(t,i,s),s){let o=s.parent;for(;o&&o.parent;)Ai(o.parent.vnode)&&Kf(i,t,s,o),o=o.parent}}function Kf(e,t,s,i){let o=Di(t,e,i,!0);Do(()=>{eo(i[t],o)},s)}function Di(e,t,s=Nt,i=!1){if(s){let o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...d)=>{Qt();let p=To(s),u=jt(t,s,e,d);return p(),Zt(),u});return i?o.unshift(r):o.push(r),r}}var En=e=>(t,s=Nt)=>{(!_s||e==="sp")&&Di(e,(...i)=>t(...i),s)},Yf=En("bm"),fn=En("m"),dd=En("bu"),ud=En("u"),is=En("bum"),Do=En("um"),Xf=En("sp"),Jf=En("rtg"),Qf=En("rtc");function Zf(e,t=Nt){Di("ec",e,t)}var cd="components",xf="directives";function Xe(e,t){return pd(cd,e,!0,t)||e}var eh=Symbol.for("v-ndc");function Ae(e){return pd(xf,e)}function pd(e,t,s=!0,i=!1){let o=Lt||Nt;if(o){let r=o.type;if(e===cd){let p=$h(r,!1);if(p&&(p===t||p===ht(t)||p===Qn(ht(t))))return r}let d=$l(o[e]||r[e],t)||$l(o.appContext[e],t);return!d&&i?r:d}}function $l(e,t){return e&&(e[t]||e[ht(t)]||e[Qn(ht(t))])}function x(e,t,s,i){let o,r=s&&s[i],d=Ne(e);if(d||it(e)){let p=d&&ln(e),u=!1,y=!1;p&&(u=!Ot(e),y=Ht(e),e=po(e)),o=new Array(e.length);for(let m=0,b=e.length;mt(p,u,void 0,r&&r[u]));else{let p=Object.keys(e);o=new Array(p.length);for(let u=0,y=p.length;ue?Vd(e)?Ii(e):zr(e.parent):null;var bo=ct(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zr(e.parent),$root:e=>zr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xr(e),$forceUpdate:e=>e.f||(e.f=()=>{Kr(e.update)}),$nextTick:e=>e.n||(e.n=tt.bind(e.proxy)),$watch:e=>Hf.bind(e)});var Lr=(e,t)=>e!==Ze&&!e.__isScriptSetup&&je(e,t),th={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:s,setupState:i,data:o,props:r,accessCache:d,type:p,appContext:u}=e;if(t[0]!=="$"){let h=d[t];if(h!==void 0)switch(h){case 1:return i[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Lr(i,t))return d[t]=1,i[t];if(o!==Ze&&je(o,t))return d[t]=2,o[t];if(je(r,t))return d[t]=3,r[t];if(s!==Ze&&je(s,t))return d[t]=4,s[t];Hr&&(d[t]=0)}}let y=bo[t],m,b;if(y)return t==="$attrs"&&Et(e.attrs,"get",""),y(e);if((m=p.__cssModules)&&(m=m[t]))return m;if(s!==Ze&&je(s,t))return d[t]=4,s[t];if(b=u.config.globalProperties,je(b,t))return b[t]},set({_:e},t,s){let{data:i,setupState:o,ctx:r}=e;return Lr(o,t)?(o[t]=s,!0):i!==Ze&&je(i,t)?(i[t]=s,!0):je(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:i,appContext:o,props:r,type:d}},p){let u;return!!(s[p]||e!==Ze&&p[0]!=="$"&&je(e,p)||Lr(t,p)||je(r,p)||je(i,p)||je(bo,p)||je(o.config.globalProperties,p)||(u=d.__cssModules)&&u[p])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:je(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Ll(e){return Ne(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}var Hr=!0;function nh(e){let t=Xr(e),s=e.proxy,i=e.ctx;Hr=!1,t.beforeCreate&&Fl(t.beforeCreate,e,"bc");let{data:o,computed:r,methods:d,watch:p,provide:u,inject:y,created:m,beforeMount:b,mounted:h,beforeUpdate:w,updated:R,activated:S,deactivated:N,beforeDestroy:v,beforeUnmount:E,destroyed:M,unmounted:V,render:_,renderTracked:G,renderTriggered:te,errorCaptured:X,serverPrefetch:O,expose:U,inheritAttrs:C,components:L,directives:z,filters:K}=t;if(y&&sh(y,i,null),d)for(let Y in d){let he=d[Y];Te(he)&&(i[Y]=he.bind(s))}if(o){let Y=o.call(s,s);Ye(Y)&&(e.data=st(Y))}if(Hr=!0,r)for(let Y in r){let he=r[Y],Se=Te(he)?he.bind(s,s):Te(he.get)?he.get.bind(s,s):Tt,Ue=!Te(he)&&Te(he.set)?he.set.bind(s):Tt,Be=Rt({get:Se,set:Ue});Object.defineProperty(i,Y,{enumerable:!0,configurable:!0,get:()=>Be.value,set:Qe=>Be.value=Qe})}if(p)for(let Y in p)fd(p[Y],i,s,Y);if(u){let Y=Te(u)?u.call(s):u;Reflect.ownKeys(Y).forEach(he=>{os(he,Y[he])})}m&&Fl(m,e,"c");function se(Y,he){Ne(he)?he.forEach(Se=>Y(Se.bind(s))):he&&Y(he.bind(s))}if(se(Yf,b),se(fn,h),se(dd,w),se(ud,R),se(rd,S),se(ad,N),se(Zf,X),se(Qf,G),se(Jf,te),se(is,E),se(Do,V),se(Xf,O),Ne(U))if(U.length){let Y=e.exposed||(e.exposed={});U.forEach(he=>{Object.defineProperty(Y,he,{get:()=>s[he],set:Se=>s[he]=Se,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Tt&&(e.render=_),C!=null&&(e.inheritAttrs=C),L&&(e.components=L),z&&(e.directives=z),O&&Yr(e)}function sh(e,t,s=Tt){Ne(e)&&(e=jr(e));for(let i in e){let o=e[i],r;Ye(o)?"default"in o?r=Mt(o.from||i,o.default,!0):r=Mt(o.from||i):r=Mt(o),wt(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:d=>r.value=d}):t[i]=r}}function Fl(e,t,s){jt(Ne(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,s)}function fd(e,t,s,i){let o=i.includes(".")?sd(s,i):()=>s[i];if(it(e)){let r=t[e];Te(r)&&dt(o,r)}else if(Te(e))dt(o,e.bind(s));else if(Ye(e))if(Ne(e))e.forEach(r=>fd(r,t,s,i));else{let r=Te(e.handler)?e.handler.bind(s):t[e.handler];Te(r)&&dt(o,r,e)}}function Xr(e){let t=e.type,{mixins:s,extends:i}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:d}}=e.appContext,p=r.get(t),u;return p?u=p:!o.length&&!s&&!i?u=t:(u={},o.length&&o.forEach(y=>Ei(u,y,d,!0)),Ei(u,t,d)),Ye(t)&&r.set(t,u),u}function Ei(e,t,s,i=!1){let{mixins:o,extends:r}=t;r&&Ei(e,r,s,!0),o&&o.forEach(d=>Ei(e,d,s,!0));for(let d in t)if(!(i&&d==="expose")){let p=oh[d]||s&&s[d];e[d]=p?p(e[d],t[d]):t[d]}return e}var oh={data:Ul,props:Bl,emits:Bl,methods:go,computed:go,beforeCreate:Pt,created:Pt,beforeMount:Pt,mounted:Pt,beforeUpdate:Pt,updated:Pt,beforeDestroy:Pt,beforeUnmount:Pt,destroyed:Pt,unmounted:Pt,activated:Pt,deactivated:Pt,errorCaptured:Pt,serverPrefetch:Pt,components:go,directives:go,watch:rh,provide:Ul,inject:ih};function Ul(e,t){return t?e?function(){return ct(Te(e)?e.call(this,this):e,Te(t)?t.call(this,this):t)}:t:e}function ih(e,t){return go(jr(e),jr(t))}function jr(e){if(Ne(e)){let t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${sn(t)}Modifiers`];function uh(e,t,...s){if(e.isUnmounted)return;let i=e.vnode.props||Ze,o=s,r=t.startsWith("update:"),d=r&&dh(i,t.slice(7));d&&(d.trim&&(o=s.map(m=>it(m)?m.trim():m)),d.number&&(o=o.map(Ts)));let p,u=i[p=no(t)]||i[p=no(ht(t))];!u&&r&&(u=i[p=no(sn(t))]),u&&jt(u,e,6,o);let y=i[p+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[p])return;e.emitted[p]=!0,jt(y,e,6,o)}}var ch=new WeakMap;function md(e,t,s=!1){let i=s?ch:t.emitsCache,o=i.get(e);if(o!==void 0)return o;let r=e.emits,d={},p=!1;if(!Te(e)){let u=y=>{let m=md(y,t,!0);m&&(p=!0,ct(d,m))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!p?(Ye(e)&&i.set(e,null),null):(Ne(r)?r.forEach(u=>d[u]=null):ct(d,r),Ye(e)&&i.set(e,d),d)}function Ti(e,t){return!e||!Rs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),je(e,t[0].toLowerCase()+t.slice(1))||je(e,sn(t))||je(e,t))}function Fr(e){let{type:t,vnode:s,proxy:i,withProxy:o,propsOptions:[r],slots:d,attrs:p,emit:u,render:y,renderCache:m,props:b,data:h,setupState:w,ctx:R,inheritAttrs:S}=e,N=ki(e),v,E;try{if(s.shapeFlag&4){let _=o||i,G=_;v=pn(y.call(G,_,m,b,w,h,R)),E=p}else{let _=t;v=pn(_.length>1?_(b,{attrs:p,slots:d,emit:u}):_(b,null)),E=t.props?p:ph(p)}}catch(_){ss.length=0,Po(_,e,1),v=Oe(en)}let M=v,V;if(E&&S!==!1){let _=Object.keys(E),{shapeFlag:G}=M;_.length&&G&7&&(r&&_.some(Ps)&&(E=fh(E,r)),M=qs(M,E,!1,!0))}if(s.dirs&&(M=qs(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(s.dirs):s.dirs),s.transition){let _=Pi(M.type)&&od(M)||M;Co(_,s.transition)}return v=M,ki(N),v}function gd(e,t=!0){let s;for(let i=0;i{let t;for(let s in e)(s==="class"||s==="style"||Rs(s))&&((t||(t={}))[s]=e[s]);return t},fh=(e,t)=>{let s={};for(let i in e)(!Ps(i)||!(i.slice(9)in t))&&(s[i]=e[i]);return s};function hh(e,t,s){let{props:i,children:o,component:r}=e,{props:d,children:p,patchFlag:u}=t,y=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return i?zl(i,d,y):!!d;if(u&8){let m=t.dynamicProps;for(let b=0;bObject.create(yd),wd=e=>Object.getPrototypeOf(e)===yd;function gh(e,t,s,i=!1){let o={},r=bd();e.propsDefaults=Object.create(null),kd(e,t,o,r);for(let d in e.propsOptions[0])d in o||(o[d]=void 0);s?e.props=i?o:fo(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function vh(e,t,s,i){let{props:o,attrs:r,vnode:{patchFlag:d}}=e,p=We(o),[u]=e.propsOptions,y=!1;if((i||d>0)&&!(d&16)){if(d&8){let m=e.vnode.dynamicProps;for(let b=0;b{u=!0;let[h,w]=Cd(b,t,!0);ct(d,h),w&&p.push(...w)};!s&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!r&&!u)return Ye(e)&&i.set(e,In),In;if(Ne(r))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",Qr=e=>Ne(e)?e.map(pn):[pn(e)],bh=(e,t,s)=>{if(t._n)return t;let i=Uf((...o)=>Qr(t(...o)),s);return i._c=!1,i},Ed=(e,t,s)=>{let i=e._ctx;for(let o in e){if(Jr(o))continue;let r=e[o];if(Te(r))t[o]=bh(o,r,i);else if(r!=null){let d=Qr(r);t[o]=()=>d}}},Sd=(e,t)=>{let s=Qr(t);e.slots.default=()=>s},Nd=(e,t,s)=>{for(let i in t)(s||!Jr(i))&&(e[i]=t[i])},wh=(e,t,s)=>{let i=e.slots=bd();if(e.vnode.shapeFlag&32){let o=t._;o?(Nd(i,t,s),s&&ri(i,"_",o,!0)):Ed(t,i)}else t&&Sd(e,t)},kh=(e,t,s)=>{let{vnode:i,slots:o}=e,r=!0,d=Ze;if(i.shapeFlag&32){let p=t._;p?s&&p===1?r=!1:Nd(o,t,s):(r=!t.$stable,Ed(t,o)),d=t}else t&&(Sd(e,t),d={default:1});if(r)for(let p in o)!Jr(p)&&d[p]==null&&delete o[p]};function Ch(){let e=[]}var It=Rh;function Rd(e){return Eh(e)}function Eh(e,t){Ch();let s=so();s.__VUE__=!0;let{insert:i,remove:o,patchProp:r,createElement:d,createText:p,createComment:u,setText:y,setElementText:m,parentNode:b,nextSibling:h,setScopeId:w=Tt,insertStaticContent:R}=e,S=(A,T,F,J=null,H=null,Z=null,le=void 0,ne=null,oe=!!T.dynamicChildren)=>{if(A===T)return;A&&!mo(A,T)&&(J=fe(A),He(A,H,Z,!0),A=null),T.patchFlag===-2&&(oe=!1,T.dynamicChildren=null),T.dynamicChildren&&A&&A.dynamicChildren&&A.dynamicChildren.hasOnce&&(T.dynamicChildren===In&&(T.dynamicChildren=[]),T.dynamicChildren.hasOnce=!0);let{type:ee,ref:ke,shapeFlag:pe}=T;switch(ee){case Oi:N(A,T,F,J);break;case en:v(A,T,F,J);break;case wo:A==null&&E(T,F,J,le);break;case q:z(A,T,F,J,H,Z,le,ne,oe);break;default:pe&1?G(A,T,F,J,H,Z,le,ne,oe):pe&6?K(A,T,F,J,H,Z,le,ne,oe):(pe&64||pe&128)&&ee.process(A,T,F,J,H,Z,le,ne,oe,ce)}ke!=null&&H?vo(ke,A&&A.ref,Z,T||A,!T):ke==null&&A&&A.ref!=null&&vo(A.ref,null,Z,A,!0)},N=(A,T,F,J)=>{if(A==null)i(T.el=p(T.children),F,J);else{let H=T.el=A.el;T.children!==A.children&&y(H,T.children)}},v=(A,T,F,J)=>{A==null?i(T.el=u(T.children||""),F,J):T.el=A.el},E=(A,T,F,J)=>{[A.el,A.anchor]=R(A.children,T,F,J,A.el,A.anchor)},M=(A,T,F,J)=>{if(T.children!==A.children){let H=h(A.anchor);_(A),[T.el,T.anchor]=R(T.children,F,H,J)}else T.el=A.el,T.anchor=A.anchor},V=({el:A,anchor:T},F,J)=>{let H;for(;A&&A!==T;)H=h(A),i(A,F,J),A=H;i(T,F,J)},_=({el:A,anchor:T})=>{let F;for(;A&&A!==T;)F=h(A),o(A),A=F;o(T)},G=(A,T,F,J,H,Z,le,ne,oe)=>{if(T.type==="svg"?le="svg":T.type==="math"&&(le="mathml"),A==null)te(T,F,J,H,Z,le,ne,oe);else{let ee=A.el&&A.el._isVueCE?A.el:null;try{ee&&ee._beginPatch(),U(A,T,H,Z,le,ne,oe)}finally{ee&&ee._endPatch()}}},te=(A,T,F,J,H,Z,le,ne)=>{let oe,ee,{props:ke,shapeFlag:pe,transition:Ce,dirs:Pe}=A;if(oe=A.el=d(A.type,Z,ke&&ke.is,ke),pe&8?m(oe,A.children):pe&16&&O(A.children,oe,null,J,H,Ur(A,Z),le,ne),Pe&&ts(A,null,J,"created"),X(oe,A,A.scopeId,le,J),ke){for(let Ge in ke)Ge!=="value"&&!As(Ge)&&r(oe,Ge,null,ke[Ge],Z,J);"value"in ke&&r(oe,"value",null,ke.value,Z),(ee=ke.onVnodeBeforeMount)&&un(ee,J,A)}Pe&&ts(A,null,J,"beforeMount");let Ve=Sh(H,Ce);Ve&&Ce.beforeEnter(oe),i(oe,T,F),((ee=ke&&ke.onVnodeMounted)||Ve||Pe)&&It(()=>{let ze;ee&&un(ee,J,A),Ve&&Ce.enter(oe),Pe&&ts(A,null,J,"mounted")},H)},X=(A,T,F,J,H)=>{if(F&&w(A,F),J)for(let Z=0;Z{for(let ee=oe;ee{let ne=T.el=A.el,{patchFlag:oe,dynamicChildren:ee,dirs:ke}=T;oe|=A.patchFlag&16;let pe=A.props||Ze,Ce=T.props||Ze,Pe;if(F&&ns(F,!1),(Pe=Ce.onVnodeBeforeUpdate)&&un(Pe,F,T,A),ke&&ts(T,A,F,"beforeUpdate"),F&&ns(F,!0),ee&&(!A.dynamicChildren||A.dynamicChildren.length!==ee.length)&&(oe=0,le=!1,ee=null),(pe.innerHTML&&Ce.innerHTML==null||pe.textContent&&Ce.textContent==null)&&m(ne,""),ee?C(A.dynamicChildren,ee,ne,F,J,Ur(T,H),Z):le||Se(A,T,ne,null,F,J,Ur(T,H),Z,!1),oe>0){if(oe&16)L(ne,pe,Ce,F,H);else if(oe&2&&pe.class!==Ce.class&&r(ne,"class",null,Ce.class,H),oe&4&&r(ne,"style",pe.style,Ce.style,H),oe&8){let Ve=T.dynamicProps;for(let Ge=0;Ge{Pe&&un(Pe,F,T,A),ke&&ts(T,A,F,"updated")},J)},C=(A,T,F,J,H,Z,le)=>{for(let ne=0;ne{if(T!==F){if(T!==Ze)for(let Z in T)!As(Z)&&!(Z in F)&&r(A,Z,T[Z],null,H,J);for(let Z in F){if(As(Z))continue;let le=F[Z],ne=T[Z];le!==ne&&Z!=="value"&&r(A,Z,ne,le,H,J)}"value"in F&&r(A,"value",T.value,F.value,H)}},z=(A,T,F,J,H,Z,le,ne,oe)=>{let ee=T.el=A?A.el:p(""),ke=T.anchor=A?A.anchor:p(""),{patchFlag:pe,dynamicChildren:Ce,slotScopeIds:Pe}=T;Pe&&(ne=ne?ne.concat(Pe):Pe),A==null?(i(ee,F,J),i(ke,F,J),O(T.children||[],F,ke,H,Z,le,ne,oe)):pe>0&&pe&64&&Ce&&A.dynamicChildren&&A.dynamicChildren.length===Ce.length?(C(A.dynamicChildren,Ce,F,H,Z,le,ne),(T.key!=null||H&&T===H.subTree)&&Pd(A,T,!0)):Se(A,T,F,ke,H,Z,le,ne,oe)},K=(A,T,F,J,H,Z,le,ne,oe)=>{T.slotScopeIds=ne,A==null?T.shapeFlag&512?H.ctx.activate(T,F,J,le,oe):ie(T,F,J,H,Z,le,oe):se(A,T,oe)},ie=(A,T,F,J,H,Z,le)=>{let ne=A.component=Ih(A,J,H);if(Ai(A)&&(ne.ctx.renderer=ce),Mh(ne,!1,le),ne.asyncDep){if(H&&H.registerDep(ne,Y,le,Z),!A.el){let oe=ne.subTree=Oe(en);v(null,oe,T,F),A.placeholder=oe.el}}else Y(ne,A,T,F,H,Z,le)},se=(A,T,F)=>{let J=T.component=A.component;if(hh(A,T,F))if(J.asyncDep&&!J.asyncResolved){T.el=A.el,T.placeholder=A.placeholder,he(J,T,F);return}else J.next=T,J.update();else T.el=A.el,T.placeholder=A.placeholder,J.vnode=T},Y=(A,T,F,J,H,Z,le)=>{let ne=()=>{if(A.isMounted){let{next:pe,bu:Ce,u:Pe,parent:Ve,vnode:Ge}=A;{let rt=Ad(A);if(rt){pe&&(pe.el=Ge.el,he(A,pe,le)),rt.asyncDep.then(()=>{It(()=>{A.isUnmounted||ee()},H)});return}}let ze=pe,we;ns(A,!1),pe?(pe.el=Ge.el,he(A,pe,le)):pe=Ge,Ce&&Ds(Ce),(we=pe.props&&pe.props.onVnodeBeforeUpdate)&&un(we,Ve,pe,Ge),ns(A,!0);let be=Fr(A),ot=A.subTree;A.subTree=be,S(ot,be,b(ot.el),fe(ot),A,H,Z),pe.el=be.el,ze===null&&mh(A,be.el),Pe&&It(Pe,H),(we=pe.props&&pe.props.onVnodeUpdated)&&It(()=>un(we,Ve,pe,Ge),H)}else{let pe,{el:Ce,props:Pe}=T,{bm:Ve,m:Ge,parent:ze,root:we,type:be}=A,ot=yo(T);if(ns(A,!1),Ve&&Ds(Ve),!ot&&(pe=Pe&&Pe.onVnodeBeforeMount)&&un(pe,ze,T),ns(A,!0),Ce&&Me){let rt=()=>{A.subTree=Fr(A),Me(Ce,A.subTree,A,H,null)};ot&&be.__asyncHydrate?be.__asyncHydrate(Ce,A,rt):rt()}else{we.ce&&we.ce._hasShadowRoot()&&we.ce._injectChildStyle(be,A.parent?A.parent.type:void 0);let rt=A.subTree=Fr(A);S(null,rt,F,J,A,H,Z),T.el=rt.el}if(Ge&&It(Ge,H),!ot&&(pe=Pe&&Pe.onVnodeMounted)){let rt=T;It(()=>un(pe,ze,rt),H)}(T.shapeFlag&256||ze&&yo(ze.vnode)&&ze.vnode.shapeFlag&256)&&A.a&&It(A.a,H),A.isMounted=!0,T=F=J=null}};A.scope.on();let oe=A.effect=new Is(ne);A.scope.off();let ee=A.update=oe.run.bind(oe),ke=A.job=oe.runIfDirty.bind(oe);ke.i=A,ke.id=A.uid,oe.scheduler=()=>Kr(ke),ns(A,!0),ee()},he=(A,T,F)=>{T.component=A;let J=A.vnode.props;A.vnode=T,A.next=null,vh(A,T.props,J,F),kh(A,T.children,F),Qt(),Zl(A),Zt()},Se=(A,T,F,J,H,Z,le,ne,oe=!1)=>{let ee=A&&A.children,ke=A?A.shapeFlag:0,pe=T.children,{patchFlag:Ce,shapeFlag:Pe}=T;if(Ce>0){if(Ce&128){Be(ee,pe,F,J,H,Z,le,ne,oe);return}else if(Ce&256){Ue(ee,pe,F,J,H,Z,le,ne,oe);return}}Pe&8?(ke&16&&W(ee,H,Z),pe!==ee&&m(F,pe)):ke&16?Pe&16?Be(ee,pe,F,J,H,Z,le,ne,oe):W(ee,H,Z,!0):(ke&8&&m(F,""),Pe&16&&O(pe,F,J,H,Z,le,ne,oe))},Ue=(A,T,F,J,H,Z,le,ne,oe)=>{A=A||In,T=T||In;let ee=A.length,ke=T.length,pe=Math.min(ee,ke),Ce;for(Ce=0;Ceke?W(A,H,Z,!0,!1,pe):O(T,F,J,H,Z,le,ne,oe,pe)},Be=(A,T,F,J,H,Z,le,ne,oe)=>{let ee=0,ke=T.length,pe=A.length-1,Ce=ke-1;for(;ee<=pe&&ee<=Ce;){let Pe=A[ee],Ve=T[ee]=oe?Cn(T[ee]):pn(T[ee]);if(mo(Pe,Ve))S(Pe,Ve,F,null,H,Z,le,ne,oe);else break;ee++}for(;ee<=pe&&ee<=Ce;){let Pe=A[pe],Ve=T[Ce]=oe?Cn(T[Ce]):pn(T[Ce]);if(mo(Pe,Ve))S(Pe,Ve,F,null,H,Z,le,ne,oe);else break;pe--,Ce--}if(ee>pe){if(ee<=Ce){let Pe=Ce+1,Ve=PeCe)for(;ee<=pe;)He(A[ee],H,Z,!0),ee++;else{let Pe=ee,Ve=ee,Ge=new Map;for(ee=Ve;ee<=Ce;ee++){let lt=T[ee]=oe?Cn(T[ee]):pn(T[ee]);lt.key!=null&&Ge.set(lt.key,ee)}let ze,we=0,be=Ce-Ve+1,ot=!1,rt=0,yt=new Array(be);for(ee=0;ee=be){He(lt,H,Z,!0);continue}let ft;if(lt.key!=null)ft=Ge.get(lt.key);else for(ze=Ve;ze<=Ce;ze++)if(yt[ze-Ve]===0&&mo(lt,T[ze])){ft=ze;break}ft===void 0?He(lt,H,Z,!0):(yt[ft-Ve]=ee+1,ft>=rt?rt=ft:ot=!0,S(lt,T[ft],F,null,H,Z,le,ne,oe),we++)}let at=ot?Nh(yt):In;for(ze=at.length-1,ee=be-1;ee>=0;ee--){let lt=Ve+ee,ft=T[lt],Vt=T[lt+1],Yn=lt+1{let{el:Z,type:le,transition:ne,children:oe,shapeFlag:ee}=A;if(ee&6){Qe(A.component.subTree,T,F,J);return}if(ee&128){A.suspense.move(T,F,J);return}if(ee&64){le.move(A,T,F,ce);return}if(le===q){i(Z,T,F);for(let pe=0;pene.enter(Z),H));else{let{leave:pe,delayLeave:Ce,afterLeave:Pe}=ne,Ve=()=>{A.ctx.isUnmounted?o(Z):i(Z,T,F)},Ge=()=>{let ze=Z._isLeaving||!!Z[$r];Z._isLeaving&&Z[$r](!0),ne.persisted&&!ze?Ve():pe(Z,()=>{Ve(),Pe&&Pe()})};Ce?Ce(Z,Ve,Ge):Ge()}else i(Z,T,F)},He=(A,T,F,J=!1,H=!1)=>{let{type:Z,props:le,ref:ne,children:oe,dynamicChildren:ee,shapeFlag:ke,patchFlag:pe,dirs:Ce,cacheIndex:Pe,memo:Ve}=A;if((pe===-2||ee&&ee.hasOnce)&&(H=!1),ne!=null&&(Qt(),vo(ne,null,F,A,!0),Zt()),Pe!=null&&(!A.ctx||A.ctx===T)&&(T.renderCache[Pe]=void 0),ke&256){T.ctx.deactivate(A);return}let Ge=ke&1&&Ce,ze=!yo(A),we;if(ze&&(we=le&&le.onVnodeBeforeUnmount)&&un(we,T,A),ke&6)Fe(A.component,F,J);else{if(ke&128){A.suspense.unmount(F,J);return}Ge&&ts(A,null,T,"beforeUnmount"),ke&64?A.type.remove(A,T,F,ce,J):ee&&!ee.hasOnce&&(Z!==q||pe>0&&pe&64)?W(ee,T,F,!1,!0):(Z===q&&pe&384||!H&&ke&16)&&W(oe,T,F),J&&et(A)}let be=Ve!=null&&Pe==null;(ze&&(we=le&&le.onVnodeUnmounted)||Ge||be)&&It(()=>{we&&un(we,T,A),Ge&&ts(A,null,T,"unmounted"),be&&(A.el=null)},F)},et=A=>{let{type:T,el:F,anchor:J,transition:H}=A,Z=T===q;if(Z&&!H){Re(F,J);return}if(T===wo){_(A),H&&!H.persisted&&H.afterLeave&&H.afterLeave();return}let le=Z?Br(A):A,ne=()=>{Z?b(F)&&Re(F,J):o(F),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(le&&le.shapeFlag&1&&H&&!H.persisted){let{leave:oe,delayLeave:ee}=H,ke=le.el,pe=()=>oe(ke,ne);ee?ee(ke,ne,pe):pe()}else ne()},Re=(A,T)=>{let F;for(;A!==T;)F=h(A),o(A),A=F;o(T)},Fe=(A,T,F)=>{let{bum:J,scope:H,job:Z,subTree:le,um:ne,m:oe,a:ee}=A;jl(oe),jl(ee),J&&Ds(J),H.stop(),Z?(Z.flags|=8,He(le,A,T,F)):A.vnode.el&&le&&(le.transition=A.vnode.transition,He(le,A,T,F)),ne&&It(ne,T),It(()=>{A.isUnmounted=!0},T)},W=(A,T,F,J=!1,H=!1,Z=0)=>{for(let le=Z;le{if(A.shapeFlag&6)return fe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();let T=h(A.anchor||A.el),F=T&&T[jf];return F?h(F):T},de=(A,T,F)=>{let J=A&&T._vnode?void 0:A&&A.component?A.component.uid:Oh();Ff(()=>{A==null?T._vnode&&He(T._vnode,null,null,!0):S(T._vnode||null,A,T,null,null,null,F),T._vnode=A},J)},ce={p:S,um:He,m:Qe,r:et,mt:ie,mc:O,pc:Se,pbc:C,n:fe,o:e},me,Me;return t&&([me,Me]=t(ce)),{render:de,hydrate:me,createApp:lh(de,me)}}function Ur({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function ns({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Sh(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Pd(e,t,s=!1){let i=e.children,o=t.children;if(Ne(i)&&Ne(o))for(let r=0;r>1,e[s[p]]0&&(t[i]=s[r-1]),s[r]=i)}}for(r=s.length,d=s[r-1];r-- >0;)s[r]=d,d=t[d];return s}function Ad(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ad(t)}function jl(e){if(e)for(let t=0;te.__isSuspense;function Rh(e,t){t&&t.pendingBranch?Ne(e)?t.effects.push(...e):t.effects.push(e):Ql(e)}var q=Symbol.for("v-fgt"),Oi=Symbol.for("v-txt"),en=Symbol.for("v-cmt"),wo=Symbol.for("v-stc"),ss=[],Ft=null;function a(e=!1){ss.push(Ft=e?null:[])}function Td(){ss.pop(),Ft=ss[ss.length-1]||null}var Eo=1;function Si(e,t=!1){Eo+=e,e<0&&Ft&&t&&(Ft.hasOnce=!0)}function Od(e){return e.dynamicChildren=Eo>0?Ft||In:null,Td(),Eo>0&&Ft&&Ft.push(e),e}function l(e,t,s,i,o,r){return Od(n(e,t,s,i,o,r,!0))}function Gt(e,t,s,i,o){return Od(Oe(e,t,s,i,o,!0))}function So(e){return e?e.__v_isVNode===!0:!1}function mo(e,t){return e.type===t.type&&e.key===t.key}var Id=({key:e})=>e??null,bi=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?it(e)||wt(e)||Te(e)?{i:Lt,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,i=0,o=null,r=e===q?0:1,d=!1,p=!1){let u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Id(t),ref:t&&bi(t),scopeId:td,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Lt};return p?(Ni(u,s),r&128&&e.normalize(u)):s&&(u.shapeFlag|=it(s)?8:16),Eo>0&&!d&&Ft&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&Ft.push(u),u}var Oe=Ph;function Ph(e,t=null,s=null,i=0,o=null,r=!1){if((!e||e===eh)&&(e=en),So(e)){let p=qs(e,t,!0);return s&&Ni(p,s),Eo>0&&!r&&Ft&&(p.shapeFlag&6?Ft[Ft.indexOf(e)]=p:Ft.push(p)),p.patchFlag=-2,p}if(Lh(e)&&(e=e.__vccOpts),t){t=Ah(t);let{class:p,style:u}=t;p&&!it(p)&&(t.class=P(p)),Ye(u)&&(ho(u)&&!Ne(u)&&(u=ct({},u)),t.style=Ie(u))}let d=it(e)?1:Dd(e)?128:Pi(e)?64:Ye(e)?4:Te(e)?2:0;return n(e,t,s,i,o,d,r,!0)}function Ah(e){return e?ho(e)||wd(e)?ct({},e):e:null}function qs(e,t,s=!1,i=!1){let{props:o,ref:r,patchFlag:d,children:p,transition:u}=e,y=t?Dh(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Id(y),ref:t&&t.ref?s&&r?Ne(r)?r.concat(bi(t)):[r,bi(t)]:bi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:p,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==q?d===-1?16:d|16:d,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qs(e.ssContent),ssFallback:e.ssFallback&&qs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return u&&i&&Co(m,u.clone(m)),m}function g(e=" ",t=0){return Oe(Oi,null,e,t)}function Ee(e,t){let s=Oe(wo,null,e);return s.staticCount=t,s}function f(e="",t=!1){return t?(a(),Gt(en,null,e)):Oe(en,null,e)}function pn(e){return e==null||typeof e=="boolean"?Oe(en):Ne(e)?Oe(q,null,e.slice()):So(e)?Cn(e):Oe(Oi,null,String(e))}function Cn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qs(e)}function Ni(e,t){let s=0,{shapeFlag:i}=e;if(t==null)t=null;else if(Ne(t))s=16;else if(typeof t=="object")if(i&65){let o=t.default;o&&(o._c&&(o._d=!1),Ni(e,o()),o._c&&(o._d=!0));return}else{s=32;let o=t._;!o&&!wd(t)?t._ctx=Lt:o===3&&Lt&&(Lt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Te(t)){if(i&65){Ni(e,{default:t});return}t={default:t,_ctx:Lt},s=32}else t=String(t),i&64?(s=16,t=[g(t)]):s=8;e.children=t,e.shapeFlag|=s}function Dh(...e){let t={};for(let s=0;sNt||Lt,Ri,No;{let e=so(),t=(s,i)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(i),r=>{o.length>1?o.forEach(d=>d(r)):o[0](r)}};Ri=t("__VUE_INSTANCE_SETTERS__",s=>Nt=s),No=t("__VUE_SSR_SETTERS__",s=>_s=s)}var To=e=>{let t=Nt;return Ri(e),e.scope.on(),()=>{e.scope.off(),Ri(t)}},Gl=()=>{Nt&&Nt.scope.off(),Ri(null)};function Vd(e){return e.vnode.shapeFlag&4}var _s=!1;function Mh(e,t=!1,s=!1){t&&No(t);let{props:i,children:o}=e.vnode,r=Vd(e);gh(e,i,r,t),wh(e,o,s||t);let d=r?Vh(e,t):void 0;return t&&No(!1),d}function Vh(e,t){let s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,th);let{setup:i}=s;if(i){Qt();let o=e.setupContext=i.length>1?_h(e):null,r=To(e),d=Ro(i,e,0,[e.props,o]),p=yr(d);if(Zt(),r(),(p||e.sp)&&!yo(e)&&Yr(e),p){if(d.then(Gl,Gl),t)return d.then(u=>{No(!0);try{Wl(e,u,t)}finally{No(!1)}}).catch(u=>{Po(u,e,0)});e.asyncDep=d}else Wl(e,d,t)}else qd(e,t)}function Wl(e,t,s){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ye(t)&&(e.setupState=vi(t)),qd(e,s)}var Kl,Yl;function qd(e,t,s){let i=e.type;if(!e.render){if(!t&&Kl&&!i.render){let o=i.template||Xr(e).template;if(o){let{isCustomElement:r,compilerOptions:d}=e.appContext.config,{delimiters:p,compilerOptions:u}=i,y=ct(ct({isCustomElement:r,delimiters:p},d),u);i.render=Kl(o,y)}}e.render=i.render||Tt,Yl&&Yl(e)}{let o=To(e);Qt();try{nh(e)}finally{Zt(),o()}}}var qh={get(e,t){return Et(e,"get",""),e[t]}};function _h(e){let t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,qh),slots:e.slots,emit:e.emit,expose:t}}function Ii(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vi(dn(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in bo)return bo[s](e)},has(t,s){return s in t||s in bo}})):e.proxy}function $h(e,t=!0){return Te(e)?e.displayName||e.name:e.name||t&&e.__name}function Lh(e){return Te(e)&&"__vccOpts"in e}var Rt=(e,t)=>Ol(e,t,_s);function De(e,t,s){try{Si(-1);let i=arguments.length;return i===2?Ye(t)&&!Ne(t)?So(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(i>3?s=Array.prototype.slice.call(arguments,2):i===3&&So(s)&&(s=[s]),Oe(e,t,s))}finally{Si(1)}}var Fh="3.5.44";var na,_d=typeof window<"u"&&window.trustedTypes;if(_d)try{na=_d.createPolicy("vue",{createHTML:e=>e})}catch{}var Yd=na?e=>na.createHTML(e):e=>e,Uh="http://www.w3.org/2000/svg",Bh="http://www.w3.org/1998/Math/MathML",Sn=typeof document<"u"?document:null,$d=Sn&&Sn.createElement("template"),zh={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,i)=>{let o=t==="svg"?Sn.createElementNS(Uh,e):t==="mathml"?Sn.createElementNS(Bh,e):s?Sn.createElement(e,{is:s}):Sn.createElement(e);return e==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:e=>Sn.createTextNode(e),createComment:e=>Sn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,i,o,r){let d=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{$d.innerHTML=Yd(i==="svg"?`${e}`:i==="mathml"?`${e}`:e);let p=$d.content;if(i==="svg"||i==="mathml"){let u=p.firstChild;for(;u.firstChild;)p.appendChild(u.firstChild);p.removeChild(u)}t.insertBefore(p,s)}return[d?d.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};var Hh=Symbol("_vtc");function jh(e,t,s){let i=e[Hh];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}var qi=Symbol("_vod"),Xd=Symbol("_vsh"),Q={name:"show",beforeMount(e,{value:t},{transition:s}){e[qi]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Oo(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:i}){!t!=!s&&(i?t?(i.beforeEnter(e),Oo(e,!0),i.enter(e)):i.leave(e,()=>{Oo(e,!1)}):Oo(e,t))},beforeUnmount(e,{value:t}){Oo(e,t)}};function Oo(e,t){e.style.display=t?e[qi]:"none",e[Xd]=!t}var Gh=Symbol("");var Wh=/(?:^|;)\s*display\s*:/;function Kh(e,t,s){let i=e.style,o=it(s),r=!1;if(s&&!o){if(t)if(it(t))for(let d of t.split(";")){let p=d.slice(0,d.indexOf(":")).trim();s[p]==null&&Io(i,p,"")}else for(let d in t)s[d]==null&&Io(i,d,"");for(let d in s){d==="display"&&(r=!0);let p=s[d];p!=null?Xh(e,d,!it(t)&&t?t[d]:void 0,p)||Io(i,d,p):Io(i,d,"")}}else if(o){if(t!==s){let d=i[Gh];d&&(s+=";"+d),i.cssText=s,r=Wh.test(s)}}else t&&e.removeAttribute("style");qi in e&&((!o||t!==s)&&(e[qi]=r?i.display:""),e[Xd]&&(i.display="none"))}var Mi=/\s*!important$/;function Io(e,t,s){if(Ne(s))s.forEach(i=>Io(e,t,i));else if(s==null&&(s=""),t.startsWith("--"))Mi.test(s)?e.setProperty(t,s.replace(Mi,""),"important"):e.setProperty(t,s);else{let i=Yh(e,t);Mi.test(s)?e.setProperty(sn(i),s.replace(Mi,""),"important"):e[i]=s}}var Ld=["Webkit","Moz","ms"],xr={};function Yh(e,t){let s=xr[t];if(s)return s;let i=ht(t);if(i!=="filter"&&i in e)return xr[t]=i;i=Qn(i);for(let o=0;oea||(tm.then(()=>ea=0),ea=Date.now());function sm(e,t){let s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;let o=s.value;if(Ne(o)){let r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};let d=o.slice(),p=[i];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,om=(e,t,s,i,o,r)=>{let d=o==="svg";t==="class"?jh(e,i,d):t==="style"?Kh(e,s,i):Rs(t)?Ps(t)||Qh(e,t,s,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):im(e,t,i,d))?(Bd(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ud(e,t,i,d,r,t!=="value")):e._isVueCE&&(rm(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!it(i)))?Bd(e,ht(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Ud(e,t,i,d))};function im(e,t,s,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Hd(t)&&Te(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Hd(t)&&it(s)?!1:t in e}function rm(e,t){let s=e._def.props;if(!s)return!1;let i=ht(t);return Array.isArray(s)?s.some(o=>ht(o)===i):Object.keys(s).some(o=>ht(o)===i)}var $s=e=>{let t=e.props["onUpdate:modelValue"]||!1;return Ne(t)?s=>Ds(t,s):t};function am(e){e.target.composing=!0}function jd(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var hn=Symbol("_assign"),Vi=Symbol("_initialValue");function ta(e,t,s){return t&&(e=e.trim()),s&&(e=Ts(e)),e}var pt={created(e,{modifiers:{lazy:t,trim:s,number:i}},o){e.parentNode&&(e.type==="text"?e[Vi]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Vi]=e.defaultValue.replace(/\r\n?/g,` +`))),e[hn]=$s(o);let r=i||o.props&&o.props.type==="number";Vn(e,t?"change":"input",d=>{d.target.composing||e[hn](ta(e.value,s,r))}),(s||r)&&Vn(e,"change",()=>{e.value=ta(e.value,s,r)}),t||(Vn(e,"compositionstart",am),Vn(e,"compositionend",jd),Vn(e,"change",jd))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[Vi];delete e[Vi],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[hn](ta(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},d){if(e[hn]=$s(d),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Ts(e.value):e.value,u=t??"";if(p===u)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===u)||(e.value=u)}},sa={deep:!0,created(e,t,s){e[hn]=$s(s),Vn(e,"change",()=>{let i=e._modelValue,o=Mo(e),r=e.checked,d=e[hn];if(Ne(i)){let p=li(i,o),u=p!==-1;if(r&&!u)d(i.concat(o));else if(!r&&u){let y=[...i];y.splice(p,1),d(y)}}else if(Yt(i)){let p=new Set(i);r?p.add(o):p.delete(o),d(p)}else d(Jd(e,r))})},mounted:Gd,beforeUpdate(e,t,s){e[hn]=$s(s),Gd(e,t,s)}};function Gd(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Ne(t))o=li(t,i.props.value)>-1;else if(Yt(t))o=t.has(i.props.value);else{if(t===s)return;o=Xt(t,Jd(e,!0))}e.checked!==o&&(e.checked=o)}var mn={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Vn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>s?Ts(Mo(u)):Mo(u)),r=e.multiple,d=r?Yt(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Ne(d)?o.slice():o:d];try{e[hn](d)}finally{tt(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[hn]=$s(i)},mounted(e,{value:t}){Wd(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[hn]=$s(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!lm(t,s[1],s[0]))&&Wd(e,t)}};function lm(e,t,s){if(!s)return Xt(e,t);if(Ne(e))return Xt(e,t);if(Yt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Wd(e,t){let s=e.multiple,i=Ne(t);if(!(s&&!i&&!Yt(t))){for(let o=0,r=e.options.length;oString(y)===String(p)):d.selected=li(t,p)>-1}else d.selected=t.has(p);else if(Xt(Mo(d),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Mo(e){return"_value"in e?e._value:e.value}function Jd(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var dm=["ctrl","shift","alt","meta"],um={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dm.some(s=>e[`${s}Key`]&&!t.includes(s))},ae=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let d=0;d{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=sn(o.key);if(t.some(d=>d===r||cm[d]===r))return e(o)}))},pm=ct({patchProp:om},zh),Kd;function fm(){return Kd||(Kd=Rd(pm))}var Qd=((...e)=>{let t=fm().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=mm(i);if(!o)return;let r=t._component;!Te(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let d=s(o,!1,hm(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),d},t});function hm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mm(e){return it(e)?document.querySelector(e):e}var ls=typeof document<"u";function xd(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function gm(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xd(e.default)}var Je=Object.assign;function _i(e,t){let s={};for(let i in t){let o=t[i];s[i]=Wt(o)?o.map(e):e(o)}return s}var Fs=()=>{},Wt=Array.isArray;function ra(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var eu=/#/g,vm=/&/g,ym=/\//g,bm=/=/g,wm=/\?/g,tu=/\+/g,km=/%5B/g,Cm=/%5D/g,nu=/%5E/g,Em=/%60/g,su=/%7B/g,Sm=/%7C/g,ou=/%7D/g,Nm=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(Sm,"|").replace(km,"[").replace(Cm,"]")}function iu(e){return aa(e).replace(su,"{").replace(ou,"}").replace(nu,"^")}function oa(e){return aa(e).replace(tu,"%2B").replace(Nm,"+").replace(eu,"%23").replace(vm,"%26").replace(Em,"`").replace(su,"{").replace(ou,"}").replace(nu,"^")}function Rm(e){return oa(e).replace(bm,"%3D")}function Pm(e){return aa(e).replace(eu,"%23").replace(wm,"%3F")}function ru(e){return Pm(e).replace(ym,"%2F")}function Ls(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Am=/\/$/,Dm=e=>e.replace(Am,"");function $i(e,t,s="/"){let i,o={},r="",d="",p=t.indexOf("#"),u=t.indexOf("?");return u=p>=0&&u>p?-1:u,u>=0&&(i=t.slice(0,u),r=t.slice(u,p>0?p:t.length),o=e(r.slice(1))),p>=0&&(i=i||t.slice(0,p),d=t.slice(p,t.length)),i=Om(i??t,s),{fullPath:i+r+d,path:i,query:o,hash:Ls(d)}}function au(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function la(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lu(e,t,s){let i=t.matched.length-1,o=s.matched.length-1;return i>-1&&i===o&&rs(t.matched[i],s.matched[o])&&da(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function rs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function da(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Tm(e[s],t[s]))return!1;return!0}function Tm(e,t){return Wt(e)?Zd(e,t):Wt(t)?Zd(t,e):e?.valueOf()===t?.valueOf()}function Zd(e,t){return Wt(t)?e.length===t.length&&e.every((s,i)=>s===t[i]):e.length===1&&e[0]===t}function Om(e,t){if(e.startsWith("/"))return e;if(!e)return t;let s=t.split("/"),i=e.split("/"),o=i[i.length-1];(o===".."||o===".")&&i.push("");let r=s.length-1,d,p;for(d=0;d1&&r--;else break;return s.slice(0,r).join("/")+"/"+i.slice(d).join("/")}var Rn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Li=(function(e){return e.pop="pop",e.push="push",e})({}),Fi=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function du(e){if(!e)if(ls){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Dm(e)}var Im=/^[^#]+#/;function uu(e,t){return e.replace(Im,"#")+t}function Mm(e,t){let s=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:t.behavior,left:i.left-s.left-(t.left||0),top:i.top-s.top-(t.top||0)}}var Vo=()=>({left:window.scrollX,top:window.scrollY});function cu(e){let t;if("el"in e){let s=e.el,i=typeof s=="string"&&s.startsWith("#"),o=typeof s=="string"?i?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!o)return;t=Mm(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ua(e,t){return(history.state?history.state.position-t:-1)+e}var ia=new Map;function pu(e,t){ia.set(e,t)}function fu(e){let t=ia.get(e);return ia.delete(e),t}function Vm(e){return typeof e=="string"||e&&typeof e=="object"}function ca(e){return typeof e=="string"||typeof e=="symbol"}var ut=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),hu=Symbol("");var sZ={[ut.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at -`+JSON.stringify(t):""}`},[ut.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Im(t)}" via a navigation guard.`},[ut.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ut.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ut.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ro(e,t){return Qe(new Error,{type:e,[hu]:!0},t)}function gn(e,t){return e instanceof Error&&hu in e&&(t==null||!!(e.type&t))}var Om=["params","query","hash"];function Im(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of Om)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function mu(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;is&&sa(s)):[i&&sa(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function gu(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=Wt(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var vu=Symbol(""),fa=Symbol(""),Ui=Symbol(""),Bi=Symbol(""),zi=Symbol("");function Bo(){let e=[];function t(i){return e.push(i),()=>{let s=e.indexOf(i);s>-1&&e.splice(s,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Nn(e,t,o,i,s,r=d=>d()){let d=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((c,u)=>{let y=g=>{g===!1?u(ro(ut.NAVIGATION_ABORTED,{from:o,to:t})):g instanceof Error?u(g):Tm(g)?u(ro(ut.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(d&&i.enterCallbacks[s]===d&&typeof g=="function"&&d.push(g),c())},h=r(()=>e.call(i&&i.instances[s],t,o,y)),b=Promise.resolve(h);e.length<3&&(b=b.then(y)),b.catch(g=>u(g))})}function Hi(e,t,o,i,s=r=>r()){let r=[];for(let d of e)for(let c in d.components){let u=d.components[c];if(!(t!=="beforeRouteEnter"&&!d.instances[c]))if(xd(u)){let y=(u.__vccOpts||u)[t];y&&r.push(Nn(y,o,i,d,c,s))}else{let y=u();r.push(()=>y.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${c}" at "${d.path}"`);let b=pm(h)?h.default:h;d.mods[c]=h,d.components[c]=b;let g=(b.__vccOpts||b)[t];return g&&Nn(g,o,i,d,c,s)()}))}}return r}function yu(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let d=0;dio(y,c))?i.push(c):o.push(c));let u=e.matched[d];u&&(t.matched.find(y=>io(y,u))||s.push(u))}return[o,i,s]}var Mm=()=>location.protocol+"//"+location.host;function Au(e,t){let{pathname:o,search:i,hash:s}=t,r=e.indexOf("#");if(r>-1){let d=s.includes(e.slice(r))?e.slice(r).length:1,c=s.slice(d);return c[0]!=="/"&&(c="/"+c),la(c,"")}return la(o,e)+i+s}function _m(e,t,o,i){let s=[],r=[],d=null,c=({state:g})=>{let k=Au(e,location),R=o.value,S=t.value,N=0;if(g){if(o.value=k,t.value=g,d&&d===R){d=null;return}N=S?g.position-S.position:0}else i(k);s.forEach(m=>{m(o.value,R,{delta:N,type:Li.pop,direction:N?N>0?Fi.forward:Fi.back:Fi.unknown})})};function u(){d=o.value}function y(g){s.push(g);let k=()=>{let R=s.indexOf(g);R>-1&&s.splice(R,1)};return r.push(k),k}function h(){if(document.visibilityState==="hidden"){let{history:g}=window;if(!g.state)return;g.replaceState(Qe({},g.state,{scroll:_s()}),"")}}function b(){for(let g of r)g();r=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:u,listen:y,destroy:b}}function bu(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?_s():null}}function Vm(e){let{history:t,location:o}=window,i={value:Au(e,o)},s={value:t.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,y,h){let b=e.indexOf("#"),g=b>-1?(o.host&&document.querySelector("base")?e:e.slice(b))+u:Mm()+e+u;try{t[h?"replaceState":"pushState"](y,"",g),s.value=y}catch(k){console.error(k),o[h?"replace":"assign"](g)}}function d(u,y){r(u,Qe({},t.state,bu(s.value.back,u,s.value.forward,!0),y,{position:s.value.position}),!0),i.value=u}function c(u,y){let h=Qe({},s.value,t.state,{forward:u,scroll:_s()});r(h.current,h,!0),r(u,Qe({},bu(i.value,u,null),{position:h.position+1},y),!1),i.value=u}return{location:i,state:s,push:c,replace:d}}function Tu(e){e=du(e);let t=Vm(e),o=_m(e,t.state,t.location,t.replace);function i(r,d=!0){d||o.pauseListeners(),history.go(r)}let s=Qe({location:"",base:e,go:i,createHref:uu.bind(null,e)},t,o);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}var lo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),gt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(gt||{}),qm={type:lo.Static,value:""},$m=/[a-zA-Z0-9_]/;function Lm(e){if(!e)return[[]];if(e==="/")return[[qm]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(k){throw new Error(`ERR (${o})/"${y}": ${k}`)}let o=gt.Static,i=o,s=[],r;function d(){r&&s.push(r),r=[]}let c=0,u,y="",h="";function b(){y&&(o===gt.Static?r.push({type:lo.Static,value:y}):o===gt.Param||o===gt.ParamRegExp||o===gt.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${y}) must be alone in its segment. eg: '/:ids+.`),r.push({type:lo.Param,value:y,regexp:h,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),y="")}function g(){y+=u}for(;ct.length?t.length===1&&t[0]===At.Static+At.Segment?1:-1:0}function Ou(e,t){let o=0,i=e.score,s=t.score;for(;o0&&t[t.length-1]<0}var Hm={strict:!1,end:!0,sensitive:!1};function jm(e,t,o){let i=Bm(Lm(e.path),o),s=Qe(i,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function Gm(e,t){let o=[],i=new Map;t=ra(Hm,t);function s(b){return i.get(b)}function r(b,g,k){let R=!k,S=Eu(b);S.aliasOf=k&&k.record;let N=ra(t,b),m=[S];if("alias"in b){let _=typeof b.alias=="string"?[b.alias]:b.alias;for(let V of _)m.push(Eu(Qe({},S,{components:k?k.record.components:S.components,path:V,aliasOf:k?k.record:S})))}let E,M;for(let _ of m){let{path:V}=_;if(g&&V[0]!=="/"){let G=g.record.path,ee=G[G.length-1]==="/"?"":"/";_.path=g.record.path+(V&&ee+V)}if(E=jm(_,g,N),k?k.alias.push(E):(M=M||E,M!==E&&M.alias.push(E),R&&b.name&&!Su(E)&&d(b.name)),Iu(E)&&u(E),S.children){let G=S.children;for(let ee=0;ee{d(M)}:Uo}function d(b){if(ca(b)){let g=i.get(b);g&&(i.delete(b),o.splice(o.indexOf(g),1),g.children.forEach(d),g.alias.forEach(d))}else{let g=o.indexOf(b);g>-1&&(o.splice(g,1),b.record.name&&i.delete(b.record.name),b.children.forEach(d),b.alias.forEach(d))}}function c(){return o}function u(b){let g=Ym(b,o);o.splice(g,0,b),b.record.name&&!Su(b)&&i.set(b.record.name,b)}function y(b,g){let k,R={},S,N;if("name"in b&&b.name){if(k=i.get(b.name),!k)throw ro(ut.MATCHER_NOT_FOUND,{location:b});N=k.record.name,R=Qe(Cu(g.params,k.keys.filter(M=>!M.optional).concat(k.parent?k.parent.keys.filter(M=>M.optional):[]).map(M=>M.name)),b.params&&Cu(b.params,k.keys.map(M=>M.name))),S=k.stringify(R)}else if(b.path!=null)S=b.path,k=o.find(M=>M.re.test(S)),k&&(R=k.parse(S),N=k.record.name);else{if(k=g.name?i.get(g.name):o.find(M=>M.re.test(g.path)),!k)throw ro(ut.MATCHER_NOT_FOUND,{location:b,currentLocation:g});N=k.record.name,R=Qe({},g.params,b.params),S=k.stringify(R)}let m=[],E=k;for(;E;)m.unshift(E.record),E=E.parent;return{name:N,path:S,params:R,matched:m,meta:Km(m)}}e.forEach(b=>r(b));function h(){o.length=0,i.clear()}return{addRoute:r,resolve:y,removeRoute:d,clearRoutes:h,getRoutes:c,getRecordMatcher:s}}function Cu(e,t){let o={};for(let i of t)i in e&&(o[i]=e[i]);return o}function Eu(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Wm(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Wm(e){let t={},o=e.props||!1;if("component"in e)t.default=o;else for(let i in e.components)t[i]=typeof o=="object"?o[i]:o;return t}function Su(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Km(e){return e.reduce((t,o)=>Qe(t,o.meta),{})}function Ym(e,t){let o=0,i=t.length;for(;o!==i;){let r=o+i>>1;Ou(e,t[r])<0?i=r:o=r+1}let s=Xm(e);return s&&(i=t.lastIndexOf(s,i-1)),i}function Xm(e){let t=e;for(;t=t.parent;)if(Iu(t)&&Ou(e,t)===0)return t}function Iu({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Nu(e){let t=Mt(Ui),o=Mt(Bi),i=!1,s=null,r=Nt(()=>{let h=kn(e.to);return t.resolve(h)}),d=Nt(()=>{let{matched:h}=r.value,{length:b}=h,g=h[b-1],k=o.matched;if(!g||!k.length)return-1;let R=k.findIndex(io.bind(null,g));if(R>-1)return R;let S=Ru(h[b-2]);return b>1&&Ru(g)===S&&k[k.length-1].path!==S?k.findIndex(io.bind(null,h[b-2])):R}),c=Nt(()=>d.value>-1&&eg(o.params,r.value.params)),u=Nt(()=>d.value>-1&&d.value===o.matched.length-1&&da(o.params,r.value.params));function y(h={}){if(xm(h)){let b=t[kn(e.replace)?"replace":"push"](kn(e.to)).catch(Uo);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>b),b}return Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:c,isExactActive:u,navigate:y}}function Qm(e){return e.length===1?e[0]:e}var Jm=Ps({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Nu,setup(e,{slots:t}){let o=ot(Nu(e)),{options:i}=Mt(Ui),s=Nt(()=>({[Du(e.activeClass,i.linkActiveClass,"router-link-active")]:o.isActive,[Du(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{let r=t.default&&Qm(t.default(o));return e.custom?r:Ae("a",{"aria-current":o.isExactActive?e.ariaCurrentValue:null,href:o.href,onClick:o.navigate,class:s.value},r)}}}),Zm=Jm;function xm(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function eg(e,t){for(let o in t){let i=t[o],s=e[o];if(typeof i=="string"){if(i!==s)return!1}else if(!Wt(s)||s.length!==i.length||i.some((r,d)=>r.valueOf()!==s[d].valueOf()))return!1}return!0}function Ru(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var Du=(e,t,o)=>e??t??o,tg=Ps({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:o}){let i=Mt(zi),s=Nt(()=>e.route||i.value),r=Mt(fa,0),d=Nt(()=>{let y=kn(r),{matched:h}=s.value,b;for(;(b=h[y])&&!b.components;)y++;return y}),c=Nt(()=>s.value.matched[d.value]);oo(fa,Nt(()=>d.value+1)),oo(vu,c),oo(zi,s);let u=Et();return dt(()=>[u.value,c.value,e.name],([y,h,b],[g,k,R])=>{h&&(h.instances[b]=y,k&&k!==h&&y&&y===g&&(h.leaveGuards.size||(h.leaveGuards=k.leaveGuards),h.updateGuards.size||(h.updateGuards=k.updateGuards))),y&&h&&(!k||!io(h,k)||!g)&&(h.enterCallbacks[b]||[]).forEach(S=>S(y))},{flush:"post"}),()=>{let y=s.value,h=e.name,b=c.value,g=b&&b.components[h];if(!g)return Pu(o.default,{Component:g,route:y});let k=b.props[h],R=k?k===!0?y.params:typeof k=="function"?k(y):k:null,N=Ae(g,Qe({},R,t,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(b.instances[h]=null)},ref:u}));return Pu(o.default,{Component:N,route:y})||N}}});function Pu(e,t){if(!e)return null;let o=e(t);return o.length===1?o[0]:o}var ha=tg;function Mu(e){let t=Gm(e.routes,e),o=e.parseQuery||mu,i=e.stringifyQuery||pa,s=e.history,r=Bo(),d=Bo(),c=Bo(),u=gi(Rn),y=Rn;ao&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let h=qi.bind(null,W=>""+W),b=qi.bind(null,ru),g=qi.bind(null,Fo);function k(W,fe){let de,ce;return ca(W)?(de=t.getRecordMatcher(W),ce=fe):ce=W,t.addRoute(ce,de)}function R(W){let fe=t.getRecordMatcher(W);fe&&t.removeRoute(fe)}function S(){return t.getRoutes().map(W=>W.record)}function N(W){return!!t.getRecordMatcher(W)}function m(W,fe){if(fe=Qe({},fe||u.value),typeof W=="string"){let A=$i(o,W,fe.path),L=t.resolve({path:A.path},fe),Q=s.createHref(A.fullPath);return Qe(A,L,{params:g(L.params),hash:Fo(A.hash),redirectedFrom:void 0,href:Q})}let de;if(W.path!=null)de=Qe({},W,{path:$i(o,W.path,fe.path).path});else{let A=Qe({},W.params);for(let L in A)A[L]==null&&delete A[L];de=Qe({},W,{params:b(A)}),fe.params=b(fe.params)}let ce=t.resolve(de,fe),me=W.hash||"";ce.params=h(g(ce.params));let Ie=au(i,Qe({},W,{hash:iu(me),path:ce.path})),D=s.createHref(Ie);return Qe({fullPath:Ie,hash:me,query:i===pa?gu(W.query):W.query||{}},ce,{redirectedFrom:void 0,href:D})}function E(W){return typeof W=="string"?$i(o,W,u.value.path):Qe({},W)}function M(W,fe){if(y!==W)return ro(ut.NAVIGATION_CANCELLED,{from:fe,to:W})}function _(W){return ee(W)}function V(W){return _(Qe(E(W),{replace:!0}))}function G(W,fe){let de=W.matched[W.matched.length-1];if(de&&de.redirect){let{redirect:ce}=de,me=typeof ce=="function"?ce(W,fe):ce;return typeof me=="string"&&(me=me.includes("?")||me.includes("#")?me=E(me):{path:me},me.params={}),Qe({query:W.query,hash:W.hash,params:me.path!=null?{}:W.params},me)}}function ee(W,fe){let de=y=m(W),ce=u.value,me=W.state,Ie=W.force,D=W.replace===!0,A=G(de,ce);if(A)return ee(Qe(E(A),{state:typeof A=="object"?Qe({},me,A.state):me,force:Ie,replace:D}),fe||de);let L=de;L.redirectedFrom=fe;let Q;return!Ie&&lu(i,ce,de)&&(Q=ro(ut.NAVIGATION_DUPLICATED,{to:L,from:ce}),Be(ce,ce,!0,!1)),(Q?Promise.resolve(Q):U(L,ce)).catch(H=>gn(H)?gn(H,ut.NAVIGATION_GUARD_REDIRECT)?H:Ue(H):he(H,L,ce)).then(H=>{if(H){if(gn(H,ut.NAVIGATION_GUARD_REDIRECT))return ee(Qe({replace:D},E(H.to),{state:typeof H.to=="object"?Qe({},me,H.to.state):me,force:Ie}),fe||L)}else H=q(L,ce,!0,D,me);return C(L,ce,H),H})}function X(W,fe){let de=M(W,fe);return de?Promise.reject(de):Promise.resolve()}function O(W){let fe=et.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(W):W()}function U(W,fe){let de,[ce,me,Ie]=yu(W,fe);de=Hi(ce.reverse(),"beforeRouteLeave",W,fe);for(let A of ce)A.leaveGuards.forEach(L=>{de.push(Nn(L,W,fe))});let D=X.bind(null,W,fe);return de.push(D),Fe(de).then(()=>{de=[];for(let A of r.list())de.push(Nn(A,W,fe));return de.push(D),Fe(de)}).then(()=>{de=Hi(me,"beforeRouteUpdate",W,fe);for(let A of me)A.updateGuards.forEach(L=>{de.push(Nn(L,W,fe))});return de.push(D),Fe(de)}).then(()=>{de=[];for(let A of Ie)if(A.beforeEnter)if(Wt(A.beforeEnter))for(let L of A.beforeEnter)de.push(Nn(L,W,fe));else de.push(Nn(A.beforeEnter,W,fe));return de.push(D),Fe(de)}).then(()=>(W.matched.forEach(A=>A.enterCallbacks={}),de=Hi(Ie,"beforeRouteEnter",W,fe,O),de.push(D),Fe(de))).then(()=>{de=[];for(let A of d.list())de.push(Nn(A,W,fe));return de.push(D),Fe(de)}).catch(A=>gn(A,ut.NAVIGATION_CANCELLED)?A:Promise.reject(A))}function C(W,fe,de){c.list().forEach(ce=>O(()=>ce(W,fe,de)))}function q(W,fe,de,ce,me){let Ie=M(W,fe);if(Ie)return Ie;let D=fe===Rn,A=ao?history.state:{};de&&(ce||D?s.replace(W.fullPath,Qe({scroll:D&&A&&A.scroll},me)):s.push(W.fullPath,me)),u.value=W,Be(W,fe,de,D),Ue()}let z;function K(){z||(z=s.listen((W,fe,de)=>{if(!Re.listening)return;let ce=m(W),me=G(ce,Re.currentRoute.value);if(me){ee(Qe(me,{replace:!0,force:!0}),ce).catch(Uo);return}y=ce;let Ie=u.value;ao&&pu(ua(Ie.fullPath,de.delta),_s()),U(ce,Ie).catch(D=>gn(D,ut.NAVIGATION_ABORTED|ut.NAVIGATION_CANCELLED)?D:gn(D,ut.NAVIGATION_GUARD_REDIRECT)?(ee(Qe(E(D.to),{force:!0}),ce).then(A=>{gn(A,ut.NAVIGATION_ABORTED|ut.NAVIGATION_DUPLICATED)&&!de.delta&&de.type===Li.pop&&s.go(-1,!1)}).catch(Uo),Promise.reject()):(de.delta&&s.go(-de.delta,!1),he(D,ce,Ie))).then(D=>{D=D||q(ce,Ie,!1),D&&(de.delta&&!gn(D,ut.NAVIGATION_CANCELLED)?s.go(-de.delta,!1):de.type===Li.pop&&gn(D,ut.NAVIGATION_ABORTED|ut.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),C(ce,Ie,D)}).catch(Uo)}))}let ie=Bo(),ne=Bo(),Y;function he(W,fe,de){Ue(W);let ce=ne.list();return ce.length?ce.forEach(me=>me(W,fe,de)):console.error(W),Promise.reject(W)}function Ee(){return Y&&u.value!==Rn?Promise.resolve():new Promise((W,fe)=>{ie.add([W,fe])})}function Ue(W){return Y||(Y=!W,K(),ie.list().forEach(([fe,de])=>W?de(W):fe()),ie.reset()),W}function Be(W,fe,de,ce){let{scrollBehavior:me}=e;if(!ao||!me)return Promise.resolve();let Ie=!de&&fu(ua(W.fullPath,0))||(ce||!de)&&history.state&&history.state.scroll||null;return tt().then(()=>me(W,fe,Ie)).then(D=>D&&cu(D)).catch(D=>he(D,W,fe))}let Je=W=>s.go(W),He,et=new Set,Re={currentRoute:u,listening:!0,addRoute:k,removeRoute:R,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:S,resolve:m,options:e,push:_,replace:V,go:Je,back:()=>Je(-1),forward:()=>Je(1),beforeEach:r.add,beforeResolve:d.add,afterEach:c.add,onError:ne.add,isReady:Ee,install(W){W.component("RouterLink",Zm),W.component("RouterView",ha),W.config.globalProperties.$router=Re,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>kn(u)}),ao&&!He&&u.value===Rn&&(He=!0,_(s.location).catch(ce=>{}));let fe={};for(let ce in Rn)Object.defineProperty(fe,ce,{get:()=>u.value[ce],enumerable:!0});W.provide(Ui,Re),W.provide(Bi,fs(fe)),W.provide(zi,u);let de=W.unmount;et.add(W),W.unmount=function(){et.delete(W),et.size<1&&(y=Rn,z&&z(),z=null,u.value=Rn,He=!1,Y=!1),de()}}};function Fe(W){return W.reduce((fe,de)=>fe.then(()=>O(de)),Promise.resolve())}return Re}function _u(e){return Mt(Bi)}function Gi(e){return["author_pass","repo_extend","repo_never","repo_slot","repo_pack"].includes(e)}var ji=new WeakMap;function Wi(e){if(!ji.has(e)){let t=e.get("/api/billing/").finally(()=>ji.delete(e));ji.set(e,t)}return ji.get(e)}function Ki(e,t,o=()=>{},i={}){let s=new URLSearchParams(window.location.search).get("billing");e.billing=null,e.billingLoading=!0,e.billingBusy=!1,e.billingError="",e.billingNotice="",e.billingPending=s==="success",e.billingRepository="";let r={billing_invalid_draft:"This draft could not be saved. Your form is unchanged. Try again.",billing_draft_not_found:"This checkout draft is unavailable or expired. Your local form is unchanged.",billing_recovery_required:"Your earlier payment needs verification. Please contact support before paying again.",billing_checkout_disabled:"New purchases are temporarily unavailable. You can still manage existing billing.",billing_unavailable:"Payments are not available yet. Please try again later.",billing_subscription_exists:"You already have a subscription. Use Manage billing to change or cancel it.",billing_checkout_in_progress:"You have another checkout open. Complete it, or wait up to 30 minutes for it to expire, before choosing a different option.",billing_busy:"Another billing request is processing. Please try again shortly.",billing_already_paid:"This repository or conference already has this paid option.",billing_invalid_review_window:"Conference packages cover up to 180 days. Check the review dates.",billing_invalid_conference:"Only a conference owner can pay for a conference awaiting payment.",repo_not_found:"Enter the ID of an existing repository that you own."};e.billingAmount=u=>u?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:u.currency,minimumFractionDigits:u.amount%100?2:0,maximumFractionDigits:2}).format(u.amount/100),e.billingPrice=u=>u.amount==null?"Price shown at checkout":e.billingAmount(u)+(u.interval?` / ${u.intervalCount>1?u.intervalCount+" ":""}${u.interval}`:" once"),e.billingPerMonth=u=>u?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:u.currency}).format(u.amount/1200),e.billingBytes=u=>{let y=Number(u)||0;if(y<1024)return`${y} B`;let h=Math.min(4,Math.floor(Math.log2(y)/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(y/1024**h)} ${["B","KB","MB","GB","TB"][h]}`},e.billingDate=u=>u?new Date(u).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"",e.loadBilling=()=>(e.billingError="",e.billingLoading=!0,Wi(t).then(u=>{e.billing=u.data,e.emit?.("billing:updated",u.data)}).catch(()=>{e.billingError="Billing could not be loaded. Try again."}).finally(()=>{e.billingLoading=!1}));async function d(u,y,h=!0){if(!(e.billingBusy||!e.billing?.csrf)){e.billingBusy=!0,e.billingError="";try{let b=await t.post(`/api/billing/${u}`,y,{headers:{"x-csrf-token":e.billing.csrf}});if(h)window.location.assign(b.data.url);else return await e.loadBilling(),await o(),e.billingPending=!!b.data.pending,e.emit?.("billing:pending",e.billingPending),e.billingNotice=b.data.pending?"Your payment is still pending. Please do not pay again.":i.confirmedMessage||"Billing status refreshed. Your confirmed access appears below.",b.data}catch(b){e.billingError=r[b.data?.error]||"The billing request failed. Please try again."}finally{e.billingBusy=!1}}}e.checkout=(u,y="",h={})=>d("checkout",{planId:u,target:y,...h}),e.billingPortal=()=>d("portal",{}),e.refreshBilling=()=>d("refresh",{},!1);async function c(){for(let u=0;u<5;u++){let y=await e.refreshBilling();if(!y||!y.pending)return;await new Promise(h=>window.setTimeout(h,3e3))}e.billingNotice="Confirmation is taking longer than usual. You can refresh payment status later. Please do not pay again."}e.loadBilling().then(()=>{s==="success"?(e.billingNotice="Checking your payment. Paid access starts after confirmation.",c()):s==="portal"?e.refreshBilling().then(()=>{e.billingPending=!1,e.emit?.("billing:pending",!1),e.billingNotice=i.portalMessage?.(e.billing)||"Your billing details are up to date."}):s==="cancelled"&&(e.billingNotice="Checkout was closed. No new paid access has been activated.")})}function Vu(e,t){return t?.split(".").reduce((o,i)=>o?.[i],e)}function Vs(e=null,t=new Map){let o=ot({}),i=[],s=!1,r=new Proxy(o,{get(d,c){return typeof c=="string"&&c.startsWith("__v_")||Reflect.has(d,c)?Reflect.get(d,c):e?.[c]}});return Object.defineProperty(o,"parent",{value:e,configurable:!0}),Object.defineProperty(o,"viewState",{get:()=>r}),r.watch=(d,c,u=!1,y=!0)=>{let h=typeof d=="function"?()=>d(r):()=>Vu(r,d),b=dt(h,c,{deep:u,flush:"post"});return i.push(b),y&&tt(()=>{s||c(h(),h())}),b},r.watchGroup=(d,c,u=!0)=>r.watch(()=>d.map(y=>Vu(r,y)),c,!0,u),r.on=(d,c)=>{if(d==="dispose")return i.push(c),()=>{};t.has(d)||t.set(d,new Set),t.get(d).add(c);let u=()=>t.get(d)?.delete(c);return i.push(u),u},r.emit=(d,...c)=>{for(let u of[...t.get(d)||[]])u({},...c)},r.dispose=()=>{s=!0,i.splice(0).reverse().forEach(d=>d())},xn(r.dispose),r}function Rt(){let e=new Set,t=new Set,o=!1,i=(r,d=0)=>{if(o)return;let c=setTimeout(()=>{e.delete(c),r()},d);return e.add(c),c};i.cancel=r=>{clearTimeout(r),e.delete(r)};let s=(r,d)=>{if(o)return;let c=setInterval(r,d);return t.add(c),c};return s.cancel=r=>{clearInterval(r),t.delete(r)},xn(()=>{o=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:s}}function Ut(){let e=new Set;return xn(()=>{e.forEach(t=>t()),e.clear()}),(t,o,i,s)=>{t.addEventListener(o,i,s);let r=()=>{t.removeEventListener(o,i,s),e.delete(r)};return e.add(r),r}}var ma=function(e,t=e){let o=/\bXXXX-\d+\b/g;t.on("dark-mode",(O,U)=>{e.aceOption&&(e.aceOption.theme=U?"nord_dark":"chrome")});let i=Rt(),s=Ut();e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);let r={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},d=["license","txt"],c=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],u=["wav","mp3","ogg","wma","flac","aac","m4a"],y=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};let h=(()=>{try{return window.localStorage?.getItem("wrapLines")}catch{return null}})();e.wrapLines=(h??(window.matchMedia?.("(max-width: 767px)").matches?"false":"true"))!=="false",e.toggleWrap=function(){e.wrapLines=!e.wrapLines;try{window.localStorage?.setItem("wrapLines",String(e.wrapLines))}catch{}e.codeEditor?.session.setUseWrapMode(e.wrapLines)};function b(){return window.document.querySelector(".reading-layout .markdown-body")}function g(){let O=b();O&&(O.querySelectorAll("mark.md-find").forEach(U=>{U.replaceWith(window.document.createTextNode(U.textContent))}),O.normalize())}e.runMdFind=function(){g(),e.mdFindTotal=0,e.mdFindIndex=0;let O=(e.mdFindQuery||"").trim(),U=b();if(!O||!U)return;let C=!!e.mdFindCase,q=C?O:O.toLowerCase(),z=window.document.createTreeWalker(U,4),K=[];for(;z.nextNode();)(C?z.currentNode.nodeValue:z.currentNode.nodeValue.toLowerCase()).includes(q)&&K.push(z.currentNode);let ie=0;for(let ne of K){let Y=ne.nodeValue,he=C?Y:Y.toLowerCase(),Ee=window.document.createDocumentFragment(),Ue=0,Be;for(;(Be=he.indexOf(q,Ue))!==-1;){Ee.appendChild(window.document.createTextNode(Y.slice(Ue,Be)));let Je=window.document.createElement("mark");Je.className="md-find",Je.textContent=Y.slice(Be,Be+O.length),Ee.appendChild(Je),ie++,Ue=Be+O.length}Ee.appendChild(window.document.createTextNode(Y.slice(Ue))),ne.parentNode.replaceChild(Ee,ne)}e.mdFindTotal=ie,ie&&e.stepMdFind(0)},e.stepMdFind=function(O){let U=b();if(!U||!e.mdFindTotal)return;let C=U.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+O+C.length)%C.length,C.forEach((q,z)=>q.classList.toggle("is-current",z===e.mdFindIndex)),C[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(O){if(e.mdFindOpen=O===void 0?!e.mdFindOpen:O,!e.mdFindOpen){g(),e.mdFindTotal=0;return}tt(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let O=e.codeEditor;if(!O)return;O.focus(),O.execCommand("find");let U=()=>{let C=O.searchBox?.element;C&&(O.renderer.setScrollMargin(52,12,0,0),!C._dockObserver&&(C._dockObserver=new MutationObserver(()=>{O.renderer.setScrollMargin(C.style.display!=="none"?52:12,12,0,0)}),C._dockObserver.observe(C,{attributes:!0,attributeFilter:["style"]})))};U(),setTimeout(U,150)};let k=[[/^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/,"class"],[/^\s*(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/,"function"],[/^\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/,"function"],[/^\s*(?:async\s+)?def\s+([A-Za-z_]\w*)/,"function"],[/^\s*class\s+([A-Za-z_]\w*)/,"class"],[/^\s*func\s+(?:\([^)]*\)\s*)?([A-Za-z_]\w*)/,"function"],[/^\s*(?:pub\s+)?fn\s+([A-Za-z_]\w*)/,"function"],[/^\s*(?:public|private|protected|static|\s)+[\w<>\[\],\s]+\s+([A-Za-z_]\w*)\s*\([^;]*\)\s*\{?\s*$/,"function"]],R={content:null,list:[]};e.symbolsOpen=!1,e.symbols=function(){if(typeof e.content!="string"||e.content.length>2e6)return[];if(R.content===e.content)return R.list;let O=[];return e.content.split(` -`).forEach((U,C)=>{for(let[q,z]of k){let K=q.exec(U);if(K&&!/^(if|for|while|switch|return|catch)$/.test(K[1])){O.push({name:K[1],kind:z,line:C+1});break}}}),R={content:e.content,list:O.slice(0,300)},R.list},e.goToSymbol=function(O){e.symbolsOpen=!1;let U=e.codeEditor;U&&(U.scrollToLine(O-1,!0,!0,()=>{}),U.gotoLine(O,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+O),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let O=window.document.getElementById("goto-input");O&&(O.focus(),O.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let O=e.codeEditor;if(!O)return;let U=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),C=O.session.getLength();if(!U||+U[1]<1||+U[1]>C){e.gotoError="Enter a line from 1 to "+C;return}O.gotoLine(+U[1],U[2]?Math.max(0,+U[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",O.focus()},e.rootEntries=function(){return[...e.files||[]].sort((O,U)=>{let C=O.size==null,q=U.size==null;return C!==q?C?-1:1:O.name.localeCompare(U.name)})},e.formatSize=function(O){if(O==null)return"";if(O<1024)return O+" B";let U=O/1024,C=q=>q.toFixed(1).replace(/\.0$/,"");return U<1024?C(U)+" KB":U<1024*1024?C(U/1024)+" MB":C(U/1024/1024)+" GB"},e.fileSize=function(O){if(!O)return null;let U=O.replace(/^\/+/,""),C=(e.files||[]).find(q=>(q.path?q.path+"/":"")+q.name===U);return C&&C.size!=null?C.size:null},e.revealFolder=function(O){e.sidebarHidden=!1,e.sidebarCollapsed=!1,tt(()=>{let U=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(O):O)+'"]');U&&(U.closest("li")?.classList.contains("open")||U.click(),U.scrollIntoView({block:"nearest"}),U.focus())})};let S={content:null,n:0},N=O=>{if(S.content===O)return S.n;let U=O;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let C=[],q=K=>{Array.isArray(K)?C.push(K.join("")):typeof K=="string"&&C.push(K)};(U&&(U.cells||(U.worksheets||[]).flatMap(K=>K.cells||[]))||[]).forEach(K=>{q(K?.source??K?.input),(K?.outputs||[]).forEach(ie=>{q(ie?.text),ie?.data&&(q(ie.data["text/plain"]),q(ie.data["text/markdown"]),q(ie.data["text/html"])),q(ie?.traceback)})});let z=C.reduce((K,ie)=>K+(ie.match(o)||[]).length,0);return S={content:O,n:z},z};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(o)||[]).length},e.renderRedacted=qs;let m=O=>O.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(O){let U=e.renderRedacted(O);if(!U||typeof window.DOMParser!="function")return U;let C=new window.DOMParser().parseFromString("
"+U+"
","text/html"),q={};return C.querySelectorAll("h1, h2, h3").forEach(z=>{let K=z.id||m(z.textContent);q[K]?K+="-"+ ++q[K]:q[K]=1,z.id=K}),C.body.firstChild.innerHTML};let E={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(E.content===e.content)return E.list;let U=[...new window.DOMParser().parseFromString("
"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"
","text/html").querySelectorAll("h2, h3")].map(C=>({id:C.id,text:C.textContent.trim(),level:C.tagName==="H3"?3:2})).slice(0,40);return E={content:e.content,list:U},U},e.activeHeading=null,s(window,"scroll",()=>{let O=e.readmeToc?e.readmeToc():[];if(!O.length)return;let U=150,C="",q="";for(let z of O){let K=window.document.getElementById(z.id);if(!K)continue;let ie=K.getBoundingClientRect().top;ie{let C=[],q=[],z="",K=!1;for(let ie=0;ieie.length>1||ie[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let O=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:_(e.content,O)}}return M.rows},e.csvNumCol=O=>{let U=e.csvRows().slice(1).map(C=>C[O]).filter(C=>C!=null&&String(C).trim()!=="");return U.length>0&&U.every(C=>e.csvNumeric(C))},e.csvNumeric=O=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(O)&&/\d/.test(O),e.redactParts=function(O){let U=[],C=0,q,z=/\bXXXX-(\d+)\b/g;for(O=String(O||"");q=z.exec(O);)q.index>C&&U.push({t:O.slice(C,q.index)}),U.push({n:q[1]}),C=q.index+q[0].length;return C{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let O=e.content;if(e.type==="html"&&e.url)if(e.preview)O=e.sourceContent;else try{O=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(O),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function V(O){return r[O]?r[O]:O}function G(O){return O=="pdf"?"pdf":O=="html"||O=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(O)?"md":O=="org"?"org":O=="ipynb"?"IPython":d.indexOf(O)>-1?"text":c.indexOf(O)>-1?"image":y.indexOf(O)>-1?"media":u.indexOf(O)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(O){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=O,e.paths=O.split("/").filter(Boolean);let U=e.filePath.toLowerCase(),C=U.lastIndexOf(".");C>-1&&(U=U.substring(C+1));let q={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},z=V(U);e.languageName=q[z]??(z?z.charAt(0).toUpperCase()+z.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:V(U),onLoad:function(K){e.codeEditor=dn(K);{let Re=K.session,Fe=Re.getTokens.bind(Re),W=/\bXXXX-\d+\b/g;if(Re.getTokens=function(fe){let de=Fe(fe);if(!de.some(me=>me.value.indexOf("XXXX-")!==-1))return de;let ce=[];for(let me of de){if(me.value.indexOf("XXXX-")===-1){ce.push(me);continue}let Ie=0;W.lastIndex=0;let D;for(;D=W.exec(me.value);)D.index>Ie&&ce.push({type:me.type,value:me.value.slice(Ie,D.index)}),ce.push({type:"redacted.n"+D[0].slice(5),value:D[0]}),Ie=D.index+D[0].length;Ie`.ace_redacted.ace_n${ce+1}::after{content:"${ce+1}"}`).join(""),window.document.head.appendChild(fe)}K.renderer.updateFull(!0)}K.session.setUseWrapMode(e.wrapLines!==!1);let ie=K.container.closest?.(".file-card"),ne=()=>{if(!ie)return;let Re=K.renderer,Fe=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);ie.classList.toggle("at-right-edge",Fe<=2||Re.getScrollLeft()>=Fe-2)};K.session.on("changeScrollLeft",ne),K.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&K.setOption("hScrollBarAlwaysVisible",!0);let Y=ace.require("ace/range").Range,he=null;function Ee(Re,Fe){he!==null&&(K.session.removeMarker(he),he=null),Re!=null&&(he=K.session.addMarker(new Y(Re,0,Fe,1),"highlighted-line","fullLine"))}function Ue(Re){let Fe=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Fe){Ee(null);return}let W=parseInt(Fe[1])-1,fe=Fe[2]?parseInt(Fe[2])-1:W;Ee(W,fe),Re&&i.timeout(()=>{K.scrollToLine(W,!0,!0,function(){})},100)}Ue(!0);let Be=null;K.on("guttermousedown",function(Re){let Fe=Re.getDocumentPosition().row,W=Re.domEvent&&Re.domEvent.shiftKey,fe=Fe,de=Fe;W&&Be!==null?(fe=Math.min(Be,Fe),de=Math.max(Be,Fe)):Be=Fe;let ce=fe===de?`#L${fe+1}`:`#L${fe+1}-L${de+1}`,me=window.location.pathname+window.location.search+ce;e.preview||window.history.replaceState(null,"",me),Ee(fe,de),Re.stop()});let Je=s(window,"hashchange",()=>Ue(!1));K.setFontSize(e.aceOption.fontSize),K.setOptions({fontFamily:"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace"}),K.container.style.lineHeight="20px",K.renderer.setPadding(16),K.renderer.setScrollMargin(12,12,0,0),K.renderer.updateFontSize(),K.setReadOnly(e.aceOption.readOnly),K.setKeyboardHandler(e.aceOption.keyBinding),K.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),K.setOption("displayIndentGuides",!1),K.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(K.renderer.$cursorLayer.element.style.display="none"),K.setHighlightGutterLine(e.aceOption.highlightGutterLine),K.setShowInvisibles(e.aceOption.showInvisibles),K.setDisplayIndentGuides(e.aceOption.showIndentGuides),K.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),K.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),K.session.setUseSoftTabs(e.aceOption.useSoftTab),K.session.setTabSize(e.aceOption.tabSize),K.setBehavioursEnabled(e.aceOption.enableBehaviours),K.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets);let He=()=>!e.preview||K.isFocused(),et=s(window,"keydown",Re=>{if((Re.ctrlKey||Re.metaKey)&&!Re.altKey&&Re.key.toLowerCase()==="g"&&document.body.contains(K.container)&&He()){Re.preventDefault(),e.gotoLine();return}if(Re.altKey&&!Re.ctrlKey&&!Re.metaKey&&Re.key.toLowerCase()==="z"&&document.body.contains(K.container)&&He()){Re.preventDefault(),e.toggleWrap();return}(Re.ctrlKey||Re.metaKey)&&!Re.altKey&&Re.key.toLowerCase()==="f"&&document.body.contains(K.container)&&He()&&(Re.preventDefault(),e.findInFile())});return()=>{Je(),et()}}},e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=G(U)},e.renderFileContent=function(O,U,C,q){if(e.type=U,e.content=O,e.sourceContent=O,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(O,C),e.type="html"),e.type=="org"){let K=contentAbs2Relative(O);var z=new Org.Parser().parse(K).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(z.toString()),e.type="html"}e.type=="code"&&q=="application/octet-stream"&&(e.type="binary",e.content="binary"),i.timeout(()=>{Prism.highlightAll()},50)};let ee=["image","media","audio","pdf","IPython","binary"],X=["file_too_big","file_not_found","file_not_accessible","file_not_supported","folder_not_supported"];e.fileFrame=()=>e.filePath?ee.includes(e.type)?e.content!=null:e.type==="error"?X.includes(e.content):e.content==null&&["code","text"].includes(e.type):!1,e.fileKind=()=>{let O=(e.paths||[])[(e.paths||[]).length-1]||"",U=O.lastIndexOf("."),C=U>0?O.slice(U+1).toUpperCase():"";if(e.type==="image")return(C==="JPG"?"JPEG":C)+" image";let q={WEBM:"WebM",OGG:"Ogg",OGV:"Ogg",MOV:"QuickTime",M4V:"M4V",MKV:"Matroska"};return e.type==="media"?(q[C]||C)+" video":e.type==="audio"?C+" audio":e.type==="pdf"?"PDF":e.type==="IPython"?"Jupyter notebook":e.type==="binary"?"Binary file":e.languageName||(C?C+" file":"File")},e.imageSize="",e.onImageLoad=O=>{let U=O.target;U?.naturalWidth&&(e.imageSize=`${U.naturalWidth} \xD7 ${U.naturalHeight}`)},s(document,"click",O=>{e.preview&&(O.target.closest?.(".symbols")||(e.symbolsOpen=!1),O.target.closest?.(".tb-more")||(e.moreOpen=!1),O.target.closest?.(".tb-toc-m")||(e.tocOpen=!1),O.target.isConnected&&!O.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1))})};function ga(e,t,o){let i,s=!1,r="form-draft:"+o,d=()=>Object.fromEntries(t.map(g=>[g,e[g]])),c=()=>JSON.stringify(d()),u=g=>{for(let k of t)Object.prototype.hasOwnProperty.call(g,k)&&(e[k]=g[k]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},y=()=>{try{window.sessionStorage.removeItem(r)}catch{}},h=(g=!1)=>{if(i!==void 0){if(g&&document.querySelectorAll("input, select, textarea").forEach(k=>{k._field?.binding.state===e&&k._field.timer&&k._field.commit()}),e.unsavedChanges=c()!==i,e.draftSaved=!1,!e.unsavedChanges){y();return}try{window.sessionStorage.setItem(r,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:d()})),e.draftSaved=!0}catch{}}},b=()=>h(!0);return e.on("routeLeave",b),window.addEventListener("beforeunload",b),e.on("dispose",()=>window.removeEventListener("beforeunload",b)),{restore(){i=c();let g;try{g=JSON.parse(window.sessionStorage.getItem(r)||"null")}catch{}let k=g&&g.account===(e.user?.username||null)&&Date.now()-g.savedAt<30*6e4&&g.values;return k&&(u(g.values),e.draftRestored=!0),s||(s=!0,e.watch(()=>d(),()=>h(),!0)),e.unsavedChanges=c()!==i,!!k},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(g=>{g._field?.binding.state===e&&g._field.timer&&g._field.commit()}),JSON.parse(c())},accept(g){i=JSON.stringify(g),e.draftRestored=!1,h()},discard(){document.querySelectorAll("input, select, textarea").forEach(g=>{g._field?.binding.state!==e||!g._field.timer||(clearTimeout(g._field.timer),g._field.timer=null,g.value=g._field.binding.value??"")}),i!==void 0&&u(JSON.parse(i)),e.draftRestored=!1,h()},clear(){i=c(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,y()}}}var wa={};xp(wa,{bigNum:()=>og,date:()=>fg,dateEcho:()=>ya,diff:()=>rg,duration:()=>uo,filter:()=>cg,humanFileSize:()=>ng,humanTime:()=>va,limitTo:()=>ug,money:()=>lg,number:()=>ag,orderBy:()=>pg,plural:()=>hg,shortDate:()=>ba,statusLabel:()=>ig,statusMsg:()=>Yi,title:()=>sg,uppercase:()=>dg});var ng=e=>String(window.humanFileSize(e)).replace(/([KMGTPEZY])iB$/,"$1B").replace(/\.0 ([KMGTPEZY]?B)$/," $1"),og=(function(){return function(t){let o=Number(t)||0,i=Math.abs(o);return i<1e3?String(o):i<1e4?(o/1e3).toFixed(1).replace(/\.0$/,"")+"k":i<1e6?Math.round(o/1e3)+"k":i<1e7?(o/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(o/1e6)+"M"}})(),va=(function(){return function(t){if(!t)return"never";var o=null;t instanceof Date&&(o=t,t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(o=new Date(t),t=Math.round((Date.now()-o)/1e3));var i=t<0?"from now":"ago";if(Math.abs(t)>7200*24)return(o&&!isNaN(o)?o:new Date(Date.now()-t*1e3)).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"});t=Math.abs(t);for(var s=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],r=["year","month","week","day","hour","minute","second"],d=0;d1&&(u+="s"),c>=1)return c+" "+u+" "+i}return"0 seconds "+i}})(),sg=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),o=t.map(function(i){return i.charAt(0).toUpperCase()+i.substring(1,i.length)});return o.join(" ")}})(),ig=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var o=String(t).replace(/[_-]+/g," ").toLowerCase();return o.charAt(0).toUpperCase()+o.slice(1)}})(),Yi=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",repository_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var o=t.match(/^rate_limited:(\d+)$/);if(o){var i=Math.max(0,Math.ceil((parseInt(o[1],10)-Date.now())/1e3));if(i<=0)return"Rate limited \u2014 resuming soon";var s=Math.floor(i/60),r=i%60;return"Rate limited \u2014 retrying in "+(s>0?s+"m "+r+"s":r+"s")}if(e[t])return e[t];var d=/^([a-z0-9]+(?:_[a-z0-9]+)+):\s*\S/.exec(t);if(d){if(e[d[1]])return e[d[1]];var c=d[1].replace(/_/g," ");return c.charAt(0).toUpperCase()+c.slice(1)}if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var u=t.replace(/_/g," ");return u.charAt(0).toUpperCase()+u.slice(1)}return t}})(),rg=(function(e){let t=i=>i.replace(/&/g,"&").replace(//g,">");function o(i,s){if(!s)return;let r=s.newPath&&s.newPath!=="/dev/null"?s.newPath:s.oldPath||"",d=s.oldPath==="/dev/null"?"added":s.newPath==="/dev/null"?"deleted":s.oldPath&&s.newPath&&s.oldPath!==s.newPath?"renamed":"modified";if(i.push('
'),i.push('
'+t(r)+''+d+"
"),s.lines.length){i.push('');for(let c of s.lines)i.push('");i.push("
'+(c.oldNo||"")+''+(c.newNo||"")+''+(c.kind==="add"?"+":c.kind==="remove"?"-":"")+''+t(c.text)+"
")}i.push("
")}return function(i){if(!i)return i;let s=[],r=null,d=0,c=0,u=()=>(r||(r={oldPath:"",newPath:"",lines:[]}),r),y=()=>{r&&(r.lines.length||r.oldPath||r.newPath)&&(o(s,r),r=null)},h=i.split(` -`);for(let b=0;be});function ag(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function lg(e,t="EUR"){let o=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:o%1?2:0,maximumFractionDigits:2}).format(o)}function dg(e){return String(e??"").toUpperCase()}function ug(e,t,o=0){return(e||[]).slice(o,o+t)}function cg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function pg(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((i,s)=>{for(let r of o){let d=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let c=r.split(".").reduce((y,h)=>y?.[h],i),u=r.split(".").reduce((y,h)=>y?.[h],s);if(typeof c=="string"&&(c=c.toLowerCase()),typeof u=="string"&&(u=u.toLowerCase()),c!==u)return(c==null?-1:u==null?1:ci[s])}function hg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function ya(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),o=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(o))return"";let i=o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),s=new Date;s.setHours(0,0,0,0);let r=Math.round((o-s)/864e5),d;if(r===0)d="today";else if(r===1)d="tomorrow";else if(r===-1)d="yesterday";else{let c=Math.abs(r),u=Math.round(c/30.44),y=c<14?[c,"day"]:c<60?[Math.round(c/7),"week"]:u<18?[u,"month"]:[Math.round(c/365.25),"year"],h=y[0]+" "+y[1]+(y[0]===1?"":"s");d=r>0?"in "+h:h+" ago"}return i+" \xB7 "+d}function uo(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let o=e/1e3;if(o<60)return+(o<10?o.toFixed(2):o.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),s=Math.round(o);return s<3600?Math.floor(s/60)+"m "+i(s%60)+"s":Math.floor(s/3600)+"h "+i(Math.floor(s%3600/60))+"m"}function ba(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let o={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(o.year="numeric"),t.toLocaleDateString(void 0,o)}var Xi=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Qi(e,{flags:t,keys:o,count:i,onChange:s=()=>{}}){if(e.segView=()=>{let r=t()||{};if(o.every(c=>!!r[c]))return"all";let d=o.filter(c=>!!r[c]);return d.length===1?d[0]:"custom"},e.setSegView=r=>{let d=t();if(d){for(let c of o)d[c]=r==="all"?!0:c===r;s()}},e.segCount=r=>r==="all"?o.reduce((d,c)=>d+i(c),0):i(r),t()&&e.segView()==="custom")for(let r of o)t()[r]=!0}var qu=function(e,t,o){let i=Rt(),s=Ut();Hu(i,s),e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let d=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showStatusMessage=S=>{let N=S.statusMessage||"(no message)";window.prompt(`Status message for ${S.repoId} (${S.status}):`,N)},e.fetchGithubInfo=S=>{let N=window.open("","_blank");N&&N.document.write("
Loading GitHub info for "+S.repoId+"...
"),t.get("/api/admin/repos/"+S.repoId+"/github").then(m=>{N&&(N.document.open(),N.document.write('
'+JSON.stringify(m.data,null,2).replace(/[<>]/g,E=>E==="<"?"<":">")+"
"),N.document.close())},m=>{let E=m&&m.data?JSON.stringify(m.data,null,2):String(m);N&&(N.document.body.innerHTML='
'+E+"
")})},e.statusCountFor=S=>{let N=(e.statusCounts||[]).find(m=>m._id===S);return N?N.count:0},e.statusStorageFor=S=>{let N=(e.statusCounts||[]).find(m=>m._id===S);return N?N.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=S=>{e.query.sort===S?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=S,e.query.direction="desc"),e.query.page=1},e.sortIcon=S=>e.query.sort===S?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.repos.filterPrefs",u={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(c)||{};e.query=Object.assign({},u,y,{page:1,search:""});let h=o.search();h.owner&&(e.query.owner=h.owner),h.conference&&(e.query.conference=h.conference),h.search&&(e.query.search=h.search);let b="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let N=Object.assign({},e.query);delete N.page,e.presets=(e.presets||[]).filter(m=>m.name!==S),e.presets.push({name:S,query:N}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(N=>N.name!==S.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(S=>{e.selected[S.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(S=>e.selected[S.repoId]),e.bulkRefresh=()=>{let S=e.selectedRepos();S.length&&confirm(`Force refresh ${S.length} repositories?`)&&S.forEach(N=>e.updateRepository(N))},e.bulkRemoveCache=()=>{let S=e.selectedRepos();S.length&&confirm(`Purge cache for ${S.length} repositories?`)&&S.forEach(N=>e.removeCache(N))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let S=new URLSearchParams(Object.entries(e.query).filter(([,N])=>N!==""&&N!==!1&&N!=null));S.set("format","csv"),S.set("limit","10000"),window.open("/api/admin/repos?"+S.toString(),"_blank")},e.removeCache=S=>{confirm("Remove cached files for "+S.repoId+"?")&&t.delete("/api/admin/repos/"+S.repoId).then(()=>g(),N=>console.error(N))},e.removeRepository=S=>{confirm("Remove repository "+S.repoId+"?")&&t.delete("/api/repo/"+S.repoId+"/").then(()=>g(),N=>console.error(N))},e.updateRepository=S=>{let N=ot({title:`Refreshing ${S.repoId}...`,date:new Date,body:`The repository ${S.repoId} is going to be refreshed.`});e.toasts.push(N),t.post(`/api/repo/${S.repoId}/refresh`).then(m=>{m.data.status=="ready"?N.title=`${S.repoId} is refreshed.`:N.title=`Refreshing of ${S.repoId}.`},m=>{N.title=`Error during the refresh of ${S.repoId}.`,N.body=m.body})},e.filtersOpen=!1,e.fetchError=null;function g(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(S=>{e.total=S.data.total,e.totalPage=Math.ceil(S.data.total/e.query.limit),e.repositories=S.data.results,e.allSelected=!1},S=>{e.fetchError=S&&S.data&&S.data.error||"Failed to load repositories",console.error(S)})}function k(){let S=Object.assign({},e.query,{page:1,limit:1,ready:!0,expired:!0,removed:!0,error:!0,preparing:!0});t.get("/api/admin/repos",{params:S}).then(N=>{e.statusCounts=N.data.statusCounts||[],e.totalSize=N.data.totalSize||0},()=>{})}e.showAllStatuses=()=>Object.assign(e.query,{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0,page:1}),Qi(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:S=>S==="preparing"?e.statusCountFor("preparing")+e.statusCountFor("download"):S==="expired"?e.statusCountFor("expired")+e.statusCountFor("expiring"):S==="removed"?e.statusCountFor("removed")+e.statusCountFor("removing"):e.statusCountFor(S),onChange:()=>{e.query.page=1}}),g(),k();let R=null;e.watch("query",()=>{i.timeout.cancel(R),R=i.timeout(()=>{g(),k()},500);let{page:S,search:N,...m}=e.query;saveFilterPrefs(c,m),d()},!0),d()},$u=function(e,t,o){let i=Rt(),s=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let r=g=>{if(g.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){g.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=g=>{g==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[g]="",e.query.page=1},e.chips=[];let d=()=>{let g=[];e.query.role&&g.push({key:"role",label:"Role",value:e.query.role}),e.chips=g};e.statusCountFor=g=>{let k=(e.statusCounts||[]).find(R=>R._id===g);return k?k.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=g=>{e.query.sort===g?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=g,e.query.direction="desc"),e.query.page=1},e.sortIcon=g=>e.query.sort===g?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.users.filterPrefs",u={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},y=loadFilterPrefs(c)||{};e.query=Object.assign({},u,y,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(g=>{e.selected[g.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(g=>e.selected[g.username]),e.banUser=g=>{confirm(`Ban user ${g.username}?`)&&t.post(`/api/admin/users/${g.username}/ban`).then(h,k=>console.error(k))},e.activateUser=g=>{t.post(`/api/admin/users/${g.username}/activate`).then(h,k=>console.error(k))},e.bulkBan=()=>{let g=e.selectedUsers();g.length&&confirm(`Ban ${g.length} users?`)&&g.forEach(k=>e.banUser(k))},e.exportCsv=()=>{let g=new URLSearchParams(Object.entries(e.query).filter(([,k])=>k!==""&&k!==!1&&k!=null));g.set("format","csv"),g.set("limit","10000"),window.open("/api/admin/users?"+g.toString(),"_blank")},e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(g=>{e.total=g.data.total,e.totalPage=Math.ceil(g.data.total/e.query.limit),e.users=g.data.results,e.statusCounts=g.data.statusCounts||[],e.allSelected=!1},g=>{e.fetchError=g&&g.data&&g.data.error||"Failed to load users",console.error(g)})}h();let b=null;e.watch("query",()=>{i.timeout.cancel(b),b=i.timeout(h,500);let{page:g,search:k,...R}=e.query;saveFilterPrefs(c,R),d()},!0),d()},Lu=function(e,t,o,i){let s=Rt();Hu(s,Ut()),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let r="admin.user.filterPrefs",d={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},c=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},d.filters.status,c.filters&&c.filters.status||{})},e.query={sort:c.sort||d.sort,direction:c.direction||d.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=g=>{e.query.sort===g?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=g,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=g=>e.query.sort===g?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=g=>(e.repositories||[]).filter(k=>Xi(k.status)===g).length,Qi(e,{flags:()=>e.filters.status,keys:["ready","preparing","error","expired","removed"],count:g=>e.statusCountFor(g)}),e.repoFiler=g=>e.filters.status[Xi(g.status)]==!1?!1:!!(e.search.trim().length==0||g.source.fullName.indexOf(e.search)>-1||g.repoId.indexOf(e.search)>-1||g.statusMessage&&g.statusMessage.indexOf(e.search)>-1||g.conference&&g.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(g=>{e.selected[g.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(g=>e.selected[g.repoId]),e.bulkRefresh=()=>{let g=e.selectedRepos();g.length&&confirm(`Force refresh ${g.length} repositories?`)&&g.forEach(k=>e.updateRepository(k))},e.bulkRemoveCache=()=>{let g=e.selectedRepos();g.length&&confirm(`Purge cache for ${g.length} repositories?`)&&g.forEach(k=>e.removeCache(k))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let g=e.filteredRepositories||e.repositories,R=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),S=g.map(E=>[E.repoId,E.status,E.statusMessage||"",E.pageView||0,E.anonymizeDate||"",E.source&&E.source.fullName||"",E.conference||"",E.size&&E.size.storage||0].map(M=>{let _=String(M??"");return/[",\n\r]/.test(_)?'"'+_.replace(/"/g,'""')+'"':_}).join(",")),N=new Blob([R+` +`+JSON.stringify(t):""}`},[ut.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${_m(t)}" via a navigation guard.`},[ut.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ut.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ut.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function as(e,t){return Je(new Error,{type:e,[hu]:!0},t)}function gn(e,t){return e instanceof Error&&hu in e&&(t==null||!!(e.type&t))}var qm=["params","query","hash"];function _m(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of qm)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function mu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;io&&oa(o)):[i&&oa(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function gu(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Wt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var vu=Symbol(""),fa=Symbol(""),Ui=Symbol(""),Bi=Symbol(""),zi=Symbol("");function Us(){let e=[];function t(i){return e.push(i),()=>{let o=e.indexOf(i);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Nn(e,t,s,i,o,r=d=>d()){let d=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,u)=>{let y=h=>{h===!1?u(as(ut.NAVIGATION_ABORTED,{from:s,to:t})):h instanceof Error?u(h):Vm(h)?u(as(ut.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(d&&i.enterCallbacks[o]===d&&typeof h=="function"&&d.push(h),p())},m=r(()=>e.call(i&&i.instances[o],t,s,y)),b=Promise.resolve(m);e.length<3&&(b=b.then(y)),b.catch(h=>u(h))})}function Hi(e,t,s,i,o=r=>r()){let r=[];for(let d of e)for(let p in d.components){let u=d.components[p];if(!(t!=="beforeRouteEnter"&&!d.instances[p]))if(xd(u)){let y=(u.__vccOpts||u)[t];y&&r.push(Nn(y,s,i,d,p,o))}else{let y=u();r.push(()=>y.then(m=>{if(!m)throw new Error(`Couldn't resolve component "${p}" at "${d.path}"`);let b=gm(m)?m.default:m;d.mods[p]=m,d.components[p]=b;let h=(b.__vccOpts||b)[t];return h&&Nn(h,s,i,d,p,o)()}))}}return r}function yu(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let d=0;drs(y,p))?i.push(p):s.push(p));let u=e.matched[d];u&&(t.matched.find(y=>rs(y,u))||o.push(u))}return[s,i,o]}var $m=()=>location.protocol+"//"+location.host;function Du(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let d=o.includes(e.slice(r))?e.slice(r).length:1,p=o.slice(d);return p[0]!=="/"&&(p="/"+p),la(p,"")}return la(s,e)+i+o}function Lm(e,t,s,i){let o=[],r=[],d=null,p=({state:h})=>{let w=Du(e,location),R=s.value,S=t.value,N=0;if(h){if(s.value=w,t.value=h,d&&d===R){d=null;return}N=S?h.position-S.position:0}else i(w);o.forEach(v=>{v(s.value,R,{delta:N,type:Li.pop,direction:N?N>0?Fi.forward:Fi.back:Fi.unknown})})};function u(){d=s.value}function y(h){o.push(h);let w=()=>{let R=o.indexOf(h);R>-1&&o.splice(R,1)};return r.push(w),w}function m(){if(document.visibilityState==="hidden"){let{history:h}=window;if(!h.state)return;h.replaceState(Je({},h.state,{scroll:Vo()}),"")}}function b(){for(let h of r)h();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",m)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",m),{pauseListeners:u,listen:y,destroy:b}}function bu(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?Vo():null}}function Fm(e){let{history:t,location:s}=window,i={value:Du(e,s)},o={value:t.state};o.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,y,m){let b=e.indexOf("#"),h=b>-1?(s.host&&document.querySelector("base")?e:e.slice(b))+u:$m()+e+u;try{t[m?"replaceState":"pushState"](y,"",h),o.value=y}catch(w){console.error(w),s[m?"replace":"assign"](h)}}function d(u,y){r(u,Je({},t.state,bu(o.value.back,u,o.value.forward,!0),y,{position:o.value.position}),!0),i.value=u}function p(u,y){let m=Je({},o.value,t.state,{forward:u,scroll:Vo()});r(m.current,m,!0),r(u,Je({},bu(i.value,u,null),{position:m.position+1},y),!1),i.value=u}return{location:i,state:o,push:p,replace:d}}function Tu(e){e=du(e);let t=Fm(e),s=Lm(e,t.state,t.location,t.replace);function i(r,d=!0){d||s.pauseListeners(),history.go(r)}let o=Je({location:"",base:e,go:i,createHref:uu.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}var ds=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),gt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(gt||{}),Um={type:ds.Static,value:""},Bm=/[a-zA-Z0-9_]/;function zm(e){if(!e)return[[]];if(e==="/")return[[Um]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(w){throw new Error(`ERR (${s})/"${y}": ${w}`)}let s=gt.Static,i=s,o=[],r;function d(){r&&o.push(r),r=[]}let p=0,u,y="",m="";function b(){y&&(s===gt.Static?r.push({type:ds.Static,value:y}):s===gt.Param||s===gt.ParamRegExp||s===gt.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${y}) must be alone in its segment. eg: '/:ids+.`),r.push({type:ds.Param,value:y,regexp:m,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),y="")}function h(){y+=u}for(;pt.length?t.length===1&&t[0]===Dt.Static+Dt.Segment?1:-1:0}function Ou(e,t){let s=0,i=e.score,o=t.score;for(;s0&&t[t.length-1]<0}var Km={strict:!1,end:!0,sensitive:!1};function Ym(e,t,s){let i=Gm(zm(e.path),s),o=Je(i,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Xm(e,t){let s=[],i=new Map;t=ra(Km,t);function o(b){return i.get(b)}function r(b,h,w){let R=!w,S=Eu(b);S.aliasOf=w&&w.record;let N=ra(t,b),v=[S];if("alias"in b){let V=typeof b.alias=="string"?[b.alias]:b.alias;for(let _ of V)v.push(Eu(Je({},S,{components:w?w.record.components:S.components,path:_,aliasOf:w?w.record:S})))}let E,M;for(let V of v){let{path:_}=V;if(h&&_[0]!=="/"){let G=h.record.path,te=G[G.length-1]==="/"?"":"/";V.path=h.record.path+(_&&te+_)}if(E=Ym(V,h,N),w?w.alias.push(E):(M=M||E,M!==E&&M.alias.push(E),R&&b.name&&!Su(E)&&d(b.name)),Iu(E)&&u(E),S.children){let G=S.children;for(let te=0;te{d(M)}:Fs}function d(b){if(ca(b)){let h=i.get(b);h&&(i.delete(b),s.splice(s.indexOf(h),1),h.children.forEach(d),h.alias.forEach(d))}else{let h=s.indexOf(b);h>-1&&(s.splice(h,1),b.record.name&&i.delete(b.record.name),b.children.forEach(d),b.alias.forEach(d))}}function p(){return s}function u(b){let h=Zm(b,s);s.splice(h,0,b),b.record.name&&!Su(b)&&i.set(b.record.name,b)}function y(b,h){let w,R={},S,N;if("name"in b&&b.name){if(w=i.get(b.name),!w)throw as(ut.MATCHER_NOT_FOUND,{location:b});N=w.record.name,R=Je(Cu(h.params,w.keys.filter(M=>!M.optional).concat(w.parent?w.parent.keys.filter(M=>M.optional):[]).map(M=>M.name)),b.params&&Cu(b.params,w.keys.map(M=>M.name))),S=w.stringify(R)}else if(b.path!=null)S=b.path,w=s.find(M=>M.re.test(S)),w&&(R=w.parse(S),N=w.record.name);else{if(w=h.name?i.get(h.name):s.find(M=>M.re.test(h.path)),!w)throw as(ut.MATCHER_NOT_FOUND,{location:b,currentLocation:h});N=w.record.name,R=Je({},h.params,b.params),S=w.stringify(R)}let v=[],E=w;for(;E;)v.unshift(E.record),E=E.parent;return{name:N,path:S,params:R,matched:v,meta:Qm(v)}}e.forEach(b=>r(b));function m(){s.length=0,i.clear()}return{addRoute:r,resolve:y,removeRoute:d,clearRoutes:m,getRoutes:p,getRecordMatcher:o}}function Cu(e,t){let s={};for(let i of t)i in e&&(s[i]=e[i]);return s}function Eu(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Jm(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Jm(e){let t={},s=e.props||!1;if("component"in e)t.default=s;else for(let i in e.components)t[i]=typeof s=="object"?s[i]:s;return t}function Su(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qm(e){return e.reduce((t,s)=>Je(t,s.meta),{})}function Zm(e,t){let s=0,i=t.length;for(;s!==i;){let r=s+i>>1;Ou(e,t[r])<0?i=r:s=r+1}let o=xm(e);return o&&(i=t.lastIndexOf(o,i-1)),i}function xm(e){let t=e;for(;t=t.parent;)if(Iu(t)&&Ou(e,t)===0)return t}function Iu({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Nu(e){let t=Mt(Ui),s=Mt(Bi),i=!1,o=null,r=Rt(()=>{let m=kn(e.to);return t.resolve(m)}),d=Rt(()=>{let{matched:m}=r.value,{length:b}=m,h=m[b-1],w=s.matched;if(!h||!w.length)return-1;let R=w.findIndex(rs.bind(null,h));if(R>-1)return R;let S=Ru(m[b-2]);return b>1&&Ru(h)===S&&w[w.length-1].path!==S?w.findIndex(rs.bind(null,m[b-2])):R}),p=Rt(()=>d.value>-1&&og(s.params,r.value.params)),u=Rt(()=>d.value>-1&&d.value===s.matched.length-1&&da(s.params,r.value.params));function y(m={}){if(sg(m)){let b=t[kn(e.replace)?"replace":"push"](kn(e.to)).catch(Fs);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>b),b}return Promise.resolve()}return{route:r,href:Rt(()=>r.value.href),isActive:p,isExactActive:u,navigate:y}}function eg(e){return e.length===1?e[0]:e}var tg=Ao({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Nu,setup(e,{slots:t}){let s=st(Nu(e)),{options:i}=Mt(Ui),o=Rt(()=>({[Pu(e.activeClass,i.linkActiveClass,"router-link-active")]:s.isActive,[Pu(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{let r=t.default&&eg(t.default(s));return e.custom?r:De("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),ng=tg;function sg(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function og(e,t){for(let s in t){let i=t[s],o=e[s];if(typeof i=="string"){if(i!==o)return!1}else if(!Wt(o)||o.length!==i.length||i.some((r,d)=>r.valueOf()!==o[d].valueOf()))return!1}return!0}function Ru(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var Pu=(e,t,s)=>e??t??s,ig=Ao({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){let i=Mt(zi),o=Rt(()=>e.route||i.value),r=Mt(fa,0),d=Rt(()=>{let y=kn(r),{matched:m}=o.value,b;for(;(b=m[y])&&!b.components;)y++;return y}),p=Rt(()=>o.value.matched[d.value]);os(fa,Rt(()=>d.value+1)),os(vu,p),os(zi,o);let u=St();return dt(()=>[u.value,p.value,e.name],([y,m,b],[h,w,R])=>{m&&(m.instances[b]=y,w&&w!==m&&y&&y===h&&(m.leaveGuards.size||(m.leaveGuards=w.leaveGuards),m.updateGuards.size||(m.updateGuards=w.updateGuards))),y&&m&&(!w||!rs(m,w)||!h)&&(m.enterCallbacks[b]||[]).forEach(S=>S(y))},{flush:"post"}),()=>{let y=o.value,m=e.name,b=p.value,h=b&&b.components[m];if(!h)return Au(s.default,{Component:h,route:y});let w=b.props[m],R=w?w===!0?y.params:typeof w=="function"?w(y):w:null,N=De(h,Je({},R,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(b.instances[m]=null)},ref:u}));return Au(s.default,{Component:N,route:y})||N}}});function Au(e,t){if(!e)return null;let s=e(t);return s.length===1?s[0]:s}var ha=ig;function Mu(e){let t=Xm(e.routes,e),s=e.parseQuery||mu,i=e.stringifyQuery||pa,o=e.history,r=Us(),d=Us(),p=Us(),u=gi(Rn),y=Rn;ls&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let m=_i.bind(null,W=>""+W),b=_i.bind(null,ru),h=_i.bind(null,Ls);function w(W,fe){let de,ce;return ca(W)?(de=t.getRecordMatcher(W),ce=fe):ce=W,t.addRoute(ce,de)}function R(W){let fe=t.getRecordMatcher(W);fe&&t.removeRoute(fe)}function S(){return t.getRoutes().map(W=>W.record)}function N(W){return!!t.getRecordMatcher(W)}function v(W,fe){if(fe=Je({},fe||u.value),typeof W=="string"){let T=$i(s,W,fe.path),F=t.resolve({path:T.path},fe),J=o.createHref(T.fullPath);return Je(T,F,{params:h(F.params),hash:Ls(T.hash),redirectedFrom:void 0,href:J})}let de;if(W.path!=null)de=Je({},W,{path:$i(s,W.path,fe.path).path});else{let T=Je({},W.params);for(let F in T)T[F]==null&&delete T[F];de=Je({},W,{params:b(T)}),fe.params=b(fe.params)}let ce=t.resolve(de,fe),me=W.hash||"";ce.params=m(h(ce.params));let Me=au(i,Je({},W,{hash:iu(me),path:ce.path})),A=o.createHref(Me);return Je({fullPath:Me,hash:me,query:i===pa?gu(W.query):W.query||{}},ce,{redirectedFrom:void 0,href:A})}function E(W){return typeof W=="string"?$i(s,W,u.value.path):Je({},W)}function M(W,fe){if(y!==W)return as(ut.NAVIGATION_CANCELLED,{from:fe,to:W})}function V(W){return te(W)}function _(W){return V(Je(E(W),{replace:!0}))}function G(W,fe){let de=W.matched[W.matched.length-1];if(de&&de.redirect){let{redirect:ce}=de,me=typeof ce=="function"?ce(W,fe):ce;return typeof me=="string"&&(me=me.includes("?")||me.includes("#")?me=E(me):{path:me},me.params={}),Je({query:W.query,hash:W.hash,params:me.path!=null?{}:W.params},me)}}function te(W,fe){let de=y=v(W),ce=u.value,me=W.state,Me=W.force,A=W.replace===!0,T=G(de,ce);if(T)return te(Je(E(T),{state:typeof T=="object"?Je({},me,T.state):me,force:Me,replace:A}),fe||de);let F=de;F.redirectedFrom=fe;let J;return!Me&&lu(i,ce,de)&&(J=as(ut.NAVIGATION_DUPLICATED,{to:F,from:ce}),Be(ce,ce,!0,!1)),(J?Promise.resolve(J):U(F,ce)).catch(H=>gn(H)?gn(H,ut.NAVIGATION_GUARD_REDIRECT)?H:Ue(H):he(H,F,ce)).then(H=>{if(H){if(gn(H,ut.NAVIGATION_GUARD_REDIRECT))return te(Je({replace:A},E(H.to),{state:typeof H.to=="object"?Je({},me,H.to.state):me,force:Me}),fe||F)}else H=L(F,ce,!0,A,me);return C(F,ce,H),H})}function X(W,fe){let de=M(W,fe);return de?Promise.reject(de):Promise.resolve()}function O(W){let fe=et.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(W):W()}function U(W,fe){let de,[ce,me,Me]=yu(W,fe);de=Hi(ce.reverse(),"beforeRouteLeave",W,fe);for(let T of ce)T.leaveGuards.forEach(F=>{de.push(Nn(F,W,fe))});let A=X.bind(null,W,fe);return de.push(A),Fe(de).then(()=>{de=[];for(let T of r.list())de.push(Nn(T,W,fe));return de.push(A),Fe(de)}).then(()=>{de=Hi(me,"beforeRouteUpdate",W,fe);for(let T of me)T.updateGuards.forEach(F=>{de.push(Nn(F,W,fe))});return de.push(A),Fe(de)}).then(()=>{de=[];for(let T of Me)if(T.beforeEnter)if(Wt(T.beforeEnter))for(let F of T.beforeEnter)de.push(Nn(F,W,fe));else de.push(Nn(T.beforeEnter,W,fe));return de.push(A),Fe(de)}).then(()=>(W.matched.forEach(T=>T.enterCallbacks={}),de=Hi(Me,"beforeRouteEnter",W,fe,O),de.push(A),Fe(de))).then(()=>{de=[];for(let T of d.list())de.push(Nn(T,W,fe));return de.push(A),Fe(de)}).catch(T=>gn(T,ut.NAVIGATION_CANCELLED)?T:Promise.reject(T))}function C(W,fe,de){p.list().forEach(ce=>O(()=>ce(W,fe,de)))}function L(W,fe,de,ce,me){let Me=M(W,fe);if(Me)return Me;let A=fe===Rn,T=ls?history.state:{};de&&(ce||A?o.replace(W.fullPath,Je({scroll:A&&T&&T.scroll},me)):o.push(W.fullPath,me)),u.value=W,Be(W,fe,de,A),Ue()}let z;function K(){z||(z=o.listen((W,fe,de)=>{if(!Re.listening)return;let ce=v(W),me=G(ce,Re.currentRoute.value);if(me){te(Je(me,{replace:!0,force:!0}),ce).catch(Fs);return}y=ce;let Me=u.value;ls&&pu(ua(Me.fullPath,de.delta),Vo()),U(ce,Me).catch(A=>gn(A,ut.NAVIGATION_ABORTED|ut.NAVIGATION_CANCELLED)?A:gn(A,ut.NAVIGATION_GUARD_REDIRECT)?(te(Je(E(A.to),{force:!0}),ce).then(T=>{gn(T,ut.NAVIGATION_ABORTED|ut.NAVIGATION_DUPLICATED)&&!de.delta&&de.type===Li.pop&&o.go(-1,!1)}).catch(Fs),Promise.reject()):(de.delta&&o.go(-de.delta,!1),he(A,ce,Me))).then(A=>{A=A||L(ce,Me,!1),A&&(de.delta&&!gn(A,ut.NAVIGATION_CANCELLED)?o.go(-de.delta,!1):de.type===Li.pop&&gn(A,ut.NAVIGATION_ABORTED|ut.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),C(ce,Me,A)}).catch(Fs)}))}let ie=Us(),se=Us(),Y;function he(W,fe,de){Ue(W);let ce=se.list();return ce.length?ce.forEach(me=>me(W,fe,de)):console.error(W),Promise.reject(W)}function Se(){return Y&&u.value!==Rn?Promise.resolve():new Promise((W,fe)=>{ie.add([W,fe])})}function Ue(W){return Y||(Y=!W,K(),ie.list().forEach(([fe,de])=>W?de(W):fe()),ie.reset()),W}function Be(W,fe,de,ce){let{scrollBehavior:me}=e;if(!ls||!me)return Promise.resolve();let Me=!de&&fu(ua(W.fullPath,0))||(ce||!de)&&history.state&&history.state.scroll||null;return tt().then(()=>me(W,fe,Me)).then(A=>A&&cu(A)).catch(A=>he(A,W,fe))}let Qe=W=>o.go(W),He,et=new Set,Re={currentRoute:u,listening:!0,addRoute:w,removeRoute:R,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:S,resolve:v,options:e,push:V,replace:_,go:Qe,back:()=>Qe(-1),forward:()=>Qe(1),beforeEach:r.add,beforeResolve:d.add,afterEach:p.add,onError:se.add,isReady:Se,install(W){W.component("RouterLink",ng),W.component("RouterView",ha),W.config.globalProperties.$router=Re,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>kn(u)}),ls&&!He&&u.value===Rn&&(He=!0,V(o.location).catch(ce=>{}));let fe={};for(let ce in Rn)Object.defineProperty(fe,ce,{get:()=>u.value[ce],enumerable:!0});W.provide(Ui,Re),W.provide(Bi,fo(fe)),W.provide(zi,u);let de=W.unmount;et.add(W),W.unmount=function(){et.delete(W),et.size<1&&(y=Rn,z&&z(),z=null,u.value=Rn,He=!1,Y=!1),de()}}};function Fe(W){return W.reduce((fe,de)=>fe.then(()=>O(de)),Promise.resolve())}return Re}function Vu(e){return Mt(Bi)}function Gi(e){return["author_pass","repo_extend","repo_never","repo_slot","repo_pack"].includes(e)}var ji=new WeakMap;function Wi(e){if(!ji.has(e)){let t=e.get("/api/billing/").finally(()=>ji.delete(e));ji.set(e,t)}return ji.get(e)}function Ki(e,t,s=()=>{},i={}){let o=new URLSearchParams(window.location.search).get("billing");e.billing=null,e.billingLoading=!0,e.billingBusy=!1,e.billingError="",e.billingNotice="",e.billingPending=o==="success",e.billingRepository="";let r={billing_invalid_draft:"This draft could not be saved. Your form is unchanged. Try again.",billing_draft_not_found:"This checkout draft is unavailable or expired. Your local form is unchanged.",billing_recovery_required:"Your earlier payment needs verification. Please contact support before paying again.",billing_checkout_disabled:"New purchases are temporarily unavailable. You can still manage existing billing.",billing_unavailable:"Payments are not available yet. Please try again later.",billing_subscription_exists:"You already have a subscription. Use Manage billing to change or cancel it.",billing_checkout_in_progress:"You have another checkout open. Complete it, or wait up to 30 minutes for it to expire, before choosing a different option.",billing_busy:"Another billing request is processing. Please try again shortly.",billing_already_paid:"This repository or conference already has this paid option.",billing_invalid_review_window:"Conference packages cover up to 180 days. Check the review dates.",billing_invalid_conference:"Only a conference owner can pay for a conference awaiting payment.",repo_not_found:"Enter the ID of an existing repository that you own."};e.billingAmount=u=>u?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:u.currency,minimumFractionDigits:u.amount%100?2:0,maximumFractionDigits:2}).format(u.amount/100),e.billingPrice=u=>u.amount==null?"Price shown at checkout":e.billingAmount(u)+(u.interval?` / ${u.intervalCount>1?u.intervalCount+" ":""}${u.interval}`:" once"),e.billingPerMonth=u=>u?.amount==null?"":new Intl.NumberFormat(void 0,{style:"currency",currency:u.currency}).format(u.amount/1200),e.billingBytes=u=>{let y=Number(u)||0;if(y<1024)return`${y} B`;let m=Math.min(4,Math.floor(Math.log2(y)/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(y/1024**m)} ${["B","KB","MB","GB","TB"][m]}`},e.billingDate=u=>u?new Date(u).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"",e.loadBilling=()=>(e.billingError="",e.billingLoading=!0,Wi(t).then(u=>{e.billing=u.data,e.emit?.("billing:updated",u.data)}).catch(()=>{e.billingError="Billing could not be loaded. Try again."}).finally(()=>{e.billingLoading=!1}));async function d(u,y,m=!0){if(!(e.billingBusy||!e.billing?.csrf)){e.billingBusy=!0,e.billingError="";try{let b=await t.post(`/api/billing/${u}`,y,{headers:{"x-csrf-token":e.billing.csrf}});if(m)window.location.assign(b.data.url);else return await e.loadBilling(),await s(),e.billingPending=!!b.data.pending,e.emit?.("billing:pending",e.billingPending),e.billingNotice=b.data.pending?"Your payment is still pending. Please do not pay again.":i.confirmedMessage||"Billing status refreshed. Your confirmed access appears below.",b.data}catch(b){e.billingError=r[b.data?.error]||"The billing request failed. Please try again."}finally{e.billingBusy=!1}}}e.checkout=(u,y="",m={})=>d("checkout",{planId:u,target:y,...m}),e.billingPortal=()=>d("portal",{}),e.refreshBilling=()=>d("refresh",{},!1);async function p(){for(let u=0;u<5;u++){let y=await e.refreshBilling();if(!y||!y.pending)return;await new Promise(m=>window.setTimeout(m,3e3))}e.billingNotice="Confirmation is taking longer than usual. You can refresh payment status later. Please do not pay again."}e.loadBilling().then(()=>{o==="success"?(e.billingNotice="Checking your payment. Paid access starts after confirmation.",p()):o==="portal"?e.refreshBilling().then(()=>{e.billingPending=!1,e.emit?.("billing:pending",!1),e.billingNotice=i.portalMessage?.(e.billing)||"Your billing details are up to date."}):o==="cancelled"&&(e.billingNotice="Checkout was closed. No new paid access has been activated.")})}function qu(e,t){return t?.split(".").reduce((s,i)=>s?.[i],e)}function qo(e=null,t=new Map){let s=st({}),i=[],o=!1,r=new Proxy(s,{get(d,p){return typeof p=="string"&&p.startsWith("__v_")||Reflect.has(d,p)?Reflect.get(d,p):e?.[p]}});return Object.defineProperty(s,"parent",{value:e,configurable:!0}),Object.defineProperty(s,"viewState",{get:()=>r}),r.watch=(d,p,u=!1,y=!0)=>{let m=typeof d=="function"?()=>d(r):()=>qu(r,d),b=dt(m,p,{deep:u,flush:"post"});return i.push(b),y&&tt(()=>{o||p(m(),m())}),b},r.watchGroup=(d,p,u=!0)=>r.watch(()=>d.map(y=>qu(r,y)),p,!0,u),r.on=(d,p)=>{if(d==="dispose")return i.push(p),()=>{};t.has(d)||t.set(d,new Set),t.get(d).add(p);let u=()=>t.get(d)?.delete(p);return i.push(u),u},r.emit=(d,...p)=>{for(let u of[...t.get(d)||[]])u({},...p)},r.dispose=()=>{o=!0,i.splice(0).reverse().forEach(d=>d())},es(r.dispose),r}function Ct(){let e=new Set,t=new Set,s=!1,i=(r,d=0)=>{if(s)return;let p=setTimeout(()=>{e.delete(p),r()},d);return e.add(p),p};i.cancel=r=>{clearTimeout(r),e.delete(r)};let o=(r,d)=>{if(s)return;let p=setInterval(r,d);return t.add(p),p};return o.cancel=r=>{clearInterval(r),t.delete(r)},es(()=>{s=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:i,interval:o}}function Ut(){let e=new Set;return es(()=>{e.forEach(t=>t()),e.clear()}),(t,s,i,o)=>{t.addEventListener(s,i,o);let r=()=>{t.removeEventListener(s,i,o),e.delete(r)};return e.add(r),r}}var ma=function(e,t=e){let s=/\bXXXX-\d+\b/g;t.on("dark-mode",(O,U)=>{e.aceOption&&(e.aceOption.theme=U?"nord_dark":"chrome")});let i=Ct(),o=Ut();e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);let r={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},d=["license","txt"],p=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],u=["wav","mp3","ogg","wma","flac","aac","m4a"],y=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};let m=(()=>{try{return window.localStorage?.getItem("wrapLines")}catch{return null}})();e.wrapLines=(m??(window.matchMedia?.("(max-width: 767px)").matches?"false":"true"))!=="false",e.toggleWrap=function(){e.wrapLines=!e.wrapLines;try{window.localStorage?.setItem("wrapLines",String(e.wrapLines))}catch{}e.codeEditor?.session.setUseWrapMode(e.wrapLines)};function b(){return window.document.querySelector(".reading-layout .markdown-body")}function h(){let O=b();O&&(O.querySelectorAll("mark.md-find").forEach(U=>{U.replaceWith(window.document.createTextNode(U.textContent))}),O.normalize())}e.runMdFind=function(){h(),e.mdFindTotal=0,e.mdFindIndex=0;let O=(e.mdFindQuery||"").trim(),U=b();if(!O||!U)return;let C=!!e.mdFindCase,L=C?O:O.toLowerCase(),z=window.document.createTreeWalker(U,4),K=[];for(;z.nextNode();)(C?z.currentNode.nodeValue:z.currentNode.nodeValue.toLowerCase()).includes(L)&&K.push(z.currentNode);let ie=0;for(let se of K){let Y=se.nodeValue,he=C?Y:Y.toLowerCase(),Se=window.document.createDocumentFragment(),Ue=0,Be;for(;(Be=he.indexOf(L,Ue))!==-1;){Se.appendChild(window.document.createTextNode(Y.slice(Ue,Be)));let Qe=window.document.createElement("mark");Qe.className="md-find",Qe.textContent=Y.slice(Be,Be+O.length),Se.appendChild(Qe),ie++,Ue=Be+O.length}Se.appendChild(window.document.createTextNode(Y.slice(Ue))),se.parentNode.replaceChild(Se,se)}e.mdFindTotal=ie,ie&&e.stepMdFind(0)},e.stepMdFind=function(O){let U=b();if(!U||!e.mdFindTotal)return;let C=U.querySelectorAll("mark.md-find");e.mdFindIndex=(e.mdFindIndex+O+C.length)%C.length,C.forEach((L,z)=>L.classList.toggle("is-current",z===e.mdFindIndex)),C[e.mdFindIndex]?.scrollIntoView({block:"center",behavior:"smooth"})},e.toggleMdFind=function(O){if(e.mdFindOpen=O===void 0?!e.mdFindOpen:O,!e.mdFindOpen){h(),e.mdFindTotal=0;return}tt(()=>window.document.querySelector(".md-find-input")?.focus())},e.findInFile=function(){let O=e.codeEditor;if(!O)return;O.focus(),O.execCommand("find");let U=()=>{let C=O.searchBox?.element;C&&(O.renderer.setScrollMargin(52,12,0,0),!C._dockObserver&&(C._dockObserver=new MutationObserver(()=>{O.renderer.setScrollMargin(C.style.display!=="none"?52:12,12,0,0)}),C._dockObserver.observe(C,{attributes:!0,attributeFilter:["style"]})))};U(),setTimeout(U,150)};let w=[[/^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/,"class"],[/^\s*(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/,"function"],[/^\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/,"function"],[/^\s*(?:async\s+)?def\s+([A-Za-z_]\w*)/,"function"],[/^\s*class\s+([A-Za-z_]\w*)/,"class"],[/^\s*func\s+(?:\([^)]*\)\s*)?([A-Za-z_]\w*)/,"function"],[/^\s*(?:pub\s+)?fn\s+([A-Za-z_]\w*)/,"function"],[/^\s*(?:public|private|protected|static|\s)+[\w<>\[\],\s]+\s+([A-Za-z_]\w*)\s*\([^;]*\)\s*\{?\s*$/,"function"]],R={content:null,list:[]};e.symbolsOpen=!1,e.symbols=function(){if(typeof e.content!="string"||e.content.length>2e6)return[];if(R.content===e.content)return R.list;let O=[];return e.content.split(` +`).forEach((U,C)=>{for(let[L,z]of w){let K=L.exec(U);if(K&&!/^(if|for|while|switch|return|catch)$/.test(K[1])){O.push({name:K[1],kind:z,line:C+1});break}}}),R={content:e.content,list:O.slice(0,300)},R.list},e.goToSymbol=function(O){e.symbolsOpen=!1;let U=e.codeEditor;U&&(U.scrollToLine(O-1,!0,!0,()=>{}),U.gotoLine(O,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+O),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let O=window.document.getElementById("goto-input");O&&(O.focus(),O.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let O=e.codeEditor;if(!O)return;let U=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),C=O.session.getLength();if(!U||+U[1]<1||+U[1]>C){e.gotoError="Enter a line from 1 to "+C;return}O.gotoLine(+U[1],U[2]?Math.max(0,+U[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",O.focus()},e.rootEntries=function(){return[...e.files||[]].sort((O,U)=>{let C=O.size==null,L=U.size==null;return C!==L?C?-1:1:O.name.localeCompare(U.name)})},e.formatSize=function(O){if(O==null)return"";if(O<1024)return O+" B";let U=O/1024,C=L=>L.toFixed(1).replace(/\.0$/,"");return U<1024?C(U)+" KB":U<1024*1024?C(U/1024)+" MB":C(U/1024/1024)+" GB"},e.fileSize=function(O){if(!O)return null;let U=O.replace(/^\/+/,""),C=(e.files||[]).find(L=>(L.path?L.path+"/":"")+L.name===U);return C&&C.size!=null?C.size:null},e.revealFolder=function(O){e.sidebarHidden=!1,e.sidebarCollapsed=!1,tt(()=>{let U=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(O):O)+'"]');U&&(U.closest("li")?.classList.contains("open")||U.click(),U.scrollIntoView({block:"nearest"}),U.focus())})};let S={content:null,n:0},N=O=>{if(S.content===O)return S.n;let U=O;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let C=[],L=K=>{Array.isArray(K)?C.push(K.join("")):typeof K=="string"&&C.push(K)};(U&&(U.cells||(U.worksheets||[]).flatMap(K=>K.cells||[]))||[]).forEach(K=>{L(K?.source??K?.input),(K?.outputs||[]).forEach(ie=>{L(ie?.text),ie?.data&&(L(ie.data["text/plain"]),L(ie.data["text/markdown"]),L(ie.data["text/html"])),L(ie?.traceback)})});let z=C.reduce((K,ie)=>K+(ie.match(s)||[]).length,0);return S={content:O,n:z},z};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(s)||[]).length},e.renderRedacted=_o;let v=O=>O.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(O){let U=e.renderRedacted(O);if(!U||typeof window.DOMParser!="function")return U;let C=new window.DOMParser().parseFromString("
"+U+"
","text/html"),L={};return C.querySelectorAll("h1, h2, h3").forEach(z=>{let K=z.id||v(z.textContent);L[K]?K+="-"+ ++L[K]:L[K]=1,z.id=K}),C.body.firstChild.innerHTML};let E={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(E.content===e.content)return E.list;let U=[...new window.DOMParser().parseFromString("
"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"
","text/html").querySelectorAll("h2, h3")].map(C=>({id:C.id,text:C.textContent.trim(),level:C.tagName==="H3"?3:2})).slice(0,40);return E={content:e.content,list:U},U},e.activeHeading=null,o(window,"scroll",()=>{let O=e.readmeToc?e.readmeToc():[];if(!O.length)return;let U=150,C="",L="";for(let z of O){let K=window.document.getElementById(z.id);if(!K)continue;let ie=K.getBoundingClientRect().top;ie{let C=[],L=[],z="",K=!1;for(let ie=0;ieie.length>1||ie[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let O=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:V(e.content,O)}}return M.rows},e.csvNumCol=O=>{let U=e.csvRows().slice(1).map(C=>C[O]).filter(C=>C!=null&&String(C).trim()!=="");return U.length>0&&U.every(C=>e.csvNumeric(C))},e.csvNumeric=O=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(O)&&/\d/.test(O),e.redactParts=function(O){let U=[],C=0,L,z=/\bXXXX-(\d+)\b/g;for(O=String(O||"");L=z.exec(O);)L.index>C&&U.push({t:O.slice(C,L.index)}),U.push({n:L[1]}),C=L.index+L[0].length;return C{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let O=e.content;if(e.type==="html"&&e.url)if(e.preview)O=e.sourceContent;else try{O=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(O),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function _(O){return r[O]?r[O]:O}function G(O){return O=="pdf"?"pdf":O=="html"||O=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(O)?"md":O=="org"?"org":O=="ipynb"?"IPython":d.indexOf(O)>-1?"text":p.indexOf(O)>-1?"image":y.indexOf(O)>-1?"media":u.indexOf(O)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(O){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=O,e.paths=O.split("/").filter(Boolean);let U=e.filePath.toLowerCase(),C=U.lastIndexOf(".");C>-1&&(U=U.substring(C+1));let L={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},z=_(U);e.languageName=L[z]??(z?z.charAt(0).toUpperCase()+z.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:_(U),onLoad:function(K){e.codeEditor=dn(K);{let Re=K.session,Fe=Re.getTokens.bind(Re),W=/\bXXXX-\d+\b/g;if(Re.getTokens=function(fe){let de=Fe(fe);if(!de.some(me=>me.value.indexOf("XXXX-")!==-1))return de;let ce=[];for(let me of de){if(me.value.indexOf("XXXX-")===-1){ce.push(me);continue}let Me=0;W.lastIndex=0;let A;for(;A=W.exec(me.value);)A.index>Me&&ce.push({type:me.type,value:me.value.slice(Me,A.index)}),ce.push({type:"redacted.n"+A[0].slice(5),value:A[0]}),Me=A.index+A[0].length;Me`.ace_redacted.ace_n${ce+1}::after{content:"${ce+1}"}`).join(""),window.document.head.appendChild(fe)}K.renderer.updateFull(!0)}K.session.setUseWrapMode(e.wrapLines!==!1);let ie=K.container.closest?.(".file-card"),se=()=>{if(!ie)return;let Re=K.renderer,Fe=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);ie.classList.toggle("at-right-edge",Fe<=2||Re.getScrollLeft()>=Fe-2)};K.session.on("changeScrollLeft",se),K.renderer.on("afterRender",se),window.matchMedia?.("(max-width: 767px)").matches&&K.setOption("hScrollBarAlwaysVisible",!0);let Y=ace.require("ace/range").Range,he=null;function Se(Re,Fe){he!==null&&(K.session.removeMarker(he),he=null),Re!=null&&(he=K.session.addMarker(new Y(Re,0,Fe,1),"highlighted-line","fullLine"))}function Ue(Re){let Fe=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Fe){Se(null);return}let W=parseInt(Fe[1])-1,fe=Fe[2]?parseInt(Fe[2])-1:W;Se(W,fe),Re&&i.timeout(()=>{K.scrollToLine(W,!0,!0,function(){})},100)}Ue(!0);let Be=null;K.on("guttermousedown",function(Re){let Fe=Re.getDocumentPosition().row,W=Re.domEvent&&Re.domEvent.shiftKey,fe=Fe,de=Fe;W&&Be!==null?(fe=Math.min(Be,Fe),de=Math.max(Be,Fe)):Be=Fe;let ce=fe===de?`#L${fe+1}`:`#L${fe+1}-L${de+1}`,me=window.location.pathname+window.location.search+ce;e.preview||window.history.replaceState(null,"",me),Se(fe,de),Re.stop()});let Qe=o(window,"hashchange",()=>Ue(!1));K.setFontSize(e.aceOption.fontSize),K.setOptions({fontFamily:"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace"}),K.container.style.lineHeight="20px",K.renderer.setPadding(16),K.renderer.setScrollMargin(12,12,0,0),K.renderer.updateFontSize(),K.setReadOnly(e.aceOption.readOnly),K.setKeyboardHandler(e.aceOption.keyBinding),K.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),K.setOption("displayIndentGuides",!1),K.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(K.renderer.$cursorLayer.element.style.display="none"),K.setHighlightGutterLine(e.aceOption.highlightGutterLine),K.setShowInvisibles(e.aceOption.showInvisibles),K.setDisplayIndentGuides(e.aceOption.showIndentGuides),K.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),K.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),K.session.setUseSoftTabs(e.aceOption.useSoftTab),K.session.setTabSize(e.aceOption.tabSize),K.setBehavioursEnabled(e.aceOption.enableBehaviours),K.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets);let He=()=>!e.preview||K.isFocused(),et=o(window,"keydown",Re=>{if((Re.ctrlKey||Re.metaKey)&&!Re.altKey&&Re.key.toLowerCase()==="g"&&document.body.contains(K.container)&&He()){Re.preventDefault(),e.gotoLine();return}if(Re.altKey&&!Re.ctrlKey&&!Re.metaKey&&Re.key.toLowerCase()==="z"&&document.body.contains(K.container)&&He()){Re.preventDefault(),e.toggleWrap();return}(Re.ctrlKey||Re.metaKey)&&!Re.altKey&&Re.key.toLowerCase()==="f"&&document.body.contains(K.container)&&He()&&(Re.preventDefault(),e.findInFile())});return()=>{Qe(),et()}}},e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=G(U)},e.renderFileContent=function(O,U,C,L){if(e.type=U,e.content=O,e.sourceContent=O,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(O,C),e.type="html"),e.type=="org"){let K=contentAbs2Relative(O);var z=new Org.Parser().parse(K).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(z.toString()),e.type="html"}e.type=="code"&&L=="application/octet-stream"&&(e.type="binary",e.content="binary"),i.timeout(()=>{Prism.highlightAll()},50)};let te=["image","media","audio","pdf","IPython","binary"],X=["file_too_big","file_not_found","file_not_accessible","file_not_supported","folder_not_supported"];e.fileFrame=()=>e.filePath?te.includes(e.type)?e.content!=null:e.type==="error"?X.includes(e.content):e.content==null&&["code","text"].includes(e.type):!1,e.fileKind=()=>{let O=(e.paths||[])[(e.paths||[]).length-1]||"",U=O.lastIndexOf("."),C=U>0?O.slice(U+1).toUpperCase():"";if(e.type==="image")return(C==="JPG"?"JPEG":C)+" image";let L={WEBM:"WebM",OGG:"Ogg",OGV:"Ogg",MOV:"QuickTime",M4V:"M4V",MKV:"Matroska"};return e.type==="media"?(L[C]||C)+" video":e.type==="audio"?C+" audio":e.type==="pdf"?"PDF":e.type==="IPython"?"Jupyter notebook":e.type==="binary"?"Binary file":e.languageName||(C?C+" file":"File")},e.imageSize="",e.onImageLoad=O=>{let U=O.target;U?.naturalWidth&&(e.imageSize=`${U.naturalWidth} \xD7 ${U.naturalHeight}`)},o(document,"click",O=>{e.preview&&(O.target.closest?.(".symbols")||(e.symbolsOpen=!1),O.target.closest?.(".tb-more")||(e.moreOpen=!1),O.target.closest?.(".tb-toc-m")||(e.tocOpen=!1),O.target.isConnected&&!O.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1))})};function ga(e,t,s){let i,o=!1,r="form-draft:"+s,d=()=>Object.fromEntries(t.map(h=>[h,e[h]])),p=()=>JSON.stringify(d()),u=h=>{for(let w of t)Object.prototype.hasOwnProperty.call(h,w)&&(e[w]=h[w]);e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate))},y=()=>{try{window.sessionStorage.removeItem(r)}catch{}},m=(h=!1)=>{if(i!==void 0){if(h&&document.querySelectorAll("input, select, textarea").forEach(w=>{w._field?.binding.state===e&&w._field.timer&&w._field.commit()}),e.unsavedChanges=p()!==i,e.draftSaved=!1,!e.unsavedChanges){y();return}try{window.sessionStorage.setItem(r,JSON.stringify({account:e.user?.username||null,savedAt:Date.now(),values:d()})),e.draftSaved=!0}catch{}}},b=()=>m(!0);return e.on("routeLeave",b),window.addEventListener("beforeunload",b),e.on("dispose",()=>window.removeEventListener("beforeunload",b)),{restore(){i=p();let h;try{h=JSON.parse(window.sessionStorage.getItem(r)||"null")}catch{}let w=h&&h.account===(e.user?.username||null)&&Date.now()-h.savedAt<30*6e4&&h.values;return w&&(u(h.values),e.draftRestored=!0),o||(o=!0,e.watch(()=>d(),()=>m(),!0)),e.unsavedChanges=p()!==i,!!w},checkpoint(){return document.querySelectorAll("input, select, textarea").forEach(h=>{h._field?.binding.state===e&&h._field.timer&&h._field.commit()}),JSON.parse(p())},accept(h){i=JSON.stringify(h),e.draftRestored=!1,m()},discard(){document.querySelectorAll("input, select, textarea").forEach(h=>{h._field?.binding.state!==e||!h._field.timer||(clearTimeout(h._field.timer),h._field.timer=null,h.value=h._field.binding.value??"")}),i!==void 0&&u(JSON.parse(i)),e.draftRestored=!1,m()},clear(){i=p(),e.unsavedChanges=!1,e.draftRestored=!1,e.draftSaved=!1,y()}}}var wa={};sf(wa,{bigNum:()=>ag,date:()=>vg,dateEcho:()=>ya,diff:()=>ug,duration:()=>qn,filter:()=>mg,humanFileSize:()=>rg,humanTime:()=>va,limitTo:()=>hg,money:()=>pg,number:()=>cg,orderBy:()=>gg,plural:()=>yg,shortDate:()=>ba,statusLabel:()=>dg,statusMsg:()=>Yi,title:()=>lg,uppercase:()=>fg});var rg=e=>String(window.humanFileSize(e)).replace(/([KMGTPEZY])iB$/,"$1B").replace(/\.0 ([KMGTPEZY]?B)$/," $1"),ag=(function(){return function(t){let s=Number(t)||0,i=Math.abs(s);return i<1e3?String(s):i<1e4?(s/1e3).toFixed(1).replace(/\.0$/,"")+"k":i<1e6?Math.round(s/1e3)+"k":i<1e7?(s/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(s/1e6)+"M"}})(),va=(function(){return function(t){if(!t)return"never";var s=null;t instanceof Date&&(s=t,t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(s=new Date(t),t=Math.round((Date.now()-s)/1e3));var i=t<0?"from now":"ago";if(Math.abs(t)>7200*24)return(s&&!isNaN(s)?s:new Date(Date.now()-t*1e3)).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"});t=Math.abs(t);for(var o=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],r=["year","month","week","day","hour","minute","second"],d=0;d1&&(u+="s"),p>=1)return p+" "+u+" "+i}return"0 seconds "+i}})(),lg=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),s=t.map(function(i){return i.charAt(0).toUpperCase()+i.substring(1,i.length)});return s.join(" ")}})(),dg=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var s=String(t).replace(/[_-]+/g," ").toLowerCase();return s.charAt(0).toUpperCase()+s.slice(1)}})(),Yi=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",repository_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var s=t.match(/^rate_limited:(\d+)$/);if(s){var i=Math.max(0,Math.ceil((parseInt(s[1],10)-Date.now())/1e3));if(i<=0)return"Rate limited \u2014 resuming soon";var o=Math.floor(i/60),r=i%60;return"Rate limited \u2014 retrying in "+(o>0?o+"m "+r+"s":r+"s")}if(e[t])return e[t];var d=/^([a-z0-9]+(?:_[a-z0-9]+)+):\s*\S/.exec(t);if(d){if(e[d[1]])return e[d[1]];var p=d[1].replace(/_/g," ");return p.charAt(0).toUpperCase()+p.slice(1)}if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var u=t.replace(/_/g," ");return u.charAt(0).toUpperCase()+u.slice(1)}return t}})(),ug=(function(e){let t=i=>i.replace(/&/g,"&").replace(//g,">");function s(i,o){if(!o)return;let r=o.newPath&&o.newPath!=="/dev/null"?o.newPath:o.oldPath||"",d=o.oldPath==="/dev/null"?"added":o.newPath==="/dev/null"?"deleted":o.oldPath&&o.newPath&&o.oldPath!==o.newPath?"renamed":"modified";if(i.push('
'),i.push('
'+t(r)+''+d+"
"),o.lines.length){i.push('');for(let p of o.lines)i.push('");i.push("
'+(p.oldNo||"")+''+(p.newNo||"")+''+(p.kind==="add"?"+":p.kind==="remove"?"-":"")+''+t(p.text)+"
")}i.push("
")}return function(i){if(!i)return i;let o=[],r=null,d=0,p=0,u=()=>(r||(r={oldPath:"",newPath:"",lines:[]}),r),y=()=>{r&&(r.lines.length||r.oldPath||r.newPath)&&(s(o,r),r=null)},m=i.split(` +`);for(let b=0;be});function cg(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function pg(e,t="EUR"){let s=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:s%1?2:0,maximumFractionDigits:2}).format(s)}function fg(e){return String(e??"").toUpperCase()}function hg(e,t,s=0){return(e||[]).slice(s,s+t)}function mg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function gg(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let d=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let p=r.split(".").reduce((y,m)=>y?.[m],i),u=r.split(".").reduce((y,m)=>y?.[m],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof u=="string"&&(u=u.toLowerCase()),p!==u)return(p==null?-1:u==null?1:pi[o])}function yg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function ya(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),s=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(s))return"";let i=s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),o=new Date;o.setHours(0,0,0,0);let r=Math.round((s-o)/864e5),d;if(r===0)d="today";else if(r===1)d="tomorrow";else if(r===-1)d="yesterday";else{let p=Math.abs(r),u=Math.round(p/30.44),y=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:u<18?[u,"month"]:[Math.round(p/365.25),"year"],m=y[0]+" "+y[1]+(y[0]===1?"":"s");d=r>0?"in "+m:m+" ago"}return i+" \xB7 "+d}function qn(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let s=e/1e3;if(s<60)return+(s<10?s.toFixed(2):s.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),o=Math.round(s);return o<3600?Math.floor(o/60)+"m "+i(o%60)+"s":Math.floor(o/3600)+"h "+i(Math.floor(o%3600/60))+"m"}function ba(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let s={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(s.year="numeric"),t.toLocaleDateString(void 0,s)}var Xi=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Ji(e,{flags:t,keys:s,count:i,onChange:o=()=>{}}){if(e.segView=()=>{let r=t()||{};if(s.every(p=>!!r[p]))return"all";let d=s.filter(p=>!!r[p]);return d.length===1?d[0]:"custom"},e.setSegView=r=>{let d=t();if(d){for(let p of s)d[p]=r==="all"?!0:p===r;o()}},e.segCount=r=>r==="all"?s.reduce((d,p)=>d+i(p),0):i(r),t()&&e.segView()==="custom")for(let r of s)t()[r]=!0}var Lu=function(e,t,s){let i=Ct(),o=Ut();Gu(i,o),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let d=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showStatusMessage=S=>{let N=S.statusMessage||"(no message)";window.prompt(`Status message for ${S.repoId} (${S.status}):`,N)},e.fetchGithubInfo=S=>{let N=window.open("","_blank");N&&N.document.write("
Loading GitHub info for "+S.repoId+"...
"),t.get("/api/admin/repos/"+S.repoId+"/github").then(v=>{N&&(N.document.open(),N.document.write('
'+JSON.stringify(v.data,null,2).replace(/[<>]/g,E=>E==="<"?"<":">")+"
"),N.document.close())},v=>{let E=v&&v.data?JSON.stringify(v.data,null,2):String(v);N&&(N.document.body.innerHTML='
'+E+"
")})},e.statusCountFor=S=>{let N=(e.statusCounts||[]).find(v=>v._id===S);return N?N.count:0},e.statusStorageFor=S=>{let N=(e.statusCounts||[]).find(v=>v._id===S);return N?N.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=S=>{e.query.sort===S?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=S,e.query.direction="desc"),e.query.page=1},e.sortIcon=S=>e.query.sort===S?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.repos.filterPrefs",u={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let m=s.search();m.owner&&(e.query.owner=m.owner),m.conference&&(e.query.conference=m.conference),m.search&&(e.query.search=m.search);let b="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let N=Object.assign({},e.query);delete N.page,e.presets=(e.presets||[]).filter(v=>v.name!==S),e.presets.push({name:S,query:N}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(N=>N.name!==S.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(S=>{e.selected[S.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(S=>e.selected[S.repoId]),e.bulkRefresh=()=>{let S=e.selectedRepos();S.length&&confirm(`Force refresh ${S.length} repositories?`)&&S.forEach(N=>e.updateRepository(N))},e.bulkRemoveCache=()=>{let S=e.selectedRepos();S.length&&confirm(`Purge cache for ${S.length} repositories?`)&&S.forEach(N=>e.removeCache(N))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let S=new URLSearchParams(Object.entries(e.query).filter(([,N])=>N!==""&&N!==!1&&N!=null));S.set("format","csv"),S.set("limit","10000"),window.open("/api/admin/repos?"+S.toString(),"_blank")},e.removeCache=S=>{confirm("Remove cached files for "+S.repoId+"?")&&t.delete("/api/admin/repos/"+S.repoId).then(()=>h(),N=>console.error(N))},e.removeRepository=S=>{confirm("Remove repository "+S.repoId+"?")&&t.delete("/api/repo/"+S.repoId+"/").then(()=>h(),N=>console.error(N))},e.updateRepository=S=>{let N=st({title:`Refreshing ${S.repoId}...`,date:new Date,body:`The repository ${S.repoId} is going to be refreshed.`});e.toasts.push(N),t.post(`/api/repo/${S.repoId}/refresh`).then(v=>{v.data.status=="ready"?N.title=`${S.repoId} is refreshed.`:N.title=`Refreshing of ${S.repoId}.`},v=>{N.title=`Error during the refresh of ${S.repoId}.`,N.body=v.body})},e.filtersOpen=!1,e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(S=>{e.total=S.data.total,e.totalPage=Math.ceil(S.data.total/e.query.limit),e.repositories=S.data.results,e.allSelected=!1},S=>{e.fetchError=S&&S.data&&S.data.error||"Failed to load repositories",console.error(S)})}function w(){let S=Object.assign({},e.query,{page:1,limit:1,ready:!0,expired:!0,removed:!0,error:!0,preparing:!0});t.get("/api/admin/repos",{params:S}).then(N=>{e.statusCounts=N.data.statusCounts||[],e.totalSize=N.data.totalSize||0},()=>{})}e.showAllStatuses=()=>Object.assign(e.query,{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0,page:1}),Ji(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:S=>S==="preparing"?e.statusCountFor("preparing")+e.statusCountFor("download"):S==="expired"?e.statusCountFor("expired")+e.statusCountFor("expiring"):S==="removed"?e.statusCountFor("removed")+e.statusCountFor("removing"):e.statusCountFor(S),onChange:()=>{e.query.page=1}}),h(),w();let R=null;e.watch("query",()=>{i.timeout.cancel(R),R=i.timeout(()=>{h(),w()},500);let{page:S,search:N,...v}=e.query;saveFilterPrefs(p,v),d()},!0),d()},Fu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let r=h=>{if(h.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){h.preventDefault();let w=document.querySelector('.admin-filter-toolbar input[type="search"]');w&&w.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=h=>{h==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[h]="",e.query.page=1},e.chips=[];let d=()=>{let h=[];e.query.role&&h.push({key:"role",label:"Role",value:e.query.role}),e.chips=h};e.statusCountFor=h=>{let w=(e.statusCounts||[]).find(R=>R._id===h);return w?w.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.query.page=1},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.users.filterPrefs",u={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(h=>{e.selected[h.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(h=>e.selected[h.username]),e.banUser=h=>{confirm(`Ban user ${h.username}?`)&&t.post(`/api/admin/users/${h.username}/ban`).then(m,w=>console.error(w))},e.activateUser=h=>{t.post(`/api/admin/users/${h.username}/activate`).then(m,w=>console.error(w))},e.bulkBan=()=>{let h=e.selectedUsers();h.length&&confirm(`Ban ${h.length} users?`)&&h.forEach(w=>e.banUser(w))},e.exportCsv=()=>{let h=new URLSearchParams(Object.entries(e.query).filter(([,w])=>w!==""&&w!==!1&&w!=null));h.set("format","csv"),h.set("limit","10000"),window.open("/api/admin/users?"+h.toString(),"_blank")},e.fetchError=null;function m(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(h=>{e.total=h.data.total,e.totalPage=Math.ceil(h.data.total/e.query.limit),e.users=h.data.results,e.statusCounts=h.data.statusCounts||[],e.allSelected=!1},h=>{e.fetchError=h&&h.data&&h.data.error||"Failed to load users",console.error(h)})}m();let b=null;e.watch("query",()=>{i.timeout.cancel(b),b=i.timeout(m,500);let{page:h,search:w,...R}=e.query;saveFilterPrefs(p,R),d()},!0),d()},Uu=function(e,t,s,i){let o=Ct();Gu(o,Ut()),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let r="admin.user.filterPrefs",d={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},p=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},d.filters.status,p.filters&&p.filters.status||{})},e.query={sort:p.sort||d.sort,direction:p.direction||d.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=h=>(e.repositories||[]).filter(w=>Xi(w.status)===h).length,Ji(e,{flags:()=>e.filters.status,keys:["ready","preparing","error","expired","removed"],count:h=>e.statusCountFor(h)}),e.repoFiler=h=>e.filters.status[Xi(h.status)]==!1?!1:!!(e.search.trim().length==0||h.source.fullName.indexOf(e.search)>-1||h.repoId.indexOf(e.search)>-1||h.statusMessage&&h.statusMessage.indexOf(e.search)>-1||h.conference&&h.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(h=>{e.selected[h.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(h=>e.selected[h.repoId]),e.bulkRefresh=()=>{let h=e.selectedRepos();h.length&&confirm(`Force refresh ${h.length} repositories?`)&&h.forEach(w=>e.updateRepository(w))},e.bulkRemoveCache=()=>{let h=e.selectedRepos();h.length&&confirm(`Purge cache for ${h.length} repositories?`)&&h.forEach(w=>e.removeCache(w))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let h=e.filteredRepositories||e.repositories,R=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),S=h.map(E=>[E.repoId,E.status,E.statusMessage||"",E.pageView||0,E.anonymizeDate||"",E.source&&E.source.fullName||"",E.conference||"",E.size&&E.size.storage||0].map(M=>{let V=String(M??"");return/[",\n\r]/.test(V)?'"'+V.replace(/"/g,'""')+'"':V}).join(",")),N=new Blob([R+` `+S.join(` -`)],{type:"text/csv"}),m=document.createElement("a");m.href=URL.createObjectURL(N),m.download=i.username+"-repositories.csv",m.click()},e.showStatusMessage=g=>{let k=g.statusMessage||"(no message)";window.prompt(`Status message for ${g.repoId} (${g.status}):`,k)},e.fetchGithubInfo=g=>{let k=window.open("","_blank");k&&k.document.write("
Loading GitHub info for "+g.repoId+"...
"),t.get("/api/admin/repos/"+g.repoId+"/github").then(R=>{k&&(k.document.open(),k.document.write('
'+JSON.stringify(R.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"
"),k.document.close())},R=>{let S=R&&R.data?JSON.stringify(R.data,null,2):String(R);k&&(k.document.body.innerHTML='
'+S+"
")})};function u(g){t.get("/api/admin/users/"+g+"/repos",{}).then(k=>{e.repositories=k.data},k=>{console.error(k)})}function y(g){t.get("/api/admin/users/"+g,{}).then(k=>{e.userInfo=k.data},k=>{console.error(k)})}y(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),g=>console.error(g))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),g=>console.error(g))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),g=>console.error(g))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),g=>console.error(g))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(g=>{e.tokens=g.data||[]},g=>{g.status!==401&&g.status!==403&&console.error(g)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(g=>{e.tokenForm.plaintext=g.data.token,e.tokenForm.name="",h()},g=>console.error(g))},e.revokeToken=g=>{confirm(`Revoke token "${g.name}"?`)&&t.delete("/api/admin/tokens/"+g.id).then(()=>h(),k=>console.error(k))},e.removeCache=g=>{confirm("Remove cached files for "+g.repoId+"?")&&t.delete("/api/admin/repos/"+g.repoId).then(()=>u(i.username),k=>console.error(k))},e.removeRepository=g=>{confirm("Remove repository "+g.repoId+"?")&&t.delete("/api/repo/"+g.repoId+"/").then(()=>u(i.username),k=>console.error(k))},e.updateRepository=g=>{let k=ot({title:`Refreshing ${g.repoId}...`,date:new Date,body:`The repository ${g.repoId} is going to be refreshed.`});e.toasts.push(k),t.post(`/api/repo/${g.repoId}/refresh`).then(R=>{R.data.status=="ready"?k.title=`${g.repoId} is refreshed.`:k.title=`Refreshing of ${g.repoId}.`},R=>{k.title=`Error during the refresh of ${g.repoId}.`,k.body=R.body})},e.getGitHubRepositories=g=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(k=>{e.userInfo.repositories=k.data})};let b=null;e.watch("query",()=>{s.timeout.cancel(b),b=s.timeout(()=>{u(i.username)},500)},!0)},Fu=function(e,t,o){let i=Rt(),s=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=R=>{if(R.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){R.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=R=>{R==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[R]="",e.query.page=1},e.chips=[];let d=()=>{let R=[];(e.query.dateFrom||e.query.dateTo)&&R.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=R};e.statusCountFor=R=>{let S=(e.statusCounts||[]).find(N=>N._id===R);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=R=>{e.query.sort===R?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=R,e.query.direction="desc"),e.query.page=1},e.sortIcon=R=>e.query.sort===R?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(c)||{};e.query=Object.assign({},u,y,{page:1,search:""});let h=o.search();h.search&&(e.query.search=h.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let R=window.prompt("Preset name:");if(!R)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==R),e.presets.push({name:R,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=R=>{Object.assign(e.query,R.query,{page:1})},e.deletePreset=R=>{e.presets=(e.presets||[]).filter(S=>S.name!==R.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.removeConference=R=>{confirm("Remove conference "+R.conferenceID+"?")&&t.delete("/api/admin/conferences/"+R.conferenceID).then(()=>g(),S=>console.error(S))},e.exportCsv=()=>{let R=new URLSearchParams(Object.entries(e.query).filter(([,S])=>S!==""&&S!==!1&&S!=null));R.set("format","csv"),R.set("limit","10000"),window.open("/api/admin/conferences?"+R.toString(),"_blank")},e.fetchError=null;function g(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(R=>{e.total=R.data.total,e.totalPage=Math.ceil(R.data.total/e.query.limit),e.conferences=R.data.results,e.statusCounts=R.data.statusCounts||[]},R=>{e.fetchError=R&&R.data&&R.data.error||"Failed to load conferences",console.error(R)})}Qi(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:R=>e.statusCountFor(R),onChange:()=>{e.query.page=1}}),g();let k=null;e.watch("query",()=>{i.timeout.cancel(k),k=i.timeout(g,500);let{page:R,search:S,...N}=e.query;saveFilterPrefs(c,N),d()},!0),d()},Uu=function(e,t,o,i,s){let r=Rt();e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},Qi(e,{flags:()=>e.stateFilter,keys:e.allStates,count:N=>(e.jobs||[]).filter(m=>m._state===N).length}),e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(N=>e.stateFilter[N._state]),e.jobProgressPct=N=>N?._state==="completed"?100:N&&N.progress&&typeof N.progress=="object"&&typeof N.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(N.progress.percent))):typeof N.progress=="number"?Math.max(0,Math.min(100,Math.round(N.progress))):null;let d={get_files:"Fetching files",download:"Downloading",downloading:"Downloading",anonymize:"Anonymizing",anonymizing:"Anonymizing",ready:"Ready",removing:"Removing",preparing:"Preparing"};e.jobDetail=N=>{if(N?._state==="failed")return Yi(N.failedReason||"")||"Failed";let m=N?.progress&&typeof N.progress=="object"?N.progress.status:null;return N?._state==="active"&&m?d[m]||Yi(m):"\u2014"},e.jobDuration=N=>{if(!N.processedOn)return"\u2014";let m=N.finishedOn||Date.now();return uo(m-N.processedOn)},e.metricsPoints=[],e.selectQueue=N=>{e.selectedQueue=N,c(),u()},e.setRange=N=>{e.range=N,u()};function c(){let N={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:N}).then(m=>{e.queueList=m.data.queues||[],e.jobs=m.data.jobs||[],e.selectedStats=e.queueList.find(E=>E.key===e.selectedQueue)||e.queueList[0]||null},m=>console.error(m))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(N=>{e.metricsPoints=N.data.points||[],s(k,0)},N=>console.error(N))}c(),u();let y=i(()=>{e.query.autoRefresh&&(c(),u())},15e3);e.on("dispose",()=>i.cancel(y)),e.refreshNow=function(){c(),u()};function h(N){let m=N&&N.data&&(N.data.message||N.data.error)||"Request failed";e.actionError=m,s(()=>{e.actionError=null},5e3),console.error(N)}e.actionError=null,e.removeJob=N=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(c,h)},e.retryJob=N=>{t.post(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(c,h)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(c,N=>console.error(N))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(c,N=>console.error(N))},e.togglePause=()=>{let N=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${N}`).then(c,m=>console.error(m))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(c,N=>console.error(N))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(c,N=>console.error(N))};let b=null;e.watch("query.search",()=>{r.timeout.cancel(b),b=r.timeout(c,350)}),e.expanded={},e.toggleJob=N=>{e.expanded[N.id]=!e.expanded[N.id]},e.humanTime=N=>{if(!N)return"";let m=new Date(N);return m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+m.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=N=>{if(!N)return"";var m=Math.max(0,Math.ceil((N-Date.now())/1e3));if(m<=0)return"resuming soon";var E=Math.floor(m/60),M=m%60;return"in "+(E>0?E+"m "+M+"s":M+"s")};function g(N){if(N<=0)return{ticks:[0],niceMax:1};let m=Math.pow(10,Math.floor(Math.log10(N))),E=m;N/E<2?E=m/2:N/E>5&&(E=m*2);let M=Math.ceil(N/E)*E,_=[];for(let V=0;V<=M;V+=E)_.push(V);return{ticks:_,niceMax:M}}function k(){var N=document.getElementById("q-throughput-chart");if(!N)return;var m=N.getContext("2d"),E=window.devicePixelRatio||1,M=N.parentElement.getBoundingClientRect(),_=44,V=44,G=22,ee=Math.max(200,Math.round(M.width)),X=Math.max(180,Math.min(420,Math.round(M.height)||180)),O=ee-_-V,U=X-G;N.width=ee*E,N.height=X*E,N.style.width=ee+"px",N.style.height=X+"px",m.setTransform(E,0,0,E,0,0);var C=document.body.classList.contains("dark-mode"),q="#8A857C",z=C?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",K=C?"#6FBF8A":"#2F7D4F",ie=C?"rgba(111,191,138,0.12)":"rgba(47,125,79,0.08)",ne=C?"#F08A82":"#B42318",Y=C?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",he=getComputedStyle(document.body).getPropertyValue("--q-time-series").trim()||(C?"#E0A94A":"#946512"),Ee=e.metricsPoints||[];if(Ee.length===0){m.fillStyle=q,m.font="13px Inter, system-ui, sans-serif",m.textAlign="center",m.fillText("No metrics data yet",ee/2,X/2),R=null;return}var Ue=Ee.map(function(we){return we.completed}),Be=Ee.map(function(we){return we.failed}),Je=Ee.map(function(we){return we.avgMs});if(!Ue.some(Boolean)&&!Be.some(Boolean)){m.strokeStyle=C?"rgba(255,255,255,0.14)":"rgba(0,0,0,0.12)",m.beginPath(),m.moveTo(0,X-18.5),m.lineTo(ee,X-18.5),m.stroke(),m.fillStyle=C?"#CFC8BD":"#4F4A42",m.font="500 14px Inter, system-ui, sans-serif",m.textAlign="center",m.fillText("No jobs processed in this window",ee/2,X/2-6),m.fillStyle=q,m.font="12.5px Inter, system-ui, sans-serif",m.fillText("Completed and failed jobs will chart here",ee/2,X/2+16),R=null;return}var He=Ee.length,et=O/(He-1||1),Re=Math.max(1,Math.max.apply(null,Ue),Math.max.apply(null,Be)),Fe=g(Re),W=Math.max.apply(null,Je),fe=W>0?g(W):{ticks:[0],niceMax:1},de=function(we){return U-we/Fe.niceMax*(U-10)},ce=function(we){return U-we/fe.niceMax*(U-10)},me=function(we){return _+we*et};m.textAlign="right",m.textBaseline="middle",m.font="11px Inter, system-ui, sans-serif",Fe.ticks.forEach(function(we){var be=de(we);m.strokeStyle=z,m.lineWidth=1,m.beginPath(),m.moveTo(_,be),m.lineTo(ee-V,be),m.stroke(),m.fillStyle=q,we!==0&&m.fillText(we>=1e3?(we/1e3).toFixed(1)+"k":String(we),_-6,be)}),W>0&&(m.textAlign="left",fe.ticks.forEach(function(we){var be=ce(we);m.fillStyle=he,we!==0&&m.fillText(uo(we),ee-V+6,be)}));var Ie=Ee[He-1].ts,D=Ee[0].ts,A=Math.max(0,(Ie-D)/6e4),L=[1,2,5,10,15,30,60,120,180,360,720,1440,2880,10080],Q=L.find(function(we){return A/we<=4})||L[L.length-1],H=function(we){return we<60?we+"m":we<1440?we/60+"h":we/1440+"d"},J=function(we){for(var be=0,st=1;st0&&Math.abs(Ee[ke].ts-(Ie-x*6e4))>ae+1)){var pe=me(ke),Ce=x===0?"now":H(x)+" ago",De=m.measureText(Ce).width,Me=oe===0?"right":ke===0?"left":"center",Ge=Me==="right"?pe:Me==="left"?pe+De:pe+De/2;Ge>te-12||(m.textAlign=Me,m.fillText(Ce,pe,U+6),te=Me==="right"?pe-De:Me==="left"?pe:pe-De/2)}}function ze(we,be,st,rt){we.length!==0&&(m.beginPath(),m.moveTo(me(0),U),we.forEach(function(yt,at){var lt=me(at),ft=be(yt);if(at===0)m.lineTo(lt,ft);else{var _t=(me(at-1)+lt)/2;m.bezierCurveTo(_t,be(we[at-1]),_t,ft,lt,ft)}}),m.lineTo(me(we.length-1),U),m.closePath(),m.fillStyle=st,m.fill(),m.beginPath(),we.forEach(function(yt,at){var lt=me(at),ft=be(yt);if(at===0)m.moveTo(lt,ft);else{var _t=(me(at-1)+lt)/2;m.bezierCurveTo(_t,be(we[at-1]),_t,ft,lt,ft)}}),m.strokeStyle=rt,m.lineWidth=1.5,m.stroke())}ze(Ue,de,ie,K),ze(Be,de,Y,ne),W>0&&(m.beginPath(),Je.forEach(function(we,be){var st=me(be),rt=ce(we);if(be===0)m.moveTo(st,rt);else{var yt=(me(be-1)+st)/2;m.bezierCurveTo(yt,ce(Je[be-1]),yt,rt,st,rt)}}),m.strokeStyle=he,m.lineWidth=1,m.setLineDash([4,3]),m.stroke(),m.setLineDash([])),R={pts:Ee,maxLen:He,marginLeft:_,step:et,totalW:ee,toX:me}}var R=null;function S(){var N=document.getElementById("q-throughput-chart");if(!(!N||N._tipBound)){N._tipBound=!0;var m=document.getElementById("q-chart-tooltip"),E=document.getElementById("q-chart-crosshair");N.addEventListener("mousemove",function(M){if(!(!R||!m||!E)){var _=R,V=N.getBoundingClientRect(),G=M.clientX-V.left,ee=Math.round((G-_.marginLeft)/_.step);if(ee<0||ee>=_.maxLen){m.style.display="none",E.style.display="none";return}var X=_.pts[ee],O=_.pts[_.pts.length-1].ts,U=Math.round((O-X.ts)/6e4),C;if(U<=0)C="now";else if(U<60)C=U+"m ago";else if(U<1440){var q=Math.floor(U/60),z=U%60;C=q+"h"+(z?" "+z+"m":"")+" ago"}else C=Math.round(U/1440)+"d ago";var K='
'+C+'
● completed: '+X.completed+'/min
● failed: '+X.failed+"/min
";if(X.avgMs>0){var ie=uo(X.avgMs);K+='
● avg time: '+ie+"
"}m.innerHTML=K;var ne=_.toX(ee),Y=m.offsetWidth,he=ne+10;he+Y>_.totalW&&(he=ne-Y-10),m.style.display="block",m.style.left=he+"px",m.style.top="8px",E.style.display="block",E.style.left=ne+"px"}}),N.addEventListener("mouseleave",function(){m&&(m.style.display="none"),E&&(E.style.display="none")})}}e.watch("metricsPoints",function(){s(S,50)})},Bu=function(e,t,o,i){let s=Rt();e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.entries=[],e.visible=[],e.available=!0,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=m=>{if(!m)return"";let E=new Date(m).getTime();if(isNaN(E))return m;let M=Math.max(0,Date.now()-E),_=Math.floor(M/1e3);if(_<5)return"just now";if(_<60)return`${_}s ago`;let V=Math.floor(_/60);if(V<60)return`${V}m ago`;let G=Math.floor(V/60);if(G<24)return`${G}h ago`;let ee=Math.floor(G/24);return ee<7?`${ee}d ago`:new Date(m).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},e.absTime=m=>{if(!m)return"";let E=new Date(m);return isNaN(E.getTime())?m:E.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},e.absTimeShort=m=>{if(!m)return"";let E=new Date(m);return isNaN(E.getTime())?m:E.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let r=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function d(m,E){let M=m&&(m.httpStatus||m.status)||null;if(typeof M=="number"){if(M>=500)return"error";if(M===401||M===403||M===404)return"info";if(M>=400)return"warn"}return E==="error"?"error":E==="warn"?"warn":"info"}function c(m){let E=(m.raw||[]).find(G=>G&&typeof G=="object"&&!Array.isArray(G));if(E){E.message&&r.test(E.message)?(m.displayMessage=E.message,m.displayContext=m.message):E.code&&r.test(String(E.code))?(m.displayMessage=String(E.code),m.displayContext=m.message):E.name&&E.name!=="AnonymousError"&&E.name!=="Error"?(m.displayMessage=E.name,m.displayContext=E.message||m.message):m.displayMessage=m.message,m._status=E.httpStatus||E.status||null,m._url=E.url||null,m._method=E.method||null,m._repoId=E.repoId||E.detail||null,m._detail=E.detail&&E.detail!==m._repoId?E.detail:null;let G=typeof E.stack=="string"?E.stack:null;for(var M=[E.cause,E.err].filter(Boolean),_=0;!G&&_{O==null||O===""||M.push([X,O])};_("name",E&&E.name),_("code",m.displayMessage||E&&E.message),m._bucket&&_("kind",m._bucket),_("httpStatus",E&&E.httpStatus),E&&E.status&&!E.httpStatus&&_("status",E.status),_("module",m.module);let V=E&&E.detail;if(typeof V=="string"){let X=V.trim();if(X[0]==="{"||X[0]==="[")try{V=JSON.parse(V)}catch{}}if(_("detail",V),_("repoId",E&&E.repoId),_("filePath",E&&E.filePath),_("upstreamStatus",E&&E.upstreamStatus),_("upstreamBody",E&&E.upstreamBody),_("url",m._url),_("err",E&&E.err),_("cause",E&&!E.err&&E.cause),_("ts",m.ts),!M.length)return JSON.stringify(m,null,2);let G=M.reduce((X,O)=>Math.max(X,O[0].length),0),ee=["{"];return M.forEach(([X,O],U)=>{let q=` ${`"${X}":`.padEnd(G+3," ")} `,z=UY===0?ne:ie+ne).join(` -`)}else typeof O=="number"||typeof O=="boolean"?K=String(O):K=JSON.stringify(O);ee.push(`${q}${K}${z}`)}),ee.push("}"),ee.join(` -`)}function y(m){let E=[],M="",_=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,V=0,G;for(;G=_.exec(m);)M+=m.slice(V,G.index),V=_.lastIndex,E.push({key:G[1],op:G[2]||"=",val:G[3]});return M+=m.slice(V),{filters:E,free:M.trim().toLowerCase()}}function h(m,E){for(let M of E.filters){let _=(G,ee,X)=>{let O=parseFloat(G),U=parseFloat(ee);return X==="="?String(G)===String(ee):X==="!="?String(G)!==String(ee):X===">="?O>=U:X==="<="?O<=U:X===">"?O>U:X==="<"?OE&&X._bucket!==E?!1:h(X,m)),_=e.query.group;if(_){let X=C=>_==="module"?C.module:C.displayMessage||C.message||"_",O=new Map;for(let C of M){let q=X(C);if(O.has(q)){let z=O.get(q);z.count++,z._related.push(C),new Date(C.ts)>new Date(z.ts)&&(z.ts=C.ts,z._url=C._url,z._status=C._status),new Date(C.ts)new Date(q.ts).getTime()>=U).length;M=Array.from(O.values())}else M=M.map((X,O)=>(X._key="row:"+O+":"+X.ts,X._related=[X],X._firstSeen=X.ts,X._lastHourCount=0,X.count=1,X));let V=X=>({error:0,warn:1,info:2})[X._bucket]??1;e.query.sort==="count"?M.sort((X,O)=>V(X)-V(O)||O.count-X.count||new Date(O.ts)-new Date(X.ts)):M.sort((X,O)=>V(X)-V(O)||new Date(O.ts)-new Date(X.ts)),e.visible=M;let G=!!(e.query.bucket||(e.query.search||"").trim()),ee=!G&&(e.stats?.severity?.error||0)>0&&!M.some(X=>X._bucket==="error")&&e.entries.length<1500;(G&&!M.length||ee)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,g(!0))}function g(m){let E=m?e.entries.length:0,M=m?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:E,limit:M}}).then(_=>{let V=(_.data.entries||[]).map(c);e.entries=m?e.entries.concat(V):V,e.available=!!_.data.available,e.cap=_.data.max||e.cap,e.total=_.data.total||e.entries.length,e._autoLoading=!1,b()},_=>{e._autoLoading=!1,console.error(_)})}e.loadMore=()=>g(!0),e.canLoadMore=()=>e.entries.length{let E=m.data||{},M=E.prev24h?Math.round((E.last24h-E.prev24h)/E.prev24h*100):0;e.stats={last24h:E.last24h||0,prev24h:E.prev24h||0,delta:M,severity:E.severity||{error:0,warn:0,info:0},unique:E.unique||{error:0,warn:0,info:0},buckets:E.buckets||[],dropped:E.dropped||0},b()},m=>console.error(m))}function R(){g(),k()}e.barPx=(m,E)=>{let M=e.stats.buckets||[],_=0,V=0;for(let O of M)_=Math.max(_,(O.error||0)+(O.warn||0)),V=Math.max(V,O.info||0);let G=m[E]||0;if(!G)return 0;if(E==="info")return V?Math.max(2,Math.round(G/V*(_?16:60))):0;let ee=(m.error||0)+(m.warn||0),X=Math.round(ee/_*44);return Math.max(4,Math.round(G/ee*X))},e.bucketTitle=m=>`${new Date(m.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${m.error||0} err \xB7 ${m.warn||0} warn \xB7 ${m.info||0} info`,e.toggle=m=>{e.expanded[m._key]=!e.expanded[m._key]},e.setBucket=m=>{e.query.bucket=m},e.refreshNow=R,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(R,m=>console.error(m))},e.exportCsv=()=>{let m=["ts","level","module","displayMessage","_status","_url","_repoId"],E=[m.join(",")];for(let G of e.visible)E.push(m.map(ee=>{let X=G[ee]==null?"":String(G[ee]);return/[",\n]/.test(X)?`"${X.replace(/"/g,'""')}"`:X}).join(","));let M=new Blob([E.join(` -`)],{type:"text/csv;charset=utf-8"}),_=URL.createObjectURL(M),V=document.createElement("a");V.href=_,V.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL(_)};function S(m){e.copyHint=`${m} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=m=>{navigator.clipboard.writeText(m._detailJson).then(()=>S("JSON"))},e.copyCurl=m=>{if(!m._url)return;let M=`curl -X ${m._method||"GET"} '${window.location.origin}${m._url}'`;navigator.clipboard.writeText(M).then(()=>S("curl"))},R();let N=i(()=>{e.query.autoRefresh&&R()},15e3);e.on("dispose",()=>i.cancel(N)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},zu=function(e,t,o,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(m){e.ovView=m;try{window.history.replaceState(null,"",m==="summary"?window.location.pathname:"#"+m)}catch{}};var s=!1;e.loadCache=function(){if(!s){s=!0;var m=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:m}}).then(function(E){m===e.cacheMinutes&&(e.cacheReport=E.data,e.cacheError=E.data.available?null:E.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){s=!1,m!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(m){return e.cacheTraffic==="all"||m.traffic===e.cacheTraffic})},e.cacheRate=function(m,E){var M=e.cacheRows(),_=function(ee){return M.filter(function(X){return X.name===ee}).reduce(function(X,O){return X+O[E]},0)},V=_(m+"_hit"),G=_(m+"_miss");return V+G?(100*V/(V+G)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(m){return m.replaceAll("_"," ")},e.cacheP95=function(m){var E=0,M=e.cacheReport?.latencyBucketsMs||[];if(!m.count)return"No samples";if(!m.ms)return"Not timed";for(var _=0;_<=M.length;_++)if(E+=m["b"+_]||0,E>=Math.ceil(m.count*.95))return _ 10\u202Fs";return"No samples"},e.healthAlert=function(){let m=e.data&&e.data.system||{},E=[["Memory",m.memPercent],["Disk",m.diskPercent]].filter(([,_])=>_>90);return E.length?E.map(([_,V])=>_+" is at "+V+"%").join(" and ")+". New anonymizations may fail until "+(E.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(m){return m==null?"":uo(m)},e.latencyBound=function(m,E){return m.count?m[E]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(m[E]):"No samples"},e.firstByteBound=function(m){return e.latencyBound({count:m.firstByteCount,p95UpperMs:m.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(m){return Math.max(0,Math.round((Date.now()-m.sampledAt)/1e3))},e.peakRss=function(m){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===m.instance}).reduce(function(E,M){return Math.max(E,M.rss)},m.memory.rss)},e.performanceWarning=function(m){return e.sampleAge(m)>45||m.droppedBatches||m.droppedMetrics||m.sockets?.closeWait>0||m.eventLoop?.p95Ms>100||m.memoryLimitBytes&&m.memory.rss>m.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var m=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==m&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:m}}).then(function(E){m===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){m===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,m!==e.performanceMinutes&&e.loadPerformance()}))};function d(m){if(m==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],M=0,_=m;_>=1024&&M0?1:0).replace(/\.0$/,"")+" "+E[M]}e.humanBytes=d;function c(m){if(!m)return"\u2014";var E=Math.floor(m/86400),M=Math.floor(m%86400/3600),_=Math.floor(m%3600/60);return E>0?E+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(_<10?"0":"")+_+"m":_+"m"}e.humanDuration=c;function u(m){return m==null?"\u2014":m>=1e6?(m/1e6).toFixed(1)+"M":m>=1e3?(m/1e3).toFixed(1)+"K":String(m)}e.humanNum=u,e.queueTotal=function(m){return m?(m.waiting||0)+(m.active||0)+(m.delayed||0)+(m.failed||0):0},e.statusCount=function(m){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],M=0;M0,zero:!_,title:String(V.getHours()).padStart(2,"0")+":00 \xB7 "+(M.error||0)+" 5xx, "+(M.warn||0)+" 4xx"}})},e.errorHoursPeak=function(){var m=e.errorStats&&e.errorStats.buckets||[];return m.reduce(function(E,M){return Math.max(E,(M.error||0)+(M.warn||0))},0)};function y(m){var E=m||[];return E.map(function(M,_){var V=E[_-1]||{},G=Object.assign({},M);return G.dailyRepositories=_?Math.max(0,(M.nbRepositories||0)-(V.nbRepositories||0)):0,G.dailyUsers=_?Math.max(0,(M.nbUsers||0)-(V.nbUsers||0)):0,G.dailyPageViews=_?Math.max(0,(M.nbPageViews||0)-(V.nbPageViews||0)):0,G})}function h(m){var E=m&&m.length?m[m.length-1]:{};return{repositories:E.dailyRepositories||0,users:E.dailyUsers||0,pageViews:E.dailyPageViews||0}}function b(m,E){if(!m||!m.length)return m;var M=new Date(m[m.length-1].date);if(isNaN(M))return m;var _={};m.forEach(function(O){_[new Date(O.date).toISOString().slice(0,10)]=O});for(var V=[],G=E-1;G>=0;G--){var ee=new Date(M.getTime()-G*864e5),X=ee.toISOString().slice(0,10);V.push(_[X]||{date:ee.toISOString(),_empty:!0,dailyPageViews:0,dailyRepositories:0,dailyUsers:0,nbUsers:0})}return V}var g={};e.historyMax=function(m){return g[m]||0};var k={};e.axisMax=function(m){var E=g[m]||0;if(E<=2)return 2;if(E<=10)return Math.ceil(E/2)*2;var M=Math.pow(10,Math.floor(Math.log10(E)));return Math.ceil(E/M)*M},e.historyBarH=function(m,E){return!m||!g[E]||!m[E]?0:Math.max(1,Math.round(m[E]/e.axisMax(E)*140))},e.historyRange=function(m){return{min:k[m],max:g[m]}};var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.historyLabel=function(m){if(!m||!m.date)return"";var E=new Date(m.date);return R[E.getUTCMonth()]+" "+E.getUTCDate()},e.historyHasMissing=function(){return!!(e.data&&e.data.history||[]).some(function(m){return m&&m._empty})},e.firstDataIndex=function(){for(var m=e.data&&e.data.history||[],E=0;E=M)return{lo:X,hi:X+2*G[ee]}}return{lo:0,hi:e.axisMax("nbUsers")}},e.userStepPath=function(m){var E=e.data&&e.data.history||[],M=e.userAxis(),_=g.nbUsers?M.hi-M.lo:0,V=e.firstDataIndex();if(!_||V>=E.length)return"";for(var G=function(U){return(140-((U||0)-M.lo)/_*140).toFixed(2)},ee=m?"M"+V+" 140":"",X=V;Xg[M])&&(g[M]=E[M]),(k[M]==null||E[M] .meta-more"),o=[...e.querySelectorAll(":scope > .meta-item")];if(o.forEach(s=>{s.removeAttribute("data-meta-hidden")}),t&&(t.hidden=!0,t.textContent="",t.removeAttribute("title"),t.removeAttribute("aria-label")),!e.clientWidth)return;if(e.classList.add("is-fitting"),e.scrollWidth<=e.clientWidth+1){e.classList.remove("is-fitting");return}let i=[];for(let s=o.length-1;s>=0&&e.scrollWidth>e.clientWidth+1;s--)if(o[s].setAttribute("data-meta-hidden",""),i.unshift(o[s]),t){let r=i.map(d=>d.dataset.metaLabel||d.textContent.trim().replace(/\s+/g," "));t.hidden=!1,t.textContent="+"+i.length,t.title=r.join(" \xB7 "),t.setAttribute("aria-label",i.length+" more: "+r.join(", "))}e.classList.remove("is-fitting")}function Hu(e,t){if(typeof document>"u"||typeof MutationObserver>"u"||!document.body)return;let o=!1,i=null,s=()=>{o=!1,i&&(document.querySelectorAll("[data-meta-fit]").forEach(mg),i.takeRecords())},r=()=>{!o&&i&&(o=!0,e.timeout(s,30))};i=new MutationObserver(d=>{d.some(c=>!(c.target.closest&&c.target.closest(".meta-more")))&&r()}),i.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),xn(()=>{i.disconnect(),i=null}),t(window,"resize",r),document.fonts?.ready&&document.fonts.ready.then(r),r()}var ka=(e,t,o)=>{let i=e instanceof RegExp?ju(e,o):e,s=t instanceof RegExp?ju(t,o):t,r=i!==null&&s!=null&&vg(i,s,o);return r&&{start:r[0],end:r[1],pre:o.slice(0,r[0]),body:o.slice(r[0]+i.length,r[1]),post:o.slice(r[1]+s.length)}},ju=(e,t)=>{let o=t.match(e);return o?o[0]:null},vg=(e,t,o)=>{let i,s,r,d,c,u=o.indexOf(e),y=o.indexOf(t,u+1),h=u;if(u>=0&&y>0){if(e===t)return[u,y];for(i=[],r=o.length;h>=0&&!c;){if(h===u)i.push(h),u=o.indexOf(e,h+1);else if(i.length===1){let b=i.pop();b!==void 0&&(c=[b,y])}else s=i.pop(),s!==void 0&&s=0?u:y}i.length&&d!==void 0&&(c=[r,d])}return c};var Gu="\0SLASH"+Math.random()+"\0",Wu="\0OPEN"+Math.random()+"\0",Na="\0CLOSE"+Math.random()+"\0",Ku="\0COMMA"+Math.random()+"\0",Yu="\0PERIOD"+Math.random()+"\0",yg=new RegExp(Gu,"g"),bg=new RegExp(Wu,"g"),wg=new RegExp(Na,"g"),kg=new RegExp(Ku,"g"),Cg=new RegExp(Yu,"g"),Eg=/\\\\/g,Sg=/\\{/g,Ng=/\\}/g,Rg=/\\,/g,Dg=/\\\./g,Pg=1e5,Ag=4e6,Tg=1e3,Og=1e3;function Ca(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Ig(e){return e.replace(Eg,Gu).replace(Sg,Wu).replace(Ng,Na).replace(Rg,Ku).replace(Dg,Yu)}function Mg(e){return e.replace(yg,"\\").replace(bg,"{").replace(wg,"}").replace(kg,",").replace(Cg,".")}function Ea(e,t){for(let o=0;o=t}function $s(e,t,o,i,s,r){let d=[],c=0;for(let u=0;u=i)return d;let h=e[u]+t+o[y];if(!(r&&!h)){if(c+h.length>s)return d;d.push(h),c+=h.length}}return d}function Fg(e,t,o,i){let s=e.split(/\.\./),r=[];if(s[0]===void 0||s[1]===void 0)return r;let d=Ca(s[0]),c=Ca(s[1]),u=Math.max(s[0].length,s[1].length),y=s.length===3&&s[2]!==void 0?Math.max(Math.abs(Ca(s[2])),1):1,h=$g;c0){let m=new Array(N+1).join("0");R<0?S="-"+m+S.slice(1):S=m+S}}if(k+S.length>i)break;r.push(S),k+=S.length}return r}function Sa(e,t,o,i,s,r,d){if(s>i)return[e];let c=[""],u=0,y=!1,h=!0;for(;;){let b=ka("{","}",e);if(!b)return $s(c,e,[""],t,o,y);let g=b.pre;if(/\$$/.test(g)){if(c=$s(c,g+"{"+b.body+"}",[""],t,o,y&&!b.post.length),h=!1,!b.post.length)break;e=b.post;continue}let k=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(b.body),R=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(b.body),S=k||R,N=b.body.indexOf(",")>=0;if(!S&&!N){if(u=t||_+X.length>o)break e;m.push(X),_+=X.length}}}}if(c=$s(c,g,m,t,o,y&&!b.post.length),!b.post.length)break;e=b.post}return c}var Ug={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}"],"[:alpha:]":["\\p{L}\\p{Nl}"],"[:ascii:]":["\\x00-\\x7f"],"[:blank:]":["\\p{Zs}\\t"],"[:cntrl:]":["\\p{Cc}"],"[:digit:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},Ls=e=>e.replace(/[[\]\\-]/g,"\\$&"),Ra=/$./,Qu=(e,t,o=!1,i)=>{let s=m=>{let E=i?m.normalize(i):m;return[...E].length===1?E:m},r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let d=[],c=[],u=r+1,y=!1,h=!1,b=!1,g=r,k="";e:for(;uk.codePointAt(0)?d.push(Ls(k)+"-"+Ls(E)):E===k&&d.push(Ls(E)),k="",u+=m.length;continue}if(e.startsWith("-]",u+m.length)){d.push(Ls(E+"-")),u+=m.length+1;continue}if(e.startsWith("-",u+m.length)){k=E,u+=m.length+1;continue}d.push(Ls(E)),u+=m.length}if(g({t:"lit",ch:e}),zg=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),ec=e=>new RegExp(`^${zg(e)}$`,"iu"),Ji=new Map,tc=e=>{let t=Ji.get(e);return t||(t=ec(e),Ji.size>=1e3&&Ji.clear(),Ji.set(e,t)),t},Ma=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let o=t.charCodeAt(0);if(o>=128)return e.re.test(t);let i=e.ascii??(e.ascii=new Uint8Array(128));return i[o]||(i[o]=e.re.test(t)?1:2),i[o]===1},Hg=(e,t,o,i)=>{let s=[];for(let r=0;r{let t=new Map,o=[];return e.forEach((i,s)=>{i.t==="open"?o.push(s):i.t==="close"&&o.length&&t.set(o.pop(),s)}),t},nc=(e,t,o,i,s)=>{let r=[],d=[r];for(let c=o;c{let o=[],i="",s=()=>{for(let r of i.normalize(t))o.push(co(r));i=""};for(let r of e){if(r.t==="lit"){i+=r.ch;continue}s(),o.push(r.t==="ext"?{...r,alts:r.alts.map(d=>oc(d,t))}:r)}return s(),o},Gg=(e,t)=>{let o=1,i=c=>({t:"split",id:o++,out:c}),s=(c,u)=>c.reduceRight((y,h)=>r(h,y),u),r=(c,u)=>{switch(c.t){case"lit":let g=t?tc(c.ch):void 0;return{t:"lit",id:o++,ch:c.ch,re:g,next:u};case"any":case"star":return{t:c.t,id:o++,next:u};case"class":return{t:"class",id:o++,re:c.re,next:u}}let y=g=>c.alts.map(k=>s(k,g));switch(c.type){case"@":return i(y(u));case"?":return i([u,...y(u)]);case"!":return{t:"neg",id:o++,sub:i(y(Da)),next:u}}let h=i([]),b=i(y(h));return h.out.push(u,b),c.type==="*"?h:b};return[s(e,Da),o]},Wg=e=>{let t=[],o=new Set,i=r=>r.t==="match"?"match":String(r.id),s=(r,d)=>{if(r.t==="match"||o.has(r))return;o.add(r);let c=u=>t.push(`${d}${r.id}: ${u}`);switch(r.t){case"split":c(`split -> ${r.out.map(i).join(", ")}`);for(let u of r.out)s(u,d);return;case"neg":return c(`!(${i(r.sub)}) -> ${i(r.next)}`),s(r.sub,d+" "),s(r.next,d);case"lit":c(`${JSON.stringify(r.ch)} -> ${i(r.next)}`);break;case"class":c(`${r.re} -> ${i(r.next)}`);break;default:c(`${r.t==="any"?"?":"*"} -> ${i(r.next)}`)}s(r.next,d)};return s(e,""),[`start -> ${i(e)}`,...t].join(` -`)},Pa=class{constructor(t){xe(this,"gen");xe(this,"threads",[]);xe(this,"match",!1);xe(this,"runs",[]);xe(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},sc=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((o,i)=>o!==t.ids[i])?!1:e.runs.every(o=>t.runs.some(i=>i.neg===o.neg&&sc(i.state,o.state))),Ju=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),po,Un,Aa,Ta,Us=class{constructor(t,o,i){_e(this,Un);xe(this,"dots");xe(this,"dotStart");_e(this,po);this.dots=t,this.dotStart=o,Le(this,po,i)}state(){return new Pa(++re(this,po).gen)}done(t){return t.ids=t.threads.map(o=>o.id).sort((o,i)=>o-i),t.match&&t.ids.unshift(Da.id),t}restricted(t,o){return o&&(this.dots||this.dotStart&&t===0)}add(t,o,i,s){switch(o.t){case"split":if(!Ve(this,Un,Aa).call(this,t,o))return;for(let d of o.out)this.add(t,d,i,s);return;case"neg":if(!Ve(this,Un,Aa).call(this,t,o))return;let r=this.state();return this.add(r,o.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:o,state:r},i,s);case"star":if(this.restricted(i,s))return;Ve(this,Un,Ta).call(this,t,o)&&this.add(t,o.next,i,s);return;case"match":t.match=!0;return;default:Ve(this,Un,Ta).call(this,t,o)}}addRun(t,o,i,s){for(let r of t.runs)if(r.neg===o.neg&&sc(r.state,o.state))return;t.runs.push(o),o.state.match||this.add(t,o.neg.next,i,s)}step(t,o,i,s){let r=this.state();for(let d of t.threads)switch(d.t){case"lit":Ma(d,o)&&this.add(r,d.next,i+1,s);break;case"any":this.restricted(i,s)||this.add(r,d.next,i+1,s);break;case"class":!this.restricted(i,s)&&d.re.test(o)&&this.add(r,d.next,i+1,s);break;case"star":this.restricted(i,s)||this.add(r,d,i+1,s)}if(!this.restricted(i,s))for(let d of t.runs){if(d.state.dead){this.addRun(r,d,i+1,s);continue}let c=this.step(d.state,o,i,!1);this.addRun(r,{t:"run",neg:d.neg,state:c},i+1,s)}return this.done(r)}};po=new WeakMap,Un=new WeakSet,Aa=function(t,o){let{seen:i}=re(this,po);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,!0)},Ta=function(t,o){let{has:i}=re(this,po);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,t.threads.push(o),!0)};var ic=e=>{let t=e.ids.join();if(!e.runs.length)return t;let o=e.runs.map(i=>`${i.neg.id}(${ic(i.state)})`);return`${t}|${o.sort().join("|")}`},Kg=1<<18,zo,Ho,Vn,fo,qn,$n,Ln,nn,Ia,xi,rc,Oa=class{constructor(t,o){_e(this,nn);_e(this,zo);_e(this,Ho,new Map);_e(this,Vn,0);_e(this,fo);_e(this,qn);_e(this,$n);_e(this,Ln);Le(this,zo,t),Le(this,$n,new Us(!1,!1,o)),Le(this,Ln,new Us(!1,!0,o))}start(t){if(t){if(re(this,qn))return re(this,qn);let i=re(this,Ln).state();return re(this,Ln).add(i,re(this,zo),0,!0),Le(this,qn,Ve(this,nn,Ia).call(this,re(this,Ln).done(i)))}if(re(this,fo))return re(this,fo);let o=re(this,$n).state();return re(this,$n).add(o,re(this,zo),0,!0),Le(this,fo,Ve(this,nn,xi).call(this,re(this,$n).done(o)))}next(t,o){let i=o.charCodeAt(0),s=i<128?void 0:t.next.get(o);if(s)return s;let r=t===re(this,qn)?Ve(this,nn,xi).call(this,re(this,Ln).step(t.state,o,0,!0)):Ve(this,nn,xi).call(this,re(this,$n).step(t.state,o,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Le(this,Vn,re(this,Vn)+128)),t.ascii[i]=r):t.next.set(o,r),nl(this,Vn)._++,r}};zo=new WeakMap,Ho=new WeakMap,Vn=new WeakMap,fo=new WeakMap,qn=new WeakMap,$n=new WeakMap,Ln=new WeakMap,nn=new WeakSet,Ia=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},xi=function(t){let o=ic(t),i=re(this,Ho).get(o);if(i)return i;re(this,Vn)>Kg&&Ve(this,nn,rc).call(this);let s=Ve(this,nn,Ia).call(this,t);return re(this,Ho).set(o,s),Le(this,Vn,re(this,Vn)+(o.length+1)),s},rc=function(){re(this,Ho).clear(),Le(this,Vn,0),Le(this,fo,void 0),Le(this,qn,void 0)};var Yg=e=>{let t=[];for(let o=e;o.t!=="match";o=o.next){if(o.t==="split"||o.t==="neg")return;t.push(o)}return t},Xg=(e,t,o,i)=>{let s=0,r=o,d=-1,c=0;for(;r{let t=0,o=0;for(let i of e){let[s,r]=Qg(i);t+=s,o+=r}return[t,o]},Qg=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(ac),o=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),s=i===0?0:1/0;return e.type==="@"?[o,i]:e.type==="?"?[0,i]:e.type==="*"?[0,s]:[o,s]},Zu=(e,t,o)=>{for(let i=0;iZg.test(e)?[...e]:e,xu=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Fn,jo,ho,er,mo,zs,tr,go,Hs,js,Gs,Dn,vn,Go,Wo,Ws,nr,tn,vo,Fs,Bs=class{constructor(t,o={}){_e(this,vo);xe(this,"pattern");xe(this,"options");_e(this,Fn);_e(this,jo);_e(this,ho);_e(this,er);_e(this,mo);_e(this,zs,!1);_e(this,tr);_e(this,go);_e(this,Hs,!1);_e(this,js,0);_e(this,Gs,1/0);_e(this,Dn,[]);_e(this,vn,[]);_e(this,Go);_e(this,Wo);_e(this,Ws,!1);_e(this,nr);_e(this,tn);if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=o;let{nocase:i=!1,noext:s=!1,normalize:r}=o;Le(this,tn,r===!0?"NFC":r||void 0);let d=/^[?*+@]\(\)$/.test(t),c=Hg(t,i,s||d,re(this,tn)),[u]=nc(c,jg(c),0,c.length,!0);re(this,tn)&&(u=oc(u,re(this,tn)));let[y,h]=Gg(u,i);if(Le(this,Fn,y),Le(this,jo,h),u.every(b=>b.t==="lit"))Le(this,mo,u.map(b=>b.ch).join("")),Le(this,zs,i);else{let b=R=>R.t!=="lit"?void 0:i?{ch:R.ch,re:tc(R.ch)}:{ch:R.ch};for(let R of u){let S=b(R);if(!S)break;re(this,Dn).push(S)}for(let R=u.length-1;R>=0;R--){let S=b(u[R]);if(!S)break;re(this,vn).unshift(S)}Le(this,Ws,!!(re(this,Dn).length||re(this,vn).length)),i||(Le(this,Go,re(this,Dn).map(R=>R.ch).join("")),Le(this,Wo,re(this,vn).map(R=>R.ch).join(""))),Le(this,go,Yg(re(this,Fn))?.slice(re(this,Dn).length,-re(this,vn).length||void 0)),Le(this,Hs,!!re(this,go)?.every(R=>R.t==="star"||R.t==="any"));let[g,k]=ac(u);Le(this,js,g),Le(this,Gs,k)}}test(t){return re(this,tn)?(xu(t),Ve(this,vo,Fs).call(this,t.normalize(re(this,tn)))):Jg.test(t)?(xu(t),Ve(this,vo,Fs).call(this,t,[...t])):Ve(this,vo,Fs).call(this,t,t)}testUnchecked(t){return Ve(this,vo,Fs).call(this,re(this,tn)?t.normalize(re(this,tn)):t)}toString(){return Wg(re(this,Fn))}};Fn=new WeakMap,jo=new WeakMap,ho=new WeakMap,er=new WeakMap,mo=new WeakMap,zs=new WeakMap,tr=new WeakMap,go=new WeakMap,Hs=new WeakMap,js=new WeakMap,Gs=new WeakMap,Dn=new WeakMap,vn=new WeakMap,Go=new WeakMap,Wo=new WeakMap,Ws=new WeakMap,nr=new WeakMap,tn=new WeakMap,vo=new WeakSet,Fs=function(t,o){if(re(this,mo)!==void 0)return re(this,zs)?(re(this,tr)??Le(this,tr,ec(re(this,mo)))).test(t):t===re(this,mo);let i=re(this,js),s=re(this,Gs);if(o===void 0){let h=t.length,b=h+1>>1;if(hs)return!1;(bs)&&(o=Zi(t))}if(o!==void 0&&(o.lengths))return!1;let r=re(this,Dn).length;if(re(this,Ws))if(re(this,Go)!==void 0&&re(this,Wo)!==void 0){if(!t.startsWith(re(this,Go))||!t.endsWith(re(this,Wo)))return!1}else{o??(o=Zi(t));let h=o.length-re(this,vn).length;if(!Zu(re(this,Dn),o,0)||!Zu(re(this,vn),o,h))return!1}let d=!this.options.dot&&t.startsWith(".");if(re(this,go)){if(t==="."||t===".."||d&&!r)return!1;if(re(this,Hs))return!0;o??(o=Zi(t));let h=o.length-re(this,vn).length;return Xg(re(this,go),o,r,h)}if(o??(o=Zi(t)),t==="."||t===".."){re(this,ho)??Le(this,ho,Ju(re(this,jo)));let h=re(this,er)??Le(this,er,new Us(!0,!1,re(this,ho))),b=h.state();h.add(b,re(this,Fn),0,!0);let g=h.done(b);for(let k=0;k{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var Bn=(e,{windowsPathsNoEscape:t=!1,magicalBraces:o=!1}={})=>o?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var yo=(e,{windowsPathsNoEscape:t=!1,magicalBraces:o=!0}={})=>o?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var Bt=(e,t,o={})=>(Ks(t),!o.nocomment&&t.charAt(0)==="#"?!1:ev(t,o).match(e)),Ko=new Map,xg=256,ev=(e,t)=>{let o=e+"\0"+JSON.stringify(t),i=Ko.get(o);return i?Ko.delete(o):(i=new bo(e,{...t}),Ko.size>=xg&&Ko.delete(Ko.keys().next().value)),Ko.set(o,i),i},fc=typeof process=="object"&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",lc={win32:{sep:"\\"},posix:{sep:"/"}},tv=fc==="win32"?lc.win32.sep:lc.posix.sep;Bt.sep=tv;var vt=Symbol("globstar **");Bt.GLOBSTAR=vt;var nv=(e,t={})=>o=>Bt(o,e,t);Bt.filter=nv;var Pn=(e,t={})=>Object.assign({},e,t),ov=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Bt;let t=Bt;return Object.assign((i,s,r={})=>t(i,s,Pn(e,r)),{Minimatch:class extends t.Minimatch{constructor(s,r={}){super(s,Pn(e,r))}static defaults(s){return t.defaults(Pn(e,s)).Minimatch}},unescape:(i,s={})=>t.unescape(i,Pn(e,s)),escape:(i,s={})=>t.escape(i,Pn(e,s)),filter:(i,s={})=>t.filter(i,Pn(e,s)),defaults:i=>t.defaults(Pn(e,i)),braceExpand:(i,s={})=>t.braceExpand(i,Pn(e,s)),match:(i,s,r={})=>t.match(i,s,Pn(e,r)),sep:t.sep,GLOBSTAR:vt})};Bt.defaults=ov;var hc=(e,t={})=>(Ks(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Xu(e,{max:t.braceExpandMax}));Bt.braceExpand=hc;var sv=(e,t,o={})=>{let i=new bo(t,o);return e=e.filter(s=>i.match(s)),i.options.nonull&&!e.length&&e.push(t),e};Bt.match=sv;var dc=/[?*]|[+@!]\(.*?\)|\[|\]/,mc=(e,t)=>{let o=t+1;(e.charAt(o)==="!"||e.charAt(o)==="^")&&o++;let i=!1;for(;o{if(!t&&(e==="+()"||e==="@()"))return e;let o="";for(let i=0;i{if(/^[?*+@]\(\)$/.test(e)||e.includes("[:"))return!1;let t=0;for(let o=0;otypeof e=="string"?t===e:t!==""&&e.testUnchecked(t),cc=(e,t,o,i,s)=>zn(e,t)?o:i!==void 0&&zn(e,i)?s:-1,La=e=>e==="."||e==="..",Va=e=>typeof e=="string"&&/^[a-z]:$/i.test(e),sr=e=>typeof e=="string"&&/^unc$/i.test(e),qa=e=>{if(e[0]!==""||e[1]!=="")return-1;let t=e[2]!=="?"?2:sr(e[3])?4:-1,o=e[t],i=e[t+1];return t!==-1&&o!==void 0&&o!==""&&o!==vt&&i!==void 0&&i!==""&&i!==vt?t:-1},or=(e,t)=>!La(e)&&(t||!e.startsWith(".")),Ys=(e,t,o,i,s)=>{for(let r=t;r=o||rr(e.charCodeAt(c),s))return!0}let d=Fa(e,r,s);if(d===-1)return!1;for(r=d+1;rt==="/"?e===47:t==="\\"?e===92:e===47||e===92,Fa=(e,t,o)=>{if(o!=="both")return e.indexOf(o,t);let i=e.indexOf("/",t),s=e.indexOf("\\",t);return i===-1?s:s===-1?i:Math.min(i,s)},pc=(e,t,o)=>o!=="both"?e.lastIndexOf(o,t):Math.max(e.lastIndexOf("/",t),e.lastIndexOf("\\",t)),$a={},Hn,Xo,jn,An,Qo,Jo,Gn,Qs,Zo,Js,qe,ir,Xs,gc,vc,yc,bc,wc,kc,Ua,Cc,Ec,Ba,Yo,za,bo=class{constructor(t,o={}){_e(this,qe);xe(this,"options");xe(this,"set");xe(this,"pattern");xe(this,"windowsPathsNoEscape");xe(this,"nonegate");xe(this,"negate");xe(this,"comment");xe(this,"empty");xe(this,"preserveMultipleSlashes");xe(this,"partial");xe(this,"globSet");xe(this,"globParts");xe(this,"nocase");xe(this,"isWindows");xe(this,"platform");xe(this,"windowsNoMagicRoot");xe(this,"maxGlobstarRecursion");_e(this,Hn);_e(this,Xo);_e(this,jn);_e(this,An);_e(this,Qo,[]);_e(this,Jo,[]);_e(this,Gn,[]);_e(this,Qs,new Map);_e(this,Zo,!1);_e(this,Js,new WeakMap);Ks(t),o=o||{},this.options=o,this.maxGlobstarRecursion=o.maxGlobstarRecursion??200,this.pattern=t,this.platform=o.platform||fc,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!o.windowsPathsNoEscape||o[i]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!o.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!o.nonegate,this.comment=!1,this.empty=!1,this.partial=!!o.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=o.windowsNoMagicRoot!==void 0?o.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],Le(this,Hn,!this.preserveMultipleSlashes),Le(this,jn,(o.optimizationLevel??1)>=2);let s=o.normalize;Le(this,An,s===!0?"NFC":s||void 0),this.make();let r=this.set.map(d=>Ve(this,qe,Xs).call(this,d));Le(this,Gn,this.set.map((d,c)=>re(this,Hn)&&d.length-1>r[c])),Le(this,Qo,this.set.map((d,c)=>{let u=re(this,Gn)[c]?d.length-1:d.length,y=d.slice(r[c]+1,u).filter(h=>typeof h=="string"&&!!h);return[...new Set(y)]})),Le(this,Xo,re(this,Qo).some(d=>d.length)),Le(this,Jo,this.set.map((d,c)=>{let[u,y,h]=d;if(re(this,Gn)[c]&&d.length===2&&u===vt&&y!==vt)return"tail";if(re(this,Gn)[c]&&o.matchBase&&d.length===1&&u!==vt&&u!=="")return"base";if(!(!re(this,Hn)||r[c]!==-1)){if(d.length===3&&u===vt&&h===vt&&y!==vt&&y!==""&&this.maxGlobstarRecursion>0)return"mid";if(d.length===2&&y===vt&&u!==vt&&u!=="")return"head"}}))}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let o of t)if(typeof o!="string")return!0;return!1}make(){let t=this.pattern,o=this.options;if(!o.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())];let i=this.globSet.map(r=>Ve(this,qe,za).call(this,r));this.globParts=this.preprocess(i),Le(this,Zo,!0);let s=this.globParts.map((r,d,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=r[2]==="?"&&sr(r[3])?6:4,y=r[0]===""&&r[1]===""&&(r[2]==="?"||!dc.test(r[2]))&&r.slice(3,u).every(b=>!dc.test(b)),h=/^[a-z]:/i.test(r[0]);if(y)return[...r.slice(0,u).map(b=>Ve(this,qe,ir).call(this,b)),...r.slice(u).map(b=>this.parse(b))];if(h)return[Ve(this,qe,ir).call(this,r[0]),...r.slice(1).map(b=>this.parse(b))]}return r.map(u=>this.parse(u))});if(this.set=s.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r{for(let c=0;ci.length));for(let i=0;i{if(!(d[i]instanceof Bs||d[i]===$a)||!rv(this.globParts[c][i]))return;let u=[...this.globParts[c]];u[i]="";let y=`${d.length}/${u.join("/")}`,h=s.get(y);h?h.push(c):s.set(y,[c])});let r=new Set;for(let d of s.values()){if(d.length<2)continue;let[c,...u]=d,h=`@(${d.map(b=>this.globParts[b][i]).join("|")})`;this.globParts[c][i]=h,this.set[c][i]=this.parse(h);for(let b of u)r.add(b)}r.size&&(t=!0,this.set=this.set.filter((d,c)=>!r.has(c)),this.globParts=this.globParts.filter((d,c)=>!r.has(c)))}}}preprocess(t){if(this.options.noglobstar)for(let i of t)for(let s=0;s=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):o>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(o=>{let i=-1;for(;(i=o.indexOf("**",i+1))!==-1;){let s=i;for(;o[s+1]==="**";)s++;s!==i&&o.splice(i,s-i)}return o})}levelOneOptimize(t){return t.map(o=>{let i=Ve(this,qe,Xs).call(this,o)+1;return o=o.reduce((s,r)=>{let d=s[s.length-1];return r==="**"&&d==="**"?s:r===".."&&s.length>i&&d&&d!==".."&&d!=="."&&d!=="**"?(s.pop(),s):(s.push(r),s)},[]),o.length===0?[""]:o})}firstPhasePreProcess(t){let{braceExpandMax:o=1e5}=this.options,i=!1;do{i=!1;for(let s of t){let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let u=r;for(;s[u+1]==="**";)u++;u>r&&s.splice(r+1,u-r);let y=s[r+1],h=s[r+2],b=s[r+3];if(y!==".."||!h||h==="."||h===".."||!b||b==="."||b===".."||t.length>=o)continue;i=!0,s.splice(r,1);let g=s.slice(0);g[r]="**",t.push(g),r--}if(!this.preserveMultipleSlashes){for(let u=1;u1e3)return t;for(let o=0;oo.length)}partsMatch(t,o,i=!1){let s=0,r=0,d=[],c="";for(;s=0;y--)u=r[y];for(let y=0;y=0){let m=S;for(;m>0&&rr(t.charCodeAt(m-1),o);)m--;c=m===0?0:pc(t,m-1,o)+1,d=t.slice(c,m)}let N=re(this,jn)&&(La(s)||s===""&&d!==void 0&&La(d));i=N?-1:1,g=!N}let k=-1;if(g&&typeof b=="string"&&(k=cc(b,s,r,d,c),k===-1))continue;if(re(this,Xo)){for(let S of re(this,Qo)[y])if(!t.includes(S))continue e}if(g&&typeof b=="object"&&(k=cc(b,s,r,d,c),k===-1))continue;let R=re(this,Jo)[y];if(R==="base"&&g)return"yes";if(R==="tail"&&g){if(re(this,jn)&&Ys(t,0,k,!0,o))return"maybe";if(!Ys(t,0,k,u,o))return"yes";continue}if(R==="mid"||R==="head"){let S=Ve(this,qe,yc).call(this,t,h,R==="head",u,o);if(S!=="no")return S;continue}return"maybe"}return"no"},vc=function(t,o,i){let s=!!this.options.dot,r=t.length;if(i==="head"){if(r<2||!zn(o[0],t[0]))return!1;for(let c=1;cc&&d.testUnchecked(t.slice(c,u)))&&!Ys(t,y,t.length,s,r))return"yes";if(i||Ys(t,c,y,s,r))return"no";c=y}return"no"},bc=function(t){let o=_a;return o?.f===t&&o.isWindows===this.isWindows&&o.preserveMultipleSlashes===this.preserveMultipleSlashes&&o.normalize===re(this,An)?o:void 0},wc=function(t){let{isWindows:o,preserveMultipleSlashes:i}=this,s=Ve(this,qe,za).call(this,o?t.split("\\").join("/"):t),r=re(this,An);return r&&(s=s.map(d=>d.normalize(r))),_a={f:t,isWindows:o,preserveMultipleSlashes:i,normalize:r,parts:s},_a},kc=function(t){let o=[...t],i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let d=1;dt.length)return!1;let b=t.length-u.length;if(Ve(this,qe,Yo).call(this,t,u,i,b,0))h=u.length;else{if(t[t.length-1]!==""||s+u.length===t.length||(b--,!Ve(this,qe,Yo).call(this,t,u,i,b,0)))return!1;h=u.length+1}}if(!c.length){let b=!!h;for(let g=s;g{m[1]=R-S[E]});let N={head:y,body:h,tail:b,segments:g};return s[r]=N,N},Ba=function(t,o,i,s,r,d,c,u,y){let h=o[r];if(!h){if(d)return s>=i||s===i-1&&t[s]==="";for(let R=s;Re.lastIndexOf(t)===o)}function ja(e){let t=(e||[]).filter(o=>typeof o=="string"&&o.length>0).map(o=>{let{negated:i,anchored:s,directoryOnly:r,body:d}=av(o);return{negated:i,directoryOnly:r,matcher:new bo(d,{dot:!0,nonegate:!0,nocomment:!0,matchBase:!s&&!d.includes("/")})}});return(o,i=!1)=>{let s=(o||"").replace(/^\/+/,"");if(!s)return!1;let r=s.split("/"),d=r.slice(0,-1).map((u,y)=>r.slice(0,y+1).join("/")),c=i;for(let u of t){if(u.negated?!c:c)continue;(u.directoryOnly?d:[...d,s]).some(h=>u.matcher.match(h))&&(c=!u.negated)}return c}}var cJ=new Set("^$\\.*+?()[]{}|/dDsSwWbBnrtvf0cxupP".split(""));function Ga(e){let t=e.indexOf("=>");if(t<0)return{term:e,replacement:null};let o=e.slice(0,t).replace(/\s+$/,""),i=e.slice(t+2).replace(/^\s+/,"");return o?{term:o,replacement:i}:{term:e,replacement:null}}var Sc=new Set(["*","+","?","(",")","[","]","{","}","|","^","$"]);function Nc(e){let t=[];return String(e||"").split(` -`).forEach((o,i)=>{let{term:s}=Ga(o.trim());if(!s)return;let r=[];for(let d=0;d{let t=e.target;if(!t||t.tagName!=="IMG"||t.dataset.failed||!t.closest?.(".markdown-body, .anonymize-preview-body"))return;t.dataset.failed="1";let o=window.document.createElement("span"),i=parseInt(t.getAttribute("width"),10)||0,s=parseInt(t.getAttribute("height"),10)||0;o.className=i>=200||s>=120?"img-unavailable is-large":"img-unavailable",o.textContent="Image unavailable",o.title=t.alt?"Image unavailable: "+t.alt.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]"):"Image unavailable",o.setAttribute("role","img"),o.setAttribute("aria-label",o.title),t.replaceWith(o)},!0);function ar(e){let t=e?.data;if(typeof t=="string")try{t=JSON.parse(t)}catch{t=null}return typeof t?.error=="string"&&Object.prototype.hasOwnProperty.call(Wn.ERRORS,t.error)?t.error:e?.status===-1||e?.status===0?"request_error":[502,503,504].includes(e?.status)?"unreachable":"unknown_error"}var lr="XXXX",dv=e=>{lr=e||"XXXX"},uv=(e=lr)=>{if(!e)return null;let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(t+"(?:-\\d+)?","g")},Dc=(e,t=lr)=>{let o=uv(t);if(!o||!e||!e.textContent.includes(t))return;let i=e.ownerDocument,s=i.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=[];for(;s.nextNode();)r.push(s.currentNode);for(let d of r){let c=d.nodeValue,u=d.parentElement;if(!c.includes(t)||!u||u.closest("script, style, mark.redaction, .mermaid"))continue;let y=u.closest('code[class*="language-"]');if(y&&!y.contains(e))continue;let h=i.createDocumentFragment(),b=0;for(let g of c.matchAll(o)){h.append(c.slice(b,g.index));let k=i.createElement("mark");k.className="redaction",k.title="Redacted by Anonymous GitHub",k.textContent=g[0],h.append(k),b=g.index+g[0].length}h.append(c.slice(b)),d.replaceWith(h)}},Zs=/\bXXXX-\d+\b/g,qs=function(e){if(!e||e.indexOf("XXXX-")===-1||typeof window.DOMParser!="function")return e;let t=new window.DOMParser().parseFromString("
"+e+"
","text/html"),o=t.createTreeWalker(t.body,4),i=[];for(;o.nextNode();)Zs.lastIndex=0,!o.currentNode.parentElement?.closest("pre code")&&Zs.test(o.currentNode.nodeValue)&&i.push(o.currentNode);for(let s of i){Zs.lastIndex=0;let r=t.createDocumentFragment(),d=0,c,u=s.nodeValue;for(;c=Zs.exec(u);){r.appendChild(t.createTextNode(u.slice(d,c.index)));let y=t.createElement("mark");y.className="redact-chip",y.setAttribute("title","Redacted term "+c[0].slice(5)+" \u2014 the same term everywhere in this snapshot");let h=c[0].slice(5);y.textContent="";let b=t.createElement("i");b.textContent=h,y.appendChild(b),y.dataset.term=c[0],y.setAttribute("aria-label","Redacted term "+h);let g=/^[.,;:!?)\]]+/.exec(u.slice(c.index+c[0].length));if(g){let k=t.createElement("span");k.className="redact-glue",k.appendChild(y),k.appendChild(t.createTextNode(g[0])),r.appendChild(k),d=c.index+c[0].length+g[0].length}else r.appendChild(y),d=c.index+c[0].length}r.appendChild(t.createTextNode(u.slice(d))),s.parentNode.replaceChild(r,s)}return t.body.firstChild.innerHTML},Pc=()=>{window.Prism?.hooks&&!window.Prism.redactionHook&&(window.Prism.hooks.add("complete",e=>{Dc(e.element),e.element.querySelectorAll?.("mark.redaction").forEach(t=>{let o=/^XXXX-(\d+)$/.exec(t.textContent);if(!o)return;t.className="redact-chip",t.setAttribute("title","Redacted term "+o[1]+" \u2014 the same term everywhere in this snapshot"),t.setAttribute("aria-label","Redacted term "+o[1]),t.dataset.term=o[0],t.style.setProperty("--slot-ch",o[0].length+"ch"),t.textContent="";let i=t.ownerDocument.createElement("span");i.className="redact-src",i.textContent=o[0].slice(0,o[0].length-o[1].length),t.appendChild(i);let s=t.ownerDocument.createElement("i");s.textContent=o[1],t.appendChild(s)})}),window.Prism.redactionHook=!0)},Ac=(e,t=lr)=>{if(!e||!t||!e.includes(t))return e;let o=new DOMParser().parseFromString(""+e+"","text/html");return Dc(o.body,t),o.body.innerHTML};async function Wa(e){if(window.navigator.clipboard?.writeText){await window.navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0";let o=document.activeElement;document.body.appendChild(t);try{if(t.select(),!document.execCommand?.("copy"))throw Error("Copy unavailable")}finally{t.remove(),o?.focus()}}function cv(e){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let t=[...e.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],o=t.indexOf(e.currentTarget),i=e.key==="Home"?0:e.key==="End"?t.length-1:(o+(e.key==="ArrowRight"?1:-1)+t.length)%t.length;e.preventDefault(),t[i]?.focus(),t[i]?.click()}var Tc=function(e,t,o,i){e.previewTabKeydown=cv,e.headerCanUpgrade=!1,e.headerShowSupport=!1,e.headerBillingPending=new URLSearchParams(window.location.search).get("billing")==="success";let s=N=>{e.headerShowSupport=!(N?.grants||[]).some(E=>["active","paid","past_due"].includes(E.status)&&new Date(E.until).getTime()>Date.now());let m=(N?.grants||[]).some(E=>["author_monthly","author_annual"].includes(E.planId)&&["active","paid","past_due"].includes(E.status)&&new Date(E.until).getTime()>Date.now());e.headerCanUpgrade=!!N?.enabled&&N.checkoutEnabled!==!1&&!m&&(N.plans||[]).some(E=>["author_monthly","author_annual"].includes(E.id))};e.on("billing:updated",(N,m)=>s(m)),e.on("billing:pending",(N,m)=>{e.headerBillingPending=m}),e.openHeaderUpgrade=()=>{o.path()==="/profile"?e.emit("settings:upgrade"):o.url("/profile?upgrade=1")};let r=Ut(),d=Rt(),c=!1,u=()=>{c=!1;let N=document.querySelector("nav.navbar.navbar-expand-lg");if(!N||(N.classList.remove("nav-fit-1","nav-fit-2"),window.innerWidth<992))return;let m=N.querySelector(".navbar-collapse"),E=()=>N.scrollWidth>N.clientWidth+1||!!m&&m.scrollWidth>m.clientWidth+1;E()&&N.classList.add("nav-fit-1"),E()&&N.classList.add("nav-fit-2")},y=()=>{c||(c=!0,tt(()=>d.timeout(u,0)))};r(window,"resize",y),e.on("routeChange",y),e.on("billing:updated",y),document.fonts?.ready&&document.fonts.ready.then(y).catch(()=>{}),e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(N){let m=e.toasts.indexOf(N);m!==-1&&e.toasts.splice(m,1)},e.addToast=function(N){return e.toasts.push(N),i(function(){e.removeToast(N)},8e3),N};let h=/^\/(r|repository|pr|gist)\//;e.path=o.url(),e.paths=o.path().substring(1).split("/"),e.isReviewerRoute=h.test(o.path()),e.darkMode=function(N){localStorage.setItem("darkMode",N),e.isDarkMode=N;let m="/css/prism.css";if($("link[href='/css/prism-okaidia.css']").remove(),N)$("body").addClass("dark-mode"),$(`link[href='${m}']`).remove();else if($("body").removeClass("dark-mode"),!document.querySelector(`link[href='${m}']`)){let E=document.createElement("link");E.href=m,E.rel="stylesheet",document.head.append(E)}e.emit("dark-mode",N)},e.darkMode(localStorage.getItem("darkMode")=="true"),e.emailPromptOpen=!1,e.emailPromptAddress="",e.emailPromptBusy=!1,e.emailPromptError="";let b;e.respondToEmailPrompt=async N=>{if(!e.emailPromptBusy){e.emailPromptBusy=!0,e.emailPromptError="";try{let m=await t.post("/github/connections/email",{action:N,email:e.emailPromptAddress},{headers:{"X-CSRF-Token":e.user.emailPromptCSRF}});N==="save"&&(e.user.notificationEmail=m.data.notificationEmail),e.emailPromptOpen=!1,e.user.showEmailPrompt=!1,b?.focus()}catch(m){e.emailPromptError=m.data?.error||"Unable to save your preference. Please try again."}finally{e.emailPromptBusy=!1}}};function g(){t.get("/api/user").then(N=>{N&&(e.user=N.data),y(),e.user?.username?Wi(t).then(m=>s(m.data)).catch(()=>{}):e.headerShowSupport=!0,e.user?.emailNotificationsEnabled&&e.user.showEmailPrompt&&!e.user.notificationEmail&&(b=document.activeElement,e.emailPromptOpen=!0,i(()=>{let m=document.getElementById("email-prompt");m?.showModal?m.showModal():m?.setAttribute("open",""),document.getElementById("email-prompt-address")?.focus()},0))},()=>{e.user=null,e.headerShowSupport=!0})}g();function k(){t.get("/api/options").then(N=>{N&&(e.site_options=N.data),dv(N?.data?.ANONYMIZATION_MASK),e.emit("site-options")},()=>{e.site_options=null})}k();function R(){t.get("/api/message").then(N=>{N&&(e.generalMessage=N.data)},()=>{e.generalMessage=null})}R();function S(N,m){m&&(e.title=m.title),e.path=o.url(),e.paths=o.path().substring(1).split("/"),e.isReviewerRoute=h.test(o.path())}e.on("routeChange",S),e.on("routeUpdate",S)},Oc=function(e,t){let o=Ut(),i=Rt();e.faqQuery="",e.faqResults=0;let s=d=>(d||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ");e.filterFaq=()=>{let d=s(e.faqQuery).trim().split(" ").filter(Boolean),c=0;document.querySelectorAll(".faq-section .panel-group").forEach(u=>{let y=0;u.querySelectorAll(":scope > .panel").forEach(g=>{let k=g.dataset.faqText||(g.dataset.faqText=s(g.textContent)),R=d.every(S=>k.includes(S));g.classList.toggle("faq-hit",d.length>0&&R),g.hidden=d.length>0&&!R,R&&y++});let h=d.length>0&&y===0;u.hidden=h;let b=u.previousElementSibling;b?.classList.contains("faq-cat")&&(b.hidden=h),c+=y}),e.faqResults=d.length?c:0},e.clearFaqSearch=()=>{e.faqQuery="",e.filterFaq(),document.getElementById("faq-search-input")?.focus()};let r=()=>{let d=window.location.hash.slice(1),c=document.getElementById(d);if(!c?.classList.contains("panel-collapse"))return;$(c).collapse("show");let u=document.getElementById(c.getAttribute("aria-labelledby"));u?.setAttribute("tabindex","-1"),u?.focus({preventScroll:!0}),u?.scrollIntoView?.({block:"start"})};e.on("routeUpdate",()=>i.timeout(r,0)),o(window,"hashchange",r),i.timeout(r,0)},Ic=function(e,t,o,i,s){e.settingsTab=/(?:billing|upgrade)=/.test(window.location.search)?"billing":"defaults",e.confirmDeleteAccount=!1,e.deleteUsername="",e.profilePastSubscription=()=>!e.profileAuthorGrant()&&(e.billing?.grants||[]).some(h=>["author_monthly","author_annual"].includes(h.planId)),e.showAuthorPlans=new URLSearchParams(window.location.search).get("upgrade")==="1",e.showRepositoryPass=!1,e.profilePlan="author_annual",e.openProfileUpgrade=()=>{e.settingsTab="billing",e.showAuthorPlans=!0,tt(()=>document.getElementById("settings-plan-comparison")?.focus())},e.on("settings:upgrade",()=>e.openProfileUpgrade()),e.profileAuthorPlans=()=>(e.billing?.plans||[]).filter(h=>["author_monthly","author_annual"].includes(h.id)),e.profileSelectedPlan=()=>e.profileAuthorPlans().find(h=>h.id===e.profilePlan)||e.profileAuthorPlans()[0],e.profilePassPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="author_pass"),e.profileAddonPlans=()=>(e.billing?.plans||[]).filter(h=>Gi(h.id)).sort((h,b)=>+(b.id==="repo_pack")-+(h.id==="repo_pack")),e.profileAddonId="repo_pack",e.profilePackPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="repo_pack"),e.profileSlotPlan=()=>(e.billing?.plans||[]).find(h=>h.id==="repo_slot"),e.profileRepositories=()=>(e.billing?.repositories||[]).filter(h=>h.status!=="removed"),e.openProfileAddon=h=>{h&&(e.profileAddonId=h),e.showRepositoryPass=!0,e.billingRepository="",tt(()=>{let b=document.getElementById("settings-addons-title");b?.scrollIntoView?.({block:"nearest",behavior:"smooth"}),b?.focus?.({preventScroll:!0})})};let r=["repo_slot","author_pass","repo_extend","repo_never"];e.profileSingleAddons=()=>e.profileAddonPlans().filter(h=>h.id!=="repo_pack").sort((h,b)=>r.indexOf(h.id)-r.indexOf(b.id)),e.profileSingleId="repo_slot",e.profileSingleAddon=()=>e.profileSingleAddons().find(h=>h.id===e.profileSingleId)||e.profileSingleAddons()[0],e.profileCheapestAddon=()=>[...e.profileSingleAddons()].sort((h,b)=>(h.amount??1/0)-(b.amount??1/0))[0],e.profileAuthorPlansByValue=()=>[...e.profileAuthorPlans()].sort((h,b)=>+(h.interval==="year")-+(b.interval==="year")),e.profilePackSummary=h=>h.parts.map(b=>b.planId==="repo_slot"?"Extra repository":`${e.profileGrantName(b)} until ${e.billingDate(b.until)}`).join(" \xB7 "),e.profileAddonFeatures=h=>({repo_pack:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage)} of storage`,"Automatic updates for 180 days","Online for up to a year","No subscription"],repo_slot:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage)} of storage`,"Valid while the repository exists","Refresh it by hand"],author_pass:["Automatic updates for 180 days",`Its own ${e.billingBytes(e.profilePassPlan()?.storage)} of storage`,"No subscription"],repo_extend:["Online for up to one more year","Buy again to add another year","No subscription"],repo_never:["The link never expires","No subscription","Ends only if the payment is refunded"]})[h]||[],e.profileAddonBlurb=h=>({repo_slot:"One more repository",author_pass:"Auto-updates for 180 days",repo_extend:"Online one more year",repo_never:"The link never expires"})[h]||"",e.profileAuthorPurchase=()=>(e.billing?.purchases||[]).find(h=>h.recurring&&["active","overdue"].includes(h.status)),e.profileRepositoryExpiry=h=>h.status==="expired"?"expired":h.expirationMode==="never"?"never expires":h.expirationDate?"expires "+e.billingDate(h.expirationDate):"no date",e.profileAnnualSavings=()=>{let h=e.profileAuthorPlans().find(g=>g.interval==="month")?.amount,b=e.profileAuthorPlans().find(g=>g.interval==="year")?.amount;return h&&b&&b(e.billing?.purchases||[]).filter(b=>["active","overdue"].includes(b.status)===h),e.profilePurchaseStatus=h=>({active:"Active",overdue:"Payment overdue",ended:"Ended",refunded:"Refunded",disputed:"Disputed"})[h.status]||h.status,e.profilePurchaseTerm=h=>{let b=h.status&&!["active","overdue"].includes(h.status);if(h.recurring)return b?h.until?"Ended "+e.billingDate(h.until):"":(h.cancelAtPeriodEnd?"Ends ":"Renews ")+e.billingDate(h.until);if(h.planId==="repo_pack"){let g=h.parts.map(k=>k.until).filter(Boolean).map(k=>new Date(k).getTime());return b||!g.length?"":"Until "+e.billingDate(new Date(Math.max(...g)))}return h.until?(b||new Date(h.until).getTime()e.profileAddonPlans().find(h=>h.id===e.profileAddonId)||e.profileAddonPlans()[0],e.profileAuthorGrant=()=>(e.billing?.grants||[]).find(h=>["author_monthly","author_annual"].includes(h.planId)&&["active","paid","past_due"].includes(h.status)&&new Date(h.until).getTime()>Date.now()),e.profileConferencePlan=()=>(e.billing?.plans||[]).filter(h=>["conference_workshop","conference","conference_large"].includes(h.id)&&h.amount!=null).sort((h,b)=>h.amount-b.amount)[0],e.profileGrantName=h=>({author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference:"Conference package",conference_workshop:"Workshop package",conference_large:"Large conference package"})[h.planId]||h.planId,Ki(e,t,()=>s.load().then(h=>{e.quota=h},console.error),{portalMessage:()=>{let h=e.profileAuthorGrant();return h?h.cancelAtPeriodEnd?`Renewal cancelled. Your access continues until ${e.billingDate(h.until)}.`:`Your subscription renews on ${e.billingDate(h.until)}.`:"Your billing details are up to date."}}),e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,e.accountEmail="",e.emailLoading=!0,e.emailCSRFReady=!1,e.emailSaving=!1,e.emailSaved=!1,e.emailError="";let d="";e.loadAccountEmail=async()=>{e.emailLoading=!0,e.emailError="";try{let h=await t.get("/github/connections/email");e.accountEmail=h.data.notificationEmail||"",d=h.data.csrf,e.emailCSRFReady=!!d}catch{e.emailError="Unable to load your email address. Please try again."}finally{e.emailLoading=!1}},e.saveAccountEmail=async()=>{if(!(e.emailSaving||e.emailLoading||!d)){e.emailSaving=!0,e.emailSaved=!1,e.emailError="";try{let h=await t.post("/github/connections/email",{email:e.accountEmail},{headers:{"X-CSRF-Token":d}});e.accountEmail=h.data.notificationEmail,e.user&&(e.user.notificationEmail=h.data.notificationEmail),e.emailSaved=!0}catch{e.emailError="Unable to save your email address. Check the address and try again."}finally{e.emailSaving=!1}}},e.loadAccountEmail(),s.load().then(h=>{e.quota=h},console.error);let c=ga(e,["terms","options"],"profile");e.discardDraft=()=>c.discard();function u(){t.get("/api/user/default").then(h=>{let b=h.data||{};b.terms&&(e.terms=b.terms.join(` -`)),e.options=Object.assign({},e.options,b.options),c.restore()})}u();let y=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let b=c.checkpoint(),g={terms:e.terms.split(` -`).map(k=>k.trim()).filter(k=>k.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{c.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",y&&i.cancel(y),y=i(()=>{e.message=null},2500)},k=>{e.saving=!1;let R=k&&k.data&&k.data.error,S="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+R),o("ERRORS.unknown_error")]).then(([N,m])=>{e.error=R&&N!==m?N:S},()=>{e.error=S})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Mc=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{o.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},_c=function(e,t,o,i,s){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(c){e.feature=c},e.featureHref=function(c){return c.needsUser&&!e.user?"/signin":c.href},e.featureTarget=function(c){return c.needsUser&&!e.user?"_self":c.target||void 0},e.featureKeydown=function(c,u){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[c.key];if(y===void 0)return;c.preventDefault();let h=e.features.length,b=y==="first"?0:y==="last"?h-1:(u+y+h)%h;e.feature=e.features[b].key,s(()=>{let g=i.document.getElementById("feature-tab-"+e.feature);g&&g.focus()})},e.demoText=`# DeepLearnUtils +`)],{type:"text/csv"}),v=document.createElement("a");v.href=URL.createObjectURL(N),v.download=i.username+"-repositories.csv",v.click()},e.showStatusMessage=h=>{let w=h.statusMessage||"(no message)";window.prompt(`Status message for ${h.repoId} (${h.status}):`,w)},e.fetchGithubInfo=h=>{let w=window.open("","_blank");w&&w.document.write("
Loading GitHub info for "+h.repoId+"...
"),t.get("/api/admin/repos/"+h.repoId+"/github").then(R=>{w&&(w.document.open(),w.document.write('
'+JSON.stringify(R.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"
"),w.document.close())},R=>{let S=R&&R.data?JSON.stringify(R.data,null,2):String(R);w&&(w.document.body.innerHTML='
'+S+"
")})};function u(h){t.get("/api/admin/users/"+h+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function y(h){t.get("/api/admin/users/"+h,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}y(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),h=>console.error(h))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),h=>console.error(h))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),h=>console.error(h))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),h=>console.error(h))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(h=>{e.tokens=h.data||[]},h=>{h.status!==401&&h.status!==403&&console.error(h)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(h=>{e.tokenForm.plaintext=h.data.token,e.tokenForm.name="",m()},h=>console.error(h))},e.revokeToken=h=>{confirm(`Revoke token "${h.name}"?`)&&t.delete("/api/admin/tokens/"+h.id).then(()=>m(),w=>console.error(w))},e.removeCache=h=>{confirm("Remove cached files for "+h.repoId+"?")&&t.delete("/api/admin/repos/"+h.repoId).then(()=>u(i.username),w=>console.error(w))},e.removeRepository=h=>{confirm("Remove repository "+h.repoId+"?")&&t.delete("/api/repo/"+h.repoId+"/").then(()=>u(i.username),w=>console.error(w))},e.updateRepository=h=>{let w=st({title:`Refreshing ${h.repoId}...`,date:new Date,body:`The repository ${h.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${h.repoId}/refresh`).then(R=>{R.data.status=="ready"?w.title=`${h.repoId} is refreshed.`:w.title=`Refreshing of ${h.repoId}.`},R=>{w.title=`Error during the refresh of ${h.repoId}.`,w.body=R.body})},e.getGitHubRepositories=h=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let b=null;e.watch("query",()=>{o.timeout.cancel(b),b=o.timeout(()=>{u(i.username)},500)},!0)},Bu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=R=>{if(R.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){R.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=R=>{R==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[R]="",e.query.page=1},e.chips=[];let d=()=>{let R=[];(e.query.dateFrom||e.query.dateTo)&&R.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=R};e.statusCountFor=R=>{let S=(e.statusCounts||[]).find(N=>N._id===R);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=R=>{e.query.sort===R?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=R,e.query.direction="desc"),e.query.page=1},e.sortIcon=R=>e.query.sort===R?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let R=window.prompt("Preset name:");if(!R)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==R),e.presets.push({name:R,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=R=>{Object.assign(e.query,R.query,{page:1})},e.deletePreset=R=>{e.presets=(e.presets||[]).filter(S=>S.name!==R.name),localStorage.setItem(b,JSON.stringify(e.presets))},e.removeConference=R=>{confirm("Remove conference "+R.conferenceID+"?")&&t.delete("/api/admin/conferences/"+R.conferenceID).then(()=>h(),S=>console.error(S))},e.exportCsv=()=>{let R=new URLSearchParams(Object.entries(e.query).filter(([,S])=>S!==""&&S!==!1&&S!=null));R.set("format","csv"),R.set("limit","10000"),window.open("/api/admin/conferences?"+R.toString(),"_blank")},e.fetchError=null;function h(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(R=>{e.total=R.data.total,e.totalPage=Math.ceil(R.data.total/e.query.limit),e.conferences=R.data.results,e.statusCounts=R.data.statusCounts||[]},R=>{e.fetchError=R&&R.data&&R.data.error||"Failed to load conferences",console.error(R)})}Ji(e,{flags:()=>e.query,keys:["ready","preparing","error","expired","removed"],count:R=>e.statusCountFor(R),onChange:()=>{e.query.page=1}}),h();let w=null;e.watch("query",()=>{i.timeout.cancel(w),w=i.timeout(h,500);let{page:R,search:S,...N}=e.query;saveFilterPrefs(p,N),d()},!0),d()},zu=function(e,t,s,i,o){let r=Ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},Ji(e,{flags:()=>e.stateFilter,keys:e.allStates,count:N=>(e.jobs||[]).filter(v=>v._state===N).length}),e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(N=>e.stateFilter[N._state]),e.jobProgressPct=N=>N?._state==="completed"?100:N&&N.progress&&typeof N.progress=="object"&&typeof N.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(N.progress.percent))):typeof N.progress=="number"?Math.max(0,Math.min(100,Math.round(N.progress))):null;let d={get_files:"Fetching files",download:"Downloading",downloading:"Downloading",anonymize:"Anonymizing",anonymizing:"Anonymizing",ready:"Ready",removing:"Removing",preparing:"Preparing"};e.jobDetail=N=>{if(N?._state==="failed")return Yi(N.failedReason||"")||"Failed";let v=N?.progress&&typeof N.progress=="object"?N.progress.status:null;return N?._state==="active"&&v?d[v]||Yi(v):"\u2014"},e.jobDuration=N=>{if(!N.processedOn)return"\u2014";let v=N.finishedOn||Date.now();return qn(v-N.processedOn)},e.metricsPoints=[],e.selectQueue=N=>{e.selectedQueue=N,p(),u()},e.setRange=N=>{e.range=N,u()};function p(){let N={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:N}).then(v=>{e.queueList=v.data.queues||[],e.jobs=v.data.jobs||[],e.selectedStats=e.queueList.find(E=>E.key===e.selectedQueue)||e.queueList[0]||null},v=>console.error(v))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(N=>{e.metricsPoints=N.data.points||[],o(w,0)},N=>console.error(N))}p(),u();let y=i(()=>{e.query.autoRefresh&&(p(),u())},15e3);e.on("dispose",()=>i.cancel(y)),e.refreshNow=function(){p(),u()};function m(N){let v=N&&N.data&&(N.data.message||N.data.error)||"Request failed";e.actionError=v,o(()=>{e.actionError=null},5e3),console.error(N)}e.actionError=null,e.removeJob=N=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,m)},e.retryJob=N=>{t.post(`/api/admin/queue/${e.selectedQueue}/${N.id}`).then(p,m)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(p,N=>console.error(N))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(p,N=>console.error(N))},e.togglePause=()=>{let N=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${N}`).then(p,v=>console.error(v))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(p,N=>console.error(N))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(p,N=>console.error(N))};let b=null;e.watch("query.search",()=>{r.timeout.cancel(b),b=r.timeout(p,350)}),e.expanded={},e.toggleJob=N=>{e.expanded[N.id]=!e.expanded[N.id]},e.humanTime=N=>{if(!N)return"";let v=new Date(N);return v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+v.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=N=>{if(!N)return"";var v=Math.max(0,Math.ceil((N-Date.now())/1e3));if(v<=0)return"resuming soon";var E=Math.floor(v/60),M=v%60;return"in "+(E>0?E+"m "+M+"s":M+"s")};function h(N){if(N<=0)return{ticks:[0],niceMax:1};let v=Math.pow(10,Math.floor(Math.log10(N))),E=v;N/E<2?E=v/2:N/E>5&&(E=v*2);let M=Math.ceil(N/E)*E,V=[];for(let _=0;_<=M;_+=E)V.push(_);return{ticks:V,niceMax:M}}function w(){var N=document.getElementById("q-throughput-chart");if(!N)return;var v=N.getContext("2d"),E=window.devicePixelRatio||1,M=N.parentElement.getBoundingClientRect(),V=44,_=44,G=22,te=Math.max(200,Math.round(M.width)),X=Math.max(180,Math.min(420,Math.round(M.height)||180)),O=te-V-_,U=X-G;N.width=te*E,N.height=X*E,N.style.width=te+"px",N.style.height=X+"px",v.setTransform(E,0,0,E,0,0);var C=document.body.classList.contains("dark-mode"),L="#8A857C",z=C?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",K=C?"#6FBF8A":"#2F7D4F",ie=C?"rgba(111,191,138,0.12)":"rgba(47,125,79,0.08)",se=C?"#F08A82":"#B42318",Y=C?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",he=getComputedStyle(document.body).getPropertyValue("--q-time-series").trim()||(C?"#E0A94A":"#946512"),Se=e.metricsPoints||[];if(Se.length===0){v.fillStyle=L,v.font="13px Inter, system-ui, sans-serif",v.textAlign="center",v.fillText("No metrics data yet",te/2,X/2),R=null;return}var Ue=Se.map(function(we){return we.completed}),Be=Se.map(function(we){return we.failed}),Qe=Se.map(function(we){return we.avgMs});if(!Ue.some(Boolean)&&!Be.some(Boolean)){v.strokeStyle=C?"rgba(255,255,255,0.14)":"rgba(0,0,0,0.12)",v.beginPath(),v.moveTo(0,X-18.5),v.lineTo(te,X-18.5),v.stroke(),v.fillStyle=C?"#CFC8BD":"#4F4A42",v.font="500 14px Inter, system-ui, sans-serif",v.textAlign="center",v.fillText("No jobs processed in this window",te/2,X/2-6),v.fillStyle=L,v.font="12.5px Inter, system-ui, sans-serif",v.fillText("Completed and failed jobs will chart here",te/2,X/2+16),R=null;return}var He=Se.length,et=O/(He-1||1),Re=Math.max(1,Math.max.apply(null,Ue),Math.max.apply(null,Be)),Fe=h(Re),W=Math.max.apply(null,Qe),fe=W>0?h(W):{ticks:[0],niceMax:1},de=function(we){return U-we/Fe.niceMax*(U-10)},ce=function(we){return U-we/fe.niceMax*(U-10)},me=function(we){return V+we*et};v.textAlign="right",v.textBaseline="middle",v.font="11px Inter, system-ui, sans-serif",Fe.ticks.forEach(function(we){var be=de(we);v.strokeStyle=z,v.lineWidth=1,v.beginPath(),v.moveTo(V,be),v.lineTo(te-_,be),v.stroke(),v.fillStyle=L,we!==0&&v.fillText(we>=1e3?(we/1e3).toFixed(1)+"k":String(we),V-6,be)}),W>0&&(v.textAlign="left",fe.ticks.forEach(function(we){var be=ce(we);v.fillStyle=he,we!==0&&v.fillText(qn(we),te-_+6,be)}));var Me=Se[He-1].ts,A=Se[0].ts,T=Math.max(0,(Me-A)/6e4),F=[1,2,5,10,15,30,60,120,180,360,720,1440,2880,10080],J=F.find(function(we){return T/we<=4})||F[F.length-1],H=function(we){return we<60?we+"m":we<1440?we/60+"h":we/1440+"d"},Z=function(we){for(var be=0,ot=1;ot0&&Math.abs(Se[ke].ts-(Me-ee*6e4))>le+1)){var pe=me(ke),Ce=ee===0?"now":H(ee)+" ago",Pe=v.measureText(Ce).width,Ve=oe===0?"right":ke===0?"left":"center",Ge=Ve==="right"?pe:Ve==="left"?pe+Pe:pe+Pe/2;Ge>ne-12||(v.textAlign=Ve,v.fillText(Ce,pe,U+6),ne=Ve==="right"?pe-Pe:Ve==="left"?pe:pe-Pe/2)}}function ze(we,be,ot,rt){we.length!==0&&(v.beginPath(),v.moveTo(me(0),U),we.forEach(function(yt,at){var lt=me(at),ft=be(yt);if(at===0)v.lineTo(lt,ft);else{var Vt=(me(at-1)+lt)/2;v.bezierCurveTo(Vt,be(we[at-1]),Vt,ft,lt,ft)}}),v.lineTo(me(we.length-1),U),v.closePath(),v.fillStyle=ot,v.fill(),v.beginPath(),we.forEach(function(yt,at){var lt=me(at),ft=be(yt);if(at===0)v.moveTo(lt,ft);else{var Vt=(me(at-1)+lt)/2;v.bezierCurveTo(Vt,be(we[at-1]),Vt,ft,lt,ft)}}),v.strokeStyle=rt,v.lineWidth=1.5,v.stroke())}ze(Ue,de,ie,K),ze(Be,de,Y,se),W>0&&(v.beginPath(),Qe.forEach(function(we,be){var ot=me(be),rt=ce(we);if(be===0)v.moveTo(ot,rt);else{var yt=(me(be-1)+ot)/2;v.bezierCurveTo(yt,ce(Qe[be-1]),yt,rt,ot,rt)}}),v.strokeStyle=he,v.lineWidth=1,v.setLineDash([4,3]),v.stroke(),v.setLineDash([])),R={pts:Se,maxLen:He,marginLeft:V,step:et,totalW:te,toX:me}}var R=null;function S(){var N=document.getElementById("q-throughput-chart");if(!(!N||N._tipBound)){N._tipBound=!0;var v=document.getElementById("q-chart-tooltip"),E=document.getElementById("q-chart-crosshair");N.addEventListener("mousemove",function(M){if(!(!R||!v||!E)){var V=R,_=N.getBoundingClientRect(),G=M.clientX-_.left,te=Math.round((G-V.marginLeft)/V.step);if(te<0||te>=V.maxLen){v.style.display="none",E.style.display="none";return}var X=V.pts[te],O=V.pts[V.pts.length-1].ts,U=Math.round((O-X.ts)/6e4),C;if(U<=0)C="now";else if(U<60)C=U+"m ago";else if(U<1440){var L=Math.floor(U/60),z=U%60;C=L+"h"+(z?" "+z+"m":"")+" ago"}else C=Math.round(U/1440)+"d ago";var K='
'+C+'
● completed: '+X.completed+'/min
● failed: '+X.failed+"/min
";if(X.avgMs>0){var ie=qn(X.avgMs);K+='
● avg time: '+ie+"
"}v.innerHTML=K;var se=V.toX(te),Y=v.offsetWidth,he=se+10;he+Y>V.totalW&&(he=se-Y-10),v.style.display="block",v.style.left=he+"px",v.style.top="8px",E.style.display="block",E.style.left=se+"px"}}),N.addEventListener("mouseleave",function(){v&&(v.style.display="none"),E&&(E.style.display="none")})}}e.watch("metricsPoints",function(){o(S,50)})},Hu=function(e,t,s,i){let o=Ct();e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.entries=[],e.visible=[],e.available=!0,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=v=>{if(!v)return"";let E=new Date(v).getTime();if(isNaN(E))return v;let M=Math.max(0,Date.now()-E),V=Math.floor(M/1e3);if(V<5)return"just now";if(V<60)return`${V}s ago`;let _=Math.floor(V/60);if(_<60)return`${_}m ago`;let G=Math.floor(_/60);if(G<24)return`${G}h ago`;let te=Math.floor(G/24);return te<7?`${te}d ago`:new Date(v).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},e.absTime=v=>{if(!v)return"";let E=new Date(v);return isNaN(E.getTime())?v:E.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},e.absTimeShort=v=>{if(!v)return"";let E=new Date(v);return isNaN(E.getTime())?v:E.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let r=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function d(v,E){let M=v&&(v.httpStatus||v.status)||null;if(typeof M=="number"){if(M>=500)return"error";if(M===401||M===403||M===404)return"info";if(M>=400)return"warn"}return E==="error"?"error":E==="warn"?"warn":"info"}function p(v){let E=(v.raw||[]).find(G=>G&&typeof G=="object"&&!Array.isArray(G));if(E){E.message&&r.test(E.message)?(v.displayMessage=E.message,v.displayContext=v.message):E.code&&r.test(String(E.code))?(v.displayMessage=String(E.code),v.displayContext=v.message):E.name&&E.name!=="AnonymousError"&&E.name!=="Error"?(v.displayMessage=E.name,v.displayContext=E.message||v.message):v.displayMessage=v.message,v._status=E.httpStatus||E.status||null,v._url=E.url||null,v._method=E.method||null,v._repoId=E.repoId||E.detail||null,v._detail=E.detail&&E.detail!==v._repoId?E.detail:null;let G=typeof E.stack=="string"?E.stack:null;for(var M=[E.cause,E.err].filter(Boolean),V=0;!G&&V{O==null||O===""||M.push([X,O])};V("name",E&&E.name),V("code",v.displayMessage||E&&E.message),v._bucket&&V("kind",v._bucket),V("httpStatus",E&&E.httpStatus),E&&E.status&&!E.httpStatus&&V("status",E.status),V("module",v.module);let _=E&&E.detail;if(typeof _=="string"){let X=_.trim();if(X[0]==="{"||X[0]==="[")try{_=JSON.parse(_)}catch{}}if(V("detail",_),V("repoId",E&&E.repoId),V("filePath",E&&E.filePath),V("upstreamStatus",E&&E.upstreamStatus),V("upstreamBody",E&&E.upstreamBody),V("url",v._url),V("err",E&&E.err),V("cause",E&&!E.err&&E.cause),V("ts",v.ts),!M.length)return JSON.stringify(v,null,2);let G=M.reduce((X,O)=>Math.max(X,O[0].length),0),te=["{"];return M.forEach(([X,O],U)=>{let L=` ${`"${X}":`.padEnd(G+3," ")} `,z=UY===0?se:ie+se).join(` +`)}else typeof O=="number"||typeof O=="boolean"?K=String(O):K=JSON.stringify(O);te.push(`${L}${K}${z}`)}),te.push("}"),te.join(` +`)}function y(v){let E=[],M="",V=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,_=0,G;for(;G=V.exec(v);)M+=v.slice(_,G.index),_=V.lastIndex,E.push({key:G[1],op:G[2]||"=",val:G[3]});return M+=v.slice(_),{filters:E,free:M.trim().toLowerCase()}}function m(v,E){for(let M of E.filters){let V=(G,te,X)=>{let O=parseFloat(G),U=parseFloat(te);return X==="="?String(G)===String(te):X==="!="?String(G)!==String(te):X===">="?O>=U:X==="<="?O<=U:X===">"?O>U:X==="<"?OE&&X._bucket!==E?!1:m(X,v)),V=e.query.group;if(V){let X=C=>V==="module"?C.module:C.displayMessage||C.message||"_",O=new Map;for(let C of M){let L=X(C);if(O.has(L)){let z=O.get(L);z.count++,z._related.push(C),new Date(C.ts)>new Date(z.ts)&&(z.ts=C.ts,z._url=C._url,z._status=C._status),new Date(C.ts)new Date(L.ts).getTime()>=U).length;M=Array.from(O.values())}else M=M.map((X,O)=>(X._key="row:"+O+":"+X.ts,X._related=[X],X._firstSeen=X.ts,X._lastHourCount=0,X.count=1,X));let _=X=>({error:0,warn:1,info:2})[X._bucket]??1;e.query.sort==="count"?M.sort((X,O)=>_(X)-_(O)||O.count-X.count||new Date(O.ts)-new Date(X.ts)):M.sort((X,O)=>_(X)-_(O)||new Date(O.ts)-new Date(X.ts)),e.visible=M;let G=!!(e.query.bucket||(e.query.search||"").trim()),te=!G&&(e.stats?.severity?.error||0)>0&&!M.some(X=>X._bucket==="error")&&e.entries.length<1500;(G&&!M.length||te)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,h(!0))}function h(v){let E=v?e.entries.length:0,M=v?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:E,limit:M}}).then(V=>{let _=(V.data.entries||[]).map(p);e.entries=v?e.entries.concat(_):_,e.available=!!V.data.available,e.cap=V.data.max||e.cap,e.total=V.data.total||e.entries.length,e._autoLoading=!1,b()},V=>{e._autoLoading=!1,console.error(V)})}e.loadMore=()=>h(!0),e.canLoadMore=()=>e.entries.length{let E=v.data||{},M=E.prev24h?Math.round((E.last24h-E.prev24h)/E.prev24h*100):0;e.stats={last24h:E.last24h||0,prev24h:E.prev24h||0,delta:M,severity:E.severity||{error:0,warn:0,info:0},unique:E.unique||{error:0,warn:0,info:0},buckets:E.buckets||[],dropped:E.dropped||0},b()},v=>console.error(v))}function R(){h(),w()}e.barPx=(v,E)=>{let M=e.stats.buckets||[],V=0,_=0;for(let O of M)V=Math.max(V,(O.error||0)+(O.warn||0)),_=Math.max(_,O.info||0);let G=v[E]||0;if(!G)return 0;if(E==="info")return _?Math.max(2,Math.round(G/_*(V?16:60))):0;let te=(v.error||0)+(v.warn||0),X=Math.round(te/V*44);return Math.max(4,Math.round(G/te*X))},e.bucketTitle=v=>`${new Date(v.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${v.error||0} err \xB7 ${v.warn||0} warn \xB7 ${v.info||0} info`,e.toggle=v=>{e.expanded[v._key]=!e.expanded[v._key]},e.setBucket=v=>{e.query.bucket=v},e.refreshNow=R,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(R,v=>console.error(v))},e.exportCsv=()=>{let v=["ts","level","module","displayMessage","_status","_url","_repoId"],E=[v.join(",")];for(let G of e.visible)E.push(v.map(te=>{let X=G[te]==null?"":String(G[te]);return/[",\n]/.test(X)?`"${X.replace(/"/g,'""')}"`:X}).join(","));let M=new Blob([E.join(` +`)],{type:"text/csv;charset=utf-8"}),V=URL.createObjectURL(M),_=document.createElement("a");_.href=V,_.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL(V)};function S(v){e.copyHint=`${v} copied`,o.timeout(()=>{e.copyHint=""},1500)}e.copyJson=v=>{navigator.clipboard.writeText(v._detailJson).then(()=>S("JSON"))},e.copyCurl=v=>{if(!v._url)return;let M=`curl -X ${v._method||"GET"} '${window.location.origin}${v._url}'`;navigator.clipboard.writeText(M).then(()=>S("curl"))},R();let N=i(()=>{e.query.autoRefresh&&R()},15e3);e.on("dispose",()=>i.cancel(N)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},ju=function(e,t,s,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(v){e.ovView=v;try{window.history.replaceState(null,"",v==="summary"?window.location.pathname:"#"+v)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var v=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:v}}).then(function(E){v===e.cacheMinutes&&(e.cacheReport=E.data,e.cacheError=E.data.available?null:E.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,v!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(v){return e.cacheTraffic==="all"||v.traffic===e.cacheTraffic})},e.cacheRate=function(v,E){var M=e.cacheRows(),V=function(te){return M.filter(function(X){return X.name===te}).reduce(function(X,O){return X+O[E]},0)},_=V(v+"_hit"),G=V(v+"_miss");return _+G?(100*_/(_+G)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(v){return v.replaceAll("_"," ")},e.cacheP95=function(v){var E=0,M=e.cacheReport?.latencyBucketsMs||[];if(!v.count)return"No samples";if(!v.ms)return"Not timed";for(var V=0;V<=M.length;V++)if(E+=v["b"+V]||0,E>=Math.ceil(v.count*.95))return V 10\u202Fs";return"No samples"},e.healthAlert=function(){let v=e.data&&e.data.system||{},E=[["Memory",v.memPercent],["Disk",v.diskPercent]].filter(([,V])=>V>90);return E.length?E.map(([V,_])=>V+" is at "+_+"%").join(" and ")+". New anonymizations may fail until "+(E.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(v){return v==null?"":qn(v)},e.latencyBound=function(v,E){return v.count?v[E]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(v[E]):"No samples"},e.firstByteBound=function(v){return e.latencyBound({count:v.firstByteCount,p95UpperMs:v.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(v){return Math.max(0,Math.round((Date.now()-v.sampledAt)/1e3))},e.peakRss=function(v){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===v.instance}).reduce(function(E,M){return Math.max(E,M.rss)},v.memory.rss)},e.performanceWarning=function(v){return e.sampleAge(v)>45||v.droppedBatches||v.droppedMetrics||v.sockets?.closeWait>0||v.eventLoop?.p95Ms>100||v.memoryLimitBytes&&v.memory.rss>v.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var v=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==v&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:v}}).then(function(E){v===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){v===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,v!==e.performanceMinutes&&e.loadPerformance()}))};function d(v){if(v==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],M=0,V=v;V>=1024&&M0?1:0).replace(/\.0$/,"")+" "+E[M]}e.humanBytes=d;function p(v){if(!v)return"\u2014";var E=Math.floor(v/86400),M=Math.floor(v%86400/3600),V=Math.floor(v%3600/60);return E>0?E+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(V<10?"0":"")+V+"m":V+"m"}e.humanDuration=p;function u(v){return v==null?"\u2014":v>=1e6?(v/1e6).toFixed(1)+"M":v>=1e3?(v/1e3).toFixed(1)+"K":String(v)}e.humanNum=u,e.queueTotal=function(v){return v?(v.waiting||0)+(v.active||0)+(v.delayed||0)+(v.failed||0):0},e.statusCount=function(v){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],M=0;M0,zero:!V,title:String(_.getHours()).padStart(2,"0")+":00 \xB7 "+(M.error||0)+" 5xx, "+(M.warn||0)+" 4xx"}})},e.errorHoursPeak=function(){var v=e.errorStats&&e.errorStats.buckets||[];return v.reduce(function(E,M){return Math.max(E,(M.error||0)+(M.warn||0))},0)};function y(v){var E=v||[];return E.map(function(M,V){var _=E[V-1]||{},G=Object.assign({},M);return G.dailyRepositories=V?Math.max(0,(M.nbRepositories||0)-(_.nbRepositories||0)):0,G.dailyUsers=V?Math.max(0,(M.nbUsers||0)-(_.nbUsers||0)):0,G.dailyPageViews=V?Math.max(0,(M.nbPageViews||0)-(_.nbPageViews||0)):0,G})}function m(v){var E=v&&v.length?v[v.length-1]:{};return{repositories:E.dailyRepositories||0,users:E.dailyUsers||0,pageViews:E.dailyPageViews||0}}function b(v,E){if(!v||!v.length)return v;var M=new Date(v[v.length-1].date);if(isNaN(M))return v;var V={};v.forEach(function(O){V[new Date(O.date).toISOString().slice(0,10)]=O});for(var _=[],G=E-1;G>=0;G--){var te=new Date(M.getTime()-G*864e5),X=te.toISOString().slice(0,10);_.push(V[X]||{date:te.toISOString(),_empty:!0,dailyPageViews:0,dailyRepositories:0,dailyUsers:0,nbUsers:0})}return _}var h={};e.historyMax=function(v){return h[v]||0};var w={};e.axisMax=function(v){var E=h[v]||0;if(E<=2)return 2;if(E<=10)return Math.ceil(E/2)*2;var M=Math.pow(10,Math.floor(Math.log10(E)));return Math.ceil(E/M)*M},e.historyBarH=function(v,E){return!v||!h[E]||!v[E]?0:Math.max(1,Math.round(v[E]/e.axisMax(E)*140))},e.historyRange=function(v){return{min:w[v],max:h[v]}};var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.historyLabel=function(v){if(!v||!v.date)return"";var E=new Date(v.date);return R[E.getUTCMonth()]+" "+E.getUTCDate()},e.historyHasMissing=function(){return!!(e.data&&e.data.history||[]).some(function(v){return v&&v._empty})},e.firstDataIndex=function(){for(var v=e.data&&e.data.history||[],E=0;E=M)return{lo:X,hi:X+2*G[te]}}return{lo:0,hi:e.axisMax("nbUsers")}},e.userStepPath=function(v){var E=e.data&&e.data.history||[],M=e.userAxis(),V=h.nbUsers?M.hi-M.lo:0,_=e.firstDataIndex();if(!V||_>=E.length)return"";for(var G=function(U){return(140-((U||0)-M.lo)/V*140).toFixed(2)},te=v?"M"+_+" 140":"",X=_;Xh[M])&&(h[M]=E[M]),(w[M]==null||E[M] .meta-more"),s=[...e.querySelectorAll(":scope > .meta-item")];if(s.forEach(o=>{o.removeAttribute("data-meta-hidden")}),t&&(t.hidden=!0,t.textContent="",t.removeAttribute("title"),t.removeAttribute("aria-label")),!e.clientWidth)return;if(e.classList.add("is-fitting"),e.scrollWidth<=e.clientWidth+1){e.classList.remove("is-fitting");return}let i=[];for(let o=s.length-1;o>=0&&e.scrollWidth>e.clientWidth+1;o--)if(s[o].setAttribute("data-meta-hidden",""),i.unshift(s[o]),t){let r=i.map(d=>d.dataset.metaLabel||d.textContent.trim().replace(/\s+/g," "));t.hidden=!1,t.textContent="+"+i.length,t.title=r.join(" \xB7 "),t.setAttribute("aria-label",i.length+" more: "+r.join(", "))}e.classList.remove("is-fitting")}function Gu(e,t){if(typeof document>"u"||typeof MutationObserver>"u"||!document.body)return;let s=!1,i=null,o=()=>{s=!1,i&&(document.querySelectorAll("[data-meta-fit]").forEach(bg),i.takeRecords())},r=()=>{!s&&i&&(s=!0,e.timeout(o,30))};i=new MutationObserver(d=>{d.some(p=>!(p.target.closest&&p.target.closest(".meta-more")))&&r()}),i.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),es(()=>{i.disconnect(),i=null}),t(window,"resize",r),document.fonts?.ready&&document.fonts.ready.then(r),r()}var wg=["bif","clp","djf","gnf","jpy","kmf","krw","mga","pyg","rwf","ugx","vnd","vuv","xaf","xof","xpf"],_u=[{id:"subscription",label:"Subscriptions"},{id:"repository",label:"Repository purchases"},{id:"conference",label:"Conferences"}],kg={author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference_workshop:"Workshop",conference:"Conference",conference_large:"Large conference"};function $u(e){return Object.entries(e||{}).filter(([,t])=>t).sort((t,s)=>s[1]-t[1]).map(([t,s])=>{let i=wg.includes(t)?s:s/100;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t.toUpperCase(),minimumFractionDigits:i%1?2:0,maximumFractionDigits:2}).format(i)}catch{return i+" "+t.toUpperCase()}})}var Wu=function(e,t,s){let i=Ct();if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.families=_u,e.periods=[{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"},{id:"12m",label:"12 months"},{id:"all",label:"All time"}];let o=(()=>{try{return localStorage.getItem("admin.billing.period")}catch{return null}})();e.period=e.periods.some(h=>h.id===o)?o:"30d",e.summary=null,e.summaryError=null,e.summaryLoading=!0,e.periodLabel=()=>(e.periods.find(h=>h.id===e.period)||{}).label||"",e.periodPhrase=()=>e.period==="all"?"all time":"last "+e.periodLabel(),e.money=h=>$u(h),e.moneyText=(h,w="\u2014")=>$u(h).join(" \xB7 ")||w,e.revenueOn=()=>!!e.summary?.revenue?.available,e.planName=h=>((e.summary?.plans||[]).find(w=>w.planId===h)||{}).name||kg[h]||h,e.bucketTotal=h=>h?h.subscription+h.repository+h.conference:0,e.chartMax=()=>{let h=Math.max(0,...(e.summary?.series||[]).map(e.bucketTotal));if(h<=4)return 4;let w=Math.pow(10,Math.floor(Math.log10(h)));return[1,1.2,1.5,2,2.5,3,4,5,6,8,10].map(R=>R*w).find(R=>R>=h&&R%2===0)||10*w},e.segmentPct=(h,w)=>h&&h[w]?h[w]/e.chartMax()*100:0,e.familyTotal=h=>(e.summary?.series||[]).reduce((w,R)=>w+R[h],0),e.bucketLabel=h=>{if(!h)return"";let w=new Date(h.date),R={timeZone:"UTC",day:"numeric",month:"short"};return e.summary?.bucket==="month"?w.toLocaleDateString(void 0,{timeZone:"UTC",month:"short",year:"numeric"}):((e.period==="12m"||e.period==="all"||w.getUTCFullYear()!==new Date().getUTCFullYear())&&(R.year="numeric"),(e.summary?.bucket==="week"?"Week of ":"")+w.toLocaleDateString(void 0,R))},e.bucketTip=h=>{let w=e.bucketTotal(h);if(!w)return e.bucketLabel(h)+": no sales";let R=_u.filter(S=>h[S.id]).map(S=>h[S.id]+" "+S.label.toLowerCase());return e.bucketLabel(h)+": "+w+(w===1?" sale":" sales")+" ("+R.join(", ")+")"},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((h,w)=>h+e.bucketTotal(w),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(h=>h.active||h.allTimeSales||h.sales),e.planTotals=()=>{let h=w=>(e.summary?.plans||[]).reduce((R,S)=>R+(S[w]||0),0);return{active:h("active"),sales:h("sales"),allTimeSales:h("allTimeSales")}},e.webhookState=()=>{let h=e.summary?.webhooks;return h?h.failed||h.reconciliationFailed?"bad":h.oldestPendingSeconds>900||h.unreviewedRevocations?"warn":"ok":"ok"},e.age=h=>h?qn(h*1e3):"\u2014";let r=0;e.loadSummary=()=>{let h=++r;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(w=>{if(h!==r)return;e.summaryLoading=!1;let R=w.data;if(!R||!R.subscriptions||!R.sales||!Array.isArray(R.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=R},w=>{h===r&&(e.summaryLoading=!1,e.summaryError=w&&w.data&&w.data.error||"Could not load billing figures.")})},e.setPeriod=h=>{if(e.period!==h){e.period=h;try{localStorage.setItem("admin.billing.period",h)}catch{}e.loadSummary()}},e.grants=[],e.total=-1,e.totalPage=0,e.stateCounts={},e.statuses=[],e.grantsError=null,e.filtersOpen=!1,e.query={page:1,limit:25,search:"",plan:"",status:"",state:"",sort:"purchasedAt",direction:"desc"};let d=s.search();d.search&&(e.query.search=d.search),e.stateView=()=>e.query.state||"all",e.setStateView=h=>{e.query.state=h==="all"?"":h,e.query.page=1},e.stateCount=h=>h==="all"?["active","expired","revoked"].reduce((w,R)=>w+(e.stateCounts[R]||0),0):e.stateCounts[h]||0,e.sortBy=h=>{e.query.sort===h?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=h,e.query.direction="desc"),e.query.page=1},e.sortIcon=h=>e.query.sort===h?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.chips=[];let p=()=>{let h=[];e.query.plan&&h.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&h.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.chips=h};e.clearFilter=h=>{e.query[h]="",e.query.page=1},e.filterPlan=h=>{Object.assign(e.query,{plan:h,page:1});let w=document.getElementById("bl-grants");w&&w.scrollIntoView&&w.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state),e.statusText=h=>(h.status||"unknown").replace(/_/g," "),e.revocationText=h=>h==="dispute"?"Disputed":h==="full_refund"?"Refunded":"Revoked",e.scopeHref=h=>h?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(h.id):h?.kind==="conference"?"/conference/"+encodeURIComponent(h.id):null;let u=0;function y(){let h=++u;e.grantsError=null;let w=Object.fromEntries(Object.entries(e.query).filter(([,R])=>R!==""&&R!=null));t.get("/api/admin/billing/grants",{params:w}).then(R=>{h===u&&(e.total=R.data?.total??0,e.totalPage=Math.ceil(e.total/e.query.limit),e.grants=R.data?.results||[],e.stateCounts=R.data.stateCounts||{},e.statuses=R.data.statuses||[])},R=>{h===u&&(e.grantsError=R&&R.data&&R.data.error||"Could not load subscriptions and purchases.")})}e.reloadGrants=y,e.loadSummary(),y(),p();let m=null,b=JSON.stringify({...e.query,page:0});e.watch("query",()=>{let h=JSON.stringify({...e.query,page:0});if(h!==b&&e.query.page!==1){b=h,e.query.page=1;return}b=h,i.timeout.cancel(m),m=i.timeout(y,300),p()},!0)};var ka=(e,t,s)=>{let i=e instanceof RegExp?Ku(e,s):e,o=t instanceof RegExp?Ku(t,s):t,r=i!==null&&o!=null&&Eg(i,o,s);return r&&{start:r[0],end:r[1],pre:s.slice(0,r[0]),body:s.slice(r[0]+i.length,r[1]),post:s.slice(r[1]+o.length)}},Ku=(e,t)=>{let s=t.match(e);return s?s[0]:null},Eg=(e,t,s)=>{let i,o,r,d,p,u=s.indexOf(e),y=s.indexOf(t,u+1),m=u;if(u>=0&&y>0){if(e===t)return[u,y];for(i=[],r=s.length;m>=0&&!p;){if(m===u)i.push(m),u=s.indexOf(e,m+1);else if(i.length===1){let b=i.pop();b!==void 0&&(p=[b,y])}else o=i.pop(),o!==void 0&&o=0?u:y}i.length&&d!==void 0&&(p=[r,d])}return p};var Yu="\0SLASH"+Math.random()+"\0",Xu="\0OPEN"+Math.random()+"\0",Na="\0CLOSE"+Math.random()+"\0",Ju="\0COMMA"+Math.random()+"\0",Qu="\0PERIOD"+Math.random()+"\0",Sg=new RegExp(Yu,"g"),Ng=new RegExp(Xu,"g"),Rg=new RegExp(Na,"g"),Pg=new RegExp(Ju,"g"),Ag=new RegExp(Qu,"g"),Dg=/\\\\/g,Tg=/\\{/g,Og=/\\}/g,Ig=/\\,/g,Mg=/\\\./g,Vg=1e5,qg=4e6,_g=1e3,$g=1e3;function Ca(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Lg(e){return e.replace(Dg,Yu).replace(Tg,Xu).replace(Og,Na).replace(Ig,Ju).replace(Mg,Qu)}function Fg(e){return e.replace(Sg,"\\").replace(Ng,"{").replace(Rg,"}").replace(Pg,",").replace(Ag,".")}function Ea(e,t){for(let s=0;s=t}function $o(e,t,s,i,o,r){let d=[],p=0;for(let u=0;u=i)return d;let m=e[u]+t+s[y];if(!(r&&!m)){if(p+m.length>o)return d;d.push(m),p+=m.length}}return d}function Gg(e,t,s,i){let o=e.split(/\.\./),r=[];if(o[0]===void 0||o[1]===void 0)return r;let d=Ca(o[0]),p=Ca(o[1]),u=Math.max(o[0].length,o[1].length),y=o.length===3&&o[2]!==void 0?Math.max(Math.abs(Ca(o[2])),1):1,m=Hg;p0){let v=new Array(N+1).join("0");R<0?S="-"+v+S.slice(1):S=v+S}}if(w+S.length>i)break;r.push(S),w+=S.length}return r}function Sa(e,t,s,i,o,r,d){if(o>i)return[e];let p=[""],u=0,y=!1,m=!0;for(;;){let b=ka("{","}",e);if(!b)return $o(p,e,[""],t,s,y);let h=b.pre;if(/\$$/.test(h)){if(p=$o(p,h+"{"+b.body+"}",[""],t,s,y&&!b.post.length),m=!1,!b.post.length)break;e=b.post;continue}let w=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(b.body),R=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(b.body),S=w||R,N=b.body.indexOf(",")>=0;if(!S&&!N){if(u=t||V+X.length>s)break e;v.push(X),V+=X.length}}}}if(p=$o(p,h,v,t,s,y&&!b.post.length),!b.post.length)break;e=b.post}return p}var Wg={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}"],"[:alpha:]":["\\p{L}\\p{Nl}"],"[:ascii:]":["\\x00-\\x7f"],"[:blank:]":["\\p{Zs}\\t"],"[:cntrl:]":["\\p{Cc}"],"[:digit:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},Lo=e=>e.replace(/[[\]\\-]/g,"\\$&"),Ra=/$./,xu=(e,t,s=!1,i)=>{let o=v=>{let E=i?v.normalize(i):v;return[...E].length===1?E:v},r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let d=[],p=[],u=r+1,y=!1,m=!1,b=!1,h=r,w="";e:for(;uw.codePointAt(0)?d.push(Lo(w)+"-"+Lo(E)):E===w&&d.push(Lo(E)),w="",u+=v.length;continue}if(e.startsWith("-]",u+v.length)){d.push(Lo(E+"-")),u+=v.length+1;continue}if(e.startsWith("-",u+v.length)){w=E,u+=v.length+1;continue}d.push(Lo(E)),u+=v.length}if(h({t:"lit",ch:e}),Yg=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),sc=e=>new RegExp(`^${Yg(e)}$`,"iu"),Qi=new Map,oc=e=>{let t=Qi.get(e);return t||(t=sc(e),Qi.size>=1e3&&Qi.clear(),Qi.set(e,t)),t},Ma=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let s=t.charCodeAt(0);if(s>=128)return e.re.test(t);let i=e.ascii??(e.ascii=new Uint8Array(128));return i[s]||(i[s]=e.re.test(t)?1:2),i[s]===1},Xg=(e,t,s,i)=>{let o=[];for(let r=0;r{let t=new Map,s=[];return e.forEach((i,o)=>{i.t==="open"?s.push(o):i.t==="close"&&s.length&&t.set(s.pop(),o)}),t},ic=(e,t,s,i,o)=>{let r=[],d=[r];for(let p=s;p{let s=[],i="",o=()=>{for(let r of i.normalize(t))s.push(us(r));i=""};for(let r of e){if(r.t==="lit"){i+=r.ch;continue}o(),s.push(r.t==="ext"?{...r,alts:r.alts.map(d=>rc(d,t))}:r)}return o(),s},Qg=(e,t)=>{let s=1,i=p=>({t:"split",id:s++,out:p}),o=(p,u)=>p.reduceRight((y,m)=>r(m,y),u),r=(p,u)=>{switch(p.t){case"lit":let h=t?oc(p.ch):void 0;return{t:"lit",id:s++,ch:p.ch,re:h,next:u};case"any":case"star":return{t:p.t,id:s++,next:u};case"class":return{t:"class",id:s++,re:p.re,next:u}}let y=h=>p.alts.map(w=>o(w,h));switch(p.type){case"@":return i(y(u));case"?":return i([u,...y(u)]);case"!":return{t:"neg",id:s++,sub:i(y(Pa)),next:u}}let m=i([]),b=i(y(m));return m.out.push(u,b),p.type==="*"?m:b};return[o(e,Pa),s]},Zg=e=>{let t=[],s=new Set,i=r=>r.t==="match"?"match":String(r.id),o=(r,d)=>{if(r.t==="match"||s.has(r))return;s.add(r);let p=u=>t.push(`${d}${r.id}: ${u}`);switch(r.t){case"split":p(`split -> ${r.out.map(i).join(", ")}`);for(let u of r.out)o(u,d);return;case"neg":return p(`!(${i(r.sub)}) -> ${i(r.next)}`),o(r.sub,d+" "),o(r.next,d);case"lit":p(`${JSON.stringify(r.ch)} -> ${i(r.next)}`);break;case"class":p(`${r.re} -> ${i(r.next)}`);break;default:p(`${r.t==="any"?"?":"*"} -> ${i(r.next)}`)}o(r.next,d)};return o(e,""),[`start -> ${i(e)}`,...t].join(` +`)},Aa=class{constructor(t){xe(this,"gen");xe(this,"threads",[]);xe(this,"match",!1);xe(this,"runs",[]);xe(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},ac=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&ac(i.state,s.state))),ec=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),cs,Bn,Da,Ta,Uo=class{constructor(t,s,i){qe(this,Bn);xe(this,"dots");xe(this,"dotStart");qe(this,cs);this.dots=t,this.dotStart=s,Le(this,cs,i)}state(){return new Aa(++re(this,cs).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Pa.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!_e(this,Bn,Da).call(this,t,s))return;for(let d of s.out)this.add(t,d,i,o);return;case"neg":if(!_e(this,Bn,Da).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;_e(this,Bn,Ta).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:_e(this,Bn,Ta).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&ac(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let d of t.threads)switch(d.t){case"lit":Ma(d,s)&&this.add(r,d.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,d.next,i+1,o);break;case"class":!this.restricted(i,o)&&d.re.test(s)&&this.add(r,d.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,d,i+1,o)}if(!this.restricted(i,o))for(let d of t.runs){if(d.state.dead){this.addRun(r,d,i+1,o);continue}let p=this.step(d.state,s,i,!1);this.addRun(r,{t:"run",neg:d.neg,state:p},i+1,o)}return this.done(r)}};cs=new WeakMap,Bn=new WeakSet,Da=function(t,s){let{seen:i}=re(this,cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ta=function(t,s){let{has:i}=re(this,cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var lc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${lc(i.state)})`);return`${t}|${s.sort().join("|")}`},xg=1<<18,Bs,zs,_n,ps,$n,Ln,Fn,nn,Ia,xi,dc,Oa=class{constructor(t,s){qe(this,nn);qe(this,Bs);qe(this,zs,new Map);qe(this,_n,0);qe(this,ps);qe(this,$n);qe(this,Ln);qe(this,Fn);Le(this,Bs,t),Le(this,Ln,new Uo(!1,!1,s)),Le(this,Fn,new Uo(!1,!0,s))}start(t){if(t){if(re(this,$n))return re(this,$n);let i=re(this,Fn).state();return re(this,Fn).add(i,re(this,Bs),0,!0),Le(this,$n,_e(this,nn,Ia).call(this,re(this,Fn).done(i)))}if(re(this,ps))return re(this,ps);let s=re(this,Ln).state();return re(this,Ln).add(s,re(this,Bs),0,!0),Le(this,ps,_e(this,nn,xi).call(this,re(this,Ln).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===re(this,$n)?_e(this,nn,xi).call(this,re(this,Fn).step(t.state,s,0,!0)):_e(this,nn,xi).call(this,re(this,Ln).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Le(this,_n,re(this,_n)+128)),t.ascii[i]=r):t.next.set(s,r),nl(this,_n)._++,r}};Bs=new WeakMap,zs=new WeakMap,_n=new WeakMap,ps=new WeakMap,$n=new WeakMap,Ln=new WeakMap,Fn=new WeakMap,nn=new WeakSet,Ia=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},xi=function(t){let s=lc(t),i=re(this,zs).get(s);if(i)return i;re(this,_n)>xg&&_e(this,nn,dc).call(this);let o=_e(this,nn,Ia).call(this,t);return re(this,zs).set(s,o),Le(this,_n,re(this,_n)+(s.length+1)),o},dc=function(){re(this,zs).clear(),Le(this,_n,0),Le(this,ps,void 0),Le(this,$n,void 0)};var ev=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},tv=(e,t,s,i)=>{let o=0,r=s,d=-1,p=0;for(;r{let t=0,s=0;for(let i of e){let[o,r]=nv(i);t+=o,s+=r}return[t,s]},nv=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(uc),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},tc=(e,t,s)=>{for(let i=0;iov.test(e)?[...e]:e,nc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Un,Hs,fs,er,hs,zo,tr,ms,Ho,jo,Go,Pn,vn,js,Gs,Wo,nr,tn,gs,Fo,Bo=class{constructor(t,s={}){qe(this,gs);xe(this,"pattern");xe(this,"options");qe(this,Un);qe(this,Hs);qe(this,fs);qe(this,er);qe(this,hs);qe(this,zo,!1);qe(this,tr);qe(this,ms);qe(this,Ho,!1);qe(this,jo,0);qe(this,Go,1/0);qe(this,Pn,[]);qe(this,vn,[]);qe(this,js);qe(this,Gs);qe(this,Wo,!1);qe(this,nr);qe(this,tn);if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=s;let{nocase:i=!1,noext:o=!1,normalize:r}=s;Le(this,tn,r===!0?"NFC":r||void 0);let d=/^[?*+@]\(\)$/.test(t),p=Xg(t,i,o||d,re(this,tn)),[u]=ic(p,Jg(p),0,p.length,!0);re(this,tn)&&(u=rc(u,re(this,tn)));let[y,m]=Qg(u,i);if(Le(this,Un,y),Le(this,Hs,m),u.every(b=>b.t==="lit"))Le(this,hs,u.map(b=>b.ch).join("")),Le(this,zo,i);else{let b=R=>R.t!=="lit"?void 0:i?{ch:R.ch,re:oc(R.ch)}:{ch:R.ch};for(let R of u){let S=b(R);if(!S)break;re(this,Pn).push(S)}for(let R=u.length-1;R>=0;R--){let S=b(u[R]);if(!S)break;re(this,vn).unshift(S)}Le(this,Wo,!!(re(this,Pn).length||re(this,vn).length)),i||(Le(this,js,re(this,Pn).map(R=>R.ch).join("")),Le(this,Gs,re(this,vn).map(R=>R.ch).join(""))),Le(this,ms,ev(re(this,Un))?.slice(re(this,Pn).length,-re(this,vn).length||void 0)),Le(this,Ho,!!re(this,ms)?.every(R=>R.t==="star"||R.t==="any"));let[h,w]=uc(u);Le(this,jo,h),Le(this,Go,w)}}test(t){return re(this,tn)?(nc(t),_e(this,gs,Fo).call(this,t.normalize(re(this,tn)))):sv.test(t)?(nc(t),_e(this,gs,Fo).call(this,t,[...t])):_e(this,gs,Fo).call(this,t,t)}testUnchecked(t){return _e(this,gs,Fo).call(this,re(this,tn)?t.normalize(re(this,tn)):t)}toString(){return Zg(re(this,Un))}};Un=new WeakMap,Hs=new WeakMap,fs=new WeakMap,er=new WeakMap,hs=new WeakMap,zo=new WeakMap,tr=new WeakMap,ms=new WeakMap,Ho=new WeakMap,jo=new WeakMap,Go=new WeakMap,Pn=new WeakMap,vn=new WeakMap,js=new WeakMap,Gs=new WeakMap,Wo=new WeakMap,nr=new WeakMap,tn=new WeakMap,gs=new WeakSet,Fo=function(t,s){if(re(this,hs)!==void 0)return re(this,zo)?(re(this,tr)??Le(this,tr,sc(re(this,hs)))).test(t):t===re(this,hs);let i=re(this,jo),o=re(this,Go);if(s===void 0){let m=t.length,b=m+1>>1;if(mo)return!1;(bo)&&(s=Zi(t))}if(s!==void 0&&(s.lengtho))return!1;let r=re(this,Pn).length;if(re(this,Wo))if(re(this,js)!==void 0&&re(this,Gs)!==void 0){if(!t.startsWith(re(this,js))||!t.endsWith(re(this,Gs)))return!1}else{s??(s=Zi(t));let m=s.length-re(this,vn).length;if(!tc(re(this,Pn),s,0)||!tc(re(this,vn),s,m))return!1}let d=!this.options.dot&&t.startsWith(".");if(re(this,ms)){if(t==="."||t===".."||d&&!r)return!1;if(re(this,Ho))return!0;s??(s=Zi(t));let m=s.length-re(this,vn).length;return tv(re(this,ms),s,r,m)}if(s??(s=Zi(t)),t==="."||t===".."){re(this,fs)??Le(this,fs,ec(re(this,Hs)));let m=re(this,er)??Le(this,er,new Uo(!0,!1,re(this,fs))),b=m.state();m.add(b,re(this,Un),0,!0);let h=m.done(b);for(let w=0;w{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var zn=(e,{windowsPathsNoEscape:t=!1,magicalBraces:s=!1}={})=>s?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var vs=(e,{windowsPathsNoEscape:t=!1,magicalBraces:s=!0}={})=>s?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var Bt=(e,t,s={})=>(Ko(t),!s.nocomment&&t.charAt(0)==="#"?!1:rv(t,s).match(e)),Ws=new Map,iv=256,rv=(e,t)=>{let s=e+"\0"+JSON.stringify(t),i=Ws.get(s);return i?Ws.delete(s):(i=new ys(e,{...t}),Ws.size>=iv&&Ws.delete(Ws.keys().next().value)),Ws.set(s,i),i},gc=typeof process=="object"&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",cc={win32:{sep:"\\"},posix:{sep:"/"}},av=gc==="win32"?cc.win32.sep:cc.posix.sep;Bt.sep=av;var vt=Symbol("globstar **");Bt.GLOBSTAR=vt;var lv=(e,t={})=>s=>Bt(s,e,t);Bt.filter=lv;var An=(e,t={})=>Object.assign({},e,t),dv=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Bt;let t=Bt;return Object.assign((i,o,r={})=>t(i,o,An(e,r)),{Minimatch:class extends t.Minimatch{constructor(o,r={}){super(o,An(e,r))}static defaults(o){return t.defaults(An(e,o)).Minimatch}},unescape:(i,o={})=>t.unescape(i,An(e,o)),escape:(i,o={})=>t.escape(i,An(e,o)),filter:(i,o={})=>t.filter(i,An(e,o)),defaults:i=>t.defaults(An(e,i)),braceExpand:(i,o={})=>t.braceExpand(i,An(e,o)),match:(i,o,r={})=>t.match(i,o,An(e,r)),sep:t.sep,GLOBSTAR:vt})};Bt.defaults=dv;var vc=(e,t={})=>(Ko(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Zu(e,{max:t.braceExpandMax}));Bt.braceExpand=vc;var uv=(e,t,s={})=>{let i=new ys(t,s);return e=e.filter(o=>i.match(o)),i.options.nonull&&!e.length&&e.push(t),e};Bt.match=uv;var pc=/[?*]|[+@!]\(.*?\)|\[|\]/,yc=(e,t)=>{let s=t+1;(e.charAt(s)==="!"||e.charAt(s)==="^")&&s++;let i=!1;for(;s{if(!t&&(e==="+()"||e==="@()"))return e;let s="";for(let i=0;i{if(/^[?*+@]\(\)$/.test(e)||e.includes("[:"))return!1;let t=0;for(let s=0;stypeof e=="string"?t===e:t!==""&&e.testUnchecked(t),hc=(e,t,s,i,o)=>Hn(e,t)?s:i!==void 0&&Hn(e,i)?o:-1,La=e=>e==="."||e==="..",qa=e=>typeof e=="string"&&/^[a-z]:$/i.test(e),or=e=>typeof e=="string"&&/^unc$/i.test(e),_a=e=>{if(e[0]!==""||e[1]!=="")return-1;let t=e[2]!=="?"?2:or(e[3])?4:-1,s=e[t],i=e[t+1];return t!==-1&&s!==void 0&&s!==""&&s!==vt&&i!==void 0&&i!==""&&i!==vt?t:-1},sr=(e,t)=>!La(e)&&(t||!e.startsWith(".")),Yo=(e,t,s,i,o)=>{for(let r=t;r=s||rr(e.charCodeAt(p),o))return!0}let d=Fa(e,r,o);if(d===-1)return!1;for(r=d+1;rt==="/"?e===47:t==="\\"?e===92:e===47||e===92,Fa=(e,t,s)=>{if(s!=="both")return e.indexOf(s,t);let i=e.indexOf("/",t),o=e.indexOf("\\",t);return i===-1?o:o===-1?i:Math.min(i,o)},mc=(e,t,s)=>s!=="both"?e.lastIndexOf(s,t):Math.max(e.lastIndexOf("/",t),e.lastIndexOf("\\",t)),$a={},jn,Ys,Gn,Dn,Xs,Js,Wn,Jo,Qs,Qo,$e,ir,Xo,bc,wc,kc,Cc,Ec,Sc,Ua,Nc,Rc,Ba,Ks,za,ys=class{constructor(t,s={}){qe(this,$e);xe(this,"options");xe(this,"set");xe(this,"pattern");xe(this,"windowsPathsNoEscape");xe(this,"nonegate");xe(this,"negate");xe(this,"comment");xe(this,"empty");xe(this,"preserveMultipleSlashes");xe(this,"partial");xe(this,"globSet");xe(this,"globParts");xe(this,"nocase");xe(this,"isWindows");xe(this,"platform");xe(this,"windowsNoMagicRoot");xe(this,"maxGlobstarRecursion");qe(this,jn);qe(this,Ys);qe(this,Gn);qe(this,Dn);qe(this,Xs,[]);qe(this,Js,[]);qe(this,Wn,[]);qe(this,Jo,new Map);qe(this,Qs,!1);qe(this,Qo,new WeakMap);Ko(t),s=s||{},this.options=s,this.maxGlobstarRecursion=s.maxGlobstarRecursion??200,this.pattern=t,this.platform=s.platform||gc,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!s.windowsPathsNoEscape||s[i]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!s.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!s.nonegate,this.comment=!1,this.empty=!1,this.partial=!!s.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=s.windowsNoMagicRoot!==void 0?s.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],Le(this,jn,!this.preserveMultipleSlashes),Le(this,Gn,(s.optimizationLevel??1)>=2);let o=s.normalize;Le(this,Dn,o===!0?"NFC":o||void 0),this.make();let r=this.set.map(d=>_e(this,$e,Xo).call(this,d));Le(this,Wn,this.set.map((d,p)=>re(this,jn)&&d.length-1>r[p])),Le(this,Xs,this.set.map((d,p)=>{let u=re(this,Wn)[p]?d.length-1:d.length,y=d.slice(r[p]+1,u).filter(m=>typeof m=="string"&&!!m);return[...new Set(y)]})),Le(this,Ys,re(this,Xs).some(d=>d.length)),Le(this,Js,this.set.map((d,p)=>{let[u,y,m]=d;if(re(this,Wn)[p]&&d.length===2&&u===vt&&y!==vt)return"tail";if(re(this,Wn)[p]&&s.matchBase&&d.length===1&&u!==vt&&u!=="")return"base";if(!(!re(this,jn)||r[p]!==-1)){if(d.length===3&&u===vt&&m===vt&&y!==vt&&y!==""&&this.maxGlobstarRecursion>0)return"mid";if(d.length===2&&y===vt&&u!==vt&&u!=="")return"head"}}))}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let s of t)if(typeof s!="string")return!0;return!1}make(){let t=this.pattern,s=this.options;if(!s.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())];let i=this.globSet.map(r=>_e(this,$e,za).call(this,r));this.globParts=this.preprocess(i),Le(this,Qs,!0);let o=this.globParts.map((r,d,p)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=r[2]==="?"&&or(r[3])?6:4,y=r[0]===""&&r[1]===""&&(r[2]==="?"||!pc.test(r[2]))&&r.slice(3,u).every(b=>!pc.test(b)),m=/^[a-z]:/i.test(r[0]);if(y)return[...r.slice(0,u).map(b=>_e(this,$e,ir).call(this,b)),...r.slice(u).map(b=>this.parse(b))];if(m)return[_e(this,$e,ir).call(this,r[0]),...r.slice(1).map(b=>this.parse(b))]}return r.map(u=>this.parse(u))});if(this.set=o.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r{for(let p=0;pi.length));for(let i=0;i{if(!(d[i]instanceof Bo||d[i]===$a)||!pv(this.globParts[p][i]))return;let u=[...this.globParts[p]];u[i]="";let y=`${d.length}/${u.join("/")}`,m=o.get(y);m?m.push(p):o.set(y,[p])});let r=new Set;for(let d of o.values()){if(d.length<2)continue;let[p,...u]=d,m=`@(${d.map(b=>this.globParts[b][i]).join("|")})`;this.globParts[p][i]=m,this.set[p][i]=this.parse(m);for(let b of u)r.add(b)}r.size&&(t=!0,this.set=this.set.filter((d,p)=>!r.has(p)),this.globParts=this.globParts.filter((d,p)=>!r.has(p)))}}}preprocess(t){if(this.options.noglobstar)for(let i of t)for(let o=0;o=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):s>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(s=>{let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let o=i;for(;s[o+1]==="**";)o++;o!==i&&s.splice(i,o-i)}return s})}levelOneOptimize(t){return t.map(s=>{let i=_e(this,$e,Xo).call(this,s)+1;return s=s.reduce((o,r)=>{let d=o[o.length-1];return r==="**"&&d==="**"?o:r===".."&&o.length>i&&d&&d!==".."&&d!=="."&&d!=="**"?(o.pop(),o):(o.push(r),o)},[]),s.length===0?[""]:s})}firstPhasePreProcess(t){let{braceExpandMax:s=1e5}=this.options,i=!1;do{i=!1;for(let o of t){let r=-1;for(;(r=o.indexOf("**",r+1))!==-1;){let u=r;for(;o[u+1]==="**";)u++;u>r&&o.splice(r+1,u-r);let y=o[r+1],m=o[r+2],b=o[r+3];if(y!==".."||!m||m==="."||m===".."||!b||b==="."||b===".."||t.length>=s)continue;i=!0,o.splice(r,1);let h=o.slice(0);h[r]="**",t.push(h),r--}if(!this.preserveMultipleSlashes){for(let u=1;u1e3)return t;for(let s=0;ss.length)}partsMatch(t,s,i=!1){let o=0,r=0,d=[],p="";for(;o=0;y--)u=r[y];for(let y=0;y=0){let v=S;for(;v>0&&rr(t.charCodeAt(v-1),s);)v--;p=v===0?0:mc(t,v-1,s)+1,d=t.slice(p,v)}let N=re(this,Gn)&&(La(o)||o===""&&d!==void 0&&La(d));i=N?-1:1,h=!N}let w=-1;if(h&&typeof b=="string"&&(w=hc(b,o,r,d,p),w===-1))continue;if(re(this,Ys)){for(let S of re(this,Xs)[y])if(!t.includes(S))continue e}if(h&&typeof b=="object"&&(w=hc(b,o,r,d,p),w===-1))continue;let R=re(this,Js)[y];if(R==="base"&&h)return"yes";if(R==="tail"&&h){if(re(this,Gn)&&Yo(t,0,w,!0,s))return"maybe";if(!Yo(t,0,w,u,s))return"yes";continue}if(R==="mid"||R==="head"){let S=_e(this,$e,kc).call(this,t,m,R==="head",u,s);if(S!=="no")return S;continue}return"maybe"}return"no"},wc=function(t,s,i){let o=!!this.options.dot,r=t.length;if(i==="head"){if(r<2||!Hn(s[0],t[0]))return!1;for(let p=1;pp&&d.testUnchecked(t.slice(p,u)))&&!Yo(t,y,t.length,o,r))return"yes";if(i||Yo(t,p,y,o,r))return"no";p=y}return"no"},Cc=function(t){let s=Va;return s?.f===t&&s.isWindows===this.isWindows&&s.preserveMultipleSlashes===this.preserveMultipleSlashes&&s.normalize===re(this,Dn)?s:void 0},Ec=function(t){let{isWindows:s,preserveMultipleSlashes:i}=this,o=_e(this,$e,za).call(this,s?t.split("\\").join("/"):t),r=re(this,Dn);return r&&(o=o.map(d=>d.normalize(r))),Va={f:t,isWindows:s,preserveMultipleSlashes:i,normalize:r,parts:o},Va},Sc=function(t){let s=[...t],i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let d=1;dt.length)return!1;let b=t.length-u.length;if(_e(this,$e,Ks).call(this,t,u,i,b,0))m=u.length;else{if(t[t.length-1]!==""||o+u.length===t.length||(b--,!_e(this,$e,Ks).call(this,t,u,i,b,0)))return!1;m=u.length+1}}if(!p.length){let b=!!m;for(let h=o;h{v[1]=R-S[E]});let N={head:y,body:m,tail:b,segments:h};return o[r]=N,N},Ba=function(t,s,i,o,r,d,p,u,y){let m=s[r];if(!m){if(d)return o>=i||o===i-1&&t[o]==="";for(let R=o;Re.lastIndexOf(t)===s)}function ja(e){let t=(e||[]).filter(s=>typeof s=="string"&&s.length>0).map(s=>{let{negated:i,anchored:o,directoryOnly:r,body:d}=fv(s);return{negated:i,directoryOnly:r,matcher:new ys(d,{dot:!0,nonegate:!0,nocomment:!0,matchBase:!o&&!d.includes("/")})}});return(s,i=!1)=>{let o=(s||"").replace(/^\/+/,"");if(!o)return!1;let r=o.split("/"),d=r.slice(0,-1).map((u,y)=>r.slice(0,y+1).join("/")),p=i;for(let u of t){if(u.negated?!p:p)continue;(u.directoryOnly?d:[...d,o]).some(m=>u.matcher.match(m))&&(p=!u.negated)}return p}}var Tx=new Set("^$\\.*+?()[]{}|/dDsSwWbBnrtvf0cxupP".split(""));function Ga(e){let t=e.indexOf("=>");if(t<0)return{term:e,replacement:null};let s=e.slice(0,t).replace(/\s+$/,""),i=e.slice(t+2).replace(/^\s+/,"");return s?{term:s,replacement:i}:{term:e,replacement:null}}var Pc=new Set(["*","+","?","(",")","[","]","{","}","|","^","$"]);function Ac(e){let t=[];return String(e||"").split(` +`).forEach((s,i)=>{let{term:o}=Ga(s.trim());if(!o)return;let r=[];for(let d=0;d{let t=e.target;if(!t||t.tagName!=="IMG"||t.dataset.failed||!t.closest?.(".markdown-body, .anonymize-preview-body"))return;t.dataset.failed="1";let s=window.document.createElement("span"),i=parseInt(t.getAttribute("width"),10)||0,o=parseInt(t.getAttribute("height"),10)||0;s.className=i>=200||o>=120?"img-unavailable is-large":"img-unavailable",s.textContent="Image unavailable",s.title=t.alt?"Image unavailable: "+t.alt.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]"):"Image unavailable",s.setAttribute("role","img"),s.setAttribute("aria-label",s.title),t.replaceWith(s)},!0);function ar(e){let t=e?.data;if(typeof t=="string")try{t=JSON.parse(t)}catch{t=null}return typeof t?.error=="string"&&Object.prototype.hasOwnProperty.call(Kn.ERRORS,t.error)?t.error:e?.status===-1||e?.status===0?"request_error":[502,503,504].includes(e?.status)?"unreachable":"unknown_error"}var lr="XXXX",mv=e=>{lr=e||"XXXX"},gv=(e=lr)=>{if(!e)return null;let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(t+"(?:-\\d+)?","g")},Tc=(e,t=lr)=>{let s=gv(t);if(!s||!e||!e.textContent.includes(t))return;let i=e.ownerDocument,o=i.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=[];for(;o.nextNode();)r.push(o.currentNode);for(let d of r){let p=d.nodeValue,u=d.parentElement;if(!p.includes(t)||!u||u.closest("script, style, mark.redaction, .mermaid"))continue;let y=u.closest('code[class*="language-"]');if(y&&!y.contains(e))continue;let m=i.createDocumentFragment(),b=0;for(let h of p.matchAll(s)){m.append(p.slice(b,h.index));let w=i.createElement("mark");w.className="redaction",w.title="Redacted by Anonymous GitHub",w.textContent=h[0],m.append(w),b=h.index+h[0].length}m.append(p.slice(b)),d.replaceWith(m)}},Zo=/\bXXXX-\d+\b/g,_o=function(e){if(!e||e.indexOf("XXXX-")===-1||typeof window.DOMParser!="function")return e;let t=new window.DOMParser().parseFromString("
"+e+"
","text/html"),s=t.createTreeWalker(t.body,4),i=[];for(;s.nextNode();)Zo.lastIndex=0,!s.currentNode.parentElement?.closest("pre code")&&Zo.test(s.currentNode.nodeValue)&&i.push(s.currentNode);for(let o of i){Zo.lastIndex=0;let r=t.createDocumentFragment(),d=0,p,u=o.nodeValue;for(;p=Zo.exec(u);){r.appendChild(t.createTextNode(u.slice(d,p.index)));let y=t.createElement("mark");y.className="redact-chip",y.setAttribute("title","Redacted term "+p[0].slice(5)+" \u2014 the same term everywhere in this snapshot");let m=p[0].slice(5);y.textContent="";let b=t.createElement("i");b.textContent=m,y.appendChild(b),y.dataset.term=p[0],y.setAttribute("aria-label","Redacted term "+m);let h=/^[.,;:!?)\]]+/.exec(u.slice(p.index+p[0].length));if(h){let w=t.createElement("span");w.className="redact-glue",w.appendChild(y),w.appendChild(t.createTextNode(h[0])),r.appendChild(w),d=p.index+p[0].length+h[0].length}else r.appendChild(y),d=p.index+p[0].length}r.appendChild(t.createTextNode(u.slice(d))),o.parentNode.replaceChild(r,o)}return t.body.firstChild.innerHTML},Oc=()=>{window.Prism?.hooks&&!window.Prism.redactionHook&&(window.Prism.hooks.add("complete",e=>{Tc(e.element),e.element.querySelectorAll?.("mark.redaction").forEach(t=>{let s=/^XXXX-(\d+)$/.exec(t.textContent);if(!s)return;t.className="redact-chip",t.setAttribute("title","Redacted term "+s[1]+" \u2014 the same term everywhere in this snapshot"),t.setAttribute("aria-label","Redacted term "+s[1]),t.dataset.term=s[0],t.style.setProperty("--slot-ch",s[0].length+"ch"),t.textContent="";let i=t.ownerDocument.createElement("span");i.className="redact-src",i.textContent=s[0].slice(0,s[0].length-s[1].length),t.appendChild(i);let o=t.ownerDocument.createElement("i");o.textContent=s[1],t.appendChild(o)})}),window.Prism.redactionHook=!0)},Ic=(e,t=lr)=>{if(!e||!t||!e.includes(t))return e;let s=new DOMParser().parseFromString(""+e+"","text/html");return Tc(s.body,t),s.body.innerHTML};async function Wa(e){if(window.navigator.clipboard?.writeText){await window.navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0";let s=document.activeElement;document.body.appendChild(t);try{if(t.select(),!document.execCommand?.("copy"))throw Error("Copy unavailable")}finally{t.remove(),s?.focus()}}function vv(e){if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;let t=[...e.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],s=t.indexOf(e.currentTarget),i=e.key==="Home"?0:e.key==="End"?t.length-1:(s+(e.key==="ArrowRight"?1:-1)+t.length)%t.length;e.preventDefault(),t[i]?.focus(),t[i]?.click()}var Mc=function(e,t,s,i){e.previewTabKeydown=vv,e.headerCanUpgrade=!1,e.headerShowSupport=!1,e.headerBillingPending=new URLSearchParams(window.location.search).get("billing")==="success";let o=N=>{e.headerShowSupport=!(N?.grants||[]).some(E=>["active","paid","past_due"].includes(E.status)&&new Date(E.until).getTime()>Date.now());let v=(N?.grants||[]).some(E=>["author_monthly","author_annual"].includes(E.planId)&&["active","paid","past_due"].includes(E.status)&&new Date(E.until).getTime()>Date.now());e.headerCanUpgrade=!!N?.enabled&&N.checkoutEnabled!==!1&&!v&&(N.plans||[]).some(E=>["author_monthly","author_annual"].includes(E.id))};e.on("billing:updated",(N,v)=>o(v)),e.on("billing:pending",(N,v)=>{e.headerBillingPending=v}),e.openHeaderUpgrade=()=>{s.path()==="/profile"?e.emit("settings:upgrade"):s.url("/profile?upgrade=1")};let r=Ut(),d=Ct(),p=!1,u=()=>{p=!1;let N=document.querySelector("nav.navbar.navbar-expand-lg");if(!N||(N.classList.remove("nav-fit-1","nav-fit-2"),window.innerWidth<992))return;let v=N.querySelector(".navbar-collapse"),E=()=>N.scrollWidth>N.clientWidth+1||!!v&&v.scrollWidth>v.clientWidth+1;E()&&N.classList.add("nav-fit-1"),E()&&N.classList.add("nav-fit-2")},y=()=>{p||(p=!0,tt(()=>d.timeout(u,0)))};r(window,"resize",y),e.on("routeChange",y),e.on("billing:updated",y),document.fonts?.ready&&document.fonts.ready.then(y).catch(()=>{}),e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(N){let v=e.toasts.indexOf(N);v!==-1&&e.toasts.splice(v,1)},e.addToast=function(N){return e.toasts.push(N),i(function(){e.removeToast(N)},8e3),N};let m=/^\/(r|repository|pr|gist)\//;e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.isReviewerRoute=m.test(s.path()),e.darkMode=function(N){localStorage.setItem("darkMode",N),e.isDarkMode=N;let v="/css/prism.css";if($("link[href='/css/prism-okaidia.css']").remove(),N)$("body").addClass("dark-mode"),$(`link[href='${v}']`).remove();else if($("body").removeClass("dark-mode"),!document.querySelector(`link[href='${v}']`)){let E=document.createElement("link");E.href=v,E.rel="stylesheet",document.head.append(E)}e.emit("dark-mode",N)},e.darkMode(localStorage.getItem("darkMode")=="true"),e.emailPromptOpen=!1,e.emailPromptAddress="",e.emailPromptBusy=!1,e.emailPromptError="";let b;e.respondToEmailPrompt=async N=>{if(!e.emailPromptBusy){e.emailPromptBusy=!0,e.emailPromptError="";try{let v=await t.post("/github/connections/email",{action:N,email:e.emailPromptAddress},{headers:{"X-CSRF-Token":e.user.emailPromptCSRF}});N==="save"&&(e.user.notificationEmail=v.data.notificationEmail),e.emailPromptOpen=!1,e.user.showEmailPrompt=!1,b?.focus()}catch(v){e.emailPromptError=v.data?.error||"Unable to save your preference. Please try again."}finally{e.emailPromptBusy=!1}}};function h(){t.get("/api/user").then(N=>{N&&(e.user=N.data),y(),e.user?.username?Wi(t).then(v=>o(v.data)).catch(()=>{}):e.headerShowSupport=!0,e.user?.emailNotificationsEnabled&&e.user.showEmailPrompt&&!e.user.notificationEmail&&(b=document.activeElement,e.emailPromptOpen=!0,i(()=>{let v=document.getElementById("email-prompt");v?.showModal?v.showModal():v?.setAttribute("open",""),document.getElementById("email-prompt-address")?.focus()},0))},()=>{e.user=null,e.headerShowSupport=!0})}h();function w(){t.get("/api/options").then(N=>{N&&(e.site_options=N.data),mv(N?.data?.ANONYMIZATION_MASK),e.emit("site-options")},()=>{e.site_options=null})}w();function R(){t.get("/api/message").then(N=>{N&&(e.generalMessage=N.data)},()=>{e.generalMessage=null})}R();function S(N,v){v&&(e.title=v.title),e.path=s.url(),e.paths=s.path().substring(1).split("/"),e.isReviewerRoute=m.test(s.path())}e.on("routeChange",S),e.on("routeUpdate",S)},Vc=function(e,t){let s=Ut(),i=Ct();e.faqQuery="",e.faqResults=0;let o=d=>(d||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ");e.filterFaq=()=>{let d=o(e.faqQuery).trim().split(" ").filter(Boolean),p=0;document.querySelectorAll(".faq-section .panel-group").forEach(u=>{let y=0;u.querySelectorAll(":scope > .panel").forEach(h=>{let w=h.dataset.faqText||(h.dataset.faqText=o(h.textContent)),R=d.every(S=>w.includes(S));h.classList.toggle("faq-hit",d.length>0&&R),h.hidden=d.length>0&&!R,R&&y++});let m=d.length>0&&y===0;u.hidden=m;let b=u.previousElementSibling;b?.classList.contains("faq-cat")&&(b.hidden=m),p+=y}),e.faqResults=d.length?p:0},e.clearFaqSearch=()=>{e.faqQuery="",e.filterFaq(),document.getElementById("faq-search-input")?.focus()};let r=()=>{let d=window.location.hash.slice(1),p=document.getElementById(d);if(!p?.classList.contains("panel-collapse"))return;$(p).collapse("show");let u=document.getElementById(p.getAttribute("aria-labelledby"));u?.setAttribute("tabindex","-1"),u?.focus({preventScroll:!0}),u?.scrollIntoView?.({block:"start"})};e.on("routeUpdate",()=>i.timeout(r,0)),s(window,"hashchange",r),i.timeout(r,0)},qc=function(e,t,s,i,o){e.settingsTab=/(?:billing|upgrade)=/.test(window.location.search)?"billing":"defaults",e.confirmDeleteAccount=!1,e.deleteUsername="",e.profilePastSubscription=()=>!e.profileAuthorGrant()&&(e.billing?.grants||[]).some(m=>["author_monthly","author_annual"].includes(m.planId)),e.showAuthorPlans=new URLSearchParams(window.location.search).get("upgrade")==="1",e.showRepositoryPass=!1,e.profilePlan="author_annual",e.openProfileUpgrade=()=>{e.settingsTab="billing",e.showAuthorPlans=!0,tt(()=>document.getElementById("settings-plan-comparison")?.focus())},e.on("settings:upgrade",()=>e.openProfileUpgrade()),e.profileAuthorPlans=()=>(e.billing?.plans||[]).filter(m=>["author_monthly","author_annual"].includes(m.id)),e.profileSelectedPlan=()=>e.profileAuthorPlans().find(m=>m.id===e.profilePlan)||e.profileAuthorPlans()[0],e.profilePassPlan=()=>(e.billing?.plans||[]).find(m=>m.id==="author_pass"),e.profileAddonPlans=()=>(e.billing?.plans||[]).filter(m=>Gi(m.id)).sort((m,b)=>+(b.id==="repo_pack")-+(m.id==="repo_pack")),e.profileAddonId="repo_pack",e.profilePackPlan=()=>(e.billing?.plans||[]).find(m=>m.id==="repo_pack"),e.profileSlotPlan=()=>(e.billing?.plans||[]).find(m=>m.id==="repo_slot"),e.profileRepositories=()=>(e.billing?.repositories||[]).filter(m=>m.status!=="removed"),e.openProfileAddon=m=>{m&&(e.profileAddonId=m),e.showRepositoryPass=!0,e.billingRepository="",tt(()=>{let b=document.getElementById("settings-addons-title");b?.scrollIntoView?.({block:"nearest",behavior:"smooth"}),b?.focus?.({preventScroll:!0})})};let r=["repo_slot","author_pass","repo_extend","repo_never"];e.profileSingleAddons=()=>e.profileAddonPlans().filter(m=>m.id!=="repo_pack").sort((m,b)=>r.indexOf(m.id)-r.indexOf(b.id)),e.profileSingleId="repo_slot",e.profileSingleAddon=()=>e.profileSingleAddons().find(m=>m.id===e.profileSingleId)||e.profileSingleAddons()[0],e.profileCheapestAddon=()=>[...e.profileSingleAddons()].sort((m,b)=>(m.amount??1/0)-(b.amount??1/0))[0],e.profileAuthorPlansByValue=()=>[...e.profileAuthorPlans()].sort((m,b)=>+(m.interval==="year")-+(b.interval==="year")),e.profilePackSummary=m=>m.parts.map(b=>b.planId==="repo_slot"?"Extra repository":`${e.profileGrantName(b)} until ${e.billingDate(b.until)}`).join(" \xB7 "),e.profileAddonFeatures=m=>({repo_pack:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage)} of storage`,"Automatic updates for 180 days","Online for up to a year","No subscription"],repo_slot:["One more repository, outside your free ones",`Its own ${e.billingBytes(e.profileSlotPlan()?.storage)} of storage`,"Valid while the repository exists","Refresh it by hand"],author_pass:["Automatic updates for 180 days",`Its own ${e.billingBytes(e.profilePassPlan()?.storage)} of storage`,"No subscription"],repo_extend:["Online for up to one more year","Buy again to add another year","No subscription"],repo_never:["The link never expires","No subscription","Ends only if the payment is refunded"]})[m]||[],e.profileAddonBlurb=m=>({repo_slot:"One more repository",author_pass:"Auto-updates for 180 days",repo_extend:"Online one more year",repo_never:"The link never expires"})[m]||"",e.profileAuthorPurchase=()=>(e.billing?.purchases||[]).find(m=>m.recurring&&["active","overdue"].includes(m.status)),e.profileRepositoryExpiry=m=>m.status==="expired"?"expired":m.expirationMode==="never"?"never expires":m.expirationDate?"expires "+e.billingDate(m.expirationDate):"no date",e.profileAnnualSavings=()=>{let m=e.profileAuthorPlans().find(h=>h.interval==="month")?.amount,b=e.profileAuthorPlans().find(h=>h.interval==="year")?.amount;return m&&b&&b(e.billing?.purchases||[]).filter(b=>["active","overdue"].includes(b.status)===m),e.profilePurchaseStatus=m=>({active:"Active",overdue:"Payment overdue",ended:"Ended",refunded:"Refunded",disputed:"Disputed"})[m.status]||m.status,e.profilePurchaseTerm=m=>{let b=m.status&&!["active","overdue"].includes(m.status);if(m.recurring)return b?m.until?"Ended "+e.billingDate(m.until):"":(m.cancelAtPeriodEnd?"Ends ":"Renews ")+e.billingDate(m.until);if(m.planId==="repo_pack"){let h=m.parts.map(w=>w.until).filter(Boolean).map(w=>new Date(w).getTime());return b||!h.length?"":"Until "+e.billingDate(new Date(Math.max(...h)))}return m.until?(b||new Date(m.until).getTime()e.profileAddonPlans().find(m=>m.id===e.profileAddonId)||e.profileAddonPlans()[0],e.profileAuthorGrant=()=>(e.billing?.grants||[]).find(m=>["author_monthly","author_annual"].includes(m.planId)&&["active","paid","past_due"].includes(m.status)&&new Date(m.until).getTime()>Date.now()),e.profileConferencePlan=()=>(e.billing?.plans||[]).filter(m=>["conference_workshop","conference","conference_large"].includes(m.id)&&m.amount!=null).sort((m,b)=>m.amount-b.amount)[0],e.profileGrantName=m=>({author_monthly:"Author monthly",author_annual:"Author annual",author_pass:"Live updates",repo_extend:"Extended expiration",repo_never:"Never expire",repo_slot:"Extra repository",repo_pack:"Paper pack",conference:"Conference package",conference_workshop:"Workshop package",conference_large:"Large conference package"})[m.planId]||m.planId,Ki(e,t,()=>o.load().then(m=>{e.quota=m},console.error),{portalMessage:()=>{let m=e.profileAuthorGrant();return m?m.cancelAtPeriodEnd?`Renewal cancelled. Your access continues until ${e.billingDate(m.until)}.`:`Your subscription renews on ${e.billingDate(m.until)}.`:"Your billing details are up to date."}}),e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,e.accountEmail="",e.emailLoading=!0,e.emailCSRFReady=!1,e.emailSaving=!1,e.emailSaved=!1,e.emailError="";let d="";e.loadAccountEmail=async()=>{e.emailLoading=!0,e.emailError="";try{let m=await t.get("/github/connections/email");e.accountEmail=m.data.notificationEmail||"",d=m.data.csrf,e.emailCSRFReady=!!d}catch{e.emailError="Unable to load your email address. Please try again."}finally{e.emailLoading=!1}},e.saveAccountEmail=async()=>{if(!(e.emailSaving||e.emailLoading||!d)){e.emailSaving=!0,e.emailSaved=!1,e.emailError="";try{let m=await t.post("/github/connections/email",{email:e.accountEmail},{headers:{"X-CSRF-Token":d}});e.accountEmail=m.data.notificationEmail,e.user&&(e.user.notificationEmail=m.data.notificationEmail),e.emailSaved=!0}catch{e.emailError="Unable to save your email address. Check the address and try again."}finally{e.emailSaving=!1}}},e.loadAccountEmail(),o.load().then(m=>{e.quota=m},console.error);let p=ga(e,["terms","options"],"profile");e.discardDraft=()=>p.discard();function u(){t.get("/api/user/default").then(m=>{let b=m.data||{};b.terms&&(e.terms=b.terms.join(` +`)),e.options=Object.assign({},e.options,b.options),p.restore()})}u();let y=null;e.saveDefault=m=>{if(m&&m.preventDefault&&m.preventDefault(),e.saving)return;let b=p.checkpoint(),h={terms:e.terms.split(` +`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",h).then(()=>{p.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",y&&i.cancel(y),y=i(()=>{e.message=null},2500)},w=>{e.saving=!1;let R=w&&w.data&&w.data.error,S="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+R),s("ERRORS.unknown_error")]).then(([N,v])=>{e.error=R&&N!==v?N:S},()=>{e.error=S})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},_c=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{s.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},$c=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,u){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(y===void 0)return;p.preventDefault();let m=e.features.length,b=y==="first"?0:y==="last"?m-1:(u+y+m)%m;e.feature=e.features[b].key,o(()=>{let h=i.document.getElementById("feature-tab-"+e.feature);h&&h.focus()})},e.demoText=`# DeepLearnUtils Developed by Jane Smith at MIT CSAIL. See Smith et al., "Attention That Works," 2026. -Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let c=(e.demoTerms||"").split(/[,\n]/).map(g=>g.trim()).filter(Boolean).sort((g,k)=>k.length-g.length),u=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!c.length)return[{text:e.demoText}];let y=new RegExp("("+c.map(u).join("|")+")","gi"),h={},b=0;return(e.demoText||"").split(y).filter(g=>g!=="").map(g=>{let k=c.find(R=>R.toLowerCase()===g.toLowerCase());return k?(h[k.toLowerCase()]||(h[k.toLowerCase()]=++b),{text:String(h[k.toLowerCase()]),redacted:!0,original:g}):{text:g}})},e.demoCount=()=>e.demoParts().filter(c=>c.redacted).length,e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(c=>!c.total);function r(){t.get("/api/stat/").then(c=>{e.stat=c.data,e.cards[0].total=c.data.nbRepositories,e.cards[1].total=c.data.nbUsers,e.cards[2].total=c.data.nbPageViews,e.cards[3].total=c.data.nbPullRequests}).catch(()=>{})}r();function d(c){let u={series:c,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!c||c.length<2)return u;let y=new Array(c.length-1);for(let S=1;S=2){let S=y[h-2];S&&(u.pctChange=(u.deltaToday-S)/S*100)}return u.pctAbs=Math.round(Math.abs(u.pctChange)),u.isUp=u.pctChange>=0,u}e.history={repositories:d([]),users:d([]),pageViews:d([]),pullRequests:d([])},t.get("/api/stat/history?days=60").then(c=>{let u=c.data||[];e.history={repositories:d(u.map(y=>y.nbRepositories||0)),users:d(u.map(y=>y.nbUsers||0)),pageViews:d(u.map(y=>y.nbPageViews||0)),pullRequests:d(u.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},Vc=function(e,t,o,i,s,r){let d=Rt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),d.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,tt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ut()(document,"click",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=C=>C.status==="error"||C._broken||u(C.status)==="progress"&&C._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=C=>{e.projectView=C,C==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=C=>{let q=va(C?.anonymizeDate||C?.lastView)||"";return/ ago$/.test(q)?"No activity for "+q.replace(/ ago$/,""):"No activity since "+q.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=C=>"project-details-"+encodeURIComponent(C._type+":"+(C._id||C._source||"unknown")),e.showProjectDetails=async C=>{e.selectedProject=C,e.projectName=C.projectName||"",e.nameError="",e.nameMessage="",await tt();let q=document.getElementById(e.projectDetailsId(C));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=C=>{e.selectedProject=null,tt(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(C._type+":"+C._id)}"]`)?.focus())},e.saveProjectName=async C=>{if(e.nameSaving||!C._id)return;let q=e.projectName.trim();if(q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let z=await t.post("/api/user/project-name",{type:C._type,id:C._id,name:q});C.projectName=z.data.name,C._label=C.projectName||C._fallbackLabel,e.selectedProject===C&&(e.nameMessage=q?"Project name saved.":"Default project name restored."),E||(e.dashboardCursor=null,await _(),e.selectedProject===C&&(e.selectedProject=e.items.find(K=>K._type===C._type&&K._id===C._id)||null))}catch{e.selectedProject===C&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async C=>{if(!C._viewUrl||e.copyingId)return;let q=new URL(C._viewUrl,s.location.origin).href;e.copyingId=C._type+":"+C._id;try{await Wa(q),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:q})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let c=["queue","download","downloaded","preparing","anonymizing"];function u(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired":C==="removed"||C==="removing"?"removed":(c.indexOf(C)>-1,"progress")}let y=7200*1e3,h="dashboard.filterPrefs",b={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},g=loadFilterPrefs(h)||{};e.typeFilter=g.typeFilter||b.typeFilter,e.filters={status:Object.assign({},b.filters.status,g.filters&&g.filters.status||{})},e.orderBy=g.orderBy||b.orderBy;let k={_name:{label:"Anonymous ID",defaultDesc:!1},_label:{label:"Project",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=k,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let C=k[e.sortField()];return C?C.label:"Custom"},e.isSortedBy=C=>e.sortField()===C,e.setSort=(C,q)=>{typeof q!="boolean"&&(q=e.isSortedBy(C)?!e.sortDesc():!!(k[C]&&k[C].defaultDesc)),e.orderBy=(q?"-":"")+C},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(h,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(h,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),r.load().then(C=>{e.quota=C},console.error);function R(C,q,z,K,ie,ne){C.pageView||(C.pageView=0),C.lastView||(C.lastView=""),C.options=C.options||{},C.options.terms=(C.options.terms||[]).filter(he=>he),C._id=q||"",C._source=K,C._broken=!q,C._name=q||K||"(unnamed)",C._fallbackLabel=C._type==="gist"?"Gist "+(q||K||"without an ID"):K||z||C._name,C._label=C.projectName||C._fallbackLabel,C._editUrl=q?ie:null,C._viewUrl=q?ne:null,C._broken&&(C.status="error",C.statusMessage="incomplete_record"),C._statusKey=u(C.status);let Y=C.anonymizeDate||C.lastView;if(C._stale=C._statusKey==="progress"&&!!Y&&Date.now()-new Date(Y).getTime()>y,C.status==="expired"||C.status==="expiring")C._expiry={kind:"expired",date:C.options.expirationDate},C._expiry.label=ba(C.options.expirationDate)||void 0;else if(C.status!=="ready")C._expiry={kind:"none"};else if(C.options.expirationMode==="never"||!C.options.expirationDate)C._expiry={kind:"never"};else{C._expiry={kind:"date",date:C.options.expirationDate};let he=new Date(C.options.expirationDate).getTime()-Date.now();if(he>0&&he<=168*3600*1e3){let Ee=Math.max(1,Math.round(he/36e5)),Ue=Math.round(he/864e5);C._expiry.soon=Ee<48?"in "+Ee+(Ee===1?" hour":" hours"):"in "+Ue+" days"}}return C}function S(C){return t.get(C).then(q=>q.data||[],q=>(console.error(q),[]))}function N(){return e.loading=!0,i.all([S("/api/user/anonymized_repositories"),S("/api/user/anonymized_pull_requests"),S("/api/user/anonymized_gists")]).then(C=>{let q=C[0],z=C[1],K=C[2],ie=[];q.forEach(ne=>{ne._type="repo";let Y=ne.source||{};ie.push(R(ne,ne.repoId,ne.repoId,Y.fullName,"/anonymize/"+ne.repoId,"/r/"+ne.repoId+"/"))}),z.forEach(ne=>{ne._type="pr";let Y=ne.source||{};ie.push(R(ne,ne.pullRequestId,ne.pullRequestId,Y.repositoryFullName?Y.repositoryFullName+"#"+Y.pullRequestId:void 0,"/pull-request-anonymize/"+ne.pullRequestId,"/pr/"+ne.pullRequestId+"/"))}),K.forEach(ne=>{ne._type="gist";let Y=ne.source||{};ie.push(R(ne,ne.gistId,ne.gistId,Y.gistId,"/gist-anonymize/"+ne.gistId,"/gist/"+ne.gistId+"/"))}),e.items=ie,e.removedCount=ie.filter(ne=>ne._statusKey==="removed").length,e.loading=!1})}let m=0,E=!1;e.dashboardCursor=null,e.dashboardError="";function M(C){let q=C.source||{};return C._type==="repo"?R(C,C.repoId,C.repoId,q.fullName,"/anonymize/"+C.repoId,"/r/"+C.repoId+"/"):C._type==="pr"?R(C,C.pullRequestId,C.pullRequestId,q.repositoryFullName?q.repositoryFullName+"#"+q.pullRequestId:void 0,"/pull-request-anonymize/"+C.pullRequestId,"/pr/"+C.pullRequestId+"/"):R(C,C.gistId,C.gistId,q.gistId,"/gist-anonymize/"+C.gistId,"/gist/"+C.gistId+"/")}function _(C=!1){if(E)return N();let q=++m;return e.loading=!C,e.loadingMore=C,e.dashboardError="",t.get("/api/user/dashboard",{params:{q:e.search,type:e.typeFilter,sort:e.orderBy,statuses:Object.keys(e.filters.status).filter(z=>e.filters.status[z]!==!1).join(",")||"none",attention:String(e.projectView==="attention"),cursor:C?e.dashboardCursor:void 0}}).then(z=>{if(q===m){if(!Array.isArray(z.data?.items))return E=!0,N();e.items=(C?e.items:[]).concat(z.data.items.map(M)),e.dashboardCursor=z.data.cursor,e.dashboardTotals=z.data,C||ee()}},z=>{if(q===m){if(z.status===404)return E=!0,N();e.dashboardError="Projects could not be loaded. Please try again."}}).finally(()=>{q===m&&(e.loading=!1,e.loadingMore=!1)})}e.loadMoreProjects=()=>_(!0);let V;e.watchGroup(["search","typeFilter","orderBy","projectView"],()=>{E||(V&&d.timeout.cancel(V),V=d.timeout(()=>_(),150))},!1),e.watch("filters",()=>{E||_()},!0,!1),e.on("dispose",()=>{m++}),_(),e.openItem=(C,q)=>{if(!C._viewUrl)return;let z=q&&q.target;z&&z.closest&&z.closest("a, button, .dropdown, input")||(s.location.href=C._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(C=>e.filters.status[C]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0;let G=()=>Object.keys(e.statusKeyLabels);e.onlyRemovedShown=()=>G().every(C=>C==="removed"==(e.filters.status[C]!==!1)),e.isActiveDefault=()=>G().every(C=>C==="removed"==(e.filters.status[C]===!1)),e.statusView=()=>e.projectView==="attention"?"attention":e.onlyRemovedShown()?"removed":e.filters.status.removed===!1?"active":"custom",e.setStatusView=C=>{if(C==="attention")return e.setProjectView("attention");e.projectView="all",G().forEach(q=>{e.filters.status[q]=C==="removed"?q==="removed":q!=="removed"})},e.statusChipKeys=()=>{let C=e.statusView();return C==="removed"?[]:G().filter(q=>e.filters.status[q]===!1&&!(q==="removed"&&C!=="custom"))},e.removedCount=null;function ee(){if(E){e.removedCount=e.items.filter(q=>q._statusKey==="removed").length;return}let C=e.dashboardTotals;!C||e.projectView!=="all"||e.search.trim()||e.typeFilter!=="all"||(e.isActiveDefault()?e.removedCount=Math.max(0,C.total-C.filtered):e.onlyRemovedShown()&&(e.removedCount=C.filtered))}e.showViewTabs=()=>e.statusView()!=="active"||e.attentionCount()>0||e.removedCount>0||e.removedCount==null&&!!e.dashboardTotals&&e.dashboardTotals.total>e.dashboardTotals.filtered,e.hasActiveFilters=()=>e.projectView!=="all"||e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(C=>e.filters.status[C]===!1),e.showClearFilters=()=>e.search.trim().length>0||e.typeFilter!=="all"||e.statusChipKeys().length>0,e.isPlainView=()=>!e.showClearFilters(),e.clearFilters=()=>{let C=e.statusView();e.typeFilter="all",e.search="",e.setStatusView(C==="removed"?"removed":"active")};function X(C,q,z,K){t.get("/api/repo/"+C).then(async ie=>{let ne=K!==void 0&&K!==ie.data.status;for(let Y of e.items)if(Y._type==="repo"&&Y.repoId==C){ne=ne||Y.status!==ie.data.status;let he=e.needsAttention(Y);Y.status=ie.data.status,Y.statusMessage=ie.data.statusMessage,Y._statusKey=u(Y.status),Y._statusKey!=="progress"&&(Y._stale=!1);let Ee=e.needsAttention(Y);e.dashboardTotals&&he!==Ee&&(e.dashboardTotals.attention=Math.max(0,e.dashboardTotals.attention+(Ee?1:-1)));break}if(ne&&!E){e.dashboardCursor=null;let Y=e.selectedProject;await _(),Y&&e.selectedProject===Y&&(e.selectedProject=e.items.find(he=>he._type===Y._type&&he._id===Y._id)||null)}if(ie.data.status=="ready"||ie.data.status=="error"||ie.data.status=="removed"||ie.data.status=="expired"){q(ie.data);return}d.timeout(()=>X(C,q,z,ie.data.status),2500)},z)}let O=C=>C==="repo"?"repository":C==="gist"?"gist":"pull request",U=C=>C==="repo"?"/api/repo":C==="gist"?"/api/gist":"/api/pr";e.removeItem=C=>{let q=O(C._type);if(confirm(`Are you sure that you want to remove the ${q} ${C._id}?`)){let z=ot({title:`Removing ${C._id}...`,date:new Date,body:`The ${q} ${C._id} is going to be removed.`});e.addToast(z);let K=`${U(C._type)}/${C._id}`;t.delete(K).then(()=>{C._type==="repo"?X(C._id,()=>{z.title=`${C._id} is removed.`,z.body=`The ${q} ${C._id} is removed.`},void 0,C.status):(z.title=`${C._id} is removed.`,z.body=`The ${q} ${C._id} is removed.`,_())},ie=>{z.title=`Error during the removal of ${C._id}.`,z.body=ie.body,_()})}},e.refreshItem=C=>{let q=O(C._type),z=ot({title:`Refreshing ${C._id}...`,date:new Date,body:`The ${q} ${C._id} is going to be refreshed.`});e.addToast(z);let K=ne=>{z.title=`Error during the refresh of ${C._id}.`,z.body=ne.data?.error||ne.body||"The refresh could not be completed. Please try again.",_()},ie=`${U(C._type)}/${C._id}/refresh`;t.post(ie).then(()=>{C._type==="repo"?X(C._id,ne=>{if(ne.status!=="ready"){K({body:ne.statusMessage||`The repository is ${ne.status}.`});return}z.title=`${C._id} is refreshed.`,z.body=`The ${q} ${C._id} is refreshed.`},K,C.status):(z.title=`${C._id} is refreshed.`,z.body=`The ${q} ${C._id} is refreshed.`,_())},K)},e.extendItem=C=>{let q=O(C._type),z=ot({title:`Extending ${C._id}...`,date:new Date,body:`The expiration of ${q} ${C._id} is being extended.`});e.addToast(z);let K=`${U(C._type)}/${C._id}/extend`;t.post(K).then(ie=>{let ne=ie?.data?.expirationDate?` until ${new Date(ie.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";C._type==="repo"?X(C._id,()=>{z.title=`${C._id} is extended.`,z.body=`${q} ${C._id} is extended${ne}.`},void 0,C.status):(z.title=`${C._id} is extended.`,z.body=`${q} ${C._id} is extended${ne}.`,_())},ie=>{z.title=`Error during the extension of ${C._id}.`;let ne=ie.data&&ie.data.error;z.body=ne||ie.body,ne&&Object.prototype.hasOwnProperty.call(Wn.ERRORS,ne)&&(z.body=Wn.ERRORS[ne]),_()})},e.itemFilter=C=>{if(e.projectView==="attention"&&!e.needsAttention(C)||e.typeFilter!=="all"&&C._type!==e.typeFilter||e.filters.status[C._statusKey]===!1)return!1;let q=e.search.trim().toLowerCase();return!!(q.length==0||C._label&&String(C._label).toLowerCase().indexOf(q)>-1||C._source&&String(C._source).toLowerCase().indexOf(q)>-1||C._id&&String(C._id).toLowerCase().indexOf(q)>-1||C.conference&&String(C.conference).toLowerCase().indexOf(q)>-1)}};var qc=function(e,t,o){let i=Rt();e.repoId=o.repoId,e.reviewUrl=window.location.origin+"/r/"+encodeURIComponent(o.repoId)+"/",e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="",e.shareUrl=(window.location?.origin||"")+"/r/"+encodeURIComponent(e.repoId)+"/",e.copied=!1;let s=null;e.copyShareUrl=async()=>{try{await Wa(e.shareUrl),e.copied=!0,s&&i.timeout.cancel(s),s=i.timeout(()=>{e.copied=!1},2e3)}catch{e.addToast?.({title:"Copy this anonymous link",body:e.shareUrl})}},e.selectShareUrl=h=>{let b=window.getSelection?.();if(!b||!h?.target)return;let g=document.createRange();g.selectNodeContents(h.target),b.removeAllRanges(),b.addRange(g)};var r=null;let d=null,c=!1;function u(h){e.rateLimitResetAt=h,r&&i.interval.cancel(r);function b(){var g=Math.max(0,Math.ceil((h-Date.now())/1e3));if(g<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,i.interval.cancel(r),r=null;else{var k=Math.floor(g/60),R=g%60;e.rateLimitCountdown=k>0?k+"m "+R+"s":R+"s"}}b(),r=i.interval(b,1e3)}e.on("dispose",function(){c=!0,r&&i.interval.cancel(r),d&&i.timeout.cancel(d)});function y(h){if(!h)return h;var b=h.match(/^rate_limited:(\d+)$/);return b?(u(parseInt(b[1],10)),null):(e.rateLimitResetAt=0,h)}e.getStatus=()=>{c||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(h=>{if(!c){e.repo=h.data,h.data.rateLimitResetAt?u(h.data.rateLimitResetAt):e.repo.statusMessage=y(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var b=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(b=!1),b&&(d=i.timeout(e.getStatus,2e3))}},h=>{e.error=h.data.error})},e.getStatus()},dr=function(e,t,o,i,s,r,d){Pc(),e.renderRedacted=qs,e.sourceUrl="",e.workspaceOpen=!1,e.sourceUrlError="",e.previewStatus="idle",e.sourceLoading=!1,e.mobilePane="settings";let c=window.matchMedia?.("(max-width: 767px)");e.mobileWorkspace=!!c?.matches,c?.addEventListener&&Ut()(c,"change",w=>{e.mobileWorkspace=w.matches}),e.selectMobilePane=w=>{e.mobilePane=w};let u=0,y=!1,h=new Set,b=(w,I=!1)=>!y&&w.generation===u&&w.url===e.sourceUrl.trim()&&w.connection===e.githubConnection&&(!I||w.branch===e.source.branch),g=()=>{let w={generation:u,url:e.sourceUrl.trim(),connection:e.githubConnection,branch:e.source.branch};return h.add(w),e.sourceLoading=!0,w},k=w=>{h.delete(w),y||(e.sourceLoading=[...h].some(I=>b(I)))};e.on("dispose",()=>{y=!0,u++});let R=null,S=w=>w.gistId&&!w.repo?"gist:"+w.gistId.toLowerCase():(w.owner+"/"+w.repo).toLowerCase()+(w.pullRequestId?"/pull/"+w.pullRequestId:""),N=ga(e,["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"],"anonymize:"+(s.path?.()||"")),m=null,E=null,M=null;e.hostingReview=!1,e.previewExpanded=!1,e.taskValidationError="",e.editRepository=()=>{e.mobilePane="settings",e.previewExpanded=!1,tt(()=>document.querySelector(".anonymize-fields .is-invalid")?.focus())},e.submitRepository=w=>{if(e.taskValidationError="",!(e.sourceLoading||e.billingBusy||e.hostingSaving||e.billingPending)){if(ei()||e.anonymize?.invalid||e.sourceUrlError){e.taskValidationError="Check the highlighted fields before continuing.",e.editRepository();return}return e.hostingNeedsPayment()?e.checkoutRepository(Gi(e.hostingChoice())?e.hostingChoice():""):e.anonymizeRepo(w)}},e.hostingPayment=!1,e.hostingAlternatives=!1,e.hostingPrice=w=>w.amount==null?"Price shown at checkout":new Intl.NumberFormat(void 0,{style:"currency",currency:w.currency,minimumFractionDigits:0,maximumFractionDigits:2}).format(w.amount/100)+(w.interval==="year"?" billed annually":" billed monthly"),e.hostingPlan="",e.hostingSaving=!1,e.selectedHostingPlan=()=>e.authorPlans().find(w=>w.id===e.hostingPlan)||e.hostingSubscriptionPlan?.();let _=()=>t.get("/api/user/quota").then(w=>{e.hostingQuota=w.data});Ki(e,t,async()=>{await _(),e.hostingQuotaBlocked=!1},{confirmedMessage:"Hosting status refreshed. Your draft is ready to continue."}),_().catch(()=>{}),e.authorPlans=()=>(e.billing?.plans||[]).filter(w=>["author_monthly","author_annual"].includes(w.id)),e.conferenceHosting=()=>!!(e.conference&&e.conference_data?.hosting),e.hasAuthorHosting=()=>["author_monthly","author_annual"].includes(e.billing?.allowance?.plan),e.hostingNeedsPayment=()=>!e.billing?.enabled||e.detectedType!=="repo"||e.hasAuthorHosting()||e.isUpdate&&e.role!=="owner"?!1:!!(e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length||!e.conferenceHosting()&&e.hostingQuotaBlocked),e.repositoryGrants=w=>(e.billing?.grants||[]).filter(I=>I.planId===w&&I.scope===`repo:${e.repoId}`&&["active","paid","past_due"].includes(I.status)&&new Date(I.until).getTime()>Date.now()),e.repositoryAddonPlans=()=>(e.billing?.plans||[]).filter(w=>Gi(w.id)&&(["repo_extend","repo_pack"].includes(w.id)||!e.repositoryGrants(w.id).length)),e.hostingOneTimePlans=()=>{let w=I=>I.map(B=>(e.billing?.plans||[]).find(j=>j.id===B&&!e.repositoryGrants(B).length)).filter(Boolean);return e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length?w(["repo_never"]):e.hostingQuotaBlocked&&!e.conferenceHosting()?w(["repo_slot","repo_pack"]):[]},e.hostingOneTime=()=>e.hostingOneTimePlans()[0];let V=["free","repo_slot"];e.liveUpdatesIncluded=()=>{if(!e.billing?.enabled||e.detectedType!=="repo"||e.isUpdate&&e.role!=="owner"||e.conferenceHosting()||e.hasAuthorHosting())return!0;let w=e.billing?.allowance?.plan;return w&&!V.includes(w)?!0:e.repositoryGrants("author_pass").length>0||e.repositoryGrants("repo_pack").length>0},e.liveUpdatesPrice=()=>{let w=(e.billing?.plans||[]).find(I=>I.id==="author_pass");return w?.amount!=null?e.billingAmount(w):""},e.showHostingOptions=()=>{e.mobilePane="settings",tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"start",behavior:"smooth"}))},e.neverExpireTag=()=>{if(e.hasAuthorHosting())return"Included in your subscription";if(e.repositoryGrants("repo_never").length)return"Paid for this repository";let w=(e.billing?.plans||[]).find(I=>I.id==="repo_never");return w?.amount!=null?`${e.billingAmount(w)} once, or with a subscription`:"Subscription or one-time add-on"},e.hostingCycle="author_annual",e.hostingSubscriptionPlan=()=>e.authorPlans().find(w=>w.id===e.hostingCycle)||e.authorPlans().find(w=>w.interval==="year")||e.authorPlans()[0],e.hostingAnnualSavings=()=>{let w=e.authorPlans().find(B=>B.interval==="month")?.amount,I=e.authorPlans().find(B=>B.interval==="year")?.amount;return w&&I&&Ie.hostingOneTimePlans().concat(e.authorPlans().length?[e.hostingSubscriptionPlan()]:[]),e.hostingOptionName=w=>({repo_slot:"Add this repository",repo_pack:"Paper pack",repo_never:"Never expire",author_annual:"Author subscription",author_monthly:"Author subscription"})[w.id]||w.name,e.hostingOptionBlurb=w=>({repo_slot:"Hosted outside your free repositories. Refresh it by hand.",repo_pack:"Adds automatic updates for 180 days and keeps the link online for a year.",repo_never:"This link never expires. No subscription."})[w.id]||`${w.repositories} repositories, ${e.billingBytes(w.storage)}, automatic updates and links that never expire.`,e.hostingChoice=()=>{let w=e.hostingOneTimePlans();return w.some(I=>I.id===e.hostingPlan)||e.authorPlans().some(I=>I.id===e.hostingPlan)?e.hostingPlan:w[0]?.id||e.hostingSubscriptionPlan()?.id||""},e.checkoutRepository=async(w="")=>{if(!(e.hostingSaving||e.billingBusy||!e.billing?.csrf||e.sourceLoading)){e.hostingSaving=!0,e.billingError="";try{let I=N.checkpoint(),B=JSON.stringify(I);(!E||B!==M)&&(E=(await t.post("/api/billing/draft",{path:s.path(),values:I},{headers:{"x-csrf-token":e.billing.csrf}})).data.id,M=B);let j=e.authorPlans().find(ue=>ue.id===e.hostingPlan)||e.hostingSubscriptionPlan();if(!w&&!j)throw new Error("No author plan available");await e.checkout(w||j.id,w?e.repoId:"",{draftId:E})}catch{e.billingError="Your draft could not be saved for checkout. Your form is unchanged. Please try again."}finally{e.hostingSaving=!1}}},e.useDatedHosting=()=>{e.options.expirationMode="remove"},e.discardDraft=async()=>{N.discard(),e.workspaceOpen=!!e.sourceUrl,e.error=null,e.sourceUrl?await e.urlSelected(!0):(u++,e.sourceLoading=!1,e.detectedType=null,e.details=null,e.sourceUrlError="",Kt.cancel(),Tn.cancel(),On.cancel(),e.previewStatus="idle")},e.githubConnection=void 0,e.githubConnections=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1;let G=()=>{let w={};for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])w[I]=e[I];sessionStorage.setItem("github-access-draft",JSON.stringify({path:s.path(),savedAt:Date.now(),draft:w}))};e.connectGistApp=()=>{G(),window.location.href="/github/app/login?returnTo="+encodeURIComponent(s.path())},e.connectGistOAuth=()=>{G(),window.location.href="/github/login?returnTo="+encodeURIComponent(s.path())},e.grantGitHubAccess=()=>{G();let w=s.path(),I=he(e.sourceUrl)||"",B=e.githubConnections?.appConnected?"/github/app/install":"/github/app/login";window.location.href=B+"?returnTo="+encodeURIComponent(w)+"&repository="+encodeURIComponent(I)+"&install=1"},e.chooseGitHubConnection=async w=>{e.githubConnection=w,e.readme="",e.sourceUrl&&await Ue()},e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0};function ee(){let w=new Date;return w.setMonth(w.getMonth()+6),w}e.options.expirationDate=ee();function X(w){let I=w.getFullYear(),B=String(w.getMonth()+1).padStart(2,"0"),j=String(w.getDate()).padStart(2,"0");return`${I}-${B}-${j}`}e.minExpirationDate=X(new Date);let O=()=>{let w=new Date,I=new Date(w);if(I.setFullYear(I.getFullYear()+1),e.billing?.enabled&&e.detectedType==="repo"&&!e.hasAuthorHosting()){I=new Date(w),I.setMonth(I.getMonth()+(e.billing.freeExpirationMonths||5));for(let ue of e.repositoryGrants("repo_extend"))new Date(ue.until)>I&&(I=new Date(ue.until));e.conference_data?.endDate&&new Date(e.conference_data.endDate)>I&&(I=new Date(e.conference_data.endDate)),e._savedExpirationDate&&e._savedExpirationDate>I&&(I=new Date(e._savedExpirationDate));let B=e.options?.expirationDate,j=e._savedExpirationDate&&B instanceof Date&&B.getTime()===e._savedExpirationDate.getTime();B instanceof Date&&B>I&&!j&&(e.options.expirationDate=new Date(I))}e.maxExpirationDate=X(I)};O(),e.watch(()=>[e.billing,e.repoId,e.conference_data,e.isUpdate,e._savedExpirationDate,e.options?.expirationMode,e.detectedType],O,!0,!1),e.anonymize_readme="",e.readme="",e.isUpdate=!1,e.userRepos=[],e.userReposStatus="idle",e.userRepoFilter="",e.loadUserRepos=(w=!1)=>{e.userReposStatus!=="loading"&&(e.userReposStatus="loading",t.get("/api/user/all_repositories",w?{params:{force:"1"}}:{}).then(I=>{if(y)return;let B=Array.isArray(I.data)?I.data.filter(j=>j&&j.fullName):[];e.userRepos=B.sort((j,ue)=>j.fullName.localeCompare(ue.fullName,void 0,{sensitivity:"base"})),e.userReposStatus="ready"},()=>{y||(e.userReposStatus="error")}))},e.filteredUserRepos=()=>{let w=String(e.userRepoFilter||"").trim().toLowerCase(),I=e.userRepos||[];return w?I.filter(B=>B.fullName.toLowerCase().includes(w)):I},e.selectUserRepo=w=>{if(w?.fullName)return e.sourceUrl="https://github.com/"+w.fullName,e.urlSelected()},!i.repoId&&!i.pullRequestId&&!i.gistId&&Promise.resolve().then(()=>{y||e.loadUserRepos()}),e.previousConfigurations=[],e.previousConfigurationId="";let U,C=w=>String(w||"").replace(/\/$/,"").replace(/\.git$/i,"").toLowerCase();async function q(){if(e.isUpdate||i.repoId||i.pullRequestId||i.gistId)return;let w={generation:u,url:e.sourceUrl.trim(),connection:e.githubConnection};try{U||(U=t.get("/api/user/anonymized_repositories").then(j=>j.data));let I=await U;if(!b(w))return;let B=C(he(w.url));e.previousConfigurations=I.filter(j=>j.repoId&&j.options&&C(j.source?.fullName)===B).sort((j,ue)=>(Date.parse(ue.anonymizeDate)||0)-(Date.parse(j.anonymizeDate)||0)),e.previousConfigurationId=e.previousConfigurations[0]?.repoId||""}catch{U=void 0}}e.sourceSummary=()=>{let w=String(e.sourceUrl||""),I=/github\.com\/([^/\s]+\/[^/\s]+)\/pull\/(\d+)/i.exec(w);return I?I[1]+" \xB7 PR #"+I[2]:(I=/gist\.github\.com\/([^/\s]+)\/([0-9a-f]{8,})/i.exec(w),I?I[1]+" \xB7 gist "+(I[2].length>12?I[2].slice(0,7)+"\u2026"+I[2].slice(-4):I[2]):"")},e.previewId=()=>e.detectedType==="pr"?e.pullRequestId:e.detectedType==="gist"?e.gistId:e.repoId,e.previewPath=()=>{let w=e.previewId();return w?(e.detectedType==="pr"?"/pr/":e.detectedType==="gist"?"/gist/":"/r/")+encodeURIComponent(w)+"/":""},e.previewUrl=()=>{let w=e.previewPath();return w?"anonymous.4open.science"+w.replace(/\/$/,""):""},e.previewRedactions=()=>{let w=j=>typeof j=="string"?(j.match(Zs)||[]).length:0;if(e.detectedType==="repo")return e.previewViewer.redactionCount();let I=e.detectedType==="pr"?Co:Eo,B=0;return I.forEach(j=>{B+=w(j)}),B};let z=(w,I)=>w.localeCompare(I,void 0,{sensitivity:"base"}),K=w=>w.slice(w.lastIndexOf("/")+1),ie={key:null,files:[]};e.previewTreeFiles=()=>{if(!e.preserve.commit||!me)return[];let w=e.preserve.commit+"\0"+e.terms+"\0"+wo.size+"\0"+me.files.length;if(ie.key===w)return ie.files;let I=me.files.map(B=>{let j=e.previewPathName(B),ue=j.lastIndexOf("/");return{name:j.slice(ue+1),path:ue<0?"":j.slice(0,ue),size:0,sourcePath:B}});return ie={key:w,files:I},I},e.selectPreviewPath=w=>{let I=e.previewTreeFiles().find(B=>"/"+(B.path?B.path+"/":"")+B.name===w);I&&e.openPreviewFile(I.sourcePath)},e.existingConfigurationUrl=()=>{let w=e.previousConfigurations.find(I=>I.repoId===e.previousConfigurationId);return w?"/anonymize/"+encodeURIComponent(w.repoId):null};function ne(w){t.get("/api/user/default").then(I=>{let B=I.data;B.terms&&(e.defaultTerms=B.terms.join(` -`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):ee(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),w&&w()})}function Y(w,I,B){e.anonymize&&e.anonymize[w]&&e.anonymize[w].setValidity(I,B)}function he(w){try{let I=parseGithubUrl(w);if(I&&I.owner&&I.repo)return I.owner+"/"+I.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||he(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let w=g();try{let I=await t.get("/github/connections");if(e.githubConnections=I.data,!I.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":I.data.csrf}});if(!b(w))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(w)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,k(w)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await Je()}catch{}}};function Ee(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:he(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ue(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Be(){let w=new URLSearchParams(window.location.search).get("billingDraft");if(w){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(w))).data;if(B.path!==s.path())throw new Error("Wrong task");m=B.values.conference||null;for(let j of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,j)&&(e[j]=B.values[j]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),E=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ue(),s.replace?.(s.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let I;try{I=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!I||I.path!==s.path()||Date.now()-I.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await Ue(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(I.draft,B)&&(e[B]=I.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ue(),sessionStorage.removeItem("github-access-draft"),!0}ne(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&d(Be,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async w=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(w.data.status),e.githubConnection=w.data.connection||"oauth",e.sourceUrl="https://github.com/"+w.data.source.fullName,e._originalFullName=w.data.source.fullName,e.terms=w.data.options.terms.filter(I=>I).join(` -`),e.source=w.data.source,e.role=w.data.role||"owner",e._existingNever=w.data.options.expirationMode==="never",e._savedExpirationDate=w.data.options.expirationDate?new Date(w.data.options.expirationDate):null,e.coauthors=w.data.coauthors||[],e._originalBranch=w.data.source.branch,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,e.repositoryID=w.data.source.repositoryID,e._originalRepositoryID=w.data.source.repositoryID,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&(await Promise.all([Je(),He()]),ko())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async w=>{if(e.githubConnection=w.data.connection||"oauth",e.sourceUrl="https://github.com/"+w.data.source.repositoryFullName+"/pull/"+w.data.source.pullRequestId,e.terms=w.data.options.terms.filter(I=>I).join(` -`),e.source=w.data.source,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be())try{await Ja()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async w=>{e.sourceUrl="https://gist.github.com/"+w.data.source.gistId,e.terms=w.data.options.terms.filter(I=>I).join(` -`),e.source=w.data.source,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&await Za()},()=>{s.url("/404")}))}),t.get("/github/connections").then(w=>{e.githubConnections=w.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&w.data.appEnabled&&w.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ue())}).catch(()=>{}),e.urlSelected=async(w=!1)=>{let I=++u;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Kt.cancel(),Tn.cancel(),On.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Y("sourceUrl","github",!1);return}let j=S(B),ue=w||R===j;R=j,e.sourceUrlError="",Y("sourceUrl","github",!0);let ge=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ke=window.document.getElementById("sourceUrl");if(Ke){try{Ke.setSelectionRange(0,0)}catch{}Ke.scrollLeft=0}},50),ge&&d(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ue&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ue||(e.source={type:"GitHubStream",branch:"",commit:""}),Kt.cancel(),Tn.cancel(),On.cancel(),Co.clear(),Eo.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",lt(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ue;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await Za()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await Ja()):(e.detectedType="repo",q(),await Promise.all([Je(),He()]),ko())}catch{}finally{I===u&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let w=e.branches.filter(B=>B.name==e.source.branch)[0];if(!w)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=w.commit),e.readme=w.readme,await He(),ko()}),e.getBranches=async w=>{let I=parseGithubUrl(e.sourceUrl),B=g();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:w===!0||e.reconnectingSource?"1":"0",repositoryID:Ee()}});if(!b(B))return;e.branches=j.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ue=e.branches.filter(ge=>ge.name==e.source.branch);ue.length>0&&(!(!e.reconnectingSource&&!w&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=ue[0].commit),e.readme=ue[0].readme,await He(w))}catch(j){if(!b(B))return;e.branches=[],e.sourceUnreachable=j&&(j.status===404||j.data&&j.data.error==="repo_not_found");let ue=j&&j.data&&j.data.error||(j&&j.status===404?"repo_not_found":"unknown_error");r("ERRORS."+ue).then(ge=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:ge}),e.error=ge},console.error),typeof Y=="function"&&Y("sourceUrl","missing",!1)}finally{k(B)}};async function Je(){let w=parseGithubUrl(e.sourceUrl),I=g();try{So();let B=await t.get(`/api/repo/${w.owner}/${w.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ee(),force:"1"}});if(!b(I))return;e.details=B.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),No(B.data.error)),Y("sourceUrl","missing",!1),B}finally{k(I)}}async function He(w){if(e.readme&&!w)return e.readme;let I=parseGithubUrl(e.sourceUrl),B=g();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:w===!0?"1":"0",branch:e.source.branch,repositoryID:Ee()}});b(B,!0)&&(e.readme=j.data)}catch{b(B,!0)&&(e.readme="")}finally{k(B)}}let et={magicalBraces:!0},Re=w=>w.startsWith("/")&&!w.endsWith("/")&&Bn(yo(w.slice(1),et),et)===w.slice(1),Fe=()=>Object.keys(e.preserve.picked).filter(w=>e.preserve.picked[w]).sort().map(w=>"/"+Bn(w,et)),W=w=>"/"+Bn(w,et)+"/**",fe=w=>"!/"+Bn(w,et)+"/",de=()=>String(e.preserve.patterns||"").split(` -`).map(w=>w.trim()).filter(Boolean),ce=null,me=null,Ie=new Set,D=0,A=null,L=()=>!1;function Q(){let w=D+"\0"+e.preserve.patterns;if(w!==A){A=w;try{L=ja(Ha([...Fe(),...de()]))}catch{L=()=>!1}}return L}function H(w){let I=new Map([["",{dirs:[],files:[]}]]);for(let B of w){let j=B.split("/"),ue="";for(let ge=0;geI.startsWith(w+"/"))),ce.descendants.get(w)}let ae=w=>Q()(w);function te(w){let I=J(w),B=0;for(let j of I)ae(j)&&B++;return B===0?"none":B===I.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let w=(e.options?.preserveFiles||[]).map(I=>String(I).trim()).filter(Boolean).map(I=>Re(I)?yo(I.slice(1),et):I);return w.length?w.slice(0,2).join(", ")+(w.length>2?` and ${w.length-2} more`:""):"None. Every file is redacted."};async function oe(){let w=e.source?.commit;if(!(ce&&e.preserve.commit===w)){e.preserve.loading=!0,e.preserve.error="",ce=null,me=null;try{let I=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${I.owner}/${I.repo}/tree`,{params:{commit:w,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()}});if(e.source?.commit!==w)return;let j=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];ce=dn(H(B.data.files||[])),me=j.length?dn(H([...B.data.files||[],...j])):ce,Ie=dn(new Set(j)),e.preserve.commit=w,e.preserve.truncated=!!B.data.truncated,e.previewFile||Kt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",w=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&w&&e.sourceUrl&&oe().catch(()=>{})}),e.openPreserveFiles=()=>{let w={},I=[];for(let j of e.options?.preserveFiles||[]){let ue=String(j).trim();ue&&(!I.length&&Re(ue)?w[yo(ue.slice(1),et)]=!0:I.push(ue))}let B={};for(let j of Object.keys(w)){let ue=j.split("/");for(let ge=1;ge0}),e.mobileWorkspace&&(e.mobilePane="settings"),D++,d(()=>{let j=document.getElementById("preserve-files-dialog");j?.showModal&&!j.open&&j.showModal(),document.getElementById("preserve-files-search")?.focus()},0),oe()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ha([...Fe(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ce)return[];let w=Q(),I=(ge,Ke,Vt)=>{let bt=!!e.preserve.picked[ge],Yn=w(ge);return{kind:"file",path:ge,label:Vt,depth:Ke,state:Yn?"all":"none",locked:!bt&&Yn,note:!bt&&Yn?"matched by a pattern":bt&&!Yn?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return ce.files.filter(ge=>ge.toLowerCase().includes(B)).slice(0,300).map(ge=>I(ge,0,ge));let j=[],ue=(ge,Ke)=>{let Vt=ce.dirs.get(ge);for(let bt of Vt.dirs){let Yn=!!e.preserve.expanded[bt],xa=de().includes(W(bt));j.push({kind:"dir",path:bt,label:bt.slice(ge?ge.length+1:0)+"/",depth:Ke,open:Yn,state:te(bt),locked:!1,note:xa?"whole folder":""}),Yn&&ue(bt,Ke+1)}for(let bt of Vt.files)j.push(I(bt,Ke,bt.slice(ge?ge.length+1:0)))};return ue("",0),j},e.preserveCount=()=>ce?ce.files.filter(ae).length:0,e.togglePreserveDir=w=>{e.preserve.expanded[w]=!e.preserve.expanded[w]},e.togglePreserveFile=w=>{e.preserve.picked[w]=!e.preserve.picked[w],D++},e.togglePreserveFolder=w=>{let I=W(w),B=fe(w),j=de().filter(ge=>ge!==I&&ge!==B),ue=te(w)==="all"||de().includes(I);for(let ge of J(w))e.preserve.picked[ge]=!1;D++,e.preserve.patterns=(ue?j:[...j,I]).join(` -`),ue&&J(w).some(ae)&&(e.preserve.patterns=[...j,B].join(` -`))};let x=/^readme(\.[^/]*)?$/i,ke=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],pe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Ce=w=>{let I=K(w),B=I.indexOf("."),j=ke.indexOf(B===-1?"":I.slice(B).toLowerCase());return j===-1?ke.length:j},De=()=>!!ce&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!De())return"";for(let w of[".github","","docs"]){let I=(ce.dirs.get(w)?.files||[]).filter(B=>x.test(K(B)));if(I.length)return I.sort((B,j)=>Ce(B)-Ce(j)||z(B,j))[0]}return""},e.readmeName=()=>K(e.readmePath())||"README.md";let Me={key:null,fn:()=>!1},Ge=()=>{let w=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),I=w.join(` -`);if(I!==Me.key){let B=()=>!1;try{w.length&&(B=ja(w))}catch{}Me={key:I,fn:B}}return Me.fn};e.pathPreserved=w=>!!w&&Ge()(w),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let w=Ge();if(De()){let I=e.readmePath();return!!I&&w(I)}return pe.some(I=>w(I))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function ze(){let w={terms:e.terms?e.terms.split(` -`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(w.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);w.repoName=`${I.owner}/${I.repo}`}catch{}return w}function we(w,I,B){let j=null,ue=0,ge=()=>{if(e.detectedType!==w)return;j&&d.cancel(j);let Ke=++ue;e.previewStatus="loading",j=d(()=>{j=null;let Vt=I();if(!Vt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Vt).then(bt=>{Ke===ue&&(B(bt.data,Vt),e.previewStatus="ready")}).catch(()=>{Ke===ue&&(e.previewStatus="error")})},200)};return ge.cancel=()=>{ue++,j&&d.cancel(j),j=null},e.on("dispose",ge.cancel),ge}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof at!="string"?ft(e.previewFile):Kt()),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()};let be=dn(Vs(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),ma(be,e),Object.assign(be,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),be.preview=!0,be.fileSize=w=>w===be.filePath&&typeof at=="string"?new Blob([at]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let st=w=>Ie.has(w)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(w),rt=(w="")=>({path:w,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=rt();let yt=0,at=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=w=>{if(w=w||"",w&&w===e.readmePath()&&(w=""),yt++,at=null,Kn(),Kt.cancel(),e.previewFile=w,e.previewDoc=rt(w),be.sidebarCollapsed=!0,be.content=null,!w){e.readme?Kt():e.previewStatus="idle";return}if(st(w)){cr("binary"),e.previewStatus="ready";return}ft(w)};function lt(){yt++,at=null,e.previewFile="",e.previewDoc=rt(),be.sidebarCollapsed=!0,be.content=null}function ft(w){let I=++yt;at=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:w,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()},transformResponse:j=>j}).then(j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=typeof j.headers=="function"&&j.headers("content-type")||"";if(/json/i.test(ue)){let ge=null;try{ge=JSON.parse(j.data)}catch{}if(ge&&ge.binary===!0){cr("binary"),e.previewStatus="ready";return}}at=typeof j.data=="string"?j.data:"",Kt()},j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=ar(j);if(ue==="file_too_big"){cr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Wn.ERRORS[ue]||"GitHub did not return this file.",e.previewStatus="error"})}let _t;function Kn(){_t&&window.URL.revokeObjectURL(_t),_t=void 0,be.url=void 0}e.on("dispose",Kn);function cr(w){Kn(),e.previewDoc.note=w,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=w==="too_big"?"error":"binary",be.content=w==="too_big"?"file_too_big":"binary"}function Kp(w){try{let I=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",j=w&&w.includes("/")?w.slice(0,w.lastIndexOf("/")+1):"";return`https://github.com/${I.owner}/${I.repo}/raw/${B}/${j}`}catch{return""}}let Qa=we("repo",()=>e.previewFile?typeof at!="string"?null:{content:at,options:ze()}:e.readme?{content:e.readme,options:ze()}:null,w=>{if(typeof w?.content!="string")throw Error("Invalid preview response");Kn(),window.URL?.createObjectURL&&(be.url=_t=window.URL.createObjectURL(new Blob([w.content],{type:"text/plain"})));let I=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(I)),be.fileBaseUrl=Kp(I),be.renderFileContent(w.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=w.content)}),Kt=()=>{e.previewFile&&typeof at!="string"||Qa()};Kt.cancel=Qa.cancel;let wo=ot(new Map),pr=new Set,fr=new Set,xo="",es=null,xs=()=>String(e.terms||"").split(` -`).filter(w=>w.trim());function Yp(){es=null;let w=xs(),I=w.join(` -`);I!==xo&&(wo.clear(),fr.clear(),xo=I);let B=[...pr].filter(j=>!wo.has(j));if(pr.clear(),!(!B.length||!w.length))for(let j=0;j{if(xo!==I||xs().join(` -`)!==I)return;let Ke=ge.data?.contents;if(!Array.isArray(Ke)||Ke.length!==ue.length)throw Error("Invalid preview response");ue.forEach((Vt,bt)=>wo.set(Vt,typeof Ke[bt]=="string"?Ke[bt]:Vt))}).catch(()=>{xo===I&&ue.forEach(ge=>fr.add(ge))})}}e.previewName=w=>{if(!w||!xs().length)return w;if(xo===xs().join(` -`)){if(wo.has(w))return wo.get(w);if(fr.has(w))return w}return pr.add(w),es||(es=d(Yp,120)),w},e.previewPathName=w=>{w=String(w||"");let I=w.lastIndexOf("/");return I<0?e.previewName(w):e.previewName(w.slice(0,I))+"/"+e.previewName(w.slice(I+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{be.repoId=e.repoId||"repository",be.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),be.paths=be.filePath.split("/"),be.files=e.previewTreeFiles(),be.loadedFolders=Object.fromEntries([...me?.dirs.keys()||[]].map(w=>[e.previewName(w),!0]))},!0),e.on("dispose",()=>{es&&d.cancel(es)});function ko(){!e.anonymize||!e.anonymize.terms||Kt()}async function Ja(){let w=parseGithubUrl(e.sourceUrl),I=g();try{So();let B=await t.get(`/api/pr/${w.owner}/${w.repo}/${w.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=w.repo+"-PR"+w.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),No(B.data.error)),Y("sourceUrl","missing",!1),B}finally{k(I)}}let Co=ot(new Map);function Xp(){let w=new Set,I=e.details&&e.details.pullRequest;if(!I)return w;typeof I.title=="string"&&w.add(I.title),typeof I.body=="string"&&w.add(I.body),typeof I.diff=="string"&&w.add(I.diff);let B=I.comments||[];for(let j of B)typeof j.author=="string"&&w.add(j.author),typeof j.body=="string"&&w.add(j.body);return w}let Tn=we("pr",()=>{let w=Xp(),I=Array.from(w);return I.length===0?null:{contents:I,options:ze()}},(w,I)=>{if(!Array.isArray(w?.contents)||w.contents.length!==I.contents.length||w.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ueCo.set(ge,ue))});e.anonymizePrContent=function(w){return w&&(Co.has(w)?Co.get(w):"")};async function Za(){let w=parseGithubUrl(e.sourceUrl),I=g();try{So(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${w.gistId}`);if(!b(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+w.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!b(I))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Y("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Y("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),No(B.data.error)),Y("sourceUrl","missing",!1),B}finally{k(I)}}let Eo=ot(new Map);function Qp(){let w=new Set,I=e.details&&e.details.gist;if(!I)return w;typeof I.description=="string"&&w.add(I.description),typeof I.ownerLogin=="string"&&w.add(I.ownerLogin);let B=I.files||[];for(let ue of B)typeof ue.filename=="string"&&w.add(ue.filename),typeof ue.content=="string"&&w.add(ue.content);let j=I.comments||[];for(let ue of j)typeof ue.author=="string"&&w.add(ue.author),typeof ue.body=="string"&&w.add(ue.body);return w}let On=we("gist",()=>{let w=Qp(),I=Array.from(w);return I.length===0?null:{contents:I,options:ze()}},(w,I)=>{if(!Array.isArray(w?.contents)||w.contents.length!==I.contents.length||w.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ueEo.set(ge,ue)),hr()});e.anonymizeGistContent=function(w){return w&&(Eo.has(w)?Eo.get(w):"")},e.previewGistFiles=[];function hr(){let w=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=w.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",hr,!0),e.watch("terms",hr);function Jp(){let w=e.conference;if(e.conference_data=null,!w)return;let I=w===m||e.isUpdate&&w===e._originalConference;w!==m&&(m=null),t.get("/api/conferences/"+w).then(B=>{e.conference===w&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===w&&(e.conference_data=null)})}function So(){Y("repoId","used",!0),Y("repoId","format",!0),Y("pullRequestId","used",!0),Y("pullRequestId","format",!0),Y("gistId","used",!0),Y("gistId","format",!0),Y("sourceUrl","used",!0),Y("sourceUrl","missing",!0),Y("sourceUrl","access",!0),Y("sourceUrl","github",!0),Y("commit","exists",!0),Y("conference","activated",!0),Y("terms","format",!0),e.termHints=[]}function ei(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let w=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||w&&w.invalid?(w&&w.setDirty&&w.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function No(w){let I=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(w){case"repoId_already_used":Y(I,"used",!1);break;case"invalid_repoId":Y(I,"format",!1);break;case"options_not_provided":Y(I,"format",!1);break;case"repo_already_anonymized":Y("sourceUrl","used",!1);break;case"invalid_terms_format":Y("terms","format",!1);break;case"repo_not_found":Y("sourceUrl","missing",!1);break;case"repo_not_accessible":Y("sourceUrl","access",!1);break;case"commit_not_found":Y("commit","exists",!1);break;case"conf_not_activated":Y("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let w=(e.coauthorSearch||"").trim();if(e.coauthorError="",w.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:w}}).then(I=>{let B=new Set((e.coauthors||[]).map(j=>(j.username||"").toLowerCase()));e.coauthorResults=(I.data||[]).filter(j=>!B.has((j.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(w,I)=>{I&&I.preventDefault(),!(!w||!w.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:w.username}).then(B=>{e.coauthors=B.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},B=>{let j=B&&B.data&&B.data.error||"unknown_error";e.coauthorError=j})},e.removeCoauthor=w=>{!w||!w.username||confirm("Remove co-author "+w.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(w.username)).then(I=>{e.coauthors=I.data||[]},I=>{let B=I&&I.data&&I.data.error||"unknown_error";e.coauthorError=B})},e.anonymizeRepo=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(e.reconnectingSource&&!e.reconnectRepositoryId)return;if(ei()){e.editRepository();return}if(e.anonymize?.invalid||e.sourceUrlError){e.editRepository(),e.error="Please correct the highlighted fields before saving.";return}if(e.hostingNeedsPayment()&&e.options.expirationMode==="never"){e.hostingReview=!0,tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}));return}let I=w.currentTarget||w.target.closest?.("button")||w.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={repoId:e.repoId,terms:e.terms.trim().split(` -`).filter(ge=>ge),connection:e.githubConnection,fullName:`${B.owner}/${B.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(j.options.pageSource=e.details.pageSource),So();let ue=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ge=>{if(ge.data){let Ke=["quota_exceeded","subscription_required_for_never_expiration"].includes(ge.data.error);Ke||r("ERRORS."+ge.data.error).then(Vt=>{e.error=Vt},console.error),No(ge.data.error),Ke&&(ge.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{I.disabled=!1})},e.anonymizeGist=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=w.currentTarget||w.target.closest?.("button")||w.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={gistId:e.gistId,terms:e.terms.trim().split(` -`).filter(ge=>ge),source:{gistId:B.gistId},options:e.options,conference:e.conference};So();let ue=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ge=>{ge.data&&(r("ERRORS."+ge.data.error).then(Ke=>{e.error=Ke},console.error),No(ge.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=w.currentTarget||w.target.closest?.("button")||w.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(` -`).filter(ge=>ge),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};So();let ue=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ge=>{ge.data&&(r("ERRORS."+ge.data.error).then(Ke=>{e.error=Ke},console.error),No(ge.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Jp()}),e.termHints=[],e.matchTermAsWritten=w=>{e.terms=Rc(e.terms,w)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Kt()}),e.watch("terms",()=>{e.termHints=Nc(e.terms),e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("details",()=>{e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()},!0)},Ka=function(e,t,o,i,s,r){ma(e);let d=Rt();Pc();let c=Ut(),u=0,y=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){y&&(y.resolve(),y=null),h&&(d.timeout.cancel(h),h=null)}let g=!1;e.on("dispose",()=>{g=!0,u++,b(),k&&k.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,c(document,"click",O=>{e.symbolsOpen&&!O.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!O.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!O.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&O.target.isConnected&&!O.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!O.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!O.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),c(document,"keydown",O=>{O.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(O.ctrlKey||O.metaKey)&&!O.altKey&&O.key&&O.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(O.preventDefault(),e.toggleMdFind(!0))}),c(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var U=document.querySelector(".tree-search-input");U&&(U.focus(),U.select())}});var k=null;e.onFileSearchChange=function(){k&&(k.resolve(),k=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let U=r.defer();k=U,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:U.promise}).then(function(C){if(!(g||k!==U)){k=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(Fe){q[(Fe.path||"")+"/"+Fe.name]=!0});for(var z=[],K={},ie=0;ie0&&e.files.push.apply(e.files,z);for(var Je=[],He=0;He0&&e.files.push.apply(e.files,Je),e.fileSearchResults=C.data}},function(){!g&&k===U&&(k=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(O,U){if(e.repoId!=i.repoId)return X();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(C=>C&&C.trim().length>0),ee();for(let C=0;C0?e.paths.slice(0,C).join("/"):"";e.files.some(K=>K.path===q)||e.getFiles(q)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(U[q.name.toLowerCase()]=q.name);let C=null;for(let q of O)if(U[q]){C=q;break}if(!C&&Object.keys(U).length>0&&(C=Object.keys(U)[0]),C){let q=o.url();q[q.length-1]!="/"&&(q+="/"),o.url(q+encodePathForUrl(U[C]))}}e.fileCounts=null;let S=0,N=new Set,m=!1;e.getFiles=function(O,U=!1){let C=e.repoId,q=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(z){if(g||C!==e.repoId||q!==S)return[];let K=O||"";return e.files=e.files.filter(ie=>ie.path!==K),e.files.push(...z.data),e.loadedFolders={...e.loadedFolders,[K]:!0},E(K,q),z.data},function(z){if(g||C!==e.repoId||q!==S)return[];U||(e.type="error",e.content=ar(z),e.files=[])})};function E(O,U){if(m||N.has(O))return;N.add(O);let C=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(O)}`).then(function(q){g||C!==e.repoId||U!==S||(e.fileCounts={...e.fileCounts,...q.data})},function(){g||C!==e.repoId||U!==S||(m=!0)})}function M(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var _=null;e.on("dispose",function(){_&&d.interval.cancel(_)});function V(O){if(g)return;let U=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(C=>{if(!(g||U!==e.repoId)){if(e.options=C.data,e.options.url){window.location=e.options.url;return}O&&O(C.data)}},C=>{if(!(g||U!==e.repoId)){var q=C.data||{};if(q.error==="rate_limited"&&q.resetAt){let K=function(){var ie=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ie<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,_&&(d.interval.cancel(_),_=null),V(O);else{var ne=Math.floor(ie/60),Y=ie%60;e.rateLimitCountdown=ne>0?ne+"m "+Y+"s":Y+"s"}};var z=K;e.type="rate_limited",e.rateLimitResetAt=q.resetAt,_&&d.interval.cancel(_),K(),_=d.interval(K,1e3)}else q.error==="repository_not_ready"?(e.type="loading",d.timeout(function(){V(O)},3e3)):(e.type="error",e.content=ar(C))}})}function G(O,U){let C=u;if(!O){e.type="error",e.content="no_file_selected";return}let q=e.type;(q==="code"||q==="text")&&ni().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let z=r.defer();y=z,h=d.timeout(()=>{!g&&C===u&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let K=U&&U.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(O)}?v=`+K,{timeout:z.promise,onDownloadProgress:ie=>{!g&&C===u&&(e.fileReceivedBytes=ie)},transformResponse:ie=>ie}).then(ie=>{g||C!==u||(b(),e.renderFileContent(ie.data,q,o.url()+"/../",ie.headers("content-type")))},ie=>{g||C!==u||(b(),e.type="error",e.content=ar(ie))})}function ee(){u++,b(),e.content="",e.file=M();let O="0";e.file&&e.file.sha&&(O=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${O}`;let U=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);if(e.fileBaseUrl=`/api/repo/${e.repoId}/file/${U?encodePathForUrl(U):""}`,e.showSource=!1,e.imageSize="",e.allowScripts=!1,e.prepareFile(e.filePath),e.type=="pdf"){e.content="pdf";return}if(e.type=="media"||e.type=="audio"){e.content=e.type;return}G(e.filePath,e.file)}e.isSourceAccessError=()=>["repo_not_found","token_expired","github_app_access_required","github_app_reconnect_required","repo_saml_enforcement","repo_access_limited"].includes(e.content),e.retryContent=()=>X();function X(){u++,b(),e.files=[],e.loadedFolders={},e.content=null,e.fileCounts=null,S++,N=new Set,m=!1,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=i.repoId,e.type="loading",e.filePath=i.path||"",e.paths=e.filePath.split("/");let O=e.repoId;V(function(U){if(e.filePath){ee();let q=[...new Set(e.paths.map((z,K)=>e.paths.slice(0,K).join("/")))];r.all(q.map(z=>e.getFiles(z,!0)));return}var C=r.resolve();for(let q=0;q0?e.paths.slice(0,q).join("/"):"";C=C.then(function(){return e.getFiles(z)}).then(function(){if(e.type==="error")return r.reject("error")})}C.then(function(){g||O!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(R(),ee()))})})}X()},$c=function(e,t,o,i,s){async function r(u){t.get(`/api/pr/${e.pullRequestId}/options`).then(y=>{if(e.options=y.data,e.options.url){window.location=e.options.url;return}u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}async function d(u){t.get(`/api/pr/${e.pullRequestId}/content`).then(y=>{e.details=y.data,e.tabState={active:y.data.diff?"diff":"comments"},u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}function c(){e.pullRequestId=i.pullRequestId,e.type="loading",r(u=>{d()})}c()},Lc=function(e,t,o,i,s){async function r(u){t.get(`/api/gist/${e.gistId}/options`).then(y=>{if(e.options=y.data,e.options.url){window.location=e.options.url;return}u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}async function d(u){t.get(`/api/gist/${e.gistId}/content`).then(y=>{e.details=y.data;let h=y.data&&y.data.files&&y.data.files.length;e.tabState={active:h?"files":"comments"},u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}function c(){e.gistId=i.gistId,e.type="loading",r(()=>{d()})}c()},Fc=function(e,t,o){e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.loading=!0,e.error="",e.search="";let i="conferences.filterPrefs",s={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},r=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},s.filters.status,r.filters&&r.filters.status||{})},e.orderBy=r.orderBy||s.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(d){if(!d.removing&&confirm(`Are you sure that you want to remove the conference ${d.name}? All the repositories linked to this conference will expire.`)){d.removing=!0;let c=ot({title:`Removing ${d.name}...`,date:new Date,body:`The conference ${d.name} is going to be removed.`});e.addToast(c),t.delete(`/api/conferences/${d.conferenceID}`).then(()=>{c.title=`${d.name} is removed.`,c.body=`The conference ${d.name} is removed.`,e.loadConferences()}).catch(()=>{c.title="Unable to remove conference",c.body="Please try again. The conference has not been removed."}).finally(()=>{d.removing=!1})}},e.loadConferences=()=>(e.loading=!0,e.error="",t.get("/api/conferences/").then(d=>{e.conferences=d.data||[]},d=>{e.error="Unable to load your conferences. Please try again."}).finally(()=>{e.loading=!1})),e.loadConferences(),e.conferenceFilter=d=>{if(e.filters.status[d.status]==!1)return!1;let c=e.search.trim().toLowerCase();return!!(!c||(d.name||"").toLowerCase().includes(c)||(d.conferenceID||"").toLowerCase().includes(c))}},Ya=function(e,t,o,i){e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/");let s=()=>{for(let[g,k,R]of[["startDate","Starts","startDate"],["endDate","Ends","endDate"]]){let S=document.getElementById(g);if(!S)continue;let N=S.parentElement.querySelector(":scope > .date-echo");N||(N=document.createElement("p"),N.className="date-echo",N.setAttribute("aria-live","polite"),S.insertAdjacentElement("afterend",N));let m=ya(e.options?.[R]);N.textContent=m?k+" "+m:"",N.hidden=!m}};typeof e.watchGroup=="function"&&e.watchGroup(["options.startDate","options.endDate"],()=>tt(s));let r=(g=20)=>{let k=document.querySelector("input#name.form-control"),R=document.querySelector("input#conferenceID.form-control");R&&(R.placeholder="e.g. ICSE27"),k?k.placeholder="e.g. ICSE 2027":g>0&&setTimeout(()=>r(g-1),50)};setTimeout(()=>r(),0),e.plans=[],e.plansLoaded=!1,e.conferenceBilling=null,Wi(t).then(g=>{e.conferenceBilling=g.data}).catch(()=>{}),e.conferenceTiers=()=>e.plans.filter(g=>g.id!=="free_conference").map(g=>{let k=(e.conferenceBilling?.plans||[]).find(R=>R.id===g.id)||{};return{...g,storage:g.storagePerRepo,...k,id:g.id,name:g.name}}),e.conferenceAudience=g=>({conference_workshop:"Workshops and small venues",conference:"A typical conference",conference_large:"Large or multi-track venues"})[g]||"",e.conferencePlanName=g=>Uc(g),e.conferenceAmount=(g,k=g?.amount)=>new Intl.NumberFormat(void 0,{style:"currency",currency:g?.currency||"eur",minimumFractionDigits:k%100?2:0,maximumFractionDigits:2}).format(k/100),e.conferenceBytes=g=>{let k=Number(g)||0,R=Math.min(4,Math.floor(Math.log2(Math.max(k,1))/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(k/1024**R)} ${["B","KB","MB","GB","TB"][R]}`},e.editionMode=!1,e.saving=!1,e.error="";function d(){return t.get("/api/conferences/"+i.conferenceId).then(g=>{e.options={...e.options,...g.data,billing:g.data.billing||{}},e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}i.conferenceId&&(e.editionMode=!0,d());function c(){t.get("/api/conferences/plans").then(g=>{e.plans=g.data,e.plansLoaded=!0,!e.editionMode&&e.plans.length&&!e.plans.some(k=>k.id==e.options.plan.planID)&&(e.options.plan.planID=(e.plans.find(k=>k.id==="conference")||e.plans[0]).id),e.plan=e.plans.filter(k=>k.id==e.options.plan.planID)[0]})}c();let u=new Date;u.setDate(1),u.setMonth(u.getMonth()+1);let y=new Date(u);y.setTime(u.getTime()+179*864e5),e.options={billing:{},startDate:u,endDate:y,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(g=>g.id==e.options.plan.planID)[0]});function h(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function b(g){switch(g){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){if(e.saving)return;e.saving=!0,e.error="";let g=JSON.parse(JSON.stringify(e.options)),k=ot({title:`Creating ${g.name}...`,date:new Date,body:`The conference ${g.conferenceID} is in creation.`});e.editionMode&&(k.title=`Updating ${g.name}...`,k.body=`The conference '${g.conferenceID}' is updating.`),e.addToast(k),h(),t.post("/api/conferences/"+(e.editionMode?g.conferenceID:""),g).then(()=>{e.editionMode?(k.title=`${g.name} updated`,k.body=`The conference '${g.conferenceID}' is updated.`):(k.title=`${g.name} created`,k.body=`The conference '${g.conferenceID}' is created.`),o.url("/conference/"+g.conferenceID)},R=>{b(R.data?.error),e.error="Unable to save the conference. Please correct any highlighted fields and try again.",e.removeToast(k)}).finally(()=>{e.saving=!1})}};function Uc(e){return{free_conference:"Free (no longer offered to new conferences)",conference_workshop:"Workshop package",conference:"Conference package",conference_large:"Large conference package",premium_conference:"Premium (legacy)",unlimited_conference:"Unlimited (legacy)"}[e]||e||"Free"}var Bc=function(e,t,o,i){Ki(e,t,()=>c(),{confirmedMessage:"Payment status checked. Your conference is ready for submissions once payment is confirmed."}),e.conferencePlanName=u=>Uc(u),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,preparing:!0,error:!0,expired:!0,removed:!1}},e.orderBy="-anonymizeDate";let s=Xi,r=["ready","preparing","error","expired","removed"],d={current:u=>u!=="removed",attention:u=>u==="error",removed:u=>u==="removed"};e.confView=()=>Object.keys(d).find(u=>r.every(y=>d[u](y)===(e.filters.status[y]!==!1)))||"custom",e.setConfView=u=>{r.forEach(y=>{e.filters.status[y]=(d[u]||d.current)(y)})},e.confCount=u=>(e.conference?.repositories||[]).filter(y=>d[u](s(y.status))).length,e.copyingId=null,e.copyRepoLink=async u=>{if(!u?.repoId||e.copyingId)return;let y=new URL("/r/"+u.repoId+"/",window.location.origin).href;e.copyingId=u.repoId;try{await Wa(y),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:y})}finally{e.copyingId=null}},e.extendingId=null,e.extendRepo=u=>{!u?.repoId||e.extendingId||(e.extendingId=u.repoId,t.post("/api/repo/"+u.repoId+"/extend").then(y=>{let h=y?.data?.expirationDate?` until ${new Date(y.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";e.addToast({title:`${u.repoId} is extended.`,body:`Reviewers can open it again${h}.`}),u.status="ready",y?.data?.expirationDate&&(u.options={...u.options||{},expirationDate:y.data.expirationDate}),e.extendingId=null},y=>{let h=y?.status||y?.data?.status;e.addToast({title:`Couldn't extend ${u.repoId}.`,body:h===401||h===403?"Only the repository's authors can extend this link. Ask them to extend it from My work.":"Try again in a moment."}),e.extendingId=null}))},e.repoFiler=u=>{if(e.filters.status[s(u.status)]==!1)return!1;let y=e.search.trim().toLowerCase();return!!(!y||(u.source?.fullName||"").toLowerCase().includes(y)||(u.repoId||"").toLowerCase().includes(y))};function c(){t.get("/api/conferences/"+i.conferenceId).then(u=>{e.conference=u.data})}c()},zc=function(e,t){e.notificationEmail="",e.emailSaved=!1,e.saveNotificationEmail=async()=>{e.busy=!0,e.emailSaved=!1,e.connectionError="";try{let o=await t.post("/github/connections/email",{email:e.notificationEmail},{headers:{"X-CSRF-Token":e.connections.csrf}});e.notificationEmail=o.data.notificationEmail,e.user&&(e.user.notificationEmail=o.data.notificationEmail),e.emailSaved=!0}catch(o){e.connectionError=o.data?.error||"Unable to save email address."}finally{e.busy=!1}},e.connections=null,e.connectionError="",e.busy=!1,e.loadConnections=()=>t.get("/github/connections").then(o=>{e.connections=o.data,e.notificationEmail=o.data.notificationEmail||""}).catch(o=>{e.connectionError=o.data?.error||"Unable to load connections."}),e.changeConnection=async(o,i,s)=>{e.busy=!0,e.connectionError="";try{let r=await t.post("/github/connections/migrate",{type:o.type,id:o.id,connection:i,preview:s},{headers:{"X-CSRF-Token":e.connections.csrf}});s?o.eligible=r.data.eligible:await e.loadConnections()}catch(r){e.connectionError=r.data?.error||"Unable to change connection."}finally{e.busy=!1}},e.disconnectOAuth=async()=>{e.busy=!0;try{await t.post("/github/connections/disconnect-oauth",{},{headers:{"X-CSRF-Token":e.connections.csrf}}),await e.loadConnections()}catch(o){e.connectionError=o.data?.error||"Unable to disconnect OAuth."}finally{e.busy=!1}},e.loadConnections()},Hc=function(e,t){e.accountRecovery=!1,t.get("/github/account-recovery").then(o=>{e.accountRecovery=o.data.required}).catch(()=>{})};typeof document<"u"&&document.addEventListener("scroll",e=>{let t=e.target;!t||!t.classList||!t.classList.contains("repo-picker-list")||t.classList.toggle("is-end",t.scrollTop+t.clientHeight>=t.scrollHeight-2)},!0);var jc=[{path:"/review-link",template:"partials/reviewConsent.htm",title:"Artifact consent \u2013 Anonymous GitHub",setup:(e,t)=>sl(e,t)},{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>zc(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Hc(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>_c(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Vc(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>dr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>dr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>dr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>qc(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fc(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ya(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ya(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bc(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oc(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ic(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Mc(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>$c(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Lc(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Ka(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Ka(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>zu(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>qu(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>$u(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Lu(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fu(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Uu(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bu(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var fv={class:"container py-4",style:{"max-width":"48rem","overflow-wrap":"anywhere"}},hv={key:0},mv={key:1,role:"alert"},gv={key:2,role:"status"},vv={key:0},yv={key:1},bv=["disabled"],wv=["disabled"],kv=["disabled"],Cv={key:5,class:"mt-4","aria-labelledby":"review-policy-title"},Ev={id:"review-policy-title"},Sv={key:0,role:"alert"},Nv=["disabled"],Rv=["disabled"],Dv=["disabled"],Pv={key:6,role:"status"};function Gc(e,t){return a(),l("section",fv,[t[12]||(t[12]=n("a",{href:"/"},"Anonymous GitHub",-1)),t[13]||(t[13]=n("h1",{class:"mt-3"},"Approve artifact access",-1)),t[14]||(t[14]=n("p",null,"This records your approval as the repository owner or an authorized co-author.",-1)),e.user?.username?f("v-if",!0):(a(),l("p",hv,[...t[6]||(t[6]=[v("Sign in first, then reopen the artifact link from your submission. ",-1),n("a",{href:"/signin"},"Sign in",-1)])])),e.error?(a(),l("p",mv,p(e.error),1)):f("v-if",!0),e.saved?(a(),l("p",gv,[t[7]||(t[7]=v("Consent recorded. ",-1)),e.handoffEnabled?(a(),l("span",vv,"Continue to review to finish linking.")):(a(),l("span",yv,"Artifact linking is not complete. Return to your submission to check its status."))])):f("v-if",!0),e.saved&&e.handoffEnabled?(a(),l("button",{key:3,class:"btn btn-primary",type:"button",onClick:t[0]||(t[0]=(...o)=>e.continueReview&&e.continueReview(...o)),disabled:e.busy},"Continue to review",8,bv)):f("v-if",!0),e.user?.username&&!e.saved?(a(),l("form",{key:4,onSubmit:t[2]||(t[2]=le((...o)=>e.loadPreview&&e.loadPreview(...o),["prevent"]))},[t[8]||(t[8]=n("label",{for:"review-repository"},"Anonymous repository ID",-1)),T(n("input",{id:"review-repository",class:"form-control","onUpdate:modelValue":t[1]||(t[1]=o=>e.repositoryId=o),maxlength:"128",autocomplete:"off",disabled:e.busy||e.uncertain,"aria-describedby":"review-repository-help"},null,8,wv),[[pt,e.repositoryId]]),t[9]||(t[9]=n("p",{id:"review-repository-help"},"Use the ID after /r/ in the anonymous repository URL.",-1)),n("button",{type:"submit",class:"btn btn-primary",disabled:e.busy||e.uncertain},"Preview access and retention",8,kv)],32)):f("v-if",!0),e.preview&&!e.saved?(a(),l("section",Cv,[n("h2",Ev,p(e.preview.repositoryName),1),n("p",null,"Access: "+p(e.preview.policy.access==="anonymous-link"?"Anyone with the anonymous link":"Restricted review access")+".",1),n("p",null,"Retain until "+p(e.preview.policy.retainUntil)+". Policy version "+p(e.preview.policy.version)+".",1),e.expired?(a(),l("p",Sv,"This preview expired. Open a new artifact link from your submission.")):f("v-if",!0),n("div",null,[n("label",null,[T(n("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=o=>e.acceptAccess=o),disabled:e.busy||e.uncertain||e.expired},null,8,Nv),[[oa,e.acceptAccess]]),t[10]||(t[10]=v(" I approve the access policy above.",-1))])]),n("div",null,[n("label",null,[T(n("input",{type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=o=>e.acceptRetention=o),disabled:e.busy||e.uncertain||e.expired},null,8,Rv),[[oa,e.acceptRetention]]),t[11]||(t[11]=v(" I approve retention until the date above.",-1))])]),n("button",{class:"btn btn-primary",type:"button",onClick:t[5]||(t[5]=(...o)=>e.confirmConsent&&e.confirmConsent(...o)),disabled:e.busy||e.expired||!e.acceptAccess||!e.acceptRetention},p(e.uncertain?"Retry confirmation":"Confirm consent"),9,Dv)])):f("v-if",!0),e.busy?(a(),l("p",Pv,"Waiting for the server\u2026")):f("v-if",!0)])}var Av={class:"container paper-page connections-page"},Tv={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},Ov={key:1,role:"status"},Iv=["disabled"],Mv={key:3},_v={key:0,class:"connection-resources"},Vv=["disabled"],qv=["disabled"],$v={key:0,role:"status"},Lv={class:"connections-grid"},Fv={key:0},Uv={class:"connection-title"},Bv={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},zv={class:"connection-actions"},Hv={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},jv=["disabled"],Gv={key:1,class:"connection-installations"},Wv={key:0},Kv=["href"],Yv={class:"sr-only"},Xv={class:"connection-title"},Qv={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},Jv={key:1,class:"connection-revoke"},Zv={key:0},xv=["disabled"],ey={class:"connection-resources"},ty={class:"connection-title"},ny={class:"connection-count"},oy={key:0,class:"connection-empty"},sy={class:"connection-resource-name"},iy={key:0,class:"connection-resource-actions"},ry=["disabled","onClick"],ay=["disabled","onClick"],ly={key:1,class:"connection-help",role:"status"},dy=["disabled","onClick"];function Wc(e,t){return a(),l("div",Av,[t[27]||(t[27]=Se('
My work \xA0/\xA0 GitHub connections

GitHub connections

Manage how GitHub shares your code. Your anonymizations and URLs stay the same.

',2)),e.connectionError?(a(),l("p",Tv,p(e.connectionError),1)):f("v-if",!0),!e.connections&&!e.connectionError?(a(),l("p",Ov,"Loading your connections\u2026")):f("v-if",!0),!e.connections&&e.connectionError?(a(),l("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=o=>e.loadConnections())},"Try again",8,Iv)):f("v-if",!0),e.connections?(a(),l("div",Mv,[e.connections.emailNotificationsEnabled?(a(),l("section",_v,[t[6]||(t[6]=n("h2",null,"Email alerts",-1)),t[7]||(t[7]=n("p",null,"We will email you if your GitHub connection stops working or a repository becomes inaccessible. Your address is never shown on anonymous pages.",-1)),n("form",{onSubmit:t[2]||(t[2]=le(o=>e.saveNotificationEmail(),["prevent"]))},[t[5]||(t[5]=n("label",{for:"notification-email"},"Email address",-1)),T(n("input",{id:"notification-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[1]||(t[1]=o=>e.notificationEmail=o),disabled:e.busy},null,8,Vv),[[pt,e.notificationEmail]]),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.busy},"Save email address",8,qv),e.emailSaved?(a(),l("p",$v,"Email address saved.")):f("v-if",!0)],32)])):f("v-if",!0),n("div",Lv,[e.connections.appEnabled?(a(),l("section",Fv,[t[15]||(t[15]=n("div",{class:"connection-top"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",{class:"connection-badge"},"Recommended")],-1)),n("div",Uv,[t[8]||(t[8]=n("h2",null,"GitHub App",-1)),n("span",{class:P(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},p(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[16]||(t[16]=n("p",null,"Read-only access to gists and the repositories you choose.",-1)),e.connections.appError?(a(),l("p",Bv,p(e.connections.appError)+". Reconnect to restore access.",1)):f("v-if",!0),n("div",zv,[e.connections.appConnected&&!e.connections.appError?(a(),l("a",Hv,[...t[9]||(t[9]=[v("Manage repository access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),n("a",{class:P(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},p(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3),e.connections.appConnected?(a(),l("button",{key:1,class:"connection-link connection-refresh",title:"Refresh access",disabled:e.busy,onClick:t[3]||(t[3]=o=>e.loadConnections())},[...t[10]||(t[10]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),n("span",{class:"sr-only"},"Refresh access",-1)])],8,jv)):f("v-if",!0)]),t[17]||(t[17]=n("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(a(),l("ul",Gv,[(a(!0),l(F,null,se(e.connections.installations,o=>(a(),l("li",{key:o.id},[n("div",null,[t[11]||(t[11]=n("span",{class:"connection-label"},"Installed on",-1)),t[12]||(t[12]=v()),n("strong",null,p(o.account),1),o.suspended?(a(),l("span",Wv," \xB7 Suspended")):f("v-if",!0)]),e.connections.installations.length>1?(a(),l("a",{key:0,target:"_self",href:"/github/app/install?installationId="+o.id},[t[13]||(t[13]=v("Manage access ",-1)),n("span",Yv,"for "+p(o.account),1),t[14]||(t[14]=v(" \u2192",-1))],8,Kv)):f("v-if",!0)]))),128))])):f("v-if",!0)])):f("v-if",!0),n("section",null,[t[20]||(t[20]=n("div",{class:"connection-top"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),n("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),n("div",Xv,[t[18]||(t[18]=n("h2",null,"GitHub OAuth",-1)),n("span",{class:P(["connection-status",{"is-connected":e.connections.oauthConnected}])},p(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[21]||(t[21]=n("p",null,"For existing OAuth anonymizations.",-1)),t[22]||(t[22]=n("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(a(),l("a",Qv,p(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):f("v-if",!0),e.connections.oauthConnected?(a(),l("div",Jv,[e.connections.gistCount?(a(),l("p",Zv,p(e.connections.gistCount)+" gist(s) use your GitHub App connection when available.",1)):f("v-if",!0),t[19]||(t[19]=n("p",null,"Switch all dependent repositories before revoking access. Gists can use your GitHub App connection.",-1)),e.connections.appConnected?(a(),l("button",{key:1,class:"btn btn-sm btn-outline-danger connection-danger",disabled:e.busy||e.connections.resources.some(o=>o.connection==="oauth"),onClick:t[4]||(t[4]=o=>e.disconnectOAuth())},"Revoke OAuth access",8,xv)):f("v-if",!0)])):f("v-if",!0)])]),n("section",ey,[n("div",ty,[t[23]||(t[23]=n("h2",null,"Repository connections",-1)),n("span",ny,p(e.connections.resources?.length||0)+" "+p((e.connections.resources?.length||0)===1?"resource":"resources"),1)]),t[25]||(t[25]=n("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?f("v-if",!0):(a(),l("div",oy,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),n("div",null,[n("h3",null,"No repository connections yet"),n("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),n("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(a(!0),l(F,null,se(e.connections.resources,o=>(a(),l("div",{class:"connection-resource",key:o.type+o.id},[n("div",sy,[n("strong",null,p(o.name||o.id),1),n("small",null,p(o.type)+" \xB7 "+p(o.id),1)]),n("span",{class:P(["connection-badge",{"connection-badge-muted":o.connection==="oauth"}])},p(o.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","removing","expiring"].includes(o.status)&&(o.status!=="download"||o.type==="pull-request"&&(!o.statusDate||new Date(o.statusDate).getTime()<=Date.now()-3e5))&&e.connections.appEnabled&&e.connections.appConnected?(a(),l("div",iy,[n("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:i=>e.changeConnection(o,"github-app",!0)},"Check read-only access",8,ry),o.eligible?(a(),l("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:i=>e.changeConnection(o,"github-app",!1)},p(o.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,ay)):f("v-if",!0),o.eligible===!1?(a(),l("span",ly,"Access unavailable. Allow this repository on GitHub, then check again.")):f("v-if",!0)])):f("v-if",!0),!["archived","removed","preparing","queue","removing","expiring"].includes(o.status)&&(o.status!=="download"||o.type==="pull-request"&&(!o.statusDate||new Date(o.statusDate).getTime()<=Date.now()-3e5))&&o.connection==="github-app"&&e.connections.oauthConnected?(a(),l("button",{key:1,class:"connection-link",disabled:e.busy,onClick:i=>e.changeConnection(o,"oauth",!1)},"Use OAuth",8,dy)):f("v-if",!0)]))),128)),t[26]||(t[26]=n("p",{class:"connection-footnote"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),v(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):f("v-if",!0)])}var uy={class:"container paper-page auth-page"},cy={class:"auth-layout"},py={class:"auth-options"},fy={key:0},hy={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},my={key:1},gy={key:1,class:"auth-card"},vy={key:2,class:"auth-legacy"},yy={key:3,role:"status"};function Kc(e,t){let o=Xe("partial-view");return a(),l(F,null,[n("div",uy,[n("div",cy,[t[4]||(t[4]=Se('
Your research, ready for review

Your code.
Your identity,
protected.
Sign in to GitHub

Sign in to create and manage your anonymizations.

',1)),n("div",py,[e.accountRecovery?(a(),l("section",fy,[t[0]||(t[0]=n("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=n("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(a(),l("a",hy,"Verify with previous GitHub connection")):(a(),l("p",my,"Account verification is currently unavailable. Please try again later."))])):f("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(a(),l("section",gy,[...t[2]||(t[2]=[Se('

Continue with GitHub

Connect through the GitHub App with read-only repository access.

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHubYour existing anonymizations and connections stay with your account.',5)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(a(),l("section",vy,[...t[3]||(t[3]=[n("div",{class:"connection-title"},[n("h2",null,"Continue with GitHub")],-1),n("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),n("a",{class:"connection-link",target:"_self",href:"/github/login"},[v("Sign in with GitHub "),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})])],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(a(),l("p",yy,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])]),Oe(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}function Yc(e,t){let o=Xe("partial-view");return a(),l(F,null,[t[0]||(t[0]=Se('
Error \xB7 404

This link
isn\u2019t here.

The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it.

',1)),Oe(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}var by={class:"container paper-page admin-page"},wy={class:"seg-bar"},ky={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},Cy=["aria-checked"],Ey={class:"count"},Sy=["aria-checked"],Ny={class:"count"},Ry=["aria-checked"],Dy={class:"count"},Py=["aria-checked"],Ay={class:"count"},Ty=["aria-checked"],Oy={class:"count"},Iy=["aria-checked"],My={class:"count"},_y={class:"seg-countline",role:"status"},Vy={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},qy={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},$y={class:"admin-filter-row"},Ly={class:"search-wrap"},Fy={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},Uy={key:0,class:"admin-search-hint"},By={key:1,class:"admin-filter-inline","aria-label":"Pagination"},zy=["disabled"],Hy={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},jy=["disabled"],Gy={key:0,class:"admin-filter-row"},Wy={class:"admin-active-chips"},Ky={class:"key"},Yy=["onClick"],Xy={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},Qy={key:0,class:"paper-table-head",role:"row"},Jy={role:"columnheader"},Zy={role:"columnheader"},xy={role:"columnheader"},eb={class:"paper-table-row",role:"row"},tb={class:"cell-anon",role:"cell"},ob={class:"anon-text"},sb=["textContent","href"],ib={class:"anon-sub"},rb={class:"cell-status",role:"cell"},ab=["textContent"],lb={class:"cell-views num",role:"cell"},db=["textContent","href"],ub={class:"cell-expires",role:"cell"},cb={class:"cell-actions",role:"cell"},pb={class:"dropdown"},fb={class:"dropdown-menu dropdown-menu-right"},hb=["href"],mb=["href"],gb=["href"],vb=["onClick"],yb={key:1,class:"paper-table-empty"},bb={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},wb={key:0,class:"pagination-compact"},kb=["disabled"],Cb=["max"],Eb=["disabled"],Sb={class:"admin-filter-inline"},Nb={class:"form-control form-control-sm"};function Xc(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",by,[t[55]||(t[55]=Se('
Admin \xA0/\xA0 Conferences

Conferences

',3)),n("div",wy,[n("div",ky,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=s=>e.setSegView("all"))},[t[14]||(t[14]=v("All ",-1)),n("span",Ey,p(e.fmt?.number(e.segCount("all"))),1)],10,Cy),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=s=>e.setSegView("ready"))},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=v("Ready ",-1)),n("span",Ny,p(e.fmt?.number(e.segCount("ready"))),1)],10,Sy),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=s=>e.setSegView("preparing"))},[t[17]||(t[17]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[18]||(t[18]=v("Preparing ",-1)),n("span",Dy,p(e.fmt?.number(e.segCount("preparing"))),1)],10,Ry),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=s=>e.setSegView("error"))},[t[19]||(t[19]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[20]||(t[20]=v("Error ",-1)),n("span",Ay,p(e.fmt?.number(e.segCount("error"))),1)],10,Py),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=s=>e.setSegView("expired"))},[t[21]||(t[21]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[22]||(t[22]=v("Expired ",-1)),n("span",Oy,p(e.fmt?.number(e.segCount("expired"))),1)],10,Ty),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=s=>e.setSegView("removed"))},[t[23]||(t[23]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[24]||(t[24]=v("Removed ",-1)),n("span",My,p(e.fmt?.number(e.segCount("removed"))),1)],10,Iy)]),n("p",_y,[n("strong",null,p(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[25]||(t[25]=v(" shown",-1))])]),e.fetchError?(a(),l("div",Vy,[t[26]||(t[26]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),v(" "+p(e.fetchError),1)])):f("v-if",!0),T((a(),l("form",qy,[n("div",$y,[n("div",Ly,[T(n("input",Fy,null,512),[[o,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",Uy,"/"))]),t[30]||(t[30]=n("span",{class:"admin-filter-spacer"},null,-1)),e.total>0?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=s=>e.exportCsv())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),v(" Export",-1)])])):f("v-if",!0),e.totalPage>1?(a(),l("span",By,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,zy),n("span",Hy,p(e.query?.page)+"/"+p(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,jy)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",Gy,[n("div",Wy,[(a(!0),l(F,null,se(e.chips,(s,r)=>(a(),l("span",{class:"admin-active-chip",key:s?.key},[n("span",Ky,p(s?.label),1),n("span",null,p(s?.value),1),n("button",{type:"button",onClick:d=>e.clearFilter(s.key),"aria-label":"Clear filter"},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,Yy)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),n("div",Xy,[e.total!==0?(a(),l("div",Qy,[n("div",Jy,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="name"}]),onClick:t[9]||(t[9]=s=>e.sortBy("name"))},[t[33]||(t[33]=v("Conference ",-1)),e.sortIcon("name")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("name")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",Zy,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=s=>e.sortBy("status"))},[t[35]||(t[35]=v("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[38]||(t[38]=n("div",{role:"columnheader",class:"num"},"Repos",-1)),n("div",xy,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[11]||(t[11]=s=>e.sortBy("startDate"))},[t[37]||(t[37]=v("Window ",-1)),e.sortIcon("startDate")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("startDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[36]||(t[36]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[39]||(t[39]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))])):f("v-if",!0),(a(!0),l(F,null,se(e.filteredConferences,(s,r)=>(a(),l("div",eb,[n("div",tb,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[n("use",{href:"#project-icon-conference"})],-1)),n("div",ob,[n("a",{class:"repo-name",textContent:p(s?.name),href:e.safeUrl("/conference/"+s?.conferenceID)},null,8,sb),n("div",ib,[n("span",null,p(s?.conferenceID),1),n("span",null,p(e.fmt?.money(s?.price||0)),1)])])]),n("div",rb,[n("span",{class:P(["status-dot","st-"+(s?.status||"unknown")])},null,2),n("span",{textContent:p(e.fmt?.statusLabel(s?.status))},null,8,ab)]),n("div",lb,[t[41]||(t[41]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:"Show repositories in this conference",textContent:p(e.fmt?.number(s?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+s?.conferenceID)},null,8,db)]),n("div",ub,[t[42]||(t[42]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),v(" "+p(e.fmt?.date(s?.startDate))+" \u2013 "+p(e.fmt?.date(s?.endDate)),1)]),n("div",cb,[n("div",pb,[t[48]||(t[48]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",fb,[n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/edit")},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit",-1)])],8,hb),n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/")},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" View",-1)])],8,mb),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+s?.conferenceID)},[...t[45]||(t[45]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),v(" View repositories",-1)])],8,gb),t[47]||(t[47]=n("div",{class:"dropdown-divider"},null,-1)),T(n("a",{class:"dropdown-item text-danger",href:"#",onClick:le(d=>e.removeConference(s),["prevent"])},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Remove",-1)])],8,vb),[[Z,s?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(a(),l("div",yb,[t[49]||(t[49]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,p(e.total?"No conferences match the current filters.":"No conferences yet."),1)])):f("v-if",!0)]),n("div",bb,[t[54]||(t[54]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",wb,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),v(" Previous",-1)])],8,kb),T(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Cb),[[o,{state:e.viewState,set:s=>{e.query.page=s},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+p(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[51]||(t[51]=[v("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,Eb)])):f("v-if",!0),n("span",Sb,[t[53]||(t[53]=n("label",null,"Per page",-1)),T((a(),l("select",Nb,[...t[52]||(t[52]=[Se('',5)])])),[[o,{state:e.viewState,set:s=>{e.query.limit=s},value:e.query?.limit,form:null,options:{}}]])])])])}var Rb={class:"container paper-page admin-page errors-page"},Db={class:"errors-header"},Pb={class:"errors-actions"},Ab={class:"kpi-grid"},Tb={class:"kpi-card"},Ob={class:"kpi-value"},Ib={key:0},Mb={key:1},_b={key:2},Vb=["aria-pressed"],qb={class:"kpi-value"},$b={class:"kpi-sub"},Lb=["aria-pressed"],Fb={class:"kpi-value"},Ub={class:"kpi-sub"},Bb=["aria-pressed"],zb={class:"kpi-value"},Hb={class:"kpi-sub"},jb={class:"kpi-value"},Gb={class:"kpi-sub"},Wb={key:0,class:"dropped-warn"},Kb={class:"volume-chart"},Yb={class:"volume-head"},Xb={class:"volume-legend"},Qb={key:0},Jb={key:1},Zb={key:2},xb={class:"volume-bars"},e1=["title"],t1={class:"errors-toolbar","aria-label":"Error filters"},n1={class:"seg-filter",role:"radiogroup","aria-label":"Filter by severity"},o1=["aria-checked"],s1={class:"count"},i1=["aria-checked"],r1={class:"count"},a1=["aria-checked"],l1={class:"count"},d1=["aria-checked"],u1={class:"count"},c1={class:"search-wrap"},p1={type:"search",class:"form-control",placeholder:"Search errors\u2026",title:"Search messages, or filter with code:repo_not_found module:route status:>=400",autocomplete:"off"},f1={key:0,class:"filter-count"},h1={class:"select-wrap"},m1={class:"form-control form-control-sm"},g1={class:"select-wrap"},v1={class:"form-control form-control-sm"},y1={class:"autoref"},b1={type:"checkbox"},w1={key:0,class:"admin-empty"},k1={key:1,class:"errors-pager"},C1={key:2,class:"errors-list"},E1={key:0,class:"errors-group-head"},S1={class:"errors-group-count"},N1={key:0,class:"errors-group-note"},R1=["onClick"],D1={class:"col-when"},P1={class:"when-rel"},A1={class:"when-abs"},T1={class:"col-sev"},O1={class:"sev-label"},I1={class:"col-mod"},M1={class:"pill pill-module"},_1={class:"col-msg"},V1={class:"msg-code"},q1={key:0,class:"msg-context"},$1={key:1,class:"msg-detail"},L1=["title"],F1={class:"col-count"},U1={key:0,class:"count-pill"},B1={key:1,class:"count-pill count-pill-muted"},z1={class:"col-status"},H1=["title"],j1={key:1,class:"status-empty",title:"No HTTP status for this event"},G1={key:0,class:"errors-row-detail"},W1={class:"detail-tabs"},K1=["onClick"],Y1=["onClick"],X1=["onClick"],Q1={class:"detail-body"},J1={class:"detail-main"},Z1={key:0},x1={key:1,class:"stack-pre"},ew={key:2,class:"related-list"},tw={class:"when-abs"},nw={class:"msg-url"},ow={class:"detail-actions"},sw=["onClick"],iw=["onClick"],rw={key:0,class:"copy-hint"},aw={class:"detail-aside"},lw={class:"aside-block"},dw=["title"],uw={class:"aside-block"},cw=["title"],pw={class:"aside-block"},fw={class:"aside-value"},hw={key:0,class:"aside-sub"},mw={key:0,class:"aside-block"},gw=["href"],vw={key:1,class:"aside-block"},yw={class:"aside-value mono"};function Qc(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",Rb,[t[49]||(t[49]=n("div",{class:"paper-crumbs"},[v("Admin \xA0/\xA0 "),n("span",{class:"here"},"Errors")],-1)),n("header",Db,[t[16]||(t[16]=n("h1",{class:"paper-page-title"},"Errors",-1)),n("div",Pb,[n("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=s=>e.exportCsv())},[...t[14]||(t[14]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),v(" Export CSV",-1)])]),n("button",{class:"btn btn-sm btn-outline-danger",type:"button",onClick:t[1]||(t[1]=s=>e.clearAll())},[...t[15]||(t[15]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Clear all",-1)])])])]),t[50]||(t[50]=Se('',1)),n("section",Ab,[n("div",Tb,[t[17]||(t[17]=n("div",{class:"kpi-label"},"Occurrences \xB7 24h",-1)),n("div",Ob,p(e.fmt?.number(e.stats?.last24h??0)),1),n("div",{class:P(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h>=20?(a(),l("span",Ib,p((e.stats?.last24h??0)-(e.stats?.prev24h??0)>=0?"+":"")+p(Math.round(((e.stats?.last24h??0)-(e.stats?.prev24h??0))/e.stats.prev24h*100))+"% vs yesterday",1)):e.stats?.prev24h!==void 0?(a(),l("span",Mb,p(e.fmt?.number(e.stats?.prev24h??0))+" in prior 24h",1)):f("v-if",!0),e.stats?.prev24h?f("v-if",!0):(a(),l("span",_b,"no prior baseline"))],2)]),n("div",{class:P(["kpi-card kpi-error kpi-filter",{"is-selected":e.query?.bucket==="error"}]),role:"button",tabindex:"0","aria-pressed":e.query?.bucket==="error",title:"Show only errors (5xx)",onClick:t[2]||(t[2]=s=>e.setBucket(e.query?.bucket==="error"?"":"error")),onKeydown:t[3]||(t[3]=kt(le(s=>e.setBucket(e.query?.bucket==="error"?"":"error"),["prevent"]),["enter"]))},[t[18]||(t[18]=n("div",{class:"kpi-label"},"Error",-1)),n("div",qb,p(e.fmt?.number(e.stats?.severity?.error??0)),1),n("div",$b,"5xx \xB7 "+p(e.stats?.unique?.error)+" unique",1)],42,Vb),n("div",{class:P(["kpi-card kpi-warn kpi-filter",{"is-selected":e.query?.bucket==="warn"}]),role:"button",tabindex:"0","aria-pressed":e.query?.bucket==="warn",title:"Show only warnings (4xx, aborted requests)",onClick:t[4]||(t[4]=s=>e.setBucket(e.query?.bucket==="warn"?"":"warn")),onKeydown:t[5]||(t[5]=kt(le(s=>e.setBucket(e.query?.bucket==="warn"?"":"warn"),["prevent"]),["enter"]))},[t[19]||(t[19]=n("div",{class:"kpi-label"},"Warning",-1)),n("div",Fb,p(e.fmt?.number(e.stats?.severity?.warn??0)),1),n("div",Ub,"4xx, aborted \xB7 "+p(e.stats?.unique?.warn)+" unique",1)],42,Lb),n("div",{class:P(["kpi-card kpi-info kpi-filter",{"is-selected":e.query?.bucket==="info"}]),role:"button",tabindex:"0","aria-pressed":e.query?.bucket==="info",title:"Show only info events",onClick:t[6]||(t[6]=s=>e.setBucket(e.query?.bucket==="info"?"":"info")),onKeydown:t[7]||(t[7]=kt(le(s=>e.setBucket(e.query?.bucket==="info"?"":"info"),["prevent"]),["enter"]))},[t[20]||(t[20]=n("div",{class:"kpi-label"},"Info",-1)),n("div",zb,p(e.fmt?.number(e.stats?.severity?.info??0)),1),n("div",Hb,"Auth, 404 \xB7 "+p(e.stats?.unique?.info)+" unique",1)],42,Bb),n("div",{class:P(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[21]||(t[21]=n("div",{class:"kpi-label"},"Distinct errors stored",-1)),n("div",jb,p(e.fmt?.number(e.total)),1),n("div",Gb,[v(" all time \xB7 cap "+p(e.fmt?.number(e.cap))+" \xB7 "+p(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(a(),l("span",Wb," \xB7 "+p(e.stats?.dropped)+" dropped",1)):f("v-if",!0)])],2)]),n("section",Kb,[n("div",Yb,[t[25]||(t[25]=n("span",{class:"volume-title"},"Volume \xB7 24h \xB7 1h buckets",-1)),n("span",Xb,[e.stats?.severity?.error?(a(),l("span",Qb,[...t[22]||(t[22]=[n("span",{class:"dot dot-error"},null,-1),v("Error",-1)])])):f("v-if",!0),e.stats?.severity?.warn?(a(),l("span",Jb,[...t[23]||(t[23]=[n("span",{class:"dot dot-warn"},null,-1),v("Warning",-1)])])):f("v-if",!0),e.stats?.severity?.info?(a(),l("span",Zb,[...t[24]||(t[24]=[n("span",{class:"dot dot-info"},null,-1),v("Info",-1)])])):f("v-if",!0)])]),n("div",xb,[(a(!0),l(F,null,se(e.stats?.buckets,(s,r)=>(a(),l("div",{class:"volume-bar",key:r,title:e.bucketTitle(s)},[n("span",{class:"seg seg-error",style:$e({height:e.barPx(s,"error")+"px"})},null,4),n("span",{class:"seg seg-warn",style:$e({height:e.barPx(s,"warn")+"px"})},null,4),n("span",{class:"seg seg-info",style:$e({height:e.barPx(s,"info")+"px"})},null,4)],8,e1))),128))]),t[26]||(t[26]=n("div",{class:"volume-axis","aria-hidden":"true"},[n("span",null,"24h ago"),n("span",null,"12h ago"),n("span",null,"now")],-1))]),T((a(),l("form",t1,[n("div",n1,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")===""}]),"aria-checked":(e.query?.bucket||"")==="",onClick:t[8]||(t[8]=s=>e.setBucket(""))},[t[27]||(t[27]=v("All ",-1)),n("span",s1,p(e.fmt?.number((e.stats?.severity?.error??0)+(e.stats?.severity?.warn??0)+(e.stats?.severity?.info??0))),1)],10,o1),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")==="error","is-empty":!e.stats?.severity?.error}]),"aria-checked":(e.query?.bucket||"")==="error",onClick:t[9]||(t[9]=s=>e.setBucket("error"))},[t[28]||(t[28]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[29]||(t[29]=v("Error ",-1)),n("span",r1,p(e.fmt?.number(e.stats?.severity?.error??0)),1)],10,i1),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")==="warn","is-empty":!e.stats?.severity?.warn}]),"aria-checked":(e.query?.bucket||"")==="warn",onClick:t[10]||(t[10]=s=>e.setBucket("warn"))},[t[30]||(t[30]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[31]||(t[31]=v("Warning ",-1)),n("span",l1,p(e.fmt?.number(e.stats?.severity?.warn??0)),1)],10,a1),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")==="info","is-empty":!e.stats?.severity?.info}]),"aria-checked":(e.query?.bucket||"")==="info",onClick:t[11]||(t[11]=s=>e.setBucket("info"))},[t[32]||(t[32]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[33]||(t[33]=v("Info ",-1)),n("span",u1,p(e.fmt?.number(e.stats?.severity?.info??0)),1)],10,d1)]),n("div",c1,[t[34]||(t[34]=n("svg",{class:"ui-icon search-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)),T(n("input",p1,null,512),[[o,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(a(),l("span",f1,p(e.parsedFilterCount)+" filter"+p(e.parsedFilterCount>1?"s":""),1)):f("v-if",!0)]),n("div",h1,[t[36]||(t[36]=n("label",null,"Sort",-1)),T((a(),l("select",m1,[...t[35]||(t[35]=[n("option",{value:"recent"},"Most recent",-1),n("option",{value:"count"},"Most frequent",-1)])])),[[o,{state:e.viewState,set:s=>{e.query.sort=s},value:e.query?.sort,form:null,options:{}}]])]),n("div",g1,[t[38]||(t[38]=n("label",{title:"Rows are always sectioned by severity. This merges repeated events inside each section."},"Merge",-1)),T((a(),l("select",v1,[...t[37]||(t[37]=[n("option",{value:""},"Don't merge",-1),n("option",{value:"code"},"Same error",-1),n("option",{value:"module"},"Same module",-1)])])),[[o,{state:e.viewState,set:s=>{e.query.group=s},value:e.query?.group,form:null,options:{}}]])]),n("label",y1,[T(n("input",b1,null,512),[[o,{state:e.viewState,set:s=>{e.query.autoRefresh=s},value:e.query?.autoRefresh,form:null,options:{}}]]),t[39]||(t[39]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))]),n("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[12]||(t[12]=s=>e.refreshNow()),"aria-label":"Refresh"},[...t[40]||(t[40]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])])),[[i,e.viewState]]),e.visible?.length?f("v-if",!0):(a(),l("div",w1,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(a(),l("div",k1,[n("span",null,p(e.query?.group&&e.visible?.length!==e.entries?.length?e.fmt?.number(e.visible?.length)+(e.visible?.length===1?" group":" groups")+" from ":"")+p(e.fmt?.number(e.entries?.length))+" of "+p(e.fmt?.number(e.total))+" stored errors loaded",1),n("button",{class:"btn btn-sm",type:"button",onClick:t[13]||(t[13]=s=>e.loadMore())},"Load 250 older")])):f("v-if",!0),e.visible?.length?(a(),l("div",C1,[t[48]||(t[48]=Se('
WhenSeverityModuleMessageTotalStatus
',1)),(a(!0),l(F,null,se(e.visible,(s,r)=>(a(),l(F,{key:s?._key},[r===0||e.visible[r-1]?._bucket!==s?._bucket?(a(),l("div",E1,[n("span",{class:P(["sev-dot","sev-"+s?._bucket])},null,2),v(p(s?._bucket==="error"?"Error":s?._bucket==="warn"?"Warning":"Info"),1),n("span",S1,p(e.fmt?.number(e.visible.filter(d=>d?._bucket===s?._bucket).length)),1),r===0?(a(),l("span",N1,"By severity \xB7 "+p(e.query?.group==="code"?"repeats merged by error \xB7 ":e.query?.group==="module"?"repeats merged by module \xB7 ":"")+p(e.query?.sort==="count"?"most frequent first":"most recent first"),1)):f("v-if",!0)])):f("v-if",!0),n("div",{class:P(["errors-row",{open:e.expanded[s?._key]}])},[n("div",{class:"errors-row-main",onClick:d=>e.toggle(s)},[n("div",D1,[n("div",P1,p(e.relTime(s?.ts)),1),n("div",A1,p(e.absTimeShort(s?.ts)),1)]),n("div",T1,[n("span",{class:P(["sev-dot","sev-"+s?._bucket])},null,2),n("span",O1,p(s?._bucket==="error"?"Error":s?._bucket==="warn"?"Warning":"Info"),1)]),n("div",I1,[n("span",M1,p(s?.module),1)]),n("div",_1,[n("strong",V1,p(s?.displayMessage),1),s?.displayContext&&s?.displayContext!==s?.displayMessage?(a(),l("span",q1,p(s?.displayContext),1)):f("v-if",!0),s?._detail?(a(),l("span",$1,p(s?._detail),1)):f("v-if",!0),s?._url?(a(),l("div",{key:2,class:"msg-url",title:s?._url},p(s?._url),9,L1)):f("v-if",!0)]),n("div",F1,[s?.count>1?(a(),l("span",U1,"\xD7"+p(s?.count),1)):f("v-if",!0),s?.count===1?(a(),l("span",B1,"\xD71")):f("v-if",!0)]),n("div",z1,[s?._status?(a(),l("span",{key:0,class:P(["status-pill",String(s?._status).match(/^[23]/)?"status-neutral":"status-"+s?._bucket]),title:String(s?._status).match(/^2/)&&s?._bucket==="warn"?"Client closed the connection":null},p(String(s?._status).match(/^2/)&&s?._bucket==="warn"?"\u2014":s?._status),11,H1)):f("v-if",!0),s?._status?f("v-if",!0):(a(),l("span",j1,"\u2014"))])],8,R1),e.expanded[s?._key]?(a(),l("div",G1,[n("div",W1,[n("button",{type:"button",class:P({active:e.detailTab[s?._key]==="raw"||!e.detailTab[s?._key]}),onClick:d=>e.detailTab[s._key]="raw"},"Raw",10,K1),s?._stack?(a(),l("button",{key:0,type:"button",class:P({active:e.detailTab[s?._key]==="stack"}),onClick:d=>e.detailTab[s._key]="stack"},"Stack",10,Y1)):f("v-if",!0),s?.count>1?(a(),l("button",{key:1,type:"button",class:P({active:e.detailTab[s?._key]==="related"}),onClick:d=>e.detailTab[s._key]="related"},"Related ("+p(s?.count)+")",11,X1)):f("v-if",!0)]),n("div",Q1,[n("div",J1,[(e.detailTab[s?._key]||"raw")==="raw"?(a(),l("pre",Z1,p(s?._detailJson),1)):f("v-if",!0),e.detailTab[s?._key]==="stack"?(a(),l("pre",x1,p(s?._stack),1)):f("v-if",!0),e.detailTab[s?._key]==="related"?(a(),l("div",ew,[(a(!0),l(F,null,se(s?._related,(d,c)=>(a(),l("div",{class:"related-row",key:c},[n("span",tw,p(e.absTimeShort(d?.ts)),1),n("span",nw,p(d?._url),1),d?._status?(a(),l("span",{key:0,class:P(["status-pill","status-"+d?._bucket])},p(d?._status),3)):f("v-if",!0)]))),128))])):f("v-if",!0),n("div",ow,[n("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:d=>e.copyCurl(s)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v(" Copy curl",-1)])],8,sw),n("button",{class:"btn btn-sm",type:"button",onClick:d=>e.copyJson(s)},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-clipboard"})],-1),v(" Copy JSON",-1)])],8,iw),e.copyHint?(a(),l("span",rw,p(e.copyHint),1)):f("v-if",!0)])]),n("aside",aw,[n("div",lw,[t[43]||(t[43]=n("div",{class:"aside-label"},"First seen",-1)),n("div",{class:"aside-value",title:e.absTime(s?._firstSeen)},p(e.relTime(s?._firstSeen)),9,dw)]),n("div",uw,[t[44]||(t[44]=n("div",{class:"aside-label"},"Last seen",-1)),n("div",{class:"aside-value",title:e.absTime(s?.ts)},p(e.relTime(s?.ts)),9,cw)]),n("div",pw,[t[45]||(t[45]=n("div",{class:"aside-label"},"Occurrences",-1)),n("div",fw,[v(p(s?.count),1),s?._lastHourCount?(a(),l("span",hw," \xB7 "+p(s?._lastHourCount)+" this hour",1)):f("v-if",!0)])]),s?._repoId?(a(),l("div",mw,[t[46]||(t[46]=n("div",{class:"aside-label"},"Repository",-1)),n("a",{class:"aside-value",href:e.safeUrl("/r/"+s?._repoId)},p(s?._repoId),9,gw)])):f("v-if",!0),s?._url?(a(),l("div",vw,[t[47]||(t[47]=n("div",{class:"aside-label"},"URL",-1)),n("div",yw,p(s?._url),1)])):f("v-if",!0)])])])):f("v-if",!0)],2)],64))),128))])):f("v-if",!0)])}var bw={class:"container paper-page admin-page overview-page"},ww={key:0,class:"admin-empty"},kw={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},Cw={class:"ov-views",role:"tablist","aria-label":"Overview sections"},Ew=["aria-selected","onClick"],Sw={key:2},Nw={key:0,class:"ov-health",role:"status"},Rw={class:"ov-kpi-row"},Dw={class:"ov-kpi-card"},Pw={class:"ov-kpi-value"},Aw={class:"ov-kpi-sub"},Tw={class:"ov-kpi-card"},Ow={class:"ov-kpi-sub"},Iw={class:"ov-kpi-card"},Mw={class:"ov-kpi-sub"},_w={class:"ov-kpi-card"},Vw={class:"ov-kpi-sub"},qw={class:"ov-kpi-card"},$w={class:"ov-kpi-value"},Lw={class:"ov-kpi-sub"},Fw={class:"ov-daily-row"},Uw={class:"ov-daily-card"},Bw={class:"ov-daily-value"},zw={class:"ov-daily-card"},Hw={class:"ov-daily-value"},jw={class:"ov-daily-sub"},Gw={class:"ov-daily-card"},Ww={class:"ov-daily-value"},Kw={class:"ov-chart-card"},Yw={class:"ov-chart-head"},Xw={class:"ov-chart-legends"},Qw={class:"ov-chart-legend"},Jw={key:0,class:"ov-legend-missing"},Zw={key:0,class:"ov-spark-bars ov-has-axis"},xw={class:"ov-yaxis","aria-hidden":"true"},ek=["data-tip","aria-label"],tk={key:1,class:"ov-spark-x"},nk={class:"ov-chart-card"},ok={class:"ov-chart-head"},sk={class:"ov-chart-legends"},ik={class:"ov-chart-legend"},rk={key:0,class:"ov-legend-missing"},ak={key:0,class:"ov-spark-bars ov-has-axis"},lk={class:"ov-yaxis","aria-hidden":"true"},dk=["data-tip","aria-label"],uk={key:1,class:"ov-spark-x"},ck={key:0,class:"ov-chart-card"},pk={class:"ov-chart-head"},fk={class:"ov-chart-legends"},hk={class:"ov-chart-legend"},mk={key:0,class:"ov-legend-missing"},gk={key:0,class:"ov-spark-bars ov-spark-step ov-has-axis"},vk={class:"ov-yaxis","aria-hidden":"true"},yk=["viewBox","aria-label"],bk=["d"],wk=["d"],kk={key:1,class:"ov-spark-x"},Ck={class:"ov-chart-card"},Ek={class:"ov-chart-head"},Sk={class:"ov-chart-legends"},Nk={class:"ov-chart-legend"},Rk={key:0,class:"ov-legend-missing"},Dk={key:0,class:"ov-spark-bars ov-has-axis"},Pk={class:"ov-yaxis","aria-hidden":"true"},Ak=["data-tip","aria-label"],Tk={key:1,class:"ov-spark-x"},Ok={class:"ov-triple-row"},Ik={class:"ov-panel-card"},Mk={class:"ov-panel-head"},_k={class:"ov-panel-meta"},Vk={class:"ov-stacked-bar"},qk={class:"ov-bar-legend"},$k={href:"/admin/repositories",class:"ov-legend-item"},Lk={class:"ov-legend-n"},Fk={href:"/admin/repositories",class:"ov-legend-item"},Uk={class:"ov-legend-n"},Bk={href:"/admin/repositories",class:"ov-legend-item"},zk={class:"ov-legend-n"},Hk={href:"/admin/repositories",class:"ov-legend-item"},jk={class:"ov-legend-n"},Gk={href:"/admin/repositories",class:"ov-legend-item"},Wk={class:"ov-legend-n"},Kk={class:"ov-panel-card"},Yk={class:"ov-panel-head"},Xk={class:"ov-panel-meta"},Qk={class:"ov-error-bars"},Jk={class:"ov-ebar-row"},Zk={class:"ov-ebar-track"},xk={class:"ov-ebar-n"},e0={class:"ov-ebar-row"},t0={class:"ov-ebar-track"},n0={class:"ov-ebar-n"},o0={key:0,class:"ov-ehours",role:"img","aria-label":"Errors per hour over the last 24 hours"},s0={class:"ov-ehours-legend"},i0={class:"ov-ehours-note"},r0={class:"ov-ehours-bars"},a0=["title"],l0={key:0,class:"ov-ehours-zero"},d0={class:"ov-ebar-note"},u0={key:0,class:"ov-panel-foot"},c0={href:"/admin/errors"},p0={class:"ov-panel-card"},f0={class:"ov-routes-table"},h0={class:"ov-route-row",href:"/admin/queues"},m0={class:"ov-route-n"},g0={class:"ov-route-n"},v0={class:"ov-route-row",href:"/admin/queues"},y0={class:"ov-route-n"},b0={class:"ov-route-n"},w0={class:"ov-route-row",href:"/admin/queues"},k0={class:"ov-route-n"},C0={class:"ov-route-n"},E0={class:"ov-services-card"},S0={class:"ov-services-head"},N0={class:"ov-panel-meta"},R0={class:"ov-services-grid"},D0={class:"ov-svc"},P0={class:"ov-svc-info"},A0={class:"ov-svc-meta"},T0={class:"ov-svc"},O0={class:"ov-svc-info"},I0={key:0,class:"ov-svc-meta"},M0={key:1,class:"ov-svc-meta"},_0={class:"ov-svc"},V0={class:"ov-svc-info"},q0={key:0,class:"ov-svc-meta"},$0={key:1,class:"ov-svc-meta"},L0={class:"ov-svc"},F0={class:"ov-svc-info"},U0={key:0,class:"ov-svc-meta"},B0={key:1,class:"ov-svc-meta"},z0={class:"ov-svc"},H0=["title"],j0={class:"ov-svc-info"},G0={class:"ov-svc-meta"},W0={class:"ov-panel-card ov-cache","aria-labelledby":"cache-heading"},K0={class:"ov-panel-head ov-performance-head"},Y0={class:"ov-performance-window"},X0={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},Q0={key:1,class:"ov-performance-empty",role:"status"},J0={key:0,class:"ov-performance-note"},Z0={key:1,class:"ov-performance-note"},x0={key:2,class:"ov-performance-message ov-performance-warning",role:"status"},e2={key:3,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache storage budgets"},t2={class:"ov-metrics-table"},n2={scope:"row",class:"ov-event-name"},o2=["title"],s2={key:0,class:"ov-metric-bad-text"},i2={key:1,class:"budget-bar","aria-hidden":"true"},r2={class:"num"},a2={class:"num"},l2={class:"num"},d2={class:"num"},u2={key:4,class:"ov-cache-rates"},c2={key:5,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache events and processing durations"},p2={class:"ov-metrics-table"},f2={scope:"row",class:"ov-event-name"},h2={class:"ov-event-traffic"},m2={class:"num"},g2={class:"num"},v2={key:6,class:"ov-performance-empty",role:"status"},y2={class:"ov-performance-note"},b2={class:"ov-panel-card ov-performance","aria-labelledby":"performance-heading"},w2={class:"ov-panel-head ov-performance-head"},k2={class:"ov-performance-window"},C2={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},E2={key:1,class:"ov-performance-empty",role:"status"},S2={key:2},N2={id:"performance-routes",role:"region","aria-label":"Routes"},R2={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Route latency metrics, scroll for more columns"},D2={class:"ov-metrics-table"},P2={scope:"row",class:"ov-metric-name"},A2={class:"num"},T2={class:"num"},O2={class:"num"},I2={class:"num"},M2={class:"num"},_2={key:1,class:"ov-performance-empty"},V2={id:"performance-processes",role:"region","aria-label":"Processes"},q2={key:0,class:"ov-performance-message ov-performance-warning",role:"status"},$2={key:1,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Process resource metrics, scroll for more columns"},L2={class:"ov-metrics-table"},F2={scope:"row",class:"ov-metric-name"},U2={key:0,class:"ov-metric-warn"},B2={class:"num"},z2={class:"num"},H2={class:"num"},j2={class:"num"},G2={class:"num"},W2={class:"num"},K2={class:"num"},Y2={class:"num"},X2={id:"performance-stages",role:"region","aria-label":"Work stages"},Q2={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Work stage metrics, scroll for more columns"},J2={class:"ov-metrics-table"},Z2={scope:"row",class:"ov-metric-name"},x2={class:"num"},eC={class:"num"},tC={class:"num"},nC={key:1,class:"ov-performance-empty"};function Jc(e,t){return a(),l("div",bw,[t[95]||(t[95]=Se('
Admin \xA0/\xA0 Overview

Overview

Live \xB7 refreshes every 30s
',2)),e.loading?(a(),l("div",ww,"Loading overview\u2026")):f("v-if",!0),e.error?(a(),l("div",kw,[t[8]||(t[8]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),v(" "+p(e.error),1)])):f("v-if",!0),n("div",Cw,[(a(),l(F,null,se([{id:"summary",label:"Summary"},{id:"performance",label:"Performance"},{id:"cache",label:"Cache"}],o=>n("button",{type:"button",role:"tab",key:o.id,"aria-selected":e.ovView===o.id?"true":"false",class:P({active:e.ovView===o.id}),onClick:i=>e.setOvView(o.id)},p(o.label),11,Ew)),64))]),e.data?T((a(),l("div",Sw,[e.data?.system?.memPercent>90||e.data?.system?.diskPercent>90?(a(),l("div",Nw,[t[10]||(t[10]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,[t[9]||(t[9]=n("b",null,"Server needs attention.",-1)),v(" "+p(e.healthAlert()),1)])])):f("v-if",!0),f(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",Rw,[n("div",Dw,[t[11]||(t[11]=n("div",{class:"ov-kpi-label"},"Live repositories",-1)),n("div",Pw,p(e.humanNum((e.data?.repos?.statusBreakdown||[]).filter(o=>o._id!=="removed"&&o._id!=="expired").reduce((o,i)=>o+(i.count||0),0))),1),n("div",Aw,p(e.humanNum(((e.data?.repos?.statusBreakdown||[]).find(o=>o._id==="removed")||{}).count||0))+" removed \xB7 "+p(e.humanNum(e.data?.repos?.total))+" total",1)]),n("div",Tw,[t[12]||(t[12]=n("div",{class:"ov-kpi-label"},"CPU",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>=75}])},p(e.data?.system?.cpuPercent)+"%",3),n("div",{class:P(["ov-meter",{warn:e.data?.system?.cpuPercent>=75,crit:e.data?.system?.cpuPercent>90}])},[n("span",{style:$e({width:Math.min(100,e.data?.system?.cpuPercent||0)+"%"})},null,4)],2),n("div",Ow,[e.data?.system?.cpuPercent>=75?(a(),l("b",{key:0,class:P(["ov-flag",{critical:e.data?.system?.cpuPercent>90}])},p(e.data?.system?.cpuPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),v(p(e.data?.system?.cpuCount)+" cores \xB7 load "+p(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)])]),n("div",Iw,[t[13]||(t[13]=n("div",{class:"ov-kpi-label"},"Memory",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>=75}])},p(e.data?.system?.memPercent)+"%",3),n("div",{class:P(["ov-meter",{warn:e.data?.system?.memPercent>=75,crit:e.data?.system?.memPercent>90}])},[n("span",{style:$e({width:Math.min(100,e.data?.system?.memPercent||0)+"%"})},null,4)],2),n("div",Mw,[e.data?.system?.memPercent>=75?(a(),l("b",{key:0,class:P(["ov-flag",{critical:e.data?.system?.memPercent>90}])},p(e.data?.system?.memPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),v(p(e.humanBytes(e.data?.system?.memUsed).replace(/\s*GB$/,""))+" / "+p(e.humanBytes(e.data?.system?.memTotal)),1)])]),n("div",_w,[t[14]||(t[14]=n("div",{class:"ov-kpi-label"},"Disk",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>=75}])},p(e.data?.system?.diskPercent)+"%",3),n("div",{class:P(["ov-meter",{warn:e.data?.system?.diskPercent>=75,crit:e.data?.system?.diskPercent>90}])},[n("span",{style:$e({width:Math.min(100,e.data?.system?.diskPercent||0)+"%"})},null,4)],2),n("div",Vw,[e.data?.system?.diskPercent>=75?(a(),l("b",{key:0,class:P(["ov-flag",{critical:e.data?.system?.diskPercent>90}])},p(e.data?.system?.diskPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),v(p(e.humanBytes(e.data?.system?.diskUsed).replace(/\s*GB$/,""))+" / "+p(e.humanBytes(e.data?.system?.diskTotal)),1),e.data?.system?.diskMount&&e.data.system.diskMount!=="/"?(a(),l(F,{key:1},[v(" \xB7 "+p(e.data?.system?.diskMount),1)],64)):f("v-if",!0)])]),n("div",qw,[t[15]||(t[15]=n("div",{class:"ov-kpi-label"},"Uptime",-1)),n("div",$w,p(e.humanDuration(e.data?.system?.uptime)),1),n("div",Lw,p(e.data?.system?.nodeVersion)+" \xB7 "+p(e.data?.system?.platform),1)])]),f(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",Fw,[n("div",Uw,[t[16]||(t[16]=n("div",{class:"ov-daily-label"},"New repos today",-1)),n("div",Bw,p(e.fmt?.number(e.data?.daily?.today?.repositories||0)),1),t[17]||(t[17]=n("div",{class:"ov-daily-sub"},"so far today",-1))]),n("div",zw,[t[18]||(t[18]=n("div",{class:"ov-daily-label"},"New users today",-1)),n("div",Hw,p(e.fmt?.number(e.data?.daily?.today?.users||0)),1),n("div",jw,p(e.fmt?.number(e.data?.users?.total))+" total \xB7 +"+p(e.fmt?.number(e.usersGained()))+" in 30 days",1)]),n("div",Gw,[t[19]||(t[19]=n("div",{class:"ov-daily-label"},"Page views today",-1)),n("div",Ww,p(e.fmt?.number(e.data?.daily?.today?.pageViews||0)),1),t[20]||(t[20]=n("div",{class:"ov-daily-sub"},"so far today",-1))])]),f(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:P(["ov-chart-row",{"is-three":e.usersTiny()}])},[n("div",Kw,[n("div",Yw,[t[23]||(t[23]=n("span",{class:"ov-chart-title"},"Daily page views \xB7 30d",-1)),n("span",Xw,[n("span",Qw,[t[21]||(t[21]=n("span",{class:"ov-dot-legend ov-dot-accent"},null,-1)),v("views/day \xB7 peak "+p(e.fmt?.number(e.historyMax("dailyPageViews"))),1)]),e.historyHasMissing()?(a(),l("span",Jw,[...t[22]||(t[22]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),v("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",Zw,[n("div",xw,[n("span",null,p(e.fmt?.number(e.axisMax("dailyPageViews"))),1),n("span",null,p(e.fmt?.number(e.axisMax("dailyPageViews")/2)),1),t[24]||(t[24]=n("span",null,"0",-1))]),(a(!0),l(F,null,se(e.data?.history,(o,i)=>(a(),l("div",{class:P(["ov-spark-col has-tip",{"is-missing":o?._empty}]),key:i,"data-tip":o?._empty?e.historyLabel(o)+": no data":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+(o?.dailyPageViews===1?" view":" views"),"aria-label":o?._empty?e.historyLabel(o)+": no data":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+(o?.dailyPageViews===1?" view":" views")},[n("span",{class:"ov-spark-fill",style:$e({height:e.historyBarH(o,"dailyPageViews")+"px"})},null,4)],10,ek))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",tk,[n("span",null,p(e.historyLabel(e.data?.history[0])),1),n("span",null,p(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,p(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),n("div",nk,[n("div",ok,[t[27]||(t[27]=n("span",{class:"ov-chart-title"},"New repos \xB7 30d",-1)),n("span",sk,[n("span",ik,[t[25]||(t[25]=n("span",{class:"ov-dot-legend ov-dot-ok-fill"},null,-1)),v("repos/day \xB7 peak "+p(e.fmt?.number(e.historyMax("dailyRepositories"))),1)]),e.historyHasMissing()?(a(),l("span",rk,[...t[26]||(t[26]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),v("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",ak,[n("div",lk,[n("span",null,p(e.fmt?.number(e.axisMax("dailyRepositories"))),1),n("span",null,p(e.fmt?.number(e.axisMax("dailyRepositories")/2)),1),t[28]||(t[28]=n("span",null,"0",-1))]),(a(!0),l(F,null,se(e.data?.history,(o,i)=>(a(),l("div",{class:P(["ov-spark-col has-tip",{"is-missing":o?._empty}]),key:i,"data-tip":o?._empty?e.historyLabel(o)+": no data":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+(o?.dailyRepositories===1?" repo":" repos"),"aria-label":o?._empty?e.historyLabel(o)+": no data":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+(o?.dailyRepositories===1?" repo":" repos")},[n("span",{class:"ov-spark-fill ov-spark-fill-alt",style:$e({height:e.historyBarH(o,"dailyRepositories")+"px"})},null,4)],10,dk))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",uk,[n("span",null,p(e.historyLabel(e.data?.history[0])),1),n("span",null,p(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,p(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),e.usersTiny()?f("v-if",!0):(a(),l("div",ck,[n("div",pk,[t[31]||(t[31]=n("span",{class:"ov-chart-title"},"Users \xB7 30d",-1)),n("span",fk,[n("span",hk,[t[29]||(t[29]=n("span",{class:"ov-dot-legend ov-dot-user-fill"},null,-1)),v("total users \xB7 "+p(e.fmt?.number(e.historyRange("nbUsers").max))+" now \xB7 +"+p(e.fmt?.number(Math.max(0,e.historyRange("nbUsers").max-e.usersFirst())))+" in 30 days",1)]),e.historyHasMissing()?(a(),l("span",mk,[...t[30]||(t[30]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),v("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",gk,[n("div",vk,[n("span",null,p(e.fmt?.number(e.userAxis().hi)),1),n("span",null,p(e.fmt?.number((e.userAxis().hi+e.userAxis().lo)/2)),1),n("span",null,p(e.fmt?.number(e.userAxis().lo)),1)]),(a(),l("svg",{class:"ov-step-svg",viewBox:"0 0 "+e.data.history.length+" 140",preserveAspectRatio:"none",role:"img","aria-label":"Total users over 30 days, from "+e.fmt?.number(e.usersFirst())+" to "+e.fmt?.number(e.historyRange("nbUsers").max)},[e.userAxis().lo===0?(a(),l("path",{key:0,class:"ov-step-area",d:e.userStepPath(!0)},null,8,bk)):f("v-if",!0),n("path",{class:"ov-step-line",d:e.userStepPath(!1),"vector-effect":"non-scaling-stroke"},null,8,wk)],8,yk)),e.firstDataIndex()>0?(a(),l("div",{key:0,class:"ov-step-missing",style:$e({width:e.firstDataIndex()/e.data.history.length*100+"%"})},null,4)):f("v-if",!0)])):f("v-if",!0),e.data?.history?.length?(a(),l("div",kk,[n("span",null,p(e.historyLabel(e.data?.history[0])),1),n("span",null,p(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,p(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])),n("div",Ck,[n("div",Ek,[t[34]||(t[34]=n("span",{class:"ov-chart-title"},"New users \xB7 30d",-1)),n("span",Sk,[n("span",Nk,[t[32]||(t[32]=n("span",{class:"ov-dot-legend ov-dot-new-user-fill"},null,-1)),v("users/day \xB7 peak "+p(e.fmt?.number(e.historyMax("dailyUsers"))),1)]),e.historyHasMissing()?(a(),l("span",Rk,[...t[33]||(t[33]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),v("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",Dk,[n("div",Pk,[n("span",null,p(e.fmt?.number(e.axisMax("dailyUsers"))),1),n("span",null,p(e.fmt?.number(e.axisMax("dailyUsers")/2)),1),t[35]||(t[35]=n("span",null,"0",-1))]),(a(!0),l(F,null,se(e.data?.history,(o,i)=>(a(),l("div",{class:P(["ov-spark-col has-tip",{"is-missing":o?._empty}]),key:i,"data-tip":o?._empty?e.historyLabel(o)+": no data":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+(o?.dailyUsers===1?" user":" users"),"aria-label":o?._empty?e.historyLabel(o)+": no data":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+(o?.dailyUsers===1?" user":" users")},[n("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:$e({height:e.historyBarH(o,"dailyUsers")+"px"})},null,4)],10,Ak))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",Tk,[n("span",null,p(e.historyLabel(e.data?.history[0])),1),n("span",null,p(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,p(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])],2),f(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",Ok,[f(" Repo status breakdown "),n("div",Ik,[n("div",Mk,[t[36]||(t[36]=n("span",{class:"ov-panel-title"},"Repo status",-1)),n("span",_k,p(e.fmt?.number(e.data?.repos?.total))+" total",1)]),n("div",Vk,[e.barPct("ready")>0?(a(),l("span",{key:0,class:"ov-bar-seg ov-bar-ready",title:"Ready",style:$e({width:e.barPct("ready")+"%"})},null,4)):f("v-if",!0),e.barPct("preparing")>0?(a(),l("span",{key:1,class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:$e({width:e.barPct("preparing")+"%"})},null,4)):f("v-if",!0),e.barPct("error")>0?(a(),l("span",{key:2,class:"ov-bar-seg ov-bar-error",title:"Error",style:$e({width:e.barPct("error")+"%"})},null,4)):f("v-if",!0),e.barPct("expired")>0?(a(),l("span",{key:3,class:"ov-bar-seg ov-bar-expired",title:"Expiring / expired",style:$e({width:e.barPct("expired")+"%"})},null,4)):f("v-if",!0),e.barPct("removed")>0?(a(),l("span",{key:4,class:"ov-bar-seg ov-bar-removed",title:"Removing / removed",style:$e({width:e.barPct("removed")+"%"})},null,4)):f("v-if",!0)]),n("div",qk,[n("a",$k,[t[37]||(t[37]=n("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[38]||(t[38]=v(" Ready ",-1)),n("span",Lk,p(e.fmt?.number(e.statusCount("ready"))),1)]),n("a",Fk,[t[39]||(t[39]=n("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[40]||(t[40]=v(" Preparing ",-1)),n("span",Uk,p(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),n("a",Bk,[t[41]||(t[41]=n("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[42]||(t[42]=v(" Error ",-1)),n("span",zk,p(e.fmt?.number(e.statusCount("error"))),1)]),n("a",Hk,[t[43]||(t[43]=n("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[44]||(t[44]=v(" Expiring / expired ",-1)),n("span",jk,p(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),n("a",Gk,[t[45]||(t[45]=n("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[46]||(t[46]=v(" Removing / removed ",-1)),n("span",Wk,p(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),f(" Error breakdown "),n("div",Kk,[n("div",Yk,[t[47]||(t[47]=n("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),n("span",Xk,p(e.fmt?.number(e.realErrors()))+" "+p(e.realErrors()===1?"error":"errors"),1)]),n("div",Qk,[n("div",Jk,[t[48]||(t[48]=n("span",{class:"ov-ebar-label"},"Error",-1)),n("span",Zk,[n("span",{class:"ov-ebar-fill ov-ebar-error",style:$e({width:e.errPct("error")+"%"})},null,4)]),n("span",xk,p(e.data?.errors?.severity?.error),1)]),n("div",e0,[t[49]||(t[49]=n("span",{class:"ov-ebar-label"},"Warning",-1)),n("span",t0,[n("span",{class:"ov-ebar-fill ov-ebar-warn",style:$e({width:e.errPct("warn")+"%"})},null,4)]),n("span",n0,p(e.data?.errors?.severity?.warn),1)]),e.errorHours().length?(a(),l("div",o0,[n("div",s0,[t[52]||(t[52]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-error","aria-hidden":"true"}),v("Error")],-1)),t[53]||(t[53]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-warn","aria-hidden":"true"}),v("Warning")],-1)),n("span",i0,[t[50]||(t[50]=v("Per hour",-1)),t[51]||(t[51]=n("span",{class:"seg-sep","aria-hidden":"true"},"\xB7",-1)),v("peak "+p(e.fmt?.number(e.errorHoursPeak())),1)])]),n("div",r0,[(a(!0),l(F,null,se(e.errorHours(),o=>(a(),l("span",{key:o.key,class:P({"is-bad":o.bad,"is-zero":o.zero}),title:o.title},[o.zero?(a(),l("i",l0)):(a(),l(F,{key:1},[o.errPct?(a(),l("i",{key:0,class:"ov-ehours-e",style:$e({height:o.errPct+"%"})},null,4)):f("v-if",!0),o.warnPct?(a(),l("i",{key:1,class:"ov-ehours-w",style:$e({height:o.warnPct+"%"})},null,4)):f("v-if",!0)],64))],10,a0))),128))]),t[54]||(t[54]=n("div",{class:"ov-ehours-x"},[n("span",null,"24h ago"),n("span",null,"now")],-1))])):f("v-if",!0),n("p",d0,"Info "+p(e.fmt?.number(e.data?.errors?.severity?.info||0))+" \xB7 logged, not counted as errors",1)]),e.data?.repos?.recentErrors24h?(a(),l("div",u0,[n("a",c0,p(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):f("v-if",!0)]),f(" Top routes / queues "),n("div",p0,[t[59]||(t[59]=n("div",{class:"ov-panel-head"},[n("span",{class:"ov-panel-title"},"Queues"),n("span",{class:"ov-panel-meta"},"by state")],-1)),n("div",f0,[t[58]||(t[58]=Se('
QueueActiveWaitFailed
',1)),n("a",h0,[t[55]||(t[55]=n("span",{class:"ov-route-name"},"Download",-1)),n("span",m0,p(e.data?.queues?.download?.active),1),n("span",g0,p(e.data?.queues?.download?.waiting),1),n("span",{class:P(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},p(e.data?.queues?.download?.failed),3)]),n("a",v0,[t[56]||(t[56]=n("span",{class:"ov-route-name"},"Remove",-1)),n("span",y0,p(e.data?.queues?.remove?.active),1),n("span",b0,p(e.data?.queues?.remove?.waiting),1),n("span",{class:P(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},p(e.data?.queues?.remove?.failed),3)]),n("a",w0,[t[57]||(t[57]=n("span",{class:"ov-route-name"},"Cache cleanup",-1)),n("span",k0,p(e.data?.queues?.cache?.active),1),n("span",C0,p(e.data?.queues?.cache?.waiting),1),n("span",{class:P(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},p(e.data?.queues?.cache?.failed),3)])])])]),f(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",E0,[n("div",S0,[t[60]||(t[60]=n("span",{class:"ov-panel-title"},"Services",-1)),n("span",N0,"5 services \xB7 "+p(e.realErrors()>0?"1 needs attention":"all healthy"),1)]),n("div",R0,[n("div",D0,[t[62]||(t[62]=n("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),n("div",P0,[t[61]||(t[61]=n("span",{class:"ov-svc-name"},"web",-1)),n("span",A0,p(e.data?.system?.nodeVersion)+" \xB7 up "+p(e.humanDuration(e.data?.system?.uptime)),1)])]),n("div",T0,[n("span",{class:P(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",O0,[t[63]||(t[63]=n("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(a(),l("span",I0,p(e.queueTotal(e.data?.queues?.download))+" "+p(e.queueTotal(e.data?.queues?.download)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.download)?f("v-if",!0):(a(),l("span",M0,"idle"))])]),n("div",_0,[n("span",{class:P(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",V0,[t[64]||(t[64]=n("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(a(),l("span",q0,p(e.queueTotal(e.data?.queues?.cache))+" "+p(e.queueTotal(e.data?.queues?.cache)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.cache)?f("v-if",!0):(a(),l("span",$0,"idle"))])]),n("div",L0,[n("span",{class:P(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",F0,[t[65]||(t[65]=n("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(a(),l("span",U0,p(e.queueTotal(e.data?.queues?.remove))+" "+p(e.queueTotal(e.data?.queues?.remove)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.remove)?f("v-if",!0):(a(),l("span",B0,"idle"))])]),n("div",z0,[n("span",{class:P(["ov-svc-dot",e.realErrors()>0?"ov-dot-warn":"ov-dot-ok"]),title:e.realErrors()>0?"Errors in the last 24 hours":"No errors in the last 24 hours"},null,10,H0),n("div",j0,[t[66]||(t[66]=n("span",{class:"ov-svc-name"},"errors",-1)),n("span",G0,p(e.fmt?.number(e.realErrors()))+" / 24h",1)])])])])],512)),[[Z,e.ovView==="summary"]]):f("v-if",!0),T(n("section",W0,[n("div",K0,[t[71]||(t[71]=n("div",null,[n("h2",{class:"ov-panel-title",id:"cache-heading"},"Cache"),n("p",{class:"ov-performance-note"},"Shared storage, repeated reads and anonymization work")],-1)),n("div",Y0,[t[69]||(t[69]=n("label",{for:"cache-window"},"Time range",-1)),T(n("select",{id:"cache-window",class:"form-control form-control-sm","onUpdate:modelValue":t[0]||(t[0]=o=>e.cacheMinutes=o),onChange:t[1]||(t[1]=o=>e.loadCache())},[...t[67]||(t[67]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1),n("option",{value:1440},"Last 24 hours",-1),n("option",{value:10080},"Last 7 days",-1)])],544),[[mn,e.cacheMinutes,void 0,{number:!0}]]),t[70]||(t[70]=n("label",{for:"cache-traffic"},"Traffic",-1)),T(n("select",{id:"cache-traffic",class:"form-control form-control-sm","onUpdate:modelValue":t[2]||(t[2]=o=>e.cacheTraffic=o)},[...t[68]||(t[68]=[Se('',6)])],512),[[mn,e.cacheTraffic]])])]),e.cacheError?(a(),l("div",X0,[n("span",null,p(e.cacheError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[3]||(t[3]=o=>e.loadCache())},"Retry")])):f("v-if",!0),!e.cacheReport&&!e.cacheError?(a(),l("p",Q0,"Loading cache monitoring\u2026")):f("v-if",!0),e.cacheReport?.available?(a(),l(F,{key:2},[e.cacheReport.enabled?f("v-if",!0):(a(),l("p",J0,"Shared blob storage is disabled. Inspection and legacy-cache activity are still measured.")),e.cacheReport.filesystemSupported?f("v-if",!0):(a(),l("p",Z0,"Shared blobs require a local filesystem. The configured storage continues to use its existing cache.")),e.cacheReport.dropped?(a(),l("p",x0,p(e.cacheReport.dropped)+" telemetry events were dropped. Totals may be incomplete.",1)):f("v-if",!0),e.cacheReport.source?(a(),l("div",e2,[n("table",t2,[t[72]||(t[72]=n("caption",{class:"sr-only"},"Current shared-cache storage and byte budgets",-1)),t[73]||(t[73]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Pool"),n("th",{scope:"col",class:"num"},"Allocated / budget"),n("th",{scope:"col",class:"num"},"Reserved for fills"),n("th",{scope:"col",class:"num"},"Original bytes"),n("th",{scope:"col",class:"num"},"Blobs"),n("th",{scope:"col",class:"num"},"Active readers")])],-1)),n("tbody",null,[(a(!0),l(F,null,se([{name:"Source blobs",data:e.cacheReport.source},{name:"Transformed output",data:e.cacheReport.results}],o=>T((a(),l("tr",{key:o.name},[n("th",n2,p(o.name),1),n("td",{class:P(["num budget-cell",{"is-over":o.data?.budgetBytes&&o.data?.allocatedBytes>o.data?.budgetBytes}]),title:o.data?.budgetBytes?Math.round(100*(o.data?.allocatedBytes||0)/o.data.budgetBytes)+"% of budget":null},[o.data?.budgetBytes&&o.data?.allocatedBytes>o.data?.budgetBytes?(a(),l("span",s2,"Over budget \xB7 ")):f("v-if",!0),v(p(e.humanBytes(o.data?.allocatedBytes))+" / "+p(e.humanBytes(o.data?.budgetBytes)),1),o.data?.budgetBytes?(a(),l("span",i2,[n("i",{style:$e({width:Math.min(100,Math.round(100*(o.data?.allocatedBytes||0)/o.data.budgetBytes))+"%"})},null,4)])):f("v-if",!0)],10,o2),n("td",r2,p(e.humanBytes(o.data?.reservedBytes)),1),n("td",a2,p(e.humanBytes(o.data?.originalBytes)),1),n("td",l2,p(e.fmt?.number(o.data?.blobs)),1),n("td",d2,p(e.fmt?.number(o.data?.activeReaders)),1)])),[[Z,o.data]])),128))])])])):f("v-if",!0),e.cacheReport.source?(a(),l("dl",u2,[n("div",null,[t[74]||(t[74]=n("dt",null,"Source request hit rate",-1)),n("dd",null,p(e.cacheRate("source","count")),1)]),n("div",null,[t[75]||(t[75]=n("dt",null,"Source byte hit rate",-1)),n("dd",null,p(e.cacheRate("source","bytes")),1)]),n("div",null,[t[76]||(t[76]=n("dt",null,"Decision hit rate",-1)),n("dd",null,p(e.cacheRate("decision","count")),1)])])):f("v-if",!0),t[79]||(t[79]=n("p",{class:"ov-performance-note"},"Reuse counts measure consecutive reads of the same blob within each interval. Codec timings are elapsed stream time, not CPU time; eviction times measure how long a blob was idle. Known monitors are identified by request metadata; other automation may remain in file reads.",-1)),e.cacheRows().length?(a(),l("div",c2,[n("table",p2,[t[77]||(t[77]=n("caption",{class:"sr-only"},"Cache events for the selected time range and traffic",-1)),t[78]||(t[78]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Event"),n("th",{scope:"col"},"Traffic"),n("th",{scope:"col",class:"num"},"Count"),n("th",{scope:"col",class:"num"},"Bytes"),n("th",{scope:"col",class:"num"},"Mean measured time"),n("th",{scope:"col",class:"num"},"p95 bound")])],-1)),n("tbody",null,[(a(!0),l(F,null,se(e.cacheRows(),o=>(a(),l("tr",{key:o.name+":"+o.traffic},[n("th",f2,p(e.cacheEventName(o.name)),1),n("td",h2,p(o.traffic),1),n("td",m2,p(e.fmt?.number(o.count)),1),n("td",g2,p(e.humanBytes(o.bytes)),1),n("td",{class:P(["num",{"ov-muted":!o.ms}])},p(o.ms?e.fmt.duration(o.ms/o.count):"Not timed"),3),n("td",{class:P(["num",{"ov-muted":!o.ms}])},p(e.cacheP95(o)),3)]))),128))])])])):(a(),l("p",v2,"No cache events in this time range for the selected traffic.")),n("p",y2,"Updated "+p(e.sampleAge(e.cacheReport))+" seconds ago. Minute history is retained for 48 hours; hourly history for 30 days.",1)],64)):f("v-if",!0)],512),[[Z,e.ovView==="cache"]]),T(n("section",b2,[n("div",w2,[t[84]||(t[84]=n("div",null,[n("h2",{class:"ov-panel-title",id:"performance-heading"},"Request performance"),n("p",{class:"ov-performance-note"},"Request latency and process health")],-1)),n("div",k2,[e.performance?.available?(a(),l(F,{key:0},[t[81]||(t[81]=n("label",{for:"performance-view"},"Show",-1)),T(n("select",{id:"performance-view",class:"form-control form-control-sm","onUpdate:modelValue":t[4]||(t[4]=o=>e.performanceTab=o),"aria-label":"Performance metrics"},[...t[80]||(t[80]=[n("option",{value:"routes"},"Routes",-1),n("option",{value:"processes"},"Processes",-1),n("option",{value:"stages"},"Work stages",-1)])],512),[[mn,e.performanceTab]])],64)):f("v-if",!0),t[83]||(t[83]=n("label",{for:"performance-window"},"Time range",-1)),T(n("select",{id:"performance-window",class:"form-control form-control-sm","onUpdate:modelValue":t[5]||(t[5]=o=>e.performanceMinutes=o),onChange:t[6]||(t[6]=o=>e.loadPerformance()),"aria-label":"Performance time range"},[...t[82]||(t[82]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1)])],544),[[mn,e.performanceMinutes,void 0,{number:!0}]])])]),e.performanceError?(a(),l("div",C2,[t[85]||(t[85]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,p(e.performanceError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[7]||(t[7]=o=>e.loadPerformance())},"Retry")])):f("v-if",!0),!e.performance&&!e.performanceError?(a(),l("p",E2,"Loading performance monitoring\u2026")):f("v-if",!0),e.performance?.available?(a(),l("div",S2,[T(n("div",N2,[e.performance.routes?.length?(a(),l("div",R2,[n("table",D2,[t[86]||(t[86]=n("caption",{class:"sr-only"},"Route latency for the selected time range",-1)),t[87]||(t[87]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Route"),n("th",{scope:"col",class:"num"},"Requests"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"First byte p95"),n("th",{scope:"col",class:"num"},"p95"),n("th",{scope:"col",class:"num"},"p99"),n("th",{scope:"col",class:"num"},"Interrupted"),n("th",{scope:"col",class:"num"},"5xx"),n("th",{scope:"col",class:"num"},"Slow")])],-1)),n("tbody",null,[(a(!0),l(F,null,se(e.performance.routes,o=>(a(),l("tr",{key:o.service+o.method+o.route},[n("th",P2,[n("span",null,p(o.route),1),n("small",null,p(o.service)+" \xB7 "+p(o.method),1)]),n("td",A2,p(e.fmt.number(o.count)),1),n("td",T2,p(e.formatMs(o.avgMs)),1),n("td",O2,p(e.firstByteBound(o)),1),n("td",I2,p(e.latencyBound(o,"p95UpperMs")),1),n("td",M2,p(e.latencyBound(o,"p99UpperMs")),1),n("td",{class:P(["num",{"ov-metric-warn":o.aborted>0}])},p(e.fmt.number(o.aborted)),3),n("td",{class:P(["num",{"ov-metric-bad":o.errors>0}])},p(e.fmt.number(o.errors)),3),n("td",{class:P(["num",{"ov-metric-warn":o.slow>0}])},p(e.fmt.number(o.slow)),3)]))),128))])])])):(a(),l("p",_2,"No recorded requests in this time range yet."))],512),[[Z,e.performanceTab==="routes"]]),T(n("div",V2,[t[91]||(t[91]=n("p",{class:"ov-performance-note"},"API and streamer processes \xB7 latest sample per instance",-1)),e.performance.instances?.length?(a(),l("div",$2,[n("table",L2,[t[89]||(t[89]=n("caption",{class:"sr-only"},"API and streamer process resource usage",-1)),t[90]||(t[90]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Process"),n("th",{scope:"col",class:"num"},"RSS / limit"),n("th",{scope:"col",class:"num"},"CPU"),n("th",{scope:"col",class:"num"},"Event loop p95"),n("th",{scope:"col",class:"num"},"Active requests"),n("th",{scope:"col",class:"num"},"Sockets / CLOSE_WAIT"),n("th",{scope:"col",class:"num"},"Workers / waiting"),n("th",{scope:"col",class:"num"},"Sample age"),n("th",{scope:"col",class:"num"},"Dropped batches / metrics")])],-1)),n("tbody",null,[(a(!0),l(F,null,se(e.performance.instances,o=>(a(),l("tr",{key:o.instance,class:P({"ov-metric-warning-row":e.performanceWarning(o)})},[n("th",F2,[n("span",null,p(o.instance),1),e.performanceWarning(o)?(a(),l("small",U2,[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),v(" Needs attention",-1)])])):f("v-if",!0)]),n("td",B2,[v(p(e.humanBytes(o.memory.rss))+" / "+p(e.humanBytes(o.memoryLimitBytes)),1),n("small",null,"Peak "+p(e.humanBytes(e.peakRss(o))),1)]),n("td",z2,p(o.cpuPercent==null?"Unavailable":o.cpuPercent.toFixed(1)+"%"),1),n("td",H2,p(o.eventLoop?.p95Ms==null?"Not applicable":e.fmt.duration(o.eventLoop.p95Ms)),1),n("td",j2,p(o.activeRequests),1),n("td",G2,p(o.sockets?.descriptors??"Unavailable")+" / "+p(o.sockets?.closeWait??"Unavailable"),1),n("td",W2,p(o.workers?.running??0)+" / "+p(o.workers?.waiting??0),1),n("td",K2,p(e.sampleAge(o))+" s",1),n("td",Y2,p(o.droppedBatches)+" / "+p(o.droppedMetrics),1)],2))),128))])])])):(a(),l("div",q2,"No recent process samples. Monitoring coverage is incomplete."))],512),[[Z,e.performanceTab==="processes"]]),T(n("div",X2,[e.performance.stages?.some(o=>o.metric!=="first_byte")?(a(),l("div",Q2,[n("table",J2,[t[92]||(t[92]=n("caption",{class:"sr-only"},"Work stages and cache results",-1)),t[93]||(t[93]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Work stage"),n("th",{scope:"col",class:"num"},"Samples"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"p95")])],-1)),n("tbody",null,[(a(!0),l(F,null,se(e.performance.stages.filter(o=>o.metric!=="first_byte"),o=>(a(),l("tr",{key:o.service+o.metric},[n("th",Z2,[n("span",null,p(o.metric),1),n("small",null,p(o.service),1)]),n("td",x2,p(e.fmt.number(o.count)),1),n("td",eC,p(e.formatMs(o.avgMs)),1),n("td",tC,p(e.latencyBound(o,"p95UpperMs")),1)]))),128))])])])):(a(),l("p",nC,"No recorded work stages or cache results in this time range yet."))],512),[[Z,e.performanceTab==="stages"]]),t[94]||(t[94]=n("details",{class:"ov-performance-help"},[n("summary",null,"How to read these metrics"),n("p",null,"Latency includes upstream waits and response transfer. Percentiles show histogram bucket upper bounds, not exact timings. Process rows marked \u201CNeeds attention\u201D have stale samples, dropped monitoring data, CLOSE_WAIT sockets, high event loop delay, or high memory usage.")],-1))])):f("v-if",!0)],512),[[Z,e.ovView==="performance"]])])}var oC={class:"container paper-page admin-page"},sC={class:"q-header"},iC={class:"q-header-actions"},rC={class:"q-cards"},aC=["aria-pressed","onKeydown","onClick"],lC={class:"q-card-head"},dC=["title"],uC=["textContent"],cC=["textContent"],pC={class:"q-card-sub"},fC={class:"q-card-failed"},hC={key:0,class:"q-card-bar"},mC={key:0,class:"q-detail"},gC={class:"q-throughput"},vC={class:"q-range-btns"},yC={class:"q-section-label"},bC={key:0,class:"q-section-right"},wC={class:"q-chart-wrap"},kC={key:0,class:"q-chart-empty"},CC={class:"q-stats-panel"},EC={class:"q-section-label"},SC={class:"q-stats-grid"},NC={class:"q-stat"},RC=["textContent"],DC={class:"q-stat"},PC=["textContent"],AC={class:"q-stat"},TC=["textContent"],OC={class:"q-stat"},IC=["textContent"],MC={class:"q-stat"},_C=["textContent"],VC={class:"q-stat"},qC=["textContent"],$C={class:"q-stats-actions"},LC=["disabled"],FC={class:"q-danger-group"},UC={class:"q-jobs"},BC={class:"q-jobs-header"},zC={class:"q-section-label"},HC={class:"seg-filter",role:"radiogroup","aria-label":"Filter jobs by state"},jC=["aria-checked"],GC={class:"count"},WC=["aria-checked"],KC={class:"count"},YC=["aria-checked"],XC={class:"count"},QC=["aria-checked"],JC={class:"count"},ZC=["aria-checked"],xC={class:"count"},eE=["aria-checked"],tE={class:"count"},nE={class:"q-search-row"},oE={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},sE={class:"q-auto-refresh"},iE={type:"checkbox"},rE={key:0,class:"q-table"},aE=["onClick"],lE={class:"q-cell-state"},dE=["textContent"],uE=["textContent"],cE=["title"],pE=["textContent","href"],fE=["title","textContent"],hE=["textContent"],mE=["textContent"],gE={class:"q-cell-progress"},vE=["aria-label"],yE=["textContent"],bE={class:"q-cell-actions"},wE=["onClick"],kE=["onClick"],CE={key:0,class:"q-detail-row"},EE={colspan:"7"},SE={class:"q-job-detail"},NE={class:"q-job-detail-grid"},RE={class:"q-job-detail-item"},DE={class:"q-job-detail-value"},PE=["textContent","href"],AE={class:"q-job-detail-item"},TE={class:"q-job-detail-value"},OE=["textContent"],IE={key:0,class:"q-job-detail-item"},ME=["textContent"],_E={key:1,class:"q-job-detail-item"},VE=["textContent"],qE={key:2,class:"q-job-detail-item"},$E={class:"q-job-detail-value"},LE={key:3,class:"q-job-detail-item"},FE=["textContent"],UE={key:4,class:"q-job-detail-item"},BE=["textContent"],zE={key:5,class:"q-job-detail-item"},HE=["textContent"],jE={key:6,class:"q-job-detail-item"},GE=["textContent"],WE={key:7,class:"q-job-detail-item"},KE=["textContent"],YE={key:0,class:"q-job-detail-error"},XE=["textContent"],QE={key:1},JE=["textContent"],ZE={class:"q-job-detail-actions"},xE=["onClick"],eS=["onClick"],tS=["href"],nS={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},oS={key:0},sS={key:1};function Zc(e,t){let o=Pe("field");return a(),l("div",oC,[t[71]||(t[71]=n("div",{class:"paper-crumbs"},[v("Admin \xA0/\xA0 "),n("span",{class:"here"},"Queues")],-1)),n("div",sC,[t[18]||(t[18]=n("h1",{class:"paper-page-title"},"Queues",-1)),n("div",iC,[n("button",{class:"btn btn-sm",onClick:t[0]||(t[0]=i=>e.pauseAll())},"Pause all queues")])]),t[72]||(t[72]=Se('',1)),f(" Queue overview cards "),n("div",rC,[(a(!0),l(F,null,se(e.queueList,(i,s)=>(a(),l("div",{class:P(["q-card",{selected:e.selectedQueue==i?.key,paused:i?.paused}]),role:"button",tabindex:"0","aria-pressed":e.selectedQueue===i.key,onKeydown:[kt(le(r=>e.selectQueue(i.key),["prevent"]),["enter"]),kt(le(r=>e.selectQueue(i.key),["prevent"]),["space"])],onClick:r=>e.selectQueue(i.key)},[n("div",lC,[n("span",{class:P(["q-dot",{"q-dot-red":i?.paused||i?.counts?.failed>0,"q-dot-idle":!i?.counts?.active&&!i?.counts?.waiting}]),title:i?.paused?"Paused":i?.counts?.failed>0?i.counts.failed+" failed jobs":i?.counts?.active||i?.counts?.waiting?"Running":"Idle"},null,10,dC),n("span",{class:"q-card-name",textContent:p(i?.label)},null,8,uC)]),n("div",{class:"q-card-count",textContent:p((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0))},null,8,cC),n("div",pC,[n("span",null,[v("waiting \xB7 "+p(i?.counts?.active||0)+" active",1),i?.counts?.failed?(a(),l(F,{key:0},[t[19]||(t[19]=v(" \xB7 ",-1)),n("b",fC,p(i.counts.failed)+" failed",1)],64)):f("v-if",!0),i?.paused?(a(),l(F,{key:1},[t[20]||(t[20]=v(" \xB7 ",-1)),t[21]||(t[21]=n("b",{class:"q-card-failed"},"paused",-1))],64)):f("v-if",!0)]),i?.counts?.active?(a(),l("div",hC,[n("div",{class:"q-card-bar-fill",style:$e({width:i?.counts?.active/((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0)||1)*100+"%"})},null,4)])):f("v-if",!0)])],42,aC))),256))]),f(" Detail: throughput chart + stats panel "),e.selectedStats?(a(),l("div",mC,[n("div",gC,[n("div",vC,[n("button",{class:P(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[1]||(t[1]=i=>e.setRange("1h"))},"1h",2),n("button",{class:P(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[2]||(t[2]=i=>e.setRange("6h"))},"6h",2),n("button",{class:P(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[3]||(t[3]=i=>e.setRange("24h"))},"24h",2),n("button",{class:P(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[4]||(t[4]=i=>e.setRange("7d"))},"7d",2)]),n("div",yC,[v("Throughput \xB7 "+p(e.selectedQueue)+" ",1),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l("span",bC,[t[23]||(t[23]=n("span",{class:"q-legend-completed"},"\u25CF",-1)),t[24]||(t[24]=v(" Completed ",-1)),t[25]||(t[25]=n("span",{class:"q-legend-failed"},"\u25CF",-1)),t[26]||(t[26]=v(" Failed ",-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l(F,{key:0},[t[22]||(t[22]=n("span",{class:"q-legend-exec","aria-hidden":"true"},null,-1)),v(" Avg time \xB7 "+p(e.range),1)],64)):f("v-if",!0)])):f("v-if",!0)]),n("div",wC,[t[28]||(t[28]=n("canvas",{id:"q-throughput-chart",height:"180"},null,-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)===0?(a(),l("div",kC,[...t[27]||(t[27]=[n("strong",null,"No jobs processed in this window",-1),n("span",null,"Completed and failed jobs will chart here.",-1)])])):f("v-if",!0),t[29]||(t[29]=n("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}},null,-1)),t[30]||(t[30]=n("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}},null,-1))])]),n("div",CC,[n("div",EC,"Stats \xB7 "+p(e.selectedQueue),1),n("div",SC,[n("div",NC,[t[31]||(t[31]=n("div",{class:"q-stat-label"},"Waiting",-1)),n("div",{class:"q-stat-value",textContent:p(e.selectedStats?.counts?.waiting||0)},null,8,RC)]),n("div",DC,[t[32]||(t[32]=n("div",{class:"q-stat-label"},"Active",-1)),n("div",{class:"q-stat-value",textContent:p(e.selectedStats?.counts?.active||0)},null,8,PC)]),n("div",AC,[t[33]||(t[33]=n("div",{class:"q-stat-label"},"Completed (24h)",-1)),n("div",{class:"q-stat-value",textContent:p(e.fmt?.number(e.selectedStats?.completed24h))},null,8,TC)]),n("div",OC,[t[34]||(t[34]=n("div",{class:"q-stat-label"},"Failed (24h)",-1)),n("div",{class:"q-stat-value",textContent:p(e.selectedStats?.failed24h||0)},null,8,IC)]),n("div",MC,[t[35]||(t[35]=n("div",{class:"q-stat-label"},"Delayed",-1)),n("div",{class:"q-stat-value",textContent:p(e.selectedStats?.counts?.delayed||0)},null,8,_C)]),n("div",VC,[t[36]||(t[36]=n("div",{class:"q-stat-label"},"Workers",-1)),n("div",{class:"q-stat-value",textContent:p(e.selectedStats?.workers||0)},null,8,qC)])]),n("div",$C,[n("button",{class:"btn btn-sm",onClick:t[5]||(t[5]=i=>e.togglePause())},p(e.selectedStats?.paused?"Resume "+e.selectedQueue:"Pause "+e.selectedQueue),1),n("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=i=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,LC),n("span",FC,[n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[7]||(t[7]=i=>e.drainSelected())},"Drain"),n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[8]||(t[8]=i=>e.emptyQueue())},"Empty")])])])])):f("v-if",!0),e.actionError?(a(),l("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=i=>e.actionError=null)},[t[37]||(t[37]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),v(" "+p(e.actionError),1)])):f("v-if",!0),f(" Jobs table "),n("div",UC,[n("div",BC,[n("div",zC,"All jobs \xB7 "+p(e.selectedQueue),1),n("div",HC,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[10]||(t[10]=i=>e.setSegView("all"))},[t[38]||(t[38]=v("All ",-1)),n("span",GC,p(e.fmt?.number(e.segCount("all"))),1)],10,jC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="active","is-empty":!e.segCount("active")}]),"aria-checked":e.segView()==="active",onClick:t[11]||(t[11]=i=>e.setSegView("active"))},[t[39]||(t[39]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[40]||(t[40]=v("Active ",-1)),n("span",KC,p(e.fmt?.number(e.segCount("active"))),1)],10,WC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="waiting","is-empty":!e.segCount("waiting")}]),"aria-checked":e.segView()==="waiting",onClick:t[12]||(t[12]=i=>e.setSegView("waiting"))},[t[41]||(t[41]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[42]||(t[42]=v("Waiting ",-1)),n("span",XC,p(e.fmt?.number(e.segCount("waiting"))),1)],10,YC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="delayed","is-empty":!e.segCount("delayed")}]),"aria-checked":e.segView()==="delayed",onClick:t[13]||(t[13]=i=>e.setSegView("delayed"))},[t[43]||(t[43]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[44]||(t[44]=v("Delayed ",-1)),n("span",JC,p(e.fmt?.number(e.segCount("delayed"))),1)],10,QC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="failed","is-empty":!e.segCount("failed")}]),"aria-checked":e.segView()==="failed",onClick:t[14]||(t[14]=i=>e.setSegView("failed"))},[t[45]||(t[45]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[46]||(t[46]=v("Failed ",-1)),n("span",xC,p(e.fmt?.number(e.segCount("failed"))),1)],10,ZC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="completed","is-empty":!e.segCount("completed")}]),"aria-checked":e.segView()==="completed",onClick:t[15]||(t[15]=i=>e.setSegView("completed"))},[t[47]||(t[47]=n("span",{class:"seg-dot done","aria-hidden":"true"},null,-1)),t[48]||(t[48]=v("Completed ",-1)),n("span",tE,p(e.fmt?.number(e.segCount("completed"))),1)],10,eE)])]),n("div",nE,[T(n("input",oE,null,512),[[o,{state:e.viewState,set:i=>{e.query.search=i},value:e.query?.search,form:null,options:{}}]]),n("label",sE,[T(n("input",iE,null,512),[[o,{state:e.viewState,set:i=>{e.query.autoRefresh=i},value:e.query?.autoRefresh,form:null,options:{}}]]),t[49]||(t[49]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))]),n("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[16]||(t[16]=i=>e.refreshNow()),"aria-label":"Refresh"},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])]),e.filteredJobs().length>0?(a(),l("table",rE,[t[69]||(t[69]=n("thead",null,[n("tr",null,[n("th",null,"State"),n("th",null,"Job"),n("th",null,"Detail"),n("th",null,"Attempts"),n("th",{class:"q-th-num"},"Duration"),n("th",null,"Progress"),n("th")])],-1)),(a(!0),l(F,null,se(e.filteredJobs(),(i,s)=>(a(),l("tbody",null,[n("tr",{style:{cursor:"pointer"},class:P({"q-row-failed":i?._state=="failed","q-row-expanded":e.expanded[i?.id]}),onClick:r=>e.toggleJob(i)},[n("td",lE,[n("span",{textContent:p(i?._state),class:P("q-state-badge q-state-"+i?._state)},null,10,dE),i?._state=="delayed"&&i?.delayUntil?(a(),l("span",{key:0,class:"q-delay-hint",textContent:p(e.delayCountdown(i?.delayUntil))},null,8,uE)):f("v-if",!0)]),n("td",{class:"q-cell-id",title:"job:"+i?.id+(i?.name&&i?.name!==i?.id?" \xB7 "+i.name:"")+(i?.data?.repoId&&i?.data?.repoId!==i?.id?" \xB7 "+i.data.repoId:"")},[(a(),l("svg",{class:P(["ui-icon q-chevron",{"q-chevron-open":e.expanded[i?.id]}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#ui-icon-chevron-right"},null,-1)])],2)),n("a",{target:"_blank",class:"q-job-link",textContent:p(i?.data?.repoId||i?.id),onClick:t[17]||(t[17]=r=>r.stopPropagation()),href:e.safeUrl("/r/"+(i?.data?.repoId||i?.id))},null,8,pE)],8,cE),n("td",{class:P(["q-cell-detail",{"is-error":i?._state=="failed"}]),title:i?._state=="failed"?i?.failedReason:"",textContent:p(e.jobDetail(i))},null,10,fE),n("td",{class:"q-cell-num",textContent:p(i?.attemptsMade||1)},null,8,hE),n("td",{class:"q-cell-num q-cell-duration",textContent:p(e.jobDuration(i))},null,8,mE),n("td",gE,[n("div",{class:P(["q-progress-wrap",{"is-indeterminate":e.jobProgressPct(i)===null}]),"aria-label":e.jobProgressPct(i)===null?"Progress not reported":e.jobProgressPct(i)+"% done"},[n("div",{class:"q-progress-bar",style:$e({"--pct":(e.jobProgressPct(i)||0)+"%"})},null,4),n("span",{class:"q-progress-label",textContent:p(e.jobProgressPct(i)===null?"\u2014":e.jobProgressPct(i)+"%")},null,8,yE)],10,vE)]),n("td",bE,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm btn-icon",title:"Retry",onClick:r=>{e.retryJob(i),r.stopPropagation()},"aria-label":"Retry job"},[...t[52]||(t[52]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])],8,wE)):f("v-if",!0),n("button",{class:"btn btn-sm btn-icon",title:"Remove","aria-label":"Remove job",onClick:r=>{e.removeJob(i),r.stopPropagation()}},[...t[53]||(t[53]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,kE)])],10,aE),e.expanded[i?.id]?(a(),l("tr",CE,[n("td",EE,[n("div",SE,[n("div",NE,[n("div",RE,[t[54]||(t[54]=n("span",{class:"q-job-detail-label"},"Job id",-1)),n("span",DE,[n("a",{target:"_blank",textContent:p(i?.id),href:e.safeUrl("/r/"+i?.id)},null,8,PE)])]),n("div",AE,[t[55]||(t[55]=n("span",{class:"q-job-detail-label"},"State",-1)),n("span",TE,[n("span",{textContent:p(i?._state),class:P("q-state-badge q-state-"+i?._state)},null,10,OE)])]),i?.data?.repoId?(a(),l("div",IE,[t[56]||(t[56]=n("span",{class:"q-job-detail-label"},"Repo ID",-1)),n("span",{class:"q-job-detail-value",textContent:p(i?.data?.repoId)},null,8,ME)])):f("v-if",!0),i?.timestamp?(a(),l("div",_E,[t[57]||(t[57]=n("span",{class:"q-job-detail-label"},"Created",-1)),n("span",{class:"q-job-detail-value",textContent:p(e.humanTime(i?.timestamp))},null,8,VE)])):f("v-if",!0),i?._state=="delayed"&&i?.delayUntil?(a(),l("div",qE,[t[58]||(t[58]=n("span",{class:"q-job-detail-label"},"Retry at",-1)),n("span",$E,p(e.humanTime(i?.delayUntil))+" ("+p(e.delayCountdown(i?.delayUntil))+")",1)])):f("v-if",!0),i?.processedOn?(a(),l("div",LE,[t[59]||(t[59]=n("span",{class:"q-job-detail-label"},"Processed",-1)),n("span",{class:"q-job-detail-value",textContent:p(e.humanTime(i?.processedOn))},null,8,FE)])):f("v-if",!0),i?.finishedOn?(a(),l("div",UE,[t[60]||(t[60]=n("span",{class:"q-job-detail-label"},"Finished",-1)),n("span",{class:"q-job-detail-value",textContent:p(e.humanTime(i?.finishedOn))},null,8,BE)])):f("v-if",!0),i?.attemptsMade?(a(),l("div",zE,[t[61]||(t[61]=n("span",{class:"q-job-detail-label"},"Attempts",-1)),n("span",{class:"q-job-detail-value",textContent:p(i?.attemptsMade)},null,8,HE)])):f("v-if",!0),i?.progress&&i?.progress?.status?(a(),l("div",jE,[t[62]||(t[62]=n("span",{class:"q-job-detail-label"},"Status",-1)),n("span",{class:"q-job-detail-value",textContent:p(i?.progress?.status)},null,8,GE)])):f("v-if",!0),e.jobProgressPct(i)!==null?(a(),l("div",WE,[t[63]||(t[63]=n("span",{class:"q-job-detail-label"},"Progress",-1)),n("span",{class:"q-job-detail-value",textContent:p(e.jobProgressPct(i)+"%")},null,8,KE)])):f("v-if",!0)]),i?.failedReason?(a(),l("div",YE,[t[64]||(t[64]=n("span",{class:"q-job-detail-label"},"Error",-1)),n("div",{class:"q-error-reason",textContent:p(i?.failedReason)},null,8,XE)])):f("v-if",!0),i?.stacktrace?.length?(a(),l("div",QE,[t[65]||(t[65]=n("span",{class:"q-job-detail-label"},"Stacktrace",-1)),(a(!0),l(F,null,se(i?.stacktrace,(r,d)=>(a(),l("pre",{class:"q-error-stack",key:d},[n("code",{textContent:p(r)},null,8,JE)]))),128))])):f("v-if",!0),n("div",ZE,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm",onClick:r=>e.retryJob(i)},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Retry",-1)])],8,xE)):f("v-if",!0),n("button",{class:"btn btn-sm",onClick:r=>e.removeJob(i)},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Remove",-1)])],8,eS),n("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+i?.id)},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1),v(" View repo",-1)])],8,tS)])])])])):f("v-if",!0)]))),256))])):f("v-if",!0),e.filteredJobs().length==0?(a(),l("div",nS,[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1)),e.query?.search?f("v-if",!0):(a(),l("span",oS,"No jobs in the "+p(e.selectedQueue)+" queue.",1)),e.query?.search?(a(),l("span",sS,"No jobs match the current filters.")):f("v-if",!0)])):f("v-if",!0)])])}var iS={class:"container paper-page admin-page"},rS={class:"seg-bar"},aS={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},lS=["aria-checked"],dS={class:"count"},uS=["aria-checked"],cS={class:"count"},pS=["aria-checked"],fS={class:"count"},hS=["aria-checked"],mS={class:"count"},gS=["aria-checked"],vS={class:"count"},yS=["aria-checked"],bS={class:"count"},wS={class:"seg-countline",role:"status"},kS={class:"seg-meta"},CS={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},ES={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},SS=["aria-expanded"],NS={class:"search-wrap"},RS={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories\u2026",autocomplete:"off"},DS={key:0,class:"admin-search-hint"},PS={class:"admin-filter-inline"},AS={type:"text",class:"form-control form-control-sm",placeholder:"username"},TS={class:"admin-filter-inline"},OS={type:"text",class:"form-control form-control-sm",placeholder:"ID"},IS={key:0,class:"admin-filter-inline","aria-label":"Pagination"},MS=["disabled"],_S={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},VS=["disabled"],qS={key:0,class:"admin-filter-row"},$S={class:"admin-active-chips"},LS={class:"key"},FS=["onClick"],US={key:1,class:"bulk-bar"},BS={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},zS={class:"paper-table-head",role:"row"},HS={role:"columnheader",style:{width:"28px"}},jS=["checked"],GS={role:"columnheader"},WS={role:"columnheader"},KS={role:"columnheader",class:"num"},YS={role:"columnheader"},XS={role:"cell",style:{width:"28px"}},QS={type:"checkbox","aria-label":"Select repository"},JS={class:"cell-anon",role:"cell"},ZS={class:"anon-text"},xS=["textContent","href"],eN=["title"],tN=["href"],nN=["textContent"],oN=["textContent"],sN=["data-meta-label"],iN=["title","textContent","href"],rN=["data-meta-label"],aN=["textContent","href"],lN=["data-meta-label"],dN={key:3,class:"meta-item"},uN={class:"meta-item"},cN={class:"cell-status",role:"cell"},pN={class:"status-line"},fN=["textContent"],hN=["textContent","title"],mN=["data-unit"],gN=["textContent"],vN={class:"cell-expires",role:"cell"},yN=["textContent"],bN={class:"cell-actions",role:"cell"},wN={class:"dropdown"},kN={class:"dropdown-menu dropdown-menu-right"},CN=["href"],EN=["href"],SN=["href"],NN=["onClick"],RN=["onClick"],DN=["onClick"],PN=["onClick"],AN=["onClick"],TN=["onClick"],ON={key:0,class:"paper-table-empty"},IN={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},MN={key:0,class:"pagination-compact"},_N=["disabled"],VN=["max"],qN=["disabled"],$N={class:"admin-filter-inline"},LN={class:"form-control form-control-sm"};function xc(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",iS,[t[80]||(t[80]=Se('
Admin \xA0/\xA0 Repositories

Repositories

',3)),n("div",rS,[n("div",aS,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=s=>e.setSegView("all"))},[t[21]||(t[21]=v("All ",-1)),n("span",dS,p(e.fmt?.number(e.segCount("all"))),1)],10,lS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=s=>e.setSegView("ready"))},[t[22]||(t[22]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[23]||(t[23]=v("Ready ",-1)),n("span",cS,p(e.fmt?.number(e.segCount("ready"))),1)],10,uS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=s=>e.setSegView("preparing"))},[t[24]||(t[24]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[25]||(t[25]=v("Preparing ",-1)),n("span",fS,p(e.fmt?.number(e.segCount("preparing"))),1)],10,pS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=s=>e.setSegView("error"))},[t[26]||(t[26]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[27]||(t[27]=v("Error ",-1)),n("span",mS,p(e.fmt?.number(e.segCount("error"))),1)],10,hS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=s=>e.setSegView("expired"))},[t[28]||(t[28]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[29]||(t[29]=v("Expiring / expired ",-1)),n("span",vS,p(e.fmt?.number(e.segCount("expired"))),1)],10,gS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=s=>e.setSegView("removed"))},[t[30]||(t[30]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[31]||(t[31]=v("Removing / removed ",-1)),n("span",bS,p(e.fmt?.number(e.segCount("removed"))),1)],10,yS)]),n("p",wS,[n("strong",null,p(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[32]||(t[32]=v(" shown",-1)),t[33]||(t[33]=n("span",{class:"seg-sep"},"\xB7",-1)),n("span",kS,p(e.fmt?.humanFileSize(e.totalSize))+" on disk",1)])]),e.fetchError?(a(),l("div",CS,[t[34]||(t[34]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),v(" "+p(e.fetchError),1)])):f("v-if",!0),T((a(),l("form",ES,[f(" Row 1: search + scoped inputs + headline actions "),n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=s=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},"Filters",8,SS),n("div",{class:P(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",NS,[T(n("input",RS,null,512),[[o,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",DS,"/"))]),n("span",PS,[t[35]||(t[35]=n("label",null,"Owner",-1)),T(n("input",AS,null,512),[[o,{state:e.viewState,set:s=>{e.query.owner=s},value:e.query?.owner,form:null,options:{}}]])]),n("span",TS,[t[36]||(t[36]=n("label",null,"Conference",-1)),T(n("input",OS,null,512),[[o,{state:e.viewState,set:s=>{e.query.conference=s},value:e.query?.conference,form:null,options:{}}]])]),t[40]||(t[40]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[7]||(t[7]=s=>e.exportCsv())},[...t[37]||(t[37]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),v(" Export",-1)])]),e.totalPage>1?(a(),l("span",IS,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[38]||(t[38]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,MS),n("span",_S,p(e.query?.page)+"/"+p(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[9]||(t[9]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[39]||(t[39]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,VS)])):f("v-if",!0)],2),f(" Row 2: appears only when there are active filter chips "),e.chips?.length?(a(),l("div",qS,[n("div",$S,[(a(!0),l(F,null,se(e.chips,(s,r)=>(a(),l("span",{class:"admin-active-chip",key:s?.key},[n("span",LS,p(s?.label),1),n("span",null,p(s?.value),1),n("button",{type:"button","aria-label":"Remove filter",onClick:d=>e.clearFilter(s.key)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,FS)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",US,[n("span",null,[n("strong",null,p(e.selectedCount()),1),t[42]||(t[42]=v(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=s=>e.bulkRefresh())},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[11]||(t[11]=s=>e.bulkRemoveCache())},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),v(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[12]||(t[12]=s=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",BS,[n("div",zS,[n("div",HS,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[13]||(t[13]=s=>e.selectAllOnPage()),checked:e.allSelected},null,8,jS)]),n("div",GS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[14]||(t[14]=s=>e.sortBy("source.repositoryName"))},[t[46]||(t[46]=v("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[45]||(t[45]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",WS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[15]||(t[15]=s=>e.sortBy("status"))},[t[48]||(t[48]=v("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[47]||(t[47]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",KS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[16]||(t[16]=s=>e.sortBy("pageView"))},[t[50]||(t[50]=v("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[49]||(t[49]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",YS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[17]||(t[17]=s=>e.sortBy("anonymizeDate"))},[t[52]||(t[52]=v("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[53]||(t[53]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(F,null,se(e.filteredRepositories,(s,r)=>(a(),l("div",{class:P(["paper-table-row",{"repo-inactive":s?.status=="expired"||s?.status=="removed","repo-error":s?.status=="error","row-selected":e.selected[s?.repoId]}]),role:"row"},[n("div",XS,[T(n("input",QS,null,512),[[o,{state:e.viewState,set:d=>{e.selected[s.repoId]=d},value:e.selected[s?.repoId],form:null,options:{}}]])]),n("div",JS,[t[56]||(t[56]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",ZS,[n("a",{class:"repo-name",target:"_blank",textContent:p(s?.repoId),href:e.safeUrl("/r/"+s?.repoId)},null,8,xS),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[s?.source?.fullName||s?.source?.repositoryName,s?.options?.update?"branch "+s?.source?.branch:"commit "+s?.source?.commit?.substring(0,7),s?.conference?"conference "+s?.conference:"",s?.size?.storage>0?e.fmt?.humanFileSize(s?.size?.storage):"",e.fmt?.number(s?.options?.terms?.length)+(s?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+s?.source?.repositoryName+"/")},[(s?.source?.repositoryName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:p((d=>d.length>16?d.slice(0,14)+"\u2026":d)((s?.source?.repositoryName||"").split("/")[0]))},null,8,nN)):f("v-if",!0),n("span",{class:"src-repo",textContent:p((s?.source?.repositoryName||"").includes("/")?"/"+(s?.source?.repositoryName||"").split("/").slice(1).join("/"):s?.source?.repositoryName)},null,8,oN)],8,tN),s?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(s?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:s?.source?.commit,textContent:p(s?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.commit)},null,8,iN)],8,sN)),s?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(s?.source?.branch||"")},[n("a",{textContent:p(s?.source?.branch),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.branch)},null,8,aN)],8,rN)):f("v-if",!0),s?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+s?.conference},[t[54]||(t[54]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),v(" "+p(s?.conference),1)],8,lN)):f("v-if",!0),s?.size?.storage>0?(a(),l("span",dN,p(e.fmt?.humanFileSize(s?.size?.storage)),1)):f("v-if",!0),n("span",uN,p(e.fmt?.number(s?.options?.terms?.length))+" "+p(s?.options?.terms?.length===1?"term":"terms"),1),t[55]||(t[55]=n("span",{class:"meta-more",hidden:""},null,-1))],8,eN)])]),n("div",cN,[n("span",pN,[n("span",{class:P(["status-dot","st-"+(s?.status||"unknown")])},null,2),n("span",{textContent:p(e.fmt?.statusLabel(s?.status))},null,8,fN)]),s?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:p(e.fmt?.statusMsg(s?.statusMessage)),title:s?.statusMessage},null,8,hN)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(s?.pageView||0)===1?"view":"views"},[t[57]||(t[57]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),t[58]||(t[58]=v()),n("span",{textContent:p(e.fmt?.number(s?.pageView||0))},null,8,gN)],8,mN),n("div",vN,[t[59]||(t[59]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[60]||(t[60]=v()),n("span",{textContent:p((e.fmt?.humanTime(s?.anonymizeDate)||"").replace(/^on /,""))},null,8,yN)]),n("div",bN,[n("div",wN,[t[72]||(t[72]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",kN,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+s?.repoId)},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit",-1)])],8,CN),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+s?.repoId+"/")},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" View repo",-1)])],8,EN),s?.options?.page&&s?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+s?.repoId+"/")},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),v(" View page",-1)])],8,SN)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.fetchGithubInfo(s),["prevent"])},[...t[64]||(t[64]=[n("i",{class:"fab fa-github"},null,-1),v(" Live GitHub info",-1)])],8,NN),t[70]||(t[70]=n("div",{class:"dropdown-divider"},null,-1)),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.updateRepository(s),["prevent"])},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Force update",-1)])],8,RN),[[Z,s?.status=="ready"||s?.status=="error"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.updateRepository(s),["prevent"])},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),v(" Enable",-1)])],8,DN),[[Z,s?.status=="removed"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.showStatusMessage(s),["prevent"])},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),v(" View status message",-1)])],8,PN),[[Z,s?.statusMessage]]),t[71]||(t[71]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.removeCache(s),["prevent"])},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),v(" Remove cache",-1)])],8,AN),T(n("a",{class:"dropdown-item text-danger",href:"#",onClick:le(d=>e.removeRepository(s),["prevent"])},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Remove",-1)])],8,TN),[[Z,s?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",ON,[t[73]||(t[73]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),t[74]||(t[74]=n("span",null,"No repositories match the current filters.",-1)),e.query.ready&&e.query.expired&&e.query.removed&&e.query.error&&e.query.preparing?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-outline-ink",onClick:t[18]||(t[18]=s=>e.showAllStatuses())},"Show all statuses"))])):f("v-if",!0)]),n("div",IN,[t[79]||(t[79]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",MN,[n("button",{class:"btn btn-sm",onClick:t[19]||(t[19]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),v(" Previous ",-1)])],8,_N),T(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,VN),[[o,{state:e.viewState,set:s=>{e.query.page=s},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+p(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[20]||(t[20]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[76]||(t[76]=[v(" Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,qN)])):f("v-if",!0),n("span",$N,[t[78]||(t[78]=n("label",null,"Per page",-1)),T((a(),l("select",LN,[...t[77]||(t[77]=[Se('',5)])])),[[o,{state:e.viewState,set:s=>{e.query.limit=s},value:e.query?.limit,form:null,options:{}}]])])])])}var FN={class:"container paper-page admin-page"},UN={class:"paper-crumbs"},BN={class:"here"},zN={class:"paper-page-title"},HN={key:0,class:"user-detail-card"},jN={class:"user-header"},GN=["src"],WN={class:"user-header-status"},KN={class:"status-dot-wrap"},YN=["textContent"],XN={key:0,class:"type-badge type-repo"},QN={class:"user-actions",style:{"margin-top":"4px"}},JN={class:"user-detail-grid"},ZN={class:"detail-value mono-id"},xN={class:"detail-value"},eR=["href"],tR={class:"detail-value"},nR={class:"detail-value"},oR={key:0},sR={key:1,class:"text-muted"},iR={class:"detail-value"},rR={key:0,style:{"margin-top":"20px"}},aR={class:"paper-table w-100",style:{"margin-top":"10px"}},lR={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},dR={class:"cell-anon",role:"cell"},uR={class:"anon-text"},cR=["textContent"],pR={class:"cell-expires",role:"cell"},fR={key:1,class:"admin-section-header"},hR={class:"section-count"},mR={key:2,class:"user-detail-card"},gR={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},vR={key:0,class:"alert alert-warning",role:"alert"},yR={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},bR={key:1,class:"paper-table w-100"},wR={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},kR=["textContent"],CR=["textContent"],ER={role:"cell"},SR={key:0},NR={key:1,class:"text-muted"},RR={role:"cell"},DR=["onClick"],PR={key:2,class:"paper-table-empty"},AR={class:"admin-section-header"},TR={class:"section-count"},OR={class:"seg-bar"},IR={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},MR=["aria-checked"],_R={class:"count"},VR=["aria-checked"],qR={class:"count"},$R=["aria-checked"],LR={class:"count"},FR=["aria-checked"],UR={class:"count"},BR=["aria-checked"],zR={class:"count"},HR=["aria-checked"],jR={class:"count"},GR={class:"seg-countline",role:"status"},WR={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},KR={class:"admin-filter-row"},YR={class:"search-wrap"},XR={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories or errors\u2026",autocomplete:"off"},QR={key:3,class:"bulk-bar"},JR={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},ZR={class:"paper-table-head",role:"row"},xR={role:"columnheader",style:{width:"28px"}},eD=["checked"],tD={role:"columnheader"},nD={role:"columnheader"},oD={role:"columnheader",class:"num"},sD={role:"columnheader"},iD={role:"cell",style:{width:"28px"}},rD={type:"checkbox","aria-label":"Select repository"},aD={class:"cell-anon",role:"cell"},lD={class:"anon-text"},dD=["textContent","href"],uD=["title"],cD=["href"],pD=["textContent"],fD=["textContent"],hD=["data-meta-label"],mD=["title","textContent","href"],gD=["data-meta-label"],vD=["textContent","href"],yD=["data-meta-label"],bD={key:3,class:"meta-item"},wD={class:"meta-item"},kD={class:"cell-status",role:"cell"},CD={class:"status-line"},ED=["textContent"],SD=["textContent","title"],ND=["data-unit","textContent"],RD=["textContent"],DD={class:"cell-actions",role:"cell"},PD={class:"dropdown"},AD={class:"dropdown-menu dropdown-menu-right"},TD=["href"],OD=["href"],ID=["href"],MD=["onClick"],_D=["onClick"],VD=["onClick"],qD=["onClick"],$D=["onClick"],LD=["onClick"],FD={key:0,class:"paper-table-empty"};function ep(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",FN,[n("div",UN,[t[23]||(t[23]=n("a",{href:"/admin/"},"Admin",-1)),t[24]||(t[24]=v(" \xA0/\xA0 ",-1)),t[25]||(t[25]=n("a",{href:"/admin/users"},"Users",-1)),t[26]||(t[26]=v(" \xA0/\xA0 ",-1)),n("span",BN,p(e.userInfo?.username||"Profile"),1)]),n("h1",zN,p(e.userInfo?.username||"User"),1),t[93]||(t[93]=Se('',1)),e.userInfo?(a(),l("div",HN,[n("div",jN,[e.userInfo?.photo?(a(),l("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,GN)):f("v-if",!0),n("div",null,[n("div",WN,[n("span",KN,[n("span",{class:P(["status-dot","st-"+(e.userInfo?.status||"unknown")])},null,2),n("span",{textContent:p(e.fmt?.title(e.userInfo?.status))},null,8,YN)]),e.userInfo?.isAdmin?(a(),l("span",XN,"Admin")):f("v-if",!0)]),n("div",QN,[e.userInfo?.status!=="banned"&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:0,class:"btn btn-sm btn-outline-danger",onClick:t[0]||(t[0]=s=>e.banUser())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),v(" Ban",-1)])])):f("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(a(),l("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=s=>e.activateUser())},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),v(" Activate",-1)])])):f("v-if",!0),e.userInfo?.isAdmin?f("v-if",!0):(a(),l("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=s=>e.promoteUser())},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-shield"})],-1),v(" Promote to admin",-1)])])),e.userInfo?.isAdmin&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:3,class:"btn btn-sm btn-outline-ink",onClick:t[3]||(t[3]=s=>e.demoteUser())},[...t[30]||(t[30]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-minus"})],-1),v(" Remove admin",-1)])])):f("v-if",!0)])])]),n("div",JN,[t[33]||(t[33]=n("div",{class:"detail-label"},"ID",-1)),n("div",ZN,p(e.userInfo?._id),1),t[34]||(t[34]=n("div",{class:"detail-label"},"Email",-1)),n("div",{class:P(["detail-value",{"is-empty":!e.userInfo?.emails?.[0]?.email}])},p(e.userInfo?.emails?.[0]?.email||"Not shared"),3),t[35]||(t[35]=n("div",{class:"detail-label"},"Access token",-1)),n("div",{class:P(["detail-value",{"is-empty":!e.userInfo?.accessTokens?.github}]),style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},p(e.userInfo?.accessTokens?.github||"Not stored"),3),t[36]||(t[36]=n("div",{class:"detail-label"},"GitHub",-1)),n("div",xN,[n("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[31]||(t[31]=n("i",{class:"fab fa-github"},null,-1)),v(" "+p(e.userInfo?.username),1)],8,eR)]),t[37]||(t[37]=n("div",{class:"detail-label"},"Created",-1)),n("div",tR,p(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[38]||(t[38]=n("div",{class:"detail-label"},"Last connection",-1)),n("div",nR,[e.userInfo?.accessTokenDates?.github?(a(),l("span",oR,p(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):f("v-if",!0),e.userInfo?.accessTokenDates?.github?f("v-if",!0):(a(),l("span",sR,"Not recorded (GitHub App sign-in)"))]),t[39]||(t[39]=n("div",{class:"detail-label"},"GitHub repos",-1)),n("div",iR,[v(p(e.userInfo?.repositories?.length?e.userInfo.repositories.length+" repositories":"Not synced")+" ",1),e.userInfo?.repositories?.length?(a(),l("button",{key:0,class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=s=>e.showRepos=!e.showRepos)},p(e.showRepos?"Hide repos":"Show repos"),1)):f("v-if",!0),n("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=s=>e.getGitHubRepositories())},[...t[32]||(t[32]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Refresh ",-1)])])])]),e.showRepos?(a(),l("div",rR,[t[42]||(t[42]=n("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),n("div",aR,[(a(!0),l(F,null,se(e.userInfo?.repositories,(s,r)=>(a(),l("div",lR,[n("div",dR,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",uR,[n("span",{class:"repo-name",textContent:p(s?.name)},null,8,cR)])]),n("div",pR,[t[41]||(t[41]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-database"})],-1)),v(" "+p(e.fmt?.humanFileSize(s?.size)),1)])]))),256))])])):f("v-if",!0)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",fR,[t[43]||(t[43]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),v(" API tokens")],-1)),n("span",hR,p(e.tokens?.length),1)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",mR,[t[49]||(t[49]=n("p",{class:"paper-page-lede"},[v("Personal API tokens for this admin account. Send as "),n("code",null,"Authorization: Bearer "),v(" to authenticate without GitHub OAuth (useful for development).")],-1)),T((a(),l("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=le(s=>e.submitForm(s,()=>{e.createToken()}),["prevent"]))},[T(n("input",gR,null,512),[[o,{state:e.viewState,set:s=>{e.tokenForm.name=s},value:e.tokenForm?.name,form:null,options:{}}]]),t[44]||(t[44]=n("button",{type:"submit",class:"btn btn-ink"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})]),v(" Generate")],-1))],32)),[[i,e.viewState]]),e.tokenForm?.plaintext?(a(),l("div",vR,[t[45]||(t[45]=n("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),n("pre",yR,p(e.tokenForm?.plaintext),1),n("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=s=>e.tokenForm.plaintext=null)},"Dismiss")])):f("v-if",!0),e.tokens?.length?(a(),l("div",bR,[t[47]||(t[47]=n("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[n("div",{role:"columnheader"},"Name"),n("div",{role:"columnheader"},"Created"),n("div",{role:"columnheader"},"Last used"),n("div",{role:"columnheader","aria-label":"Actions"})],-1)),(a(!0),l(F,null,se(e.tokens,(s,r)=>(a(),l("div",wR,[n("div",{role:"cell",textContent:p(s?.name)},null,8,kR),n("div",{role:"cell",textContent:p(e.fmt?.humanTime(s?.createdAt))},null,8,CR),n("div",ER,[s?.lastUsedAt?(a(),l("span",SR,p(e.fmt?.humanTime(s?.lastUsedAt)),1)):f("v-if",!0),s?.lastUsedAt?f("v-if",!0):(a(),l("span",NR,"never"))]),n("div",RR,[n("button",{class:"btn btn-sm text-danger btn-icon",title:"Revoke","aria-label":"Revoke token",onClick:d=>e.revokeToken(s)},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,DR)])]))),256))])):f("v-if",!0),e.tokens?.length?f("v-if",!0):(a(),l("div",PR,[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No tokens yet.",-1)])]))])):f("v-if",!0),n("div",AR,[t[50]||(t[50]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})]),v(" Anonymized repositories")],-1)),n("span",TR,p(e.repositories?.length),1)]),n("div",OR,[n("div",IR,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[8]||(t[8]=s=>e.setSegView("all"))},[t[51]||(t[51]=v("All ",-1)),n("span",_R,p(e.fmt?.number(e.segCount("all"))),1)],10,MR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[9]||(t[9]=s=>e.setSegView("ready"))},[t[52]||(t[52]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[53]||(t[53]=v("Ready ",-1)),n("span",qR,p(e.fmt?.number(e.segCount("ready"))),1)],10,VR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[10]||(t[10]=s=>e.setSegView("preparing"))},[t[54]||(t[54]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[55]||(t[55]=v("Preparing ",-1)),n("span",LR,p(e.fmt?.number(e.segCount("preparing"))),1)],10,$R),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[11]||(t[11]=s=>e.setSegView("error"))},[t[56]||(t[56]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[57]||(t[57]=v("Error ",-1)),n("span",UR,p(e.fmt?.number(e.segCount("error"))),1)],10,FR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[12]||(t[12]=s=>e.setSegView("expired"))},[t[58]||(t[58]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[59]||(t[59]=v("Expiring / expired ",-1)),n("span",zR,p(e.fmt?.number(e.segCount("expired"))),1)],10,BR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[13]||(t[13]=s=>e.setSegView("removed"))},[t[60]||(t[60]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[61]||(t[61]=v("Removing / removed ",-1)),n("span",jR,p(e.fmt?.number(e.segCount("removed"))),1)],10,HR)]),n("p",GR,[n("strong",null,p(e.fmt.number(e.filteredRepositories?.length||0)),1),t[62]||(t[62]=v(" shown",-1))])]),T((a(),l("form",WR,[n("div",KR,[n("div",YR,[T(n("input",XR,null,512),[[o,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),t[64]||(t[64]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[14]||(t[14]=s=>e.exportCsv())},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),v(" Export",-1)])])])])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",QR,[n("span",null,[n("strong",null,p(e.selectedCount()),1),t[65]||(t[65]=v(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[15]||(t[15]=s=>e.bulkRefresh())},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[16]||(t[16]=s=>e.bulkRemoveCache())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),v(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[17]||(t[17]=s=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",JR,[n("div",ZR,[n("div",xR,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[18]||(t[18]=s=>e.selectAllOnPage()),checked:e.allSelected},null,8,eD)]),n("div",tD,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[19]||(t[19]=s=>e.sortBy("source.repositoryName"))},[t[69]||(t[69]=v("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[68]||(t[68]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",nD,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[20]||(t[20]=s=>e.sortBy("status"))},[t[71]||(t[71]=v("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[70]||(t[70]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",oD,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[21]||(t[21]=s=>e.sortBy("pageView"))},[t[73]||(t[73]=v("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[72]||(t[72]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",sD,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[22]||(t[22]=s=>e.sortBy("anonymizeDate"))},[t[75]||(t[75]=v("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[74]||(t[74]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[76]||(t[76]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(F,null,se(e.filteredRepositories,(s,r)=>(a(),l("div",{class:P(["paper-table-row",{"repo-inactive":s?.status=="expired"||s?.status=="removed","repo-error":s?.status=="error","row-selected":e.selected[s?.repoId]}]),role:"row"},[n("div",iD,[T(n("input",rD,null,512),[[o,{state:e.viewState,set:d=>{e.selected[s.repoId]=d},value:e.selected[s?.repoId],form:null,options:{}}]])]),n("div",aD,[t[79]||(t[79]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",lD,[n("a",{class:"repo-name",target:"_blank",textContent:p(s?.repoId),href:e.safeUrl("/r/"+s?.repoId)},null,8,dD),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[s?.source?.fullName||s?.source?.repositoryName,s?.options?.update?"branch "+s?.source?.branch:"commit "+s?.source?.commit?.substring(0,7),s?.conference?"conference "+s?.conference:"",s?.size?.storage>0?e.fmt?.humanFileSize(s?.size?.storage):"",e.fmt?.number(s?.options?.terms?.length)+(s?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/")},[(s?.source?.fullName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:p((d=>d.length>16?d.slice(0,14)+"\u2026":d)((s?.source?.fullName||"").split("/")[0]))},null,8,pD)):f("v-if",!0),n("span",{class:"src-repo",textContent:p((s?.source?.fullName||"").includes("/")?"/"+(s?.source?.fullName||"").split("/").slice(1).join("/"):s?.source?.fullName)},null,8,fD)],8,cD),s?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(s?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:s?.source?.commit,textContent:p(s?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.commit)},null,8,mD)],8,hD)),s?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(s?.source?.branch||"")},[n("a",{textContent:p(s?.source?.branch),href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/tree/"+s?.source?.branch)},null,8,vD)],8,gD)):f("v-if",!0),s?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+s?.conference},[t[77]||(t[77]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),v(" "+p(s?.conference),1)],8,yD)):f("v-if",!0),s?.size?.storage>0?(a(),l("span",bD,p(e.fmt?.humanFileSize(s?.size?.storage)),1)):f("v-if",!0),n("span",wD,p(e.fmt?.number(s?.options?.terms?.length))+" "+p(s?.options?.terms?.length===1?"term":"terms"),1),t[78]||(t[78]=n("span",{class:"meta-more",hidden:""},null,-1))],8,uD)])]),n("div",kD,[n("span",CD,[n("span",{class:P(["status-dot","st-"+(s?.status||"unknown")])},null,2),n("span",{textContent:p(e.fmt?.statusLabel(s?.status))},null,8,ED)]),s?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:p(e.fmt?.statusMsg(s?.statusMessage)),title:s?.statusMessage},null,8,SD)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(s?.pageView||0)===1?"view":"views",textContent:p(e.fmt?.number(s?.pageView||0))},null,8,ND),n("div",{class:"cell-expires",role:"cell",textContent:p(e.fmt?.humanTime(s?.anonymizeDate))},null,8,RD),n("div",DD,[n("div",PD,[t[91]||(t[91]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",AD,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+s?.repoId)},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit",-1)])],8,TD),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+s?.repoId+"/")},[...t[81]||(t[81]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" View repo",-1)])],8,OD),s?.options?.page&&s?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+s?.repoId+"/")},[...t[82]||(t[82]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),v(" View page",-1)])],8,ID)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.fetchGithubInfo(s),["prevent"])},[...t[83]||(t[83]=[n("i",{class:"fab fa-github"},null,-1),v(" Live GitHub info",-1)])],8,MD),t[89]||(t[89]=n("div",{class:"dropdown-divider"},null,-1)),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.updateRepository(s),["prevent"])},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Force update",-1)])],8,_D),[[Z,s?.status=="ready"||s?.status=="error"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.updateRepository(s),["prevent"])},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),v(" Enable",-1)])],8,VD),[[Z,s?.status=="removed"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.showStatusMessage(s),["prevent"])},[...t[86]||(t[86]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),v(" View status message",-1)])],8,qD),[[Z,s?.statusMessage]]),t[90]||(t[90]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.removeCache(s),["prevent"])},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),v(" Remove cache",-1)])],8,$D),T(n("a",{class:"dropdown-item text-danger",href:"#",onClick:le(d=>e.removeRepository(s),["prevent"])},[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Remove",-1)])],8,LD),[[Z,s?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",FD,[...t[92]||(t[92]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)])])}var UD={class:"container paper-page admin-page"},BD={class:"seg-bar"},zD={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},HD=["aria-checked"],jD={class:"count"},GD=["aria-checked"],WD={class:"count"},KD=["aria-checked"],YD={class:"count"},XD=["aria-checked"],QD={class:"count"},JD={class:"seg-countline",role:"status"},ZD={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},xD={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},eP={class:"admin-filter-row"},tP={class:"search-wrap"},nP={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},oP={key:0,class:"admin-search-hint"},sP={class:"admin-filter-inline"},iP={class:"form-control form-control-sm"},rP={key:0,class:"admin-filter-inline","aria-label":"Pagination"},aP=["disabled"],lP={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},dP=["disabled"],uP={key:0,class:"admin-filter-row"},cP={class:"admin-active-chips"},pP={class:"key"},fP=["onClick"],hP={key:1,class:"bulk-bar"},mP={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},gP={class:"paper-table-head admin-users-row",role:"row"},vP={role:"columnheader",style:{width:"28px"}},yP=["checked"],bP={role:"columnheader"},wP={role:"columnheader"},kP={role:"cell",style:{width:"28px"}},CP={type:"checkbox","aria-label":"Select user"},EP={class:"cell-anon",role:"cell"},SP=["src"],NP={key:1,class:"avatar-fallback","aria-hidden":"true"},RP={class:"anon-text"},DP={class:"user-name-line"},PP=["textContent","href"],AP=["href","title","aria-label"],TP={class:"anon-sub meta-dots"},OP=["title"],IP={key:1},MP={class:"cell-views num",role:"cell"},_P=["title","textContent","href"],VP={class:"cell-status",role:"cell"},qP=["textContent"],$P={class:"cell-status",role:"cell"},LP={key:0,class:"role-pill"},FP={key:1,class:"empty-dash"},UP={class:"cell-actions",role:"cell"},BP={class:"dropdown"},zP={class:"dropdown-menu dropdown-menu-right"},HP=["href"],jP=["href"],GP=["onClick"],WP=["onClick"],KP={key:0,class:"paper-table-empty"},YP={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},XP={key:0,class:"pagination-compact"},QP=["disabled"],JP=["max"],ZP=["disabled"],xP={class:"admin-filter-inline"},eA={class:"form-control form-control-sm"};function tp(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",UD,[t[53]||(t[53]=Se('
Admin \xA0/\xA0 Users

Users

',3)),n("div",BD,[n("div",zD,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:!e.query?.status}]),"aria-checked":!e.query?.status,onClick:t[0]||(t[0]=s=>{e.query.status="",e.query.page=1})},[t[14]||(t[14]=v("All ",-1)),n("span",jD,p(e.fmt?.number(e.statusCountFor("active")+e.statusCountFor("banned")+e.statusCountFor("removed"))),1)],10,HD),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.query?.status==="active","is-empty":!e.statusCountFor("active")}]),"aria-checked":e.query?.status==="active",onClick:t[1]||(t[1]=s=>{e.query.status="active",e.query.page=1})},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=v("Active ",-1)),n("span",WD,p(e.fmt?.number(e.statusCountFor("active"))),1)],10,GD),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.query?.status==="banned","is-empty":!e.statusCountFor("banned")}]),"aria-checked":e.query?.status==="banned",onClick:t[2]||(t[2]=s=>{e.query.status="banned",e.query.page=1})},[t[17]||(t[17]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[18]||(t[18]=v("Banned ",-1)),n("span",YD,p(e.fmt?.number(e.statusCountFor("banned"))),1)],10,KD),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.query?.status==="removed","is-empty":!e.statusCountFor("removed")}]),"aria-checked":e.query?.status==="removed",onClick:t[3]||(t[3]=s=>{e.query.status="removed",e.query.page=1})},[t[19]||(t[19]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[20]||(t[20]=v("Removed ",-1)),n("span",QD,p(e.fmt?.number(e.statusCountFor("removed"))),1)],10,XD)]),n("p",JD,[n("strong",null,p(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[21]||(t[21]=v(" shown",-1))])]),e.fetchError?(a(),l("div",ZD,[t[22]||(t[22]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),v(" "+p(e.fetchError),1)])):f("v-if",!0),T((a(),l("form",xD,[n("div",eP,[n("div",tP,[T(n("input",nP,null,512),[[o,{state:e.viewState,set:s=>{e.query.search=s},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",oP,"/"))]),n("span",sP,[t[24]||(t[24]=n("label",null,"Role",-1)),T((a(),l("select",iP,[...t[23]||(t[23]=[n("option",{value:""},"Any",-1),n("option",{value:"admin"},"Admin",-1)])])),[[o,{state:e.viewState,set:s=>{e.query.role=s},value:e.query?.role,form:null,options:{}}]])]),t[28]||(t[28]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=s=>e.exportCsv())},[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),v(" Export",-1)])]),e.totalPage>1?(a(),l("span",rP,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[5]||(t[5]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[26]||(t[26]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,aP),n("span",lP,p(e.query?.page)+"/"+p(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,dP)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",uP,[n("div",cP,[(a(!0),l(F,null,se(e.chips,(s,r)=>(a(),l("span",{class:"admin-active-chip",key:s?.key},[n("span",pP,p(s?.label),1),n("span",null,p(s?.value),1),n("button",{type:"button",onClick:d=>e.clearFilter(s.key),"aria-label":"Clear filter"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,fP)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",hP,[n("span",null,[n("strong",null,p(e.selectedCount()),1),t[30]||(t[30]=v(" selected",-1))]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[7]||(t[7]=s=>e.bulkBan())},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),v(" Ban",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=s=>{e.selected={},e.allSelected=!1})},"Clear")])):f("v-if",!0),n("div",mP,[n("div",gP,[n("div",vP,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[9]||(t[9]=s=>e.selectAllOnPage()),checked:e.allSelected},null,8,yP)]),n("div",bP,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="username"}]),onClick:t[10]||(t[10]=s=>e.sortBy("username"))},[t[33]||(t[33]=v("User ",-1)),e.sortIcon("username")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("username")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[36]||(t[36]=n("div",{role:"columnheader",class:"num",title:"Repositories discovered on the user's GitHub account"},"GitHub repos",-1)),n("div",wP,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[11]||(t[11]=s=>e.sortBy("status"))},[t[35]||(t[35]=v("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[37]||(t[37]=n("div",{role:"columnheader"},"Role",-1)),t[38]||(t[38]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(F,null,se(e.filteredUsers,(s,r)=>(a(),l("div",{class:P(["paper-table-row admin-users-row",{"row-selected":e.selected[s?.username]}]),role:"row"},[n("div",kP,[T(n("input",CP,null,512),[[o,{state:e.viewState,set:d=>{e.selected[s.username]=d},value:e.selected[s?.username],form:null,options:{}}]])]),n("div",EP,[s?.photo?(a(),l("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(s?.photo)},null,8,SP)):(a(),l("span",NP,p((s?.username||"?").charAt(0).toUpperCase()),1)),n("div",RP,[n("span",DP,[n("a",{class:"repo-name",textContent:p(s?.username),href:e.safeUrl("/admin/users/"+s?.username)},null,8,PP),n("a",{class:"user-gh-link",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+s?.username),title:s?.username+" on GitHub","aria-label":s?.username+" on GitHub"},[...t[39]||(t[39]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)])],8,AP)]),n("div",TP,[s?.emails?.[0]?.email?(a(),l("span",{key:0,class:"meta-email meta-tail",title:s?.emails?.[0]?.email},p(s?.emails?.[0]?.email),9,OP)):f("v-if",!0),s?.dateOfEntry?(a(),l("span",IP,"Joined "+p(e.fmt?.humanTime(s?.dateOfEntry)),1)):f("v-if",!0)])])]),n("div",MP,[t[40]||(t[40]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:s?.repoCount?"Show this user\u2019s repositories":"Repositories not synced yet",textContent:p(s?.repoCount?e.fmt?.number(s.repoCount):"Not synced"),class:P({"is-unsynced":!s?.repoCount}),href:e.safeUrl("/admin/repositories?owner="+s?.username)},null,10,_P)]),n("div",VP,[n("span",{class:P(["status-dot","st-"+(s?.status||"unknown")])},null,2),n("span",{textContent:p(e.fmt?.title(s?.status))},null,8,qP)]),n("div",$P,[s?.isAdmin?(a(),l("span",LP,"Admin")):f("v-if",!0),s?.isAdmin?f("v-if",!0):(a(),l("span",FP,"\u2014"))]),n("div",UP,[n("div",BP,[t[46]||(t[46]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",zP,[n("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+s?.username)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" View details",-1)])],8,HP),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/repositories?owner="+s?.username)},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),v(" View repositories",-1)])],8,jP),t[45]||(t[45]=n("div",{class:"dropdown-divider"},null,-1)),T(n("a",{class:"dropdown-item text-danger",href:"#",onClick:le(d=>e.banUser(s),["prevent"])},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),v(" Ban",-1)])],8,GP),[[Z,s?.status=="active"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.activateUser(s),["prevent"])},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),v(" Activate",-1)])],8,WP),[[Z,s?.status=="removed"||s?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(a(),l("div",KP,[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No users match the current filters.",-1)])])):f("v-if",!0)]),n("div",YP,[t[52]||(t[52]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",XP,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=s=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),v(" Previous",-1)])],8,QP),T(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,JP),[[o,{state:e.viewState,set:s=>{e.query.page=s},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+p(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=s=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[49]||(t[49]=[v("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,ZP)])):f("v-if",!0),n("span",xP,[t[51]||(t[51]=n("label",null,"Per page",-1)),T((a(),l("select",eA,[...t[50]||(t[50]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[o,{state:e.viewState,set:s=>{e.query.limit=s},value:e.query?.limit,form:null,options:{}}]])])])])}var tA={class:"anonymize-landing"},nA={class:"anonymize-landing-inner"},oA={class:"form-group mt-4 mb-2"},sA={class:"source-url-label-row"},iA={key:0,class:"repo-access","aria-label":"GitHub access"},rA={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},aA=["aria-pressed","disabled"],lA=["aria-pressed","disabled"],dA={key:1,class:"connection-badge"},uA={class:"landing-url-row"},cA={id:"sourceUrl-landing",onblur:"this.scrollLeft=0",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},pA=["aria-disabled"],fA={key:0,class:"text-danger",role:"alert"},hA={class:"repo-picker","aria-labelledby":"repo-picker-title"},mA={class:"repo-picker-head"},gA={class:"repo-picker-title"},vA={key:0,class:"repo-picker-count","aria-live":"polite"},yA={key:0,class:"repo-picker-list","aria-busy":"true","aria-label":"Loading your repositories"},bA={class:"repo-picker-row is-skeleton","aria-hidden":"true"},wA={key:1,class:"repo-picker-list"},kA=["title"],CA={class:"repo-picker-owner"},EA={class:"repo-picker-repo"},SA=["onClick","aria-label"],NA={key:2,class:"repo-picker-state"},RA={key:3,class:"repo-picker-state"},DA={key:4,class:"repo-picker-state",role:"alert"},PA={key:5,class:"repo-access-details","aria-label":"GitHub access"},AA={class:"repo-access-main"},TA={class:"repo-access-controls"},OA={key:0,class:"access-q"},IA={key:2,class:"connection-link",href:"/connections"},MA={class:"repo-access-note"},_A={key:0},VA={class:"anonymize-workspace"},qA={class:"anonymize-topbar"},$A={class:"anonymize-topbar-inner"},LA={class:"paper-crumbs"},FA={class:"here"},UA={class:"anonymize-topbar-head"},BA={class:"paper-page-title anonymize-topbar-title"},zA={key:0},HA={key:1},jA={class:"paper-page-lede anonymize-topbar-lede"},GA={key:0,class:"task-trail flow-trail","aria-label":"Anonymization steps"},WA={key:0,class:"alert alert-info",role:"status"},KA={key:1,class:"alert alert-info",role:"status"},YA={key:1},XA={class:"anonymize-mobile-tabs",role:"tablist","aria-label":"Anonymization workspace"},QA=["aria-selected","tabindex"],JA=["aria-selected","tabindex"],ZA={class:"anonymize-split"},xA=["role","aria-labelledby"],e4={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},t4={class:"anonymize-fields"},n4={class:"paper-settings-section"},o4={class:"form-group"},s4={class:"source-url-label-row"},i4={key:0,class:"repo-access","aria-label":"GitHub access"},r4={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},a4=["aria-pressed","disabled"],l4=["aria-pressed","disabled"],d4={key:1,class:"connection-badge"},u4=["disabled"],c4={key:0,class:"source-summary"},p4={class:"invalid-feedback"},f4={class:"invalid-feedback"},h4={class:"invalid-feedback"},m4={class:"invalid-feedback"},g4={key:0,class:"repo-access-details","aria-label":"Previous repository configuration"},v4={key:0,class:"form-group"},y4=["value"],b4={key:1},w4={class:"repo-access-controls"},k4=["href"],C4={key:1,class:"repo-access-details","aria-label":"GitHub access"},E4={class:"repo-access-main"},S4={class:"repo-access-controls"},N4={key:0,class:"access-q"},R4={key:2,class:"connection-link",href:"/connections"},D4={class:"repo-access-note"},P4={key:0},A4={key:1},T4=["open"],O4={key:0,class:"repair-step"},I4=["disabled"],M4={key:0,role:"status"},_4={class:"repair-step"},V4={key:0,role:"status"},q4={key:3,class:"form-grid-2"},$4={class:"form-group"},L4={class:"input-group"},F4={class:"form-control",id:"branch",name:"branch"},U4=["textContent","value"],B4={class:"input-group-append"},z4={class:"form-group"},H4=["disabled"],j4={class:"invalid-feedback"},G4={class:"invalid-feedback"},W4={class:"form-check-input",type:"checkbox",id:"update",name:"update","aria-describedby":"update-help"},K4={class:"form-check-label",for:"update"},Y4={key:0,class:"paid-tag"},X4={key:0,class:"form-text text-muted",id:"update-help"},Q4={key:1,class:"form-text text-muted auto-update-paid",id:"update-help"},J4={class:"paper-settings-section"},Z4={class:"form-group"},x4=["disabled"],eT={class:"form-text text-muted anon-url-echo"},tT={class:"anon-url-id"},nT={class:"invalid-feedback"},oT={class:"form-group"},sT=["disabled"],iT={class:"form-text text-muted anon-url-echo"},rT={class:"anon-url-id"},aT={class:"invalid-feedback"},lT={class:"form-group"},dT=["disabled"],uT={class:"form-text text-muted anon-url-echo"},cT={class:"anon-url-id"},pT={class:"invalid-feedback"},fT={class:"form-group"},hT=["rows"],mT={class:"redaction-syntax"},gT={class:"form-text text-muted"},vT=["onClick"],yT={key:0,class:"term-hint-more"},bT={class:"invalid-feedback"},wT={class:"preserve-row"},kT={class:"preserve-row-text"},CT={class:"preserve-row-value"},ET=["disabled"],ST={class:"preserve-tree"},NT={key:0,class:"preserve-status"},RT={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},DT=["aria-expanded","aria-label","onClick"],PT={key:1,class:"preserve-caret-space"},AT=["id","aria-label","checked",".indeterminate","disabled","onChange"],TT=["for","onClick"],OT={key:2,class:"preserve-note"},IT={key:0,class:"preserve-status"},MT={key:0,class:"preserve-status"},_T=["open"],VT={class:"preserve-foot"},qT={class:"preserve-count","aria-live":"polite"},$T={class:"preserve-actions"},LT={class:"paper-settings-section"},FT={class:"form-check"},UT={class:"form-check-input",type:"checkbox",id:"link",name:"link"},BT={class:"form-check"},zT={class:"form-check-input",type:"checkbox",id:"image",name:"image"},HT={class:"form-check"},jT={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},GT={class:"form-check"},WT={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},KT={class:"form-check"},YT=["disabled"],XT={key:0,class:"form-text text-muted"},QT={key:1,class:"form-text text-muted"},JT={key:0,class:"form-text text-muted"},ZT={class:"form-check"},xT={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},e3={class:"form-check"},t3={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},n3={class:"form-check"},o3={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},s3={class:"form-check"},i3={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},r3={class:"form-check"},a3={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},l3={class:"form-check"},d3={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},u3={class:"form-check"},c3={class:"form-check-input",type:"checkbox",id:"title",name:"title"},p3={class:"form-check"},f3={class:"form-check-input",type:"checkbox",id:"body",name:"body"},h3={class:"form-check"},m3={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},g3={class:"form-check"},v3={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},y3={class:"form-check"},b3={class:"form-check-input",type:"checkbox",id:"username",name:"username"},w3={class:"form-check"},k3={class:"form-check-input",type:"checkbox",id:"date",name:"date"},C3={class:"form-check"},E3={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},S3={class:"paper-settings-section hosting-settings",id:"repository-hosting","aria-labelledby":"hosting-heading"},N3={class:"form-group conference-field"},R3=["href"],D3={class:"invalid-feedback"},P3={class:"form-text text-muted"},A3={key:0,class:"hosting-usage"},T3={key:0},O3={key:1},I3={key:2},M3={key:1,class:"hosting-limit auto-update-note",role:"status"},_3={key:2,class:"hosting-payment"},V3={key:0,class:"hosting-limit",role:"status"},q3={key:1,class:"hosting-options"},$3={class:"hosting-options-title"},L3=["value","checked","onChange"],F3={class:"hosting-option-body"},U3={key:0,class:"hosting-cycle billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},B3=["aria-checked","onClick"],z3={key:0,class:"billing-toggle-save"},H3={class:"hosting-option-price"},j3={key:2,role:"status"},G3={key:3,class:"hosting-terms"},W3={key:4,class:"hosting-terms"},K3={key:5,class:"capacity-options"},Y3=["disabled"],X3={key:3,class:"hosting-subhead"},Q3={class:"expiration-choices"},J3={class:"expiration-choice"},Z3=["checked","disabled"],x3={key:0,class:"dated-options"},eO={key:0,class:"hosting-date"},tO=["min","max"],nO={key:0,class:"date-echo","aria-live":"polite"},oO={class:"invalid-feedback"},sO={class:"invalid-feedback"},iO={class:"hosting-property"},rO={key:1,class:"expiration-choice"},aO=["checked","disabled"],lO={key:0},dO={key:4,class:"form-text text-muted"},uO={key:5,class:"inline-hosting"},cO={key:0,role:"alert",class:"text-danger"},pO={key:1,role:"alert",class:"text-danger"},fO=["disabled"],hO={key:2,role:"status"},mO={key:3,role:"status",class:"form-text text-muted"},gO={key:4,class:"hosting-terms"},vO={key:5,class:"hosting-terms"},yO={key:6,class:"repository-pass"},bO=["disabled","onClick"],wO={class:"paper-settings-section"},kO={class:"form-group"},CO={style:{position:"relative"}},EO={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},SO={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},NO=["onClick"],RO=["src"],DO=["textContent"],PO=["textContent"],AO={class:"coauthor-list"},TO={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},OO=["src"],IO=["textContent","href"],MO=["onClick"],_O={class:"form-text text-muted"},VO=["textContent"],qO={class:"anonymize-submit-bar"},$O=["disabled"],LO=["disabled"],FO=["disabled"],UO=["disabled"],BO=["disabled"],zO=["disabled"],HO={key:5,class:"submit-reason",role:"status"},jO={key:6,class:"submit-reason",role:"status"},GO={key:7,class:"checkout-return-note"},WO={key:8,class:"draft-status",role:"status"},KO={key:9,class:"draft-status"},YO=["role","aria-labelledby"],XO={class:"rp-caption"},QO=["aria-expanded"],JO=["title"],ZO={class:"redact-slot","aria-hidden":"true"},xO={key:2,class:"rp-count rp-count-none"},eI=["href"],tI=["aria-pressed"],nI={class:"rp-open-icon",viewBox:"0 0 16 16","aria-hidden":"true"},oI={key:0,d:"M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9"},sI={key:1,d:"M13.5 6.5h-4v-4M9.5 6.5 14 2M2.5 9.5h4v4M6.5 9.5 2 14"},iI={class:"rp-window"},rI={class:"rp-chrome","aria-hidden":"true"},aI={class:"rp-url"},lI={class:"rp-bar","aria-hidden":"true"},dI={key:0,class:"rp-bar-id"},uI={key:1,class:"rp-bar-kind"},cI={class:"leftCol-head"},pI={class:"leftCol-body"},fI={key:0,class:"rp-state rp-loading",role:"status"},hI={class:"rp-state-text"},mI={class:"rp-state rp-error",role:"alert"},gI={class:"rp-state-actions"},vI={key:1,class:"btn btn-outline-ink btn-sm",href:"/connections"},yI={key:2,class:"rp-state rp-error",role:"alert"},bI={class:"rp-state-actions"},wI={class:"rp-state rp-error",role:"alert"},kI={class:"rp-state-actions"},CI={class:"rp-state rp-error",role:"alert"},EI={class:"rp-state-actions"},SI={key:5,class:"rp-state rp-empty"},NI={key:7,class:"anonymize-preview-body"},RI={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},DI={class:"pr-title mb-1"},PI={key:0},AI=["textContent"],TI={key:0},OI={key:1},II={key:2},MI={class:"pr-comments mt-3"},_I={class:"pr-comment"},VI={class:"pr-comment-head"},qI=["textContent"],$I={key:0,class:"pr-comment-date"},LI={key:3},FI={class:"pr-comments"},UI={class:"pr-comment"},BI={class:"pr-comment-head"},zI={key:0,class:"pr-comment-author"},HI=["textContent"],jI=["textContent"],GI={key:0,class:"pr-comment-body"},WI={key:8,class:"anonymize-preview-body"},KI={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},YI={class:"pr-title mb-1"},XI={key:0},QI=["textContent"],JI={key:0},ZI={key:1,class:"pr-body"},xI={key:2,class:"paper-tabs",role:"tablist"},e5=["aria-selected","tabindex"],t5=["aria-selected","tabindex"],n5=["textContent"],o5={key:3,class:"anonymize-preview-status"},s5={class:"paper-tab-content"},i5={key:0,role:"tabpanel",id:"preview-pr-diff-panel","aria-labelledby":"preview-pr-diff-tab"},r5=["innerHTML"],a5={key:1,role:"tabpanel",id:"preview-pr-comments-panel","aria-labelledby":"preview-pr-comments-tab"},l5={class:"pr-comments"},d5={class:"pr-comment"},u5={class:"pr-comment-head"},c5={key:0,class:"pr-comment-author"},p5=["textContent"],f5=["textContent"],h5={key:0,class:"pr-comment-body"},m5={key:9,class:"rp-more"},g5=["href"],v5={key:2,class:"rp-more-btn is-hint","aria-hidden":"true"};function np(e,t){let o=Xe("tree"),i=Xe("partial-view"),s=Xe("gist-file"),r=Xe("markdown"),d=Pe("field"),c=Pe("form");return a(),l("div",{class:P(["anonymize-page h-100",{"mobile-preview-active":e.mobilePane==="preview","preview-expanded":e.previewExpanded}])},[f(" ===== STATE 1: No URL \u2014 centered input ===== "),T(n("div",tA,[n("div",nA,[t[70]||(t[70]=Se('
My work \xA0/\xA0 New anonymization

New anonymization

Paste a repository, pull request, or gist URL, or pick one of your repositories. You\u2019ll choose the terms to redact next.

  1. 1. Repository
  2. 2. Review and hosting
  3. 3. Review link
',2)),n("div",oA,[n("div",sA,[t[61]||(t[61]=n("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",iA,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",rA,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=u=>e.chooseGitHubConnection("github-app"))},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),v(),n("span",{class:"sr-only"},"Read-only ",-1),v("GitHub App",-1)])],8,aA),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=u=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,lA)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",dA,p((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),n("div",uA,[T(n("input",cA,null,512),[[d,{state:e.viewState,set:u=>{e.sourceUrl=u},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),n("button",{type:"button",class:"btn btn-primary landing-continue","aria-disabled":e.sourceUrl?.trim()?null:"true",onClick:t[2]||(t[2]=u=>e.sourceUrl?.trim()&&e.urlSelected())},"Continue",8,pA)])]),e.sourceUrlError?(a(),l("p",fA,p(e.sourceUrlError),1)):f("v-if",!0),t[71]||(t[71]=n("small",{class:"form-text landing-help",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),n("section",hA,[n("div",mA,[n("div",gA,[t[63]||(t[63]=n("h2",{id:"repo-picker-title"},"Your repositories",-1)),e.userReposStatus==="ready"&&e.userRepos.length>0?(a(),l("span",vA,[e.userRepoFilter&&e.filteredUserRepos().length!==e.userRepos.length?(a(),l(F,{key:0},[v(p(e.filteredUserRepos().length)+" of ",1)],64)):f("v-if",!0),v(p(e.userRepos.length)+" "+p(e.userRepos.length===1?"repository":"repositories"),1),t[62]||(t[62]=n("span",{class:"repo-picker-more"},[n("span",{class:"repo-picker-more-sep"}," \xB7 "),v("scroll for more")],-1))])):f("v-if",!0)]),e.userReposStatus==="ready"&&e.userRepos.length>0?T((a(),l("input",{key:0,type:"search",class:"form-control repo-picker-filter",placeholder:"Filter\u2026","aria-label":"Filter your repositories",autocomplete:"off","onUpdate:modelValue":t[3]||(t[3]=u=>e.userRepoFilter=u)},null,512)),[[pt,e.userRepoFilter]]):f("v-if",!0)]),e.userReposStatus==="loading"||e.userReposStatus==="idle"?(a(),l("ul",yA,[(a(),l(F,null,se([1,2,3,4],(u,y)=>n("li",bA,[n("span",{class:"skeleton skeleton-line",style:$e({width:34+u*9+"%"})},null,4)])),64))])):f("v-if",!0),e.userReposStatus==="ready"&&e.filteredUserRepos().length>0?(a(),l("ul",wA,[(a(!0),l(F,null,se(e.filteredUserRepos(),(u,y)=>(a(),l("li",{key:u.id||u.fullName,class:"repo-picker-row"},[t[65]||(t[65]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("span",{class:"repo-picker-name",title:u.fullName},[n("span",CA,[v(p(u.fullName.split("/")[0]),1),t[64]||(t[64]=n("span",{class:"repo-picker-slash"},"/",-1))]),n("span",EA,p(u.fullName.split("/").slice(1).join("/")),1)],8,kA),n("button",{type:"button",class:"btn btn-outline-ink btn-sm repo-picker-select",onClick:h=>e.selectUserRepo(u),"aria-label":"Select "+u.fullName},"Select",8,SA)]))),128))])):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length>0&&e.filteredUserRepos().length===0?(a(),l("p",NA,"No repository matches \u201C"+p(e.userRepoFilter)+"\u201D.",1)):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length===0?(a(),l("p",RA,"No repositories found for your GitHub account. Paste a URL above, or grant access below.")):f("v-if",!0),e.userReposStatus==="error"?(a(),l("p",DA,[t[66]||(t[66]=v("Your repositories could not be loaded. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[4]||(t[4]=u=>e.loadUserRepos(!0))},"Try again")])):f("v-if",!0),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected?(a(),l("aside",PA,[n("div",AA,[n("div",TA,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(a(),l("span",OA,"Repository not listed?")):f("v-if",!0),e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(a(),l("button",{key:1,type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=u=>e.grantGitHubAccess())},[...t[67]||(t[67]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(a(),l("a",IA,[...t[68]||(t[68]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0)])]),n("div",MA,[e.error&&e.detectedType!=="gist"&&e.githubConnection==="github-app"?(a(),l("span",_A,"Signing in does not grant access to private repositories. Use Manage GitHub access to select this repository, then return here. Organization access may require administrator approval.")):f("v-if",!0),t[69]||(t[69]=n("span",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),v(" Anonymized content is public, even from private repositories.")],-1))])])):f("v-if",!0)])])],512),[[Z,!e.workspaceOpen&&!e.isUpdate]]),f(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),T(n("div",VA,[n("header",qA,[n("div",$A,[n("div",LA,[t[72]||(t[72]=n("a",{href:"/dashboard"},"My work",-1)),t[73]||(t[73]=v(" \xA0/\xA0 ",-1)),n("span",FA,p(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),n("div",UA,[n("h1",BA,[e.isUpdate?f("v-if",!0):(a(),l("span",zA,"New anonymization")),e.isUpdate?(a(),l("span",HA,"Edit anonymization")):f("v-if",!0)]),T(n("span",{class:P(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},p(e.detectedType==="repo"?"Repository":e.detectedType==="pr"?"Pull request":"Gist"),3),[[Z,e.detectedType]])]),n("p",jA,p(e.isUpdate?"Changes apply to the existing anonymous link; reviewers keep the same URL.":"Choose the terms to redact, what reviewers see, and when the link expires."),1),e.isUpdate?f("v-if",!0):(a(),l("ol",GA,[...t[74]||(t[74]=[n("li",null,"1. Repository",-1),n("li",{"aria-current":"step"},"2. Review and hosting",-1),n("li",null,"3. Review link",-1)])]))])]),e.detectedType==="gist"&&e.gistAppRequired?(a(),l("aside",WA,[t[75]||(t[75]=n("p",null,"Reconnect your GitHub account to read this gist. Your draft will be restored when you return.",-1)),n("button",{type:"button",class:"btn btn-ink",onClick:t[6]||(t[6]=u=>e.connectGistApp())},"Connect GitHub App to access gists")])):f("v-if",!0),e.detectedType==="gist"&&e.gistOAuthRequired?(a(),l("aside",KA,[t[76]||(t[76]=n("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[77]||(t[77]=n("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[7]||(t[7]=u=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(a(),l("p",YA,"GitHub OAuth is currently unavailable. Please try again later."))])):f("v-if",!0),n("nav",XA,[n("button",{id:"workspace-settings-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="settings","aria-controls":"workspace-settings",tabindex:e.mobilePane==="settings"?0:-1,onKeydown:t[8]||(t[8]=u=>e.previewTabKeydown(u)),onClick:t[9]||(t[9]=u=>e.selectMobilePane("settings"))},[...t[78]||(t[78]=[n("span",{class:"tab-label"},"Settings",-1)])],40,QA),n("button",{id:"workspace-preview-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="preview","aria-controls":"workspace-preview",tabindex:e.mobilePane==="preview"?0:-1,onKeydown:t[10]||(t[10]=u=>e.previewTabKeydown(u)),onClick:t[11]||(t[11]=u=>e.selectMobilePane("preview"))},[...t[79]||(t[79]=[n("span",{class:"tab-label"},"Reviewer preview",-1)])],40,JA)]),n("div",ZA,[f(" Form column (left) "),n("div",{id:"workspace-settings",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-settings-tab":null,class:"anonymize-form-col overflow-auto"},[T((a(),l("form",e4,[n("div",t4,[n("section",n4,[t[99]||(t[99]=n("h2",{class:"paper-section-eyebrow"},"Source & access",-1)),n("div",o4,[n("div",s4,[t[81]||(t[81]=n("label",{class:"paper-field-label",for:"sourceUrl"},"Source URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",i4,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",r4,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[12]||(t[12]=u=>e.chooseGitHubConnection("github-app"))},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),v(),n("span",{class:"sr-only"},"Read-only ",-1),v("GitHub App",-1)])],8,a4),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[13]||(t[13]=u=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,l4)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",d4,p((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",onblur:"this.scrollLeft=0",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,u4),[[d,{state:e.viewState,set:u=>{e.sourceUrl=u},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),e.sourceSummary()&&!e.anonymize?.sourceUrl?.invalid?(a(),l("p",c4,[t[82]||(t[82]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check"})],-1)),v(p(e.sourceSummary()),1)])):f("v-if",!0),T(n("div",p4," Please provide a valid GitHub URL. ",512),[[Z,e.anonymize?.sourceUrl?.errors?.github]]),T(n("div",f4," Not accessible. The organization may restrict access. ",512),[[Z,e.anonymize?.sourceUrl?.errors?.access]]),T(n("div",h4," Does not exist or is not accessible. ",512),[[Z,e.anonymize?.sourceUrl?.errors?.missing]]),T(n("div",m4," Already anonymized. ",512),[[Z,e.anonymize?.sourceUrl?.errors?.used]])]),!e.isUpdate&&e.previousConfigurations.length?(a(),l("aside",g4,[t[84]||(t[84]=n("p",{role:"status"},"You have already anonymized this repository. Use the existing configuration to keep its anonymous link and avoid creating another repository.",-1)),e.previousConfigurations.length>1?(a(),l("div",v4,[t[83]||(t[83]=n("label",{class:"paper-field-label",for:"previousConfiguration"},"Previous anonymization",-1)),T(n("select",{id:"previousConfiguration",class:"form-control","onUpdate:modelValue":t[14]||(t[14]=u=>e.previousConfigurationId=u)},[(a(!0),l(F,null,se(e.previousConfigurations,u=>(a(),l("option",{key:u.repoId,value:u.repoId},p(u.repoId),9,y4))),128))],512),[[mn,e.previousConfigurationId]])])):(a(),l("p",b4,p(e.previousConfigurationId),1)),t[85]||(t[85]=n("p",null,"You can review and update its settings before saving.",-1)),n("div",w4,[n("a",{class:"btn btn-ink",href:e.existingConfigurationUrl()},"Use existing configuration",8,k4),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[15]||(t[15]=u=>e.previousConfigurations=[])},"Create a separate one")])])):f("v-if",!0),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected?(a(),l("aside",C4,[n("div",E4,[n("div",S4,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"&&!e.details?(a(),l("span",N4,"Repository not listed?")):f("v-if",!0),e.detectedType!=="gist"&&e.githubConnection!=="oauth"&&!e.details?(a(),l("button",{key:1,type:"button",class:"btn btn-outline-ink",onClick:t[16]||(t[16]=u=>e.grantGitHubAccess())},[...t[86]||(t[86]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(a(),l("a",R4,[...t[87]||(t[87]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0)])]),n("div",D4,[e.error&&e.detectedType!=="gist"&&e.githubConnection==="github-app"?(a(),l("span",P4,"Signing in does not grant access to private repositories. Use Manage GitHub access to select this repository, then return here. Organization access may require administrator approval.")):f("v-if",!0),e.detectedType!=="gist"&&e.githubConnection!=="oauth"&&!e.details?(a(),l("span",A4,"Select repositories on GitHub, then return here.")):f("v-if",!0),t[88]||(t[88]=n("span",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),v(" Selected content will be published, including content from private repositories.")],-1))])])):f("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("details",{key:2,class:"repair-disclosure",open:!!(e.error||e.accessRepairMessage||e.reconnectRepositoryId)},[t[92]||(t[92]=n("summary",null,"Connection problems?",-1)),e.accessRepairAllowed&&e.githubConnections?.appEnabled&&e.githubConnection==="github-app"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("div",O4,[t[90]||(t[90]=n("p",null,"If this repository became private or its App installation changed, repair its access here. This keeps the same anonymous URL and published commit.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.repairingGitHubAccess,onClick:t[17]||(t[17]=u=>e.repairGitHubAccess())},"Repair GitHub access",8,I4),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[18]||(t[18]=u=>e.grantGitHubAccess())},[...t[89]||(t[89]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]),e.accessRepairMessage?(a(),l("p",M4,p(e.accessRepairMessage),1)):f("v-if",!0)])):f("v-if",!0),n("div",_4,[t[91]||(t[91]=n("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[19]||(t[19]=u=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(a(),l("p",V4,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):f("v-if",!0)])],8,T4)):f("v-if",!0),e.detectedType==="repo"?(a(),l("div",q4,[n("div",$4,[t[94]||(t[94]=n("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),n("div",L4,[T((a(),l("select",F4,[(a(!0),l(F,null,se(e.branches,(u,y)=>(a(),l("option",{textContent:p(u?.name),value:u?.name},null,8,U4))),256))])),[[d,{state:e.viewState,set:u=>{e.source.branch=u},value:e.source?.branch,form:"anonymize",options:{}}]]),n("div",B4,[n("button",{class:"btn btn-icon refresh-branches",type:"button",title:"Refresh branches",onClick:t[20]||(t[20]=u=>e.getBranches(!0)),"aria-label":"Refresh branches"},[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])])])]),n("div",z4,[t[95]||(t[95]=n("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),T(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,H4),[[d,{state:e.viewState,set:u=>{e.source.commit=u},value:e.source?.commit,form:"anonymize",options:{}}]]),T(n("div",j4," The commit SHA is not valid. ",512),[[Z,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),T(n("div",G4," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[Z,e.anonymize?.commit?.errors?.exists]])])])):f("v-if",!0),T(n("div",{class:P(["form-check auto-update-check",{"is-paid":!e.liveUpdatesIncluded()}])},[T(n("input",W4,null,512),[[d,{state:e.viewState,set:u=>{e.options.update=u},value:e.options?.update,form:"anonymize",options:{}}]]),n("label",K4,[t[96]||(t[96]=v("Auto-update from GitHub",-1)),e.liveUpdatesIncluded()?f("v-if",!0):(a(),l("span",Y4,"Paid"))]),e.liveUpdatesIncluded()?(a(),l("small",X4,"Follows the latest version, at most once an hour.")):(a(),l("small",Q4,[t[97]||(t[97]=v("Needs Live updates",-1)),e.liveUpdatesPrice()?(a(),l(F,{key:0},[v(" \xB7 "+p(e.liveUpdatesPrice()),1)],64)):f("v-if",!0),t[98]||(t[98]=v(", a Paper pack or an author subscription. ",-1)),n("a",{href:"#repository-hosting",onClick:t[21]||(t[21]=le(u=>e.showHostingOptions(),["prevent"]))},"Hosting options")]))],2),[[Z,e.detectedType]])]),T(n("section",J4,[t[133]||(t[133]=n("h2",{class:"paper-section-eyebrow"},"Anonymization",-1)),T(n("div",Z4,[t[104]||(t[104]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,x4),[[d,{state:e.viewState,set:u=>{e.repoId=u},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",eT,[t[100]||(t[100]=v("anonymous.4open.science/",-1)),t[101]||(t[101]=n("wbr",null,null,-1)),t[102]||(t[102]=v("r/",-1)),t[103]||(t[103]=n("wbr",null,null,-1)),n("span",tT,p(e.repoId),1)]),T(n("div",nT,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.repoId?.errors?.format]]),T(n("div",{class:"invalid-feedback"},p(e.repoId)+" is already used.",513),[[Z,e.anonymize?.repoId?.errors?.used]])],512),[[Z,e.detectedType==="repo"]]),T(n("div",oT,[t[109]||(t[109]=n("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,sT),[[d,{state:e.viewState,set:u=>{e.pullRequestId=u},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",iT,[t[105]||(t[105]=v("anonymous.4open.science/",-1)),t[106]||(t[106]=n("wbr",null,null,-1)),t[107]||(t[107]=v("pr/",-1)),t[108]||(t[108]=n("wbr",null,null,-1)),n("span",rT,p(e.pullRequestId),1)]),T(n("div",aT,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.pullRequestId?.errors?.format]]),T(n("div",{class:"invalid-feedback"},p(e.pullRequestId)+" is already used.",513),[[Z,e.anonymize?.pullRequestId?.errors?.used]])],512),[[Z,e.detectedType==="pr"]]),T(n("div",lT,[t[114]||(t[114]=n("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,dT),[[d,{state:e.viewState,set:u=>{e.gistId=u},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",uT,[t[110]||(t[110]=v("anonymous.4open.science/",-1)),t[111]||(t[111]=n("wbr",null,null,-1)),t[112]||(t[112]=v("gist/",-1)),t[113]||(t[113]=n("wbr",null,null,-1)),n("span",cT,p(e.gistId),1)]),T(n("div",pT,"ID can only contain letters and numbers.",512),[[Z,e.anonymize?.gistId?.errors?.format]]),T(n("div",{class:"invalid-feedback"},p(e.gistId)+" is already used.",513),[[Z,e.anonymize?.gistId?.errors?.used]])],512),[[Z,e.detectedType==="gist"]]),n("div",fT,[t[125]||(t[125]=n("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),T(n("textarea",{class:P(["form-control terms-input",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:Math.min(14,Math.max(4,String(e.terms||"").split(` +Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let p=(e.demoTerms||"").split(/[,\n]/).map(h=>h.trim()).filter(Boolean).sort((h,w)=>w.length-h.length),u=h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let y=new RegExp("("+p.map(u).join("|")+")","gi"),m={},b=0;return(e.demoText||"").split(y).filter(h=>h!=="").map(h=>{let w=p.find(R=>R.toLowerCase()===h.toLowerCase());return w?(m[w.toLowerCase()]||(m[w.toLowerCase()]=++b),{text:String(m[w.toLowerCase()]),redacted:!0,original:h}):{text:h}})},e.demoCount=()=>e.demoParts().filter(p=>p.redacted).length,e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(p=>!p.total);function r(){t.get("/api/stat/").then(p=>{e.stat=p.data,e.cards[0].total=p.data.nbRepositories,e.cards[1].total=p.data.nbUsers,e.cards[2].total=p.data.nbPageViews,e.cards[3].total=p.data.nbPullRequests}).catch(()=>{})}r();function d(p){let u={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return u;let y=new Array(p.length-1);for(let S=1;S=2){let S=y[m-2];S&&(u.pctChange=(u.deltaToday-S)/S*100)}return u.pctAbs=Math.round(Math.abs(u.pctChange)),u.isUp=u.pctChange>=0,u}e.history={repositories:d([]),users:d([]),pageViews:d([]),pullRequests:d([])},t.get("/api/stat/history?days=60").then(p=>{let u=p.data||[];e.history={repositories:d(u.map(y=>y.nbRepositories||0)),users:d(u.map(y=>y.nbUsers||0)),pageViews:d(u.map(y=>y.nbPageViews||0)),pullRequests:d(u.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},Lc=function(e,t,s,i,o,r){let d=Ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),d.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,tt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ut()(document,"click",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=C=>C.status==="error"||C._broken||u(C.status)==="progress"&&C._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=C=>{e.projectView=C,C==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=C=>{let L=va(C?.anonymizeDate||C?.lastView)||"";return/ ago$/.test(L)?"No activity for "+L.replace(/ ago$/,""):"No activity since "+L.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=C=>"project-details-"+encodeURIComponent(C._type+":"+(C._id||C._source||"unknown")),e.showProjectDetails=async C=>{e.selectedProject=C,e.projectName=C.projectName||"",e.nameError="",e.nameMessage="",await tt();let L=document.getElementById(e.projectDetailsId(C));L?.focus(),L?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=C=>{e.selectedProject=null,tt(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(C._type+":"+C._id)}"]`)?.focus())},e.saveProjectName=async C=>{if(e.nameSaving||!C._id)return;let L=e.projectName.trim();if(L.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let z=await t.post("/api/user/project-name",{type:C._type,id:C._id,name:L});C.projectName=z.data.name,C._label=C.projectName||C._fallbackLabel,e.selectedProject===C&&(e.nameMessage=L?"Project name saved.":"Default project name restored."),E||(e.dashboardCursor=null,await V(),e.selectedProject===C&&(e.selectedProject=e.items.find(K=>K._type===C._type&&K._id===C._id)||null))}catch{e.selectedProject===C&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async C=>{if(!C._viewUrl||e.copyingId)return;let L=new URL(C._viewUrl,o.location.origin).href;e.copyingId=C._type+":"+C._id;try{await Wa(L),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:L})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let p=["queue","download","downloaded","preparing","anonymizing"];function u(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired":C==="removed"||C==="removing"?"removed":(p.indexOf(C)>-1,"progress")}let y=7200*1e3,m="dashboard.filterPrefs",b={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},h=loadFilterPrefs(m)||{};e.typeFilter=h.typeFilter||b.typeFilter,e.filters={status:Object.assign({},b.filters.status,h.filters&&h.filters.status||{})},e.orderBy=h.orderBy||b.orderBy;let w={_name:{label:"Anonymous ID",defaultDesc:!1},_label:{label:"Project",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=w,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let C=w[e.sortField()];return C?C.label:"Custom"},e.isSortedBy=C=>e.sortField()===C,e.setSort=(C,L)=>{typeof L!="boolean"&&(L=e.isSortedBy(C)?!e.sortDesc():!!(w[C]&&w[C].defaultDesc)),e.orderBy=(L?"-":"")+C},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(m,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(m,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),r.load().then(C=>{e.quota=C},console.error);function R(C,L,z,K,ie,se){C.pageView||(C.pageView=0),C.lastView||(C.lastView=""),C.options=C.options||{},C.options.terms=(C.options.terms||[]).filter(he=>he),C._id=L||"",C._source=K,C._broken=!L,C._name=L||K||"(unnamed)",C._fallbackLabel=C._type==="gist"?"Gist "+(L||K||"without an ID"):K||z||C._name,C._label=C.projectName||C._fallbackLabel,C._editUrl=L?ie:null,C._viewUrl=L?se:null,C._broken&&(C.status="error",C.statusMessage="incomplete_record"),C._statusKey=u(C.status);let Y=C.anonymizeDate||C.lastView;if(C._stale=C._statusKey==="progress"&&!!Y&&Date.now()-new Date(Y).getTime()>y,C.status==="expired"||C.status==="expiring")C._expiry={kind:"expired",date:C.options.expirationDate},C._expiry.label=ba(C.options.expirationDate)||void 0;else if(C.status!=="ready")C._expiry={kind:"none"};else if(C.options.expirationMode==="never"||!C.options.expirationDate)C._expiry={kind:"never"};else{C._expiry={kind:"date",date:C.options.expirationDate};let he=new Date(C.options.expirationDate).getTime()-Date.now();if(he>0&&he<=168*3600*1e3){let Se=Math.max(1,Math.round(he/36e5)),Ue=Math.round(he/864e5);C._expiry.soon=Se<48?"in "+Se+(Se===1?" hour":" hours"):"in "+Ue+" days"}}return C}function S(C){return t.get(C).then(L=>L.data||[],L=>(console.error(L),[]))}function N(){return e.loading=!0,i.all([S("/api/user/anonymized_repositories"),S("/api/user/anonymized_pull_requests"),S("/api/user/anonymized_gists")]).then(C=>{let L=C[0],z=C[1],K=C[2],ie=[];L.forEach(se=>{se._type="repo";let Y=se.source||{};ie.push(R(se,se.repoId,se.repoId,Y.fullName,"/anonymize/"+se.repoId,"/r/"+se.repoId+"/"))}),z.forEach(se=>{se._type="pr";let Y=se.source||{};ie.push(R(se,se.pullRequestId,se.pullRequestId,Y.repositoryFullName?Y.repositoryFullName+"#"+Y.pullRequestId:void 0,"/pull-request-anonymize/"+se.pullRequestId,"/pr/"+se.pullRequestId+"/"))}),K.forEach(se=>{se._type="gist";let Y=se.source||{};ie.push(R(se,se.gistId,se.gistId,Y.gistId,"/gist-anonymize/"+se.gistId,"/gist/"+se.gistId+"/"))}),e.items=ie,e.removedCount=ie.filter(se=>se._statusKey==="removed").length,e.loading=!1})}let v=0,E=!1;e.dashboardCursor=null,e.dashboardError="";function M(C){let L=C.source||{};return C._type==="repo"?R(C,C.repoId,C.repoId,L.fullName,"/anonymize/"+C.repoId,"/r/"+C.repoId+"/"):C._type==="pr"?R(C,C.pullRequestId,C.pullRequestId,L.repositoryFullName?L.repositoryFullName+"#"+L.pullRequestId:void 0,"/pull-request-anonymize/"+C.pullRequestId,"/pr/"+C.pullRequestId+"/"):R(C,C.gistId,C.gistId,L.gistId,"/gist-anonymize/"+C.gistId,"/gist/"+C.gistId+"/")}function V(C=!1){if(E)return N();let L=++v;return e.loading=!C,e.loadingMore=C,e.dashboardError="",t.get("/api/user/dashboard",{params:{q:e.search,type:e.typeFilter,sort:e.orderBy,statuses:Object.keys(e.filters.status).filter(z=>e.filters.status[z]!==!1).join(",")||"none",attention:String(e.projectView==="attention"),cursor:C?e.dashboardCursor:void 0}}).then(z=>{if(L===v){if(!Array.isArray(z.data?.items))return E=!0,N();e.items=(C?e.items:[]).concat(z.data.items.map(M)),e.dashboardCursor=z.data.cursor,e.dashboardTotals=z.data,C||te()}},z=>{if(L===v){if(z.status===404)return E=!0,N();e.dashboardError="Projects could not be loaded. Please try again."}}).finally(()=>{L===v&&(e.loading=!1,e.loadingMore=!1)})}e.loadMoreProjects=()=>V(!0);let _;e.watchGroup(["search","typeFilter","orderBy","projectView"],()=>{E||(_&&d.timeout.cancel(_),_=d.timeout(()=>V(),150))},!1),e.watch("filters",()=>{E||V()},!0,!1),e.on("dispose",()=>{v++}),V(),e.openItem=(C,L)=>{if(!C._viewUrl)return;let z=L&&L.target;z&&z.closest&&z.closest("a, button, .dropdown, input")||(o.location.href=C._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(C=>e.filters.status[C]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0;let G=()=>Object.keys(e.statusKeyLabels);e.onlyRemovedShown=()=>G().every(C=>C==="removed"==(e.filters.status[C]!==!1)),e.isActiveDefault=()=>G().every(C=>C==="removed"==(e.filters.status[C]===!1)),e.statusView=()=>e.projectView==="attention"?"attention":e.onlyRemovedShown()?"removed":e.filters.status.removed===!1?"active":"custom",e.setStatusView=C=>{if(C==="attention")return e.setProjectView("attention");e.projectView="all",G().forEach(L=>{e.filters.status[L]=C==="removed"?L==="removed":L!=="removed"})},e.statusChipKeys=()=>{let C=e.statusView();return C==="removed"?[]:G().filter(L=>e.filters.status[L]===!1&&!(L==="removed"&&C!=="custom"))},e.removedCount=null;function te(){if(E){e.removedCount=e.items.filter(L=>L._statusKey==="removed").length;return}let C=e.dashboardTotals;!C||e.projectView!=="all"||e.search.trim()||e.typeFilter!=="all"||(e.isActiveDefault()?e.removedCount=Math.max(0,C.total-C.filtered):e.onlyRemovedShown()&&(e.removedCount=C.filtered))}e.showViewTabs=()=>e.statusView()!=="active"||e.attentionCount()>0||e.removedCount>0||e.removedCount==null&&!!e.dashboardTotals&&e.dashboardTotals.total>e.dashboardTotals.filtered,e.hasActiveFilters=()=>e.projectView!=="all"||e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(C=>e.filters.status[C]===!1),e.showClearFilters=()=>e.search.trim().length>0||e.typeFilter!=="all"||e.statusChipKeys().length>0,e.isPlainView=()=>!e.showClearFilters(),e.clearFilters=()=>{let C=e.statusView();e.typeFilter="all",e.search="",e.setStatusView(C==="removed"?"removed":"active")};function X(C,L,z,K){t.get("/api/repo/"+C).then(async ie=>{let se=K!==void 0&&K!==ie.data.status;for(let Y of e.items)if(Y._type==="repo"&&Y.repoId==C){se=se||Y.status!==ie.data.status;let he=e.needsAttention(Y);Y.status=ie.data.status,Y.statusMessage=ie.data.statusMessage,Y._statusKey=u(Y.status),Y._statusKey!=="progress"&&(Y._stale=!1);let Se=e.needsAttention(Y);e.dashboardTotals&&he!==Se&&(e.dashboardTotals.attention=Math.max(0,e.dashboardTotals.attention+(Se?1:-1)));break}if(se&&!E){e.dashboardCursor=null;let Y=e.selectedProject;await V(),Y&&e.selectedProject===Y&&(e.selectedProject=e.items.find(he=>he._type===Y._type&&he._id===Y._id)||null)}if(ie.data.status=="ready"||ie.data.status=="error"||ie.data.status=="removed"||ie.data.status=="expired"){L(ie.data);return}d.timeout(()=>X(C,L,z,ie.data.status),2500)},z)}let O=C=>C==="repo"?"repository":C==="gist"?"gist":"pull request",U=C=>C==="repo"?"/api/repo":C==="gist"?"/api/gist":"/api/pr";e.removeItem=C=>{let L=O(C._type);if(confirm(`Are you sure that you want to remove the ${L} ${C._id}?`)){let z=st({title:`Removing ${C._id}...`,date:new Date,body:`The ${L} ${C._id} is going to be removed.`});e.addToast(z);let K=`${U(C._type)}/${C._id}`;t.delete(K).then(()=>{C._type==="repo"?X(C._id,()=>{z.title=`${C._id} is removed.`,z.body=`The ${L} ${C._id} is removed.`},void 0,C.status):(z.title=`${C._id} is removed.`,z.body=`The ${L} ${C._id} is removed.`,V())},ie=>{z.title=`Error during the removal of ${C._id}.`,z.body=ie.body,V()})}},e.refreshItem=C=>{let L=O(C._type),z=st({title:`Refreshing ${C._id}...`,date:new Date,body:`The ${L} ${C._id} is going to be refreshed.`});e.addToast(z);let K=se=>{z.title=`Error during the refresh of ${C._id}.`,z.body=se.data?.error||se.body||"The refresh could not be completed. Please try again.",V()},ie=`${U(C._type)}/${C._id}/refresh`;t.post(ie).then(()=>{C._type==="repo"?X(C._id,se=>{if(se.status!=="ready"){K({body:se.statusMessage||`The repository is ${se.status}.`});return}z.title=`${C._id} is refreshed.`,z.body=`The ${L} ${C._id} is refreshed.`},K,C.status):(z.title=`${C._id} is refreshed.`,z.body=`The ${L} ${C._id} is refreshed.`,V())},K)},e.extendItem=C=>{let L=O(C._type),z=st({title:`Extending ${C._id}...`,date:new Date,body:`The expiration of ${L} ${C._id} is being extended.`});e.addToast(z);let K=`${U(C._type)}/${C._id}/extend`;t.post(K).then(ie=>{let se=ie?.data?.expirationDate?` until ${new Date(ie.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";C._type==="repo"?X(C._id,()=>{z.title=`${C._id} is extended.`,z.body=`${L} ${C._id} is extended${se}.`},void 0,C.status):(z.title=`${C._id} is extended.`,z.body=`${L} ${C._id} is extended${se}.`,V())},ie=>{z.title=`Error during the extension of ${C._id}.`;let se=ie.data&&ie.data.error;z.body=se||ie.body,se&&Object.prototype.hasOwnProperty.call(Kn.ERRORS,se)&&(z.body=Kn.ERRORS[se]),V()})},e.itemFilter=C=>{if(e.projectView==="attention"&&!e.needsAttention(C)||e.typeFilter!=="all"&&C._type!==e.typeFilter||e.filters.status[C._statusKey]===!1)return!1;let L=e.search.trim().toLowerCase();return!!(L.length==0||C._label&&String(C._label).toLowerCase().indexOf(L)>-1||C._source&&String(C._source).toLowerCase().indexOf(L)>-1||C._id&&String(C._id).toLowerCase().indexOf(L)>-1||C.conference&&String(C.conference).toLowerCase().indexOf(L)>-1)}};var Fc=function(e,t,s){let i=Ct();e.repoId=s.repoId,e.reviewUrl=window.location.origin+"/r/"+encodeURIComponent(s.repoId)+"/",e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="",e.shareUrl=(window.location?.origin||"")+"/r/"+encodeURIComponent(e.repoId)+"/",e.copied=!1;let o=null;e.copyShareUrl=async()=>{try{await Wa(e.shareUrl),e.copied=!0,o&&i.timeout.cancel(o),o=i.timeout(()=>{e.copied=!1},2e3)}catch{e.addToast?.({title:"Copy this anonymous link",body:e.shareUrl})}},e.selectShareUrl=m=>{let b=window.getSelection?.();if(!b||!m?.target)return;let h=document.createRange();h.selectNodeContents(m.target),b.removeAllRanges(),b.addRange(h)};var r=null;let d=null,p=!1;function u(m){e.rateLimitResetAt=m,r&&i.interval.cancel(r);function b(){var h=Math.max(0,Math.ceil((m-Date.now())/1e3));if(h<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,i.interval.cancel(r),r=null;else{var w=Math.floor(h/60),R=h%60;e.rateLimitCountdown=w>0?w+"m "+R+"s":R+"s"}}b(),r=i.interval(b,1e3)}e.on("dispose",function(){p=!0,r&&i.interval.cancel(r),d&&i.timeout.cancel(d)});function y(m){if(!m)return m;var b=m.match(/^rate_limited:(\d+)$/);return b?(u(parseInt(b[1],10)),null):(e.rateLimitResetAt=0,m)}e.getStatus=()=>{p||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(m=>{if(!p){e.repo=m.data,m.data.rateLimitResetAt?u(m.data.rateLimitResetAt):e.repo.statusMessage=y(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var b=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(b=!1),b&&(d=i.timeout(e.getStatus,2e3))}},m=>{e.error=m.data.error})},e.getStatus()},dr=function(e,t,s,i,o,r,d){Oc(),e.renderRedacted=_o,e.sourceUrl="",e.workspaceOpen=!1,e.sourceUrlError="",e.previewStatus="idle",e.sourceLoading=!1,e.mobilePane="settings";let p=window.matchMedia?.("(max-width: 767px)");e.mobileWorkspace=!!p?.matches,p?.addEventListener&&Ut()(p,"change",k=>{e.mobileWorkspace=k.matches}),e.selectMobilePane=k=>{e.mobilePane=k};let u=0,y=!1,m=new Set,b=(k,I=!1)=>!y&&k.generation===u&&k.url===e.sourceUrl.trim()&&k.connection===e.githubConnection&&(!I||k.branch===e.source.branch),h=()=>{let k={generation:u,url:e.sourceUrl.trim(),connection:e.githubConnection,branch:e.source.branch};return m.add(k),e.sourceLoading=!0,k},w=k=>{m.delete(k),y||(e.sourceLoading=[...m].some(I=>b(I)))};e.on("dispose",()=>{y=!0,u++});let R=null,S=k=>k.gistId&&!k.repo?"gist:"+k.gistId.toLowerCase():(k.owner+"/"+k.repo).toLowerCase()+(k.pullRequestId?"/pull/"+k.pullRequestId:""),N=ga(e,["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"],"anonymize:"+(o.path?.()||"")),v=null,E=null,M=null;e.hostingReview=!1,e.previewExpanded=!1,e.taskValidationError="",e.editRepository=()=>{e.mobilePane="settings",e.previewExpanded=!1,tt(()=>document.querySelector(".anonymize-fields .is-invalid")?.focus())},e.submitRepository=k=>{if(e.taskValidationError="",!(e.sourceLoading||e.billingBusy||e.hostingSaving||e.billingPending)){if(ei()||e.anonymize?.invalid||e.sourceUrlError){e.taskValidationError="Check the highlighted fields before continuing.",e.editRepository();return}return e.hostingNeedsPayment()?e.checkoutRepository(Gi(e.hostingChoice())?e.hostingChoice():""):e.anonymizeRepo(k)}},e.hostingPayment=!1,e.hostingAlternatives=!1,e.hostingPrice=k=>k.amount==null?"Price shown at checkout":new Intl.NumberFormat(void 0,{style:"currency",currency:k.currency,minimumFractionDigits:0,maximumFractionDigits:2}).format(k.amount/100)+(k.interval==="year"?" billed annually":" billed monthly"),e.hostingPlan="",e.hostingSaving=!1,e.selectedHostingPlan=()=>e.authorPlans().find(k=>k.id===e.hostingPlan)||e.hostingSubscriptionPlan?.();let V=()=>t.get("/api/user/quota").then(k=>{e.hostingQuota=k.data});Ki(e,t,async()=>{await V(),e.hostingQuotaBlocked=!1},{confirmedMessage:"Hosting status refreshed. Your draft is ready to continue."}),V().catch(()=>{}),e.authorPlans=()=>(e.billing?.plans||[]).filter(k=>["author_monthly","author_annual"].includes(k.id)),e.conferenceHosting=()=>!!(e.conference&&e.conference_data?.hosting),e.hasAuthorHosting=()=>["author_monthly","author_annual"].includes(e.billing?.allowance?.plan),e.hostingNeedsPayment=()=>!e.billing?.enabled||e.detectedType!=="repo"||e.hasAuthorHosting()||e.isUpdate&&e.role!=="owner"?!1:!!(e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length||!e.conferenceHosting()&&e.hostingQuotaBlocked),e.repositoryGrants=k=>(e.billing?.grants||[]).filter(I=>I.planId===k&&I.scope===`repo:${e.repoId}`&&["active","paid","past_due"].includes(I.status)&&new Date(I.until).getTime()>Date.now()),e.repositoryAddonPlans=()=>(e.billing?.plans||[]).filter(k=>Gi(k.id)&&(["repo_extend","repo_pack"].includes(k.id)||!e.repositoryGrants(k.id).length)),e.hostingOneTimePlans=()=>{let k=I=>I.map(B=>(e.billing?.plans||[]).find(j=>j.id===B&&!e.repositoryGrants(B).length)).filter(Boolean);return e.options?.expirationMode==="never"&&!e._existingNever&&!e.repositoryGrants("repo_never").length?k(["repo_never"]):e.hostingQuotaBlocked&&!e.conferenceHosting()?k(["repo_slot","repo_pack"]):[]},e.hostingOneTime=()=>e.hostingOneTimePlans()[0];let _=["free","repo_slot"];e.liveUpdatesIncluded=()=>{if(!e.billing?.enabled||e.detectedType!=="repo"||e.isUpdate&&e.role!=="owner"||e.conferenceHosting()||e.hasAuthorHosting())return!0;let k=e.billing?.allowance?.plan;return k&&!_.includes(k)?!0:e.repositoryGrants("author_pass").length>0||e.repositoryGrants("repo_pack").length>0},e.liveUpdatesPrice=()=>{let k=(e.billing?.plans||[]).find(I=>I.id==="author_pass");return k?.amount!=null?e.billingAmount(k):""},e.showHostingOptions=()=>{e.mobilePane="settings",tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"start",behavior:"smooth"}))},e.neverExpireTag=()=>{if(e.hasAuthorHosting())return"Included in your subscription";if(e.repositoryGrants("repo_never").length)return"Paid for this repository";let k=(e.billing?.plans||[]).find(I=>I.id==="repo_never");return k?.amount!=null?`${e.billingAmount(k)} once, or with a subscription`:"Subscription or one-time add-on"},e.hostingCycle="author_annual",e.hostingSubscriptionPlan=()=>e.authorPlans().find(k=>k.id===e.hostingCycle)||e.authorPlans().find(k=>k.interval==="year")||e.authorPlans()[0],e.hostingAnnualSavings=()=>{let k=e.authorPlans().find(B=>B.interval==="month")?.amount,I=e.authorPlans().find(B=>B.interval==="year")?.amount;return k&&I&&Ie.hostingOneTimePlans().concat(e.authorPlans().length?[e.hostingSubscriptionPlan()]:[]),e.hostingOptionName=k=>({repo_slot:"Add this repository",repo_pack:"Paper pack",repo_never:"Never expire",author_annual:"Author subscription",author_monthly:"Author subscription"})[k.id]||k.name,e.hostingOptionBlurb=k=>({repo_slot:"Hosted outside your free repositories. Refresh it by hand.",repo_pack:"Adds automatic updates for 180 days and keeps the link online for a year.",repo_never:"This link never expires. No subscription."})[k.id]||`${k.repositories} repositories, ${e.billingBytes(k.storage)}, automatic updates and links that never expire.`,e.hostingChoice=()=>{let k=e.hostingOneTimePlans();return k.some(I=>I.id===e.hostingPlan)||e.authorPlans().some(I=>I.id===e.hostingPlan)?e.hostingPlan:k[0]?.id||e.hostingSubscriptionPlan()?.id||""},e.checkoutRepository=async(k="")=>{if(!(e.hostingSaving||e.billingBusy||!e.billing?.csrf||e.sourceLoading)){e.hostingSaving=!0,e.billingError="";try{let I=N.checkpoint(),B=JSON.stringify(I);(!E||B!==M)&&(E=(await t.post("/api/billing/draft",{path:o.path(),values:I},{headers:{"x-csrf-token":e.billing.csrf}})).data.id,M=B);let j=e.authorPlans().find(ue=>ue.id===e.hostingPlan)||e.hostingSubscriptionPlan();if(!k&&!j)throw new Error("No author plan available");await e.checkout(k||j.id,k?e.repoId:"",{draftId:E})}catch{e.billingError="Your draft could not be saved for checkout. Your form is unchanged. Please try again."}finally{e.hostingSaving=!1}}},e.useDatedHosting=()=>{e.options.expirationMode="remove"},e.discardDraft=async()=>{N.discard(),e.workspaceOpen=!!e.sourceUrl,e.error=null,e.sourceUrl?await e.urlSelected(!0):(u++,e.sourceLoading=!1,e.detectedType=null,e.details=null,e.sourceUrlError="",Kt.cancel(),Tn.cancel(),On.cancel(),e.previewStatus="idle")},e.githubConnection=void 0,e.githubConnections=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1;let G=()=>{let k={};for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])k[I]=e[I];sessionStorage.setItem("github-access-draft",JSON.stringify({path:o.path(),savedAt:Date.now(),draft:k}))};e.connectGistApp=()=>{G(),window.location.href="/github/app/login?returnTo="+encodeURIComponent(o.path())},e.connectGistOAuth=()=>{G(),window.location.href="/github/login?returnTo="+encodeURIComponent(o.path())},e.grantGitHubAccess=()=>{G();let k=o.path(),I=he(e.sourceUrl)||"",B=e.githubConnections?.appConnected?"/github/app/install":"/github/app/login";window.location.href=B+"?returnTo="+encodeURIComponent(k)+"&repository="+encodeURIComponent(I)+"&install=1"},e.chooseGitHubConnection=async k=>{e.githubConnection=k,e.readme="",e.sourceUrl&&await Ue()},e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0};function te(){let k=new Date;return k.setMonth(k.getMonth()+6),k}e.options.expirationDate=te();function X(k){let I=k.getFullYear(),B=String(k.getMonth()+1).padStart(2,"0"),j=String(k.getDate()).padStart(2,"0");return`${I}-${B}-${j}`}e.minExpirationDate=X(new Date);let O=()=>{let k=new Date,I=new Date(k);if(I.setFullYear(I.getFullYear()+1),e.billing?.enabled&&e.detectedType==="repo"&&!e.hasAuthorHosting()){I=new Date(k),I.setMonth(I.getMonth()+(e.billing.freeExpirationMonths||5));for(let ue of e.repositoryGrants("repo_extend"))new Date(ue.until)>I&&(I=new Date(ue.until));e.conference_data?.endDate&&new Date(e.conference_data.endDate)>I&&(I=new Date(e.conference_data.endDate)),e._savedExpirationDate&&e._savedExpirationDate>I&&(I=new Date(e._savedExpirationDate));let B=e.options?.expirationDate,j=e._savedExpirationDate&&B instanceof Date&&B.getTime()===e._savedExpirationDate.getTime();B instanceof Date&&B>I&&!j&&(e.options.expirationDate=new Date(I))}e.maxExpirationDate=X(I)};O(),e.watch(()=>[e.billing,e.repoId,e.conference_data,e.isUpdate,e._savedExpirationDate,e.options?.expirationMode,e.detectedType],O,!0,!1),e.anonymize_readme="",e.readme="",e.isUpdate=!1,e.userRepos=[],e.userReposStatus="idle",e.userRepoFilter="",e.loadUserRepos=(k=!1)=>{e.userReposStatus!=="loading"&&(e.userReposStatus="loading",t.get("/api/user/all_repositories",k?{params:{force:"1"}}:{}).then(I=>{if(y)return;let B=Array.isArray(I.data)?I.data.filter(j=>j&&j.fullName):[];e.userRepos=B.sort((j,ue)=>j.fullName.localeCompare(ue.fullName,void 0,{sensitivity:"base"})),e.userReposStatus="ready"},()=>{y||(e.userReposStatus="error")}))},e.filteredUserRepos=()=>{let k=String(e.userRepoFilter||"").trim().toLowerCase(),I=e.userRepos||[];return k?I.filter(B=>B.fullName.toLowerCase().includes(k)):I},e.selectUserRepo=k=>{if(k?.fullName)return e.sourceUrl="https://github.com/"+k.fullName,e.urlSelected()},!i.repoId&&!i.pullRequestId&&!i.gistId&&Promise.resolve().then(()=>{y||e.loadUserRepos()}),e.previousConfigurations=[],e.previousConfigurationId="";let U,C=k=>String(k||"").replace(/\/$/,"").replace(/\.git$/i,"").toLowerCase();async function L(){if(e.isUpdate||i.repoId||i.pullRequestId||i.gistId)return;let k={generation:u,url:e.sourceUrl.trim(),connection:e.githubConnection};try{U||(U=t.get("/api/user/anonymized_repositories").then(j=>j.data));let I=await U;if(!b(k))return;let B=C(he(k.url));e.previousConfigurations=I.filter(j=>j.repoId&&j.options&&C(j.source?.fullName)===B).sort((j,ue)=>(Date.parse(ue.anonymizeDate)||0)-(Date.parse(j.anonymizeDate)||0)),e.previousConfigurationId=e.previousConfigurations[0]?.repoId||""}catch{U=void 0}}e.sourceSummary=()=>{let k=String(e.sourceUrl||""),I=/github\.com\/([^/\s]+\/[^/\s]+)\/pull\/(\d+)/i.exec(k);return I?I[1]+" \xB7 PR #"+I[2]:(I=/gist\.github\.com\/([^/\s]+)\/([0-9a-f]{8,})/i.exec(k),I?I[1]+" \xB7 gist "+(I[2].length>12?I[2].slice(0,7)+"\u2026"+I[2].slice(-4):I[2]):"")},e.previewId=()=>e.detectedType==="pr"?e.pullRequestId:e.detectedType==="gist"?e.gistId:e.repoId,e.previewPath=()=>{let k=e.previewId();return k?(e.detectedType==="pr"?"/pr/":e.detectedType==="gist"?"/gist/":"/r/")+encodeURIComponent(k)+"/":""},e.previewUrl=()=>{let k=e.previewPath();return k?"anonymous.4open.science"+k.replace(/\/$/,""):""},e.previewRedactions=()=>{let k=j=>typeof j=="string"?(j.match(Zo)||[]).length:0;if(e.detectedType==="repo")return e.previewViewer.redactionCount();let I=e.detectedType==="pr"?ks:Cs,B=0;return I.forEach(j=>{B+=k(j)}),B};let z=(k,I)=>k.localeCompare(I,void 0,{sensitivity:"base"}),K=k=>k.slice(k.lastIndexOf("/")+1),ie={key:null,files:[]};e.previewTreeFiles=()=>{if(!e.preserve.commit||!me)return[];let k=e.preserve.commit+"\0"+e.terms+"\0"+bs.size+"\0"+me.files.length;if(ie.key===k)return ie.files;let I=me.files.map(B=>{let j=e.previewPathName(B),ue=j.lastIndexOf("/");return{name:j.slice(ue+1),path:ue<0?"":j.slice(0,ue),size:0,sourcePath:B}});return ie={key:k,files:I},I},e.selectPreviewPath=k=>{let I=e.previewTreeFiles().find(B=>"/"+(B.path?B.path+"/":"")+B.name===k);I&&e.openPreviewFile(I.sourcePath)},e.existingConfigurationUrl=()=>{let k=e.previousConfigurations.find(I=>I.repoId===e.previousConfigurationId);return k?"/anonymize/"+encodeURIComponent(k.repoId):null};function se(k){t.get("/api/user/default").then(I=>{let B=I.data;B.terms&&(e.defaultTerms=B.terms.join(` +`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):te(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function Y(k,I,B){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(I,B)}function he(k){try{let I=parseGithubUrl(k);if(I&&I.owner&&I.repo)return I.owner+"/"+I.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||he(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=h();try{let I=await t.get("/github/connections");if(e.githubConnections=I.data,!I.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":I.data.csrf}});if(!b(k))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(k)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,w(k)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await Qe()}catch{}}};function Se(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:he(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ue(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Be(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(B.path!==o.path())throw new Error("Wrong task");v=B.values.conference||null;for(let j of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,j)&&(e[j]=B.values[j]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),E=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ue(),o.replace?.(o.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let I;try{I=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!I||I.path!==o.path()||Date.now()-I.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await Ue(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(I.draft,B)&&(e[B]=I.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ue(),sessionStorage.removeItem("github-access-draft"),!0}se(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&d(Be,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async k=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(k.data.status),e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.fullName,e._originalFullName=k.data.source.fullName,e.terms=k.data.options.terms.filter(I=>I).join(` +`),e.source=k.data.source,e.role=k.data.role||"owner",e._existingNever=k.data.options.expirationMode==="never",e._savedExpirationDate=k.data.options.expirationDate?new Date(k.data.options.expirationDate):null,e.coauthors=k.data.coauthors||[],e._originalBranch=k.data.source.branch,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,e.repositoryID=k.data.source.repositoryID,e._originalRepositoryID=k.data.source.repositoryID,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&(await Promise.all([Qe(),He()]),ws())},()=>{o.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async k=>{if(e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.repositoryFullName+"/pull/"+k.data.source.pullRequestId,e.terms=k.data.options.terms.filter(I=>I).join(` +`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be())try{await Qa()}catch{}},()=>{o.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(I=>I).join(` +`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&await Za()},()=>{o.url("/404")}))}),t.get("/github/connections").then(k=>{e.githubConnections=k.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&k.data.appEnabled&&k.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ue())}).catch(()=>{}),e.urlSelected=async(k=!1)=>{let I=++u;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Kt.cancel(),Tn.cancel(),On.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Y("sourceUrl","github",!1);return}let j=S(B),ue=k||R===j;R=j,e.sourceUrlError="",Y("sourceUrl","github",!0);let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ke=window.document.getElementById("sourceUrl");if(Ke){try{Ke.setSelectionRange(0,0)}catch{}Ke.scrollLeft=0}},50),ye&&d(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ue&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ue||(e.source={type:"GitHubStream",branch:"",commit:""}),Kt.cancel(),Tn.cancel(),On.cancel(),ks.clear(),Cs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",lt(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ue;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await Za()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await Qa()):(e.detectedType="repo",L(),await Promise.all([Qe(),He()]),ws())}catch{}finally{I===u&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let k=e.branches.filter(B=>B.name==e.source.branch)[0];if(!k)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=k.commit),e.readme=k.readme,await He(),ws()}),e.getBranches=async k=>{let I=parseGithubUrl(e.sourceUrl),B=h();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:Se()}});if(!b(B))return;e.branches=j.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ue=e.branches.filter(ye=>ye.name==e.source.branch);ue.length>0&&(!(!e.reconnectingSource&&!k&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=ue[0].commit),e.readme=ue[0].readme,await He(k))}catch(j){if(!b(B))return;e.branches=[],e.sourceUnreachable=j&&(j.status===404||j.data&&j.data.error==="repo_not_found");let ue=j&&j.data&&j.data.error||(j&&j.status===404?"repo_not_found":"unknown_error");r("ERRORS."+ue).then(ye=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:ye}),e.error=ye},console.error),typeof Y=="function"&&Y("sourceUrl","missing",!1)}finally{w(B)}};async function Qe(){let k=parseGithubUrl(e.sourceUrl),I=h();try{Es();let B=await t.get(`/api/repo/${k.owner}/${k.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Se(),force:"1"}});if(!b(I))return;e.details=B.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),Ss(B.data.error)),Y("sourceUrl","missing",!1),B}finally{w(I)}}async function He(k){if(e.readme&&!k)return e.readme;let I=parseGithubUrl(e.sourceUrl),B=h();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:Se()}});b(B,!0)&&(e.readme=j.data)}catch{b(B,!0)&&(e.readme="")}finally{w(B)}}let et={magicalBraces:!0},Re=k=>k.startsWith("/")&&!k.endsWith("/")&&zn(vs(k.slice(1),et),et)===k.slice(1),Fe=()=>Object.keys(e.preserve.picked).filter(k=>e.preserve.picked[k]).sort().map(k=>"/"+zn(k,et)),W=k=>"/"+zn(k,et)+"/**",fe=k=>"!/"+zn(k,et)+"/",de=()=>String(e.preserve.patterns||"").split(` +`).map(k=>k.trim()).filter(Boolean),ce=null,me=null,Me=new Set,A=0,T=null,F=()=>!1;function J(){let k=A+"\0"+e.preserve.patterns;if(k!==T){T=k;try{F=ja(Ha([...Fe(),...de()]))}catch{F=()=>!1}}return F}function H(k){let I=new Map([["",{dirs:[],files:[]}]]);for(let B of k){let j=B.split("/"),ue="";for(let ye=0;yeI.startsWith(k+"/"))),ce.descendants.get(k)}let le=k=>J()(k);function ne(k){let I=Z(k),B=0;for(let j of I)le(j)&&B++;return B===0?"none":B===I.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let k=(e.options?.preserveFiles||[]).map(I=>String(I).trim()).filter(Boolean).map(I=>Re(I)?vs(I.slice(1),et):I);return k.length?k.slice(0,2).join(", ")+(k.length>2?` and ${k.length-2} more`:""):"None. Every file is redacted."};async function oe(){let k=e.source?.commit;if(!(ce&&e.preserve.commit===k)){e.preserve.loading=!0,e.preserve.error="",ce=null,me=null;try{let I=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${I.owner}/${I.repo}/tree`,{params:{commit:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Se()}});if(e.source?.commit!==k)return;let j=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];ce=dn(H(B.data.files||[])),me=j.length?dn(H([...B.data.files||[],...j])):ce,Me=dn(new Set(j)),e.preserve.commit=k,e.preserve.truncated=!!B.data.truncated,e.previewFile||Kt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",k=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&k&&e.sourceUrl&&oe().catch(()=>{})}),e.openPreserveFiles=()=>{let k={},I=[];for(let j of e.options?.preserveFiles||[]){let ue=String(j).trim();ue&&(!I.length&&Re(ue)?k[vs(ue.slice(1),et)]=!0:I.push(ue))}let B={};for(let j of Object.keys(k)){let ue=j.split("/");for(let ye=1;ye0}),e.mobileWorkspace&&(e.mobilePane="settings"),A++,d(()=>{let j=document.getElementById("preserve-files-dialog");j?.showModal&&!j.open&&j.showModal(),document.getElementById("preserve-files-search")?.focus()},0),oe()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ha([...Fe(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ce)return[];let k=J(),I=(ye,Ke,qt)=>{let bt=!!e.preserve.picked[ye],Xn=k(ye);return{kind:"file",path:ye,label:qt,depth:Ke,state:Xn?"all":"none",locked:!bt&&Xn,note:!bt&&Xn?"matched by a pattern":bt&&!Xn?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return ce.files.filter(ye=>ye.toLowerCase().includes(B)).slice(0,300).map(ye=>I(ye,0,ye));let j=[],ue=(ye,Ke)=>{let qt=ce.dirs.get(ye);for(let bt of qt.dirs){let Xn=!!e.preserve.expanded[bt],xa=de().includes(W(bt));j.push({kind:"dir",path:bt,label:bt.slice(ye?ye.length+1:0)+"/",depth:Ke,open:Xn,state:ne(bt),locked:!1,note:xa?"whole folder":""}),Xn&&ue(bt,Ke+1)}for(let bt of qt.files)j.push(I(bt,Ke,bt.slice(ye?ye.length+1:0)))};return ue("",0),j},e.preserveCount=()=>ce?ce.files.filter(le).length:0,e.togglePreserveDir=k=>{e.preserve.expanded[k]=!e.preserve.expanded[k]},e.togglePreserveFile=k=>{e.preserve.picked[k]=!e.preserve.picked[k],A++},e.togglePreserveFolder=k=>{let I=W(k),B=fe(k),j=de().filter(ye=>ye!==I&&ye!==B),ue=ne(k)==="all"||de().includes(I);for(let ye of Z(k))e.preserve.picked[ye]=!1;A++,e.preserve.patterns=(ue?j:[...j,I]).join(` +`),ue&&Z(k).some(le)&&(e.preserve.patterns=[...j,B].join(` +`))};let ee=/^readme(\.[^/]*)?$/i,ke=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],pe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Ce=k=>{let I=K(k),B=I.indexOf("."),j=ke.indexOf(B===-1?"":I.slice(B).toLowerCase());return j===-1?ke.length:j},Pe=()=>!!ce&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!Pe())return"";for(let k of[".github","","docs"]){let I=(ce.dirs.get(k)?.files||[]).filter(B=>ee.test(K(B)));if(I.length)return I.sort((B,j)=>Ce(B)-Ce(j)||z(B,j))[0]}return""},e.readmeName=()=>K(e.readmePath())||"README.md";let Ve={key:null,fn:()=>!1},Ge=()=>{let k=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),I=k.join(` +`);if(I!==Ve.key){let B=()=>!1;try{k.length&&(B=ja(k))}catch{}Ve={key:I,fn:B}}return Ve.fn};e.pathPreserved=k=>!!k&&Ge()(k),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let k=Ge();if(Pe()){let I=e.readmePath();return!!I&&k(I)}return pe.some(I=>k(I))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function ze(){let k={terms:e.terms?e.terms.split(` +`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);k.repoName=`${I.owner}/${I.repo}`}catch{}return k}function we(k,I,B){let j=null,ue=0,ye=()=>{if(e.detectedType!==k)return;j&&d.cancel(j);let Ke=++ue;e.previewStatus="loading",j=d(()=>{j=null;let qt=I();if(!qt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",qt).then(bt=>{Ke===ue&&(B(bt.data,qt),e.previewStatus="ready")}).catch(()=>{Ke===ue&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ue++,j&&d.cancel(j),j=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof at!="string"?ft(e.previewFile):Kt()),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()};let be=dn(qo(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),ma(be,e),Object.assign(be,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),be.preview=!0,be.fileSize=k=>k===be.filePath&&typeof at=="string"?new Blob([at]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let ot=k=>Me.has(k)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(k),rt=(k="")=>({path:k,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=rt();let yt=0,at=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=k=>{if(k=k||"",k&&k===e.readmePath()&&(k=""),yt++,at=null,Yn(),Kt.cancel(),e.previewFile=k,e.previewDoc=rt(k),be.sidebarCollapsed=!0,be.content=null,!k){e.readme?Kt():e.previewStatus="idle";return}if(ot(k)){cr("binary"),e.previewStatus="ready";return}ft(k)};function lt(){yt++,at=null,e.previewFile="",e.previewDoc=rt(),be.sidebarCollapsed=!0,be.content=null}function ft(k){let I=++yt;at=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Se()},transformResponse:j=>j}).then(j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=typeof j.headers=="function"&&j.headers("content-type")||"";if(/json/i.test(ue)){let ye=null;try{ye=JSON.parse(j.data)}catch{}if(ye&&ye.binary===!0){cr("binary"),e.previewStatus="ready";return}}at=typeof j.data=="string"?j.data:"",Kt()},j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=ar(j);if(ue==="file_too_big"){cr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Kn.ERRORS[ue]||"GitHub did not return this file.",e.previewStatus="error"})}let Vt;function Yn(){Vt&&window.URL.revokeObjectURL(Vt),Vt=void 0,be.url=void 0}e.on("dispose",Yn);function cr(k){Yn(),e.previewDoc.note=k,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=k==="too_big"?"error":"binary",be.content=k==="too_big"?"file_too_big":"binary"}function Qp(k){try{let I=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",j=k&&k.includes("/")?k.slice(0,k.lastIndexOf("/")+1):"";return`https://github.com/${I.owner}/${I.repo}/raw/${B}/${j}`}catch{return""}}let Ja=we("repo",()=>e.previewFile?typeof at!="string"?null:{content:at,options:ze()}:e.readme?{content:e.readme,options:ze()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");Yn(),window.URL?.createObjectURL&&(be.url=Vt=window.URL.createObjectURL(new Blob([k.content],{type:"text/plain"})));let I=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(I)),be.fileBaseUrl=Qp(I),be.renderFileContent(k.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=k.content)}),Kt=()=>{e.previewFile&&typeof at!="string"||Ja()};Kt.cancel=Ja.cancel;let bs=st(new Map),pr=new Set,fr=new Set,Zs="",xs=null,xo=()=>String(e.terms||"").split(` +`).filter(k=>k.trim());function Zp(){xs=null;let k=xo(),I=k.join(` +`);I!==Zs&&(bs.clear(),fr.clear(),Zs=I);let B=[...pr].filter(j=>!bs.has(j));if(pr.clear(),!(!B.length||!k.length))for(let j=0;j{if(Zs!==I||xo().join(` +`)!==I)return;let Ke=ye.data?.contents;if(!Array.isArray(Ke)||Ke.length!==ue.length)throw Error("Invalid preview response");ue.forEach((qt,bt)=>bs.set(qt,typeof Ke[bt]=="string"?Ke[bt]:qt))}).catch(()=>{Zs===I&&ue.forEach(ye=>fr.add(ye))})}}e.previewName=k=>{if(!k||!xo().length)return k;if(Zs===xo().join(` +`)){if(bs.has(k))return bs.get(k);if(fr.has(k))return k}return pr.add(k),xs||(xs=d(Zp,120)),k},e.previewPathName=k=>{k=String(k||"");let I=k.lastIndexOf("/");return I<0?e.previewName(k):e.previewName(k.slice(0,I))+"/"+e.previewName(k.slice(I+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{be.repoId=e.repoId||"repository",be.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),be.paths=be.filePath.split("/"),be.files=e.previewTreeFiles(),be.loadedFolders=Object.fromEntries([...me?.dirs.keys()||[]].map(k=>[e.previewName(k),!0]))},!0),e.on("dispose",()=>{xs&&d.cancel(xs)});function ws(){!e.anonymize||!e.anonymize.terms||Kt()}async function Qa(){let k=parseGithubUrl(e.sourceUrl),I=h();try{Es();let B=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),Ss(B.data.error)),Y("sourceUrl","missing",!1),B}finally{w(I)}}let ks=st(new Map);function xp(){let k=new Set,I=e.details&&e.details.pullRequest;if(!I)return k;typeof I.title=="string"&&k.add(I.title),typeof I.body=="string"&&k.add(I.body),typeof I.diff=="string"&&k.add(I.diff);let B=I.comments||[];for(let j of B)typeof j.author=="string"&&k.add(j.author),typeof j.body=="string"&&k.add(j.body);return k}let Tn=we("pr",()=>{let k=xp(),I=Array.from(k);return I.length===0?null:{contents:I,options:ze()}},(k,I)=>{if(!Array.isArray(k?.contents)||k.contents.length!==I.contents.length||k.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ueks.set(ye,ue))});e.anonymizePrContent=function(k){return k&&(ks.has(k)?ks.get(k):"")};async function Za(){let k=parseGithubUrl(e.sourceUrl),I=h();try{Es(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${k.gistId}`);if(!b(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!b(I))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Y("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Y("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),Ss(B.data.error)),Y("sourceUrl","missing",!1),B}finally{w(I)}}let Cs=st(new Map);function ef(){let k=new Set,I=e.details&&e.details.gist;if(!I)return k;typeof I.description=="string"&&k.add(I.description),typeof I.ownerLogin=="string"&&k.add(I.ownerLogin);let B=I.files||[];for(let ue of B)typeof ue.filename=="string"&&k.add(ue.filename),typeof ue.content=="string"&&k.add(ue.content);let j=I.comments||[];for(let ue of j)typeof ue.author=="string"&&k.add(ue.author),typeof ue.body=="string"&&k.add(ue.body);return k}let On=we("gist",()=>{let k=ef(),I=Array.from(k);return I.length===0?null:{contents:I,options:ze()}},(k,I)=>{if(!Array.isArray(k?.contents)||k.contents.length!==I.contents.length||k.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ueCs.set(ye,ue)),hr()});e.anonymizeGistContent=function(k){return k&&(Cs.has(k)?Cs.get(k):"")},e.previewGistFiles=[];function hr(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",hr,!0),e.watch("terms",hr);function tf(){let k=e.conference;if(e.conference_data=null,!k)return;let I=k===v||e.isUpdate&&k===e._originalConference;k!==v&&(v=null),t.get("/api/conferences/"+k).then(B=>{e.conference===k&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===k&&(e.conference_data=null)})}function Es(){Y("repoId","used",!0),Y("repoId","format",!0),Y("pullRequestId","used",!0),Y("pullRequestId","format",!0),Y("gistId","used",!0),Y("gistId","format",!0),Y("sourceUrl","used",!0),Y("sourceUrl","missing",!0),Y("sourceUrl","access",!0),Y("sourceUrl","github",!0),Y("commit","exists",!0),Y("conference","activated",!0),Y("terms","format",!0),e.termHints=[]}function ei(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let k=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||k&&k.invalid?(k&&k.setDirty&&k.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function Ss(k){let I=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(k){case"repoId_already_used":Y(I,"used",!1);break;case"invalid_repoId":Y(I,"format",!1);break;case"options_not_provided":Y(I,"format",!1);break;case"repo_already_anonymized":Y("sourceUrl","used",!1);break;case"invalid_terms_format":Y("terms","format",!1);break;case"repo_not_found":Y("sourceUrl","missing",!1);break;case"repo_not_accessible":Y("sourceUrl","access",!1);break;case"commit_not_found":Y("commit","exists",!1);break;case"conf_not_activated":Y("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let k=(e.coauthorSearch||"").trim();if(e.coauthorError="",k.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:k}}).then(I=>{let B=new Set((e.coauthors||[]).map(j=>(j.username||"").toLowerCase()));e.coauthorResults=(I.data||[]).filter(j=>!B.has((j.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(k,I)=>{I&&I.preventDefault(),!(!k||!k.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:k.username}).then(B=>{e.coauthors=B.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},B=>{let j=B&&B.data&&B.data.error||"unknown_error";e.coauthorError=j})},e.removeCoauthor=k=>{!k||!k.username||confirm("Remove co-author "+k.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(k.username)).then(I=>{e.coauthors=I.data||[]},I=>{let B=I&&I.data&&I.data.error||"unknown_error";e.coauthorError=B})},e.anonymizeRepo=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(e.reconnectingSource&&!e.reconnectRepositoryId)return;if(ei()){e.editRepository();return}if(e.anonymize?.invalid||e.sourceUrlError){e.editRepository(),e.error="Please correct the highlighted fields before saving.";return}if(e.hostingNeedsPayment()&&e.options.expirationMode==="never"){e.hostingReview=!0,tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}));return}let I=k.currentTarget||k.target.closest?.("button")||k.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={repoId:e.repoId,terms:e.terms.trim().split(` +`).filter(ye=>ye),connection:e.githubConnection,fullName:`${B.owner}/${B.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(j.options.pageSource=e.details.pageSource),Es();let ue=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ye=>{if(ye.data){let Ke=["quota_exceeded","subscription_required_for_never_expiration"].includes(ye.data.error);Ke||r("ERRORS."+ye.data.error).then(qt=>{e.error=qt},console.error),Ss(ye.data.error),Ke&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{I.disabled=!1})},e.anonymizeGist=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=k.currentTarget||k.target.closest?.("button")||k.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={gistId:e.gistId,terms:e.terms.trim().split(` +`).filter(ye=>ye),source:{gistId:B.gistId},options:e.options,conference:e.conference};Es();let ue=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ke=>{e.error=Ke},console.error),Ss(ye.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=k.currentTarget||k.target.closest?.("button")||k.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(` +`).filter(ye=>ye),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};Es();let ue=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ke=>{e.error=Ke},console.error),Ss(ye.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{tf()}),e.termHints=[],e.matchTermAsWritten=k=>{e.terms=Dc(e.terms,k)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Kt()}),e.watch("terms",()=>{e.termHints=Ac(e.terms),e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("details",()=>{e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()},!0)},Ka=function(e,t,s,i,o,r){ma(e);let d=Ct();Oc();let p=Ut(),u=0,y=null,m=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){y&&(y.resolve(),y=null),m&&(d.timeout.cancel(m),m=null)}let h=!1;e.on("dispose",()=>{h=!0,u++,b(),w&&w.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,p(document,"click",O=>{e.symbolsOpen&&!O.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!O.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!O.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&O.target.isConnected&&!O.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!O.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!O.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",O=>{O.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(O.ctrlKey||O.metaKey)&&!O.altKey&&O.key&&O.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(O.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var U=document.querySelector(".tree-search-input");U&&(U.focus(),U.select())}});var w=null;e.onFileSearchChange=function(){w&&(w.resolve(),w=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let U=r.defer();w=U,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:U.promise}).then(function(C){if(!(h||w!==U)){w=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Fe){L[(Fe.path||"")+"/"+Fe.name]=!0});for(var z=[],K={},ie=0;ie0&&e.files.push.apply(e.files,z);for(var Qe=[],He=0;He0&&e.files.push.apply(e.files,Qe),e.fileSearchResults=C.data}},function(){!h&&w===U&&(w=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(O,U){if(e.repoId!=i.repoId)return X();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(C=>C&&C.trim().length>0),te();for(let C=0;C0?e.paths.slice(0,C).join("/"):"";e.files.some(K=>K.path===L)||e.getFiles(L)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let L of e.files)L.name.toLowerCase().indexOf("readme")>-1&&(U[L.name.toLowerCase()]=L.name);let C=null;for(let L of O)if(U[L]){C=L;break}if(!C&&Object.keys(U).length>0&&(C=Object.keys(U)[0]),C){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(U[C]))}}e.fileCounts=null;let S=0,N=new Set,v=!1;e.getFiles=function(O,U=!1){let C=e.repoId,L=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(z){if(h||C!==e.repoId||L!==S)return[];let K=O||"";return e.files=e.files.filter(ie=>ie.path!==K),e.files.push(...z.data),e.loadedFolders={...e.loadedFolders,[K]:!0},E(K,L),z.data},function(z){if(h||C!==e.repoId||L!==S)return[];U||(e.type="error",e.content=ar(z),e.files=[])})};function E(O,U){if(v||N.has(O))return;N.add(O);let C=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(O)}`).then(function(L){h||C!==e.repoId||U!==S||(e.fileCounts={...e.fileCounts,...L.data})},function(){h||C!==e.repoId||U!==S||(v=!0)})}function M(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var V=null;e.on("dispose",function(){V&&d.interval.cancel(V)});function _(O){if(h)return;let U=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(C=>{if(!(h||U!==e.repoId)){if(e.options=C.data,e.options.url){window.location=e.options.url;return}O&&O(C.data)}},C=>{if(!(h||U!==e.repoId)){var L=C.data||{};if(L.error==="rate_limited"&&L.resetAt){let K=function(){var ie=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ie<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,V&&(d.interval.cancel(V),V=null),_(O);else{var se=Math.floor(ie/60),Y=ie%60;e.rateLimitCountdown=se>0?se+"m "+Y+"s":Y+"s"}};var z=K;e.type="rate_limited",e.rateLimitResetAt=L.resetAt,V&&d.interval.cancel(V),K(),V=d.interval(K,1e3)}else L.error==="repository_not_ready"?(e.type="loading",d.timeout(function(){_(O)},3e3)):(e.type="error",e.content=ar(C))}})}function G(O,U){let C=u;if(!O){e.type="error",e.content="no_file_selected";return}let L=e.type;(L==="code"||L==="text")&&ni().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let z=r.defer();y=z,m=d.timeout(()=>{!h&&C===u&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let K=U&&U.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(O)}?v=`+K,{timeout:z.promise,onDownloadProgress:ie=>{!h&&C===u&&(e.fileReceivedBytes=ie)},transformResponse:ie=>ie}).then(ie=>{h||C!==u||(b(),e.renderFileContent(ie.data,L,s.url()+"/../",ie.headers("content-type")))},ie=>{h||C!==u||(b(),e.type="error",e.content=ar(ie))})}function te(){u++,b(),e.content="",e.file=M();let O="0";e.file&&e.file.sha&&(O=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${O}`;let U=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);if(e.fileBaseUrl=`/api/repo/${e.repoId}/file/${U?encodePathForUrl(U):""}`,e.showSource=!1,e.imageSize="",e.allowScripts=!1,e.prepareFile(e.filePath),e.type=="pdf"){e.content="pdf";return}if(e.type=="media"||e.type=="audio"){e.content=e.type;return}G(e.filePath,e.file)}e.isSourceAccessError=()=>["repo_not_found","token_expired","github_app_access_required","github_app_reconnect_required","repo_saml_enforcement","repo_access_limited"].includes(e.content),e.retryContent=()=>X();function X(){u++,b(),e.files=[],e.loadedFolders={},e.content=null,e.fileCounts=null,S++,N=new Set,v=!1,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=i.repoId,e.type="loading",e.filePath=i.path||"",e.paths=e.filePath.split("/");let O=e.repoId;_(function(U){if(e.filePath){te();let L=[...new Set(e.paths.map((z,K)=>e.paths.slice(0,K).join("/")))];r.all(L.map(z=>e.getFiles(z,!0)));return}var C=r.resolve();for(let L=0;L0?e.paths.slice(0,L).join("/"):"";C=C.then(function(){return e.getFiles(z)}).then(function(){if(e.type==="error")return r.reject("error")})}C.then(function(){h||O!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(R(),te()))})})}X()},Uc=function(e,t,s,i,o){async function r(u){t.get(`/api/pr/${e.pullRequestId}/options`).then(y=>{if(e.options=y.data,e.options.url){window.location=e.options.url;return}u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}async function d(u){t.get(`/api/pr/${e.pullRequestId}/content`).then(y=>{e.details=y.data,e.tabState={active:y.data.diff?"diff":"comments"},u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}function p(){e.pullRequestId=i.pullRequestId,e.type="loading",r(u=>{d()})}p()},Bc=function(e,t,s,i,o){async function r(u){t.get(`/api/gist/${e.gistId}/options`).then(y=>{if(e.options=y.data,e.options.url){window.location=e.options.url;return}u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}async function d(u){t.get(`/api/gist/${e.gistId}/content`).then(y=>{e.details=y.data;let m=y.data&&y.data.files&&y.data.files.length;e.tabState={active:m?"files":"comments"},u&&u(y.data)},y=>{e.type="error",e.content=y.data.error})}function p(){e.gistId=i.gistId,e.type="loading",r(()=>{d()})}p()},zc=function(e,t,s){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.loading=!0,e.error="",e.search="";let i="conferences.filterPrefs",o={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},r=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},o.filters.status,r.filters&&r.filters.status||{})},e.orderBy=r.orderBy||o.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(d){if(!d.removing&&confirm(`Are you sure that you want to remove the conference ${d.name}? All the repositories linked to this conference will expire.`)){d.removing=!0;let p=st({title:`Removing ${d.name}...`,date:new Date,body:`The conference ${d.name} is going to be removed.`});e.addToast(p),t.delete(`/api/conferences/${d.conferenceID}`).then(()=>{p.title=`${d.name} is removed.`,p.body=`The conference ${d.name} is removed.`,e.loadConferences()}).catch(()=>{p.title="Unable to remove conference",p.body="Please try again. The conference has not been removed."}).finally(()=>{d.removing=!1})}},e.loadConferences=()=>(e.loading=!0,e.error="",t.get("/api/conferences/").then(d=>{e.conferences=d.data||[]},d=>{e.error="Unable to load your conferences. Please try again."}).finally(()=>{e.loading=!1})),e.loadConferences(),e.conferenceFilter=d=>{if(e.filters.status[d.status]==!1)return!1;let p=e.search.trim().toLowerCase();return!!(!p||(d.name||"").toLowerCase().includes(p)||(d.conferenceID||"").toLowerCase().includes(p))}},Ya=function(e,t,s,i){e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/");let o=()=>{for(let[h,w,R]of[["startDate","Starts","startDate"],["endDate","Ends","endDate"]]){let S=document.getElementById(h);if(!S)continue;let N=S.parentElement.querySelector(":scope > .date-echo");N||(N=document.createElement("p"),N.className="date-echo",N.setAttribute("aria-live","polite"),S.insertAdjacentElement("afterend",N));let v=ya(e.options?.[R]);N.textContent=v?w+" "+v:"",N.hidden=!v}};typeof e.watchGroup=="function"&&e.watchGroup(["options.startDate","options.endDate"],()=>tt(o));let r=(h=20)=>{let w=document.querySelector("input#name.form-control"),R=document.querySelector("input#conferenceID.form-control");R&&(R.placeholder="e.g. ICSE27"),w?w.placeholder="e.g. ICSE 2027":h>0&&setTimeout(()=>r(h-1),50)};setTimeout(()=>r(),0),e.plans=[],e.plansLoaded=!1,e.conferenceBilling=null,Wi(t).then(h=>{e.conferenceBilling=h.data}).catch(()=>{}),e.conferenceTiers=()=>e.plans.filter(h=>h.id!=="free_conference").map(h=>{let w=(e.conferenceBilling?.plans||[]).find(R=>R.id===h.id)||{};return{...h,storage:h.storagePerRepo,...w,id:h.id,name:h.name}}),e.conferenceAudience=h=>({conference_workshop:"Workshops and small venues",conference:"A typical conference",conference_large:"Large or multi-track venues"})[h]||"",e.conferencePlanName=h=>Hc(h),e.conferenceAmount=(h,w=h?.amount)=>new Intl.NumberFormat(void 0,{style:"currency",currency:h?.currency||"eur",minimumFractionDigits:w%100?2:0,maximumFractionDigits:2}).format(w/100),e.conferenceBytes=h=>{let w=Number(h)||0,R=Math.min(4,Math.floor(Math.log2(Math.max(w,1))/10));return`${new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(w/1024**R)} ${["B","KB","MB","GB","TB"][R]}`},e.editionMode=!1,e.saving=!1,e.error="";function d(){return t.get("/api/conferences/"+i.conferenceId).then(h=>{e.options={...e.options,...h.data,billing:h.data.billing||{}},e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}i.conferenceId&&(e.editionMode=!0,d());function p(){t.get("/api/conferences/plans").then(h=>{e.plans=h.data,e.plansLoaded=!0,!e.editionMode&&e.plans.length&&!e.plans.some(w=>w.id==e.options.plan.planID)&&(e.options.plan.planID=(e.plans.find(w=>w.id==="conference")||e.plans[0]).id),e.plan=e.plans.filter(w=>w.id==e.options.plan.planID)[0]})}p();let u=new Date;u.setDate(1),u.setMonth(u.getMonth()+1);let y=new Date(u);y.setTime(u.getTime()+179*864e5),e.options={billing:{},startDate:u,endDate:y,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(h=>h.id==e.options.plan.planID)[0]});function m(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function b(h){switch(h){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){if(e.saving)return;e.saving=!0,e.error="";let h=JSON.parse(JSON.stringify(e.options)),w=st({title:`Creating ${h.name}...`,date:new Date,body:`The conference ${h.conferenceID} is in creation.`});e.editionMode&&(w.title=`Updating ${h.name}...`,w.body=`The conference '${h.conferenceID}' is updating.`),e.addToast(w),m(),t.post("/api/conferences/"+(e.editionMode?h.conferenceID:""),h).then(()=>{e.editionMode?(w.title=`${h.name} updated`,w.body=`The conference '${h.conferenceID}' is updated.`):(w.title=`${h.name} created`,w.body=`The conference '${h.conferenceID}' is created.`),s.url("/conference/"+h.conferenceID)},R=>{b(R.data?.error),e.error="Unable to save the conference. Please correct any highlighted fields and try again.",e.removeToast(w)}).finally(()=>{e.saving=!1})}};function Hc(e){return{free_conference:"Free (no longer offered to new conferences)",conference_workshop:"Workshop package",conference:"Conference package",conference_large:"Large conference package",premium_conference:"Premium (legacy)",unlimited_conference:"Unlimited (legacy)"}[e]||e||"Free"}var jc=function(e,t,s,i){Ki(e,t,()=>p(),{confirmedMessage:"Payment status checked. Your conference is ready for submissions once payment is confirmed."}),e.conferencePlanName=u=>Hc(u),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,preparing:!0,error:!0,expired:!0,removed:!1}},e.orderBy="-anonymizeDate";let o=Xi,r=["ready","preparing","error","expired","removed"],d={current:u=>u!=="removed",attention:u=>u==="error",removed:u=>u==="removed"};e.confView=()=>Object.keys(d).find(u=>r.every(y=>d[u](y)===(e.filters.status[y]!==!1)))||"custom",e.setConfView=u=>{r.forEach(y=>{e.filters.status[y]=(d[u]||d.current)(y)})},e.confCount=u=>(e.conference?.repositories||[]).filter(y=>d[u](o(y.status))).length,e.copyingId=null,e.copyRepoLink=async u=>{if(!u?.repoId||e.copyingId)return;let y=new URL("/r/"+u.repoId+"/",window.location.origin).href;e.copyingId=u.repoId;try{await Wa(y),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:y})}finally{e.copyingId=null}},e.extendingId=null,e.extendRepo=u=>{!u?.repoId||e.extendingId||(e.extendingId=u.repoId,t.post("/api/repo/"+u.repoId+"/extend").then(y=>{let m=y?.data?.expirationDate?` until ${new Date(y.data.expirationDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}`:"";e.addToast({title:`${u.repoId} is extended.`,body:`Reviewers can open it again${m}.`}),u.status="ready",y?.data?.expirationDate&&(u.options={...u.options||{},expirationDate:y.data.expirationDate}),e.extendingId=null},y=>{let m=y?.status||y?.data?.status;e.addToast({title:`Couldn't extend ${u.repoId}.`,body:m===401||m===403?"Only the repository's authors can extend this link. Ask them to extend it from My work.":"Try again in a moment."}),e.extendingId=null}))},e.repoFiler=u=>{if(e.filters.status[o(u.status)]==!1)return!1;let y=e.search.trim().toLowerCase();return!!(!y||(u.source?.fullName||"").toLowerCase().includes(y)||(u.repoId||"").toLowerCase().includes(y))};function p(){t.get("/api/conferences/"+i.conferenceId).then(u=>{e.conference=u.data})}p()},Gc=function(e,t){e.notificationEmail="",e.emailSaved=!1,e.saveNotificationEmail=async()=>{e.busy=!0,e.emailSaved=!1,e.connectionError="";try{let s=await t.post("/github/connections/email",{email:e.notificationEmail},{headers:{"X-CSRF-Token":e.connections.csrf}});e.notificationEmail=s.data.notificationEmail,e.user&&(e.user.notificationEmail=s.data.notificationEmail),e.emailSaved=!0}catch(s){e.connectionError=s.data?.error||"Unable to save email address."}finally{e.busy=!1}},e.connections=null,e.connectionError="",e.busy=!1,e.loadConnections=()=>t.get("/github/connections").then(s=>{e.connections=s.data,e.notificationEmail=s.data.notificationEmail||""}).catch(s=>{e.connectionError=s.data?.error||"Unable to load connections."}),e.changeConnection=async(s,i,o)=>{e.busy=!0,e.connectionError="";try{let r=await t.post("/github/connections/migrate",{type:s.type,id:s.id,connection:i,preview:o},{headers:{"X-CSRF-Token":e.connections.csrf}});o?s.eligible=r.data.eligible:await e.loadConnections()}catch(r){e.connectionError=r.data?.error||"Unable to change connection."}finally{e.busy=!1}},e.disconnectOAuth=async()=>{e.busy=!0;try{await t.post("/github/connections/disconnect-oauth",{},{headers:{"X-CSRF-Token":e.connections.csrf}}),await e.loadConnections()}catch(s){e.connectionError=s.data?.error||"Unable to disconnect OAuth."}finally{e.busy=!1}},e.loadConnections()},Wc=function(e,t){e.accountRecovery=!1,t.get("/github/account-recovery").then(s=>{e.accountRecovery=s.data.required}).catch(()=>{})};typeof document<"u"&&document.addEventListener("scroll",e=>{let t=e.target;!t||!t.classList||!t.classList.contains("repo-picker-list")||t.classList.toggle("is-end",t.scrollTop+t.clientHeight>=t.scrollHeight-2)},!0);var Kc=[{path:"/review-link",template:"partials/reviewConsent.htm",title:"Artifact consent \u2013 Anonymous GitHub",setup:(e,t)=>ol(e,t)},{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Gc(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wc(e,t.http)},{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>$c(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Lc(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>dr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>dr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>dr(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fc(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>zc(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ya(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ya(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>jc(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Vc(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>qc(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>_c(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Uc(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bc(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Ka(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Ka(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ju(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Lu(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Fu(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Uu(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bu(e,t.http,t.location)},{path:"/admin/billing",template:"partials/admin/billing.htm",title:"Admin \xB7 Billing \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Wu(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>zu(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Hu(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var bv={class:"container py-4",style:{"max-width":"48rem","overflow-wrap":"anywhere"}},wv={key:0},kv={key:1,role:"alert"},Cv={key:2,role:"status"},Ev={key:0},Sv={key:1},Nv=["disabled"],Rv=["disabled"],Pv=["disabled"],Av={key:5,class:"mt-4","aria-labelledby":"review-policy-title"},Dv={id:"review-policy-title"},Tv={key:0,role:"alert"},Ov=["disabled"],Iv=["disabled"],Mv=["disabled"],Vv={key:6,role:"status"};function Yc(e,t){return a(),l("section",bv,[t[12]||(t[12]=n("a",{href:"/"},"Anonymous GitHub",-1)),t[13]||(t[13]=n("h1",{class:"mt-3"},"Approve artifact access",-1)),t[14]||(t[14]=n("p",null,"This records your approval as the repository owner or an authorized co-author.",-1)),e.user?.username?f("v-if",!0):(a(),l("p",wv,[...t[6]||(t[6]=[g("Sign in first, then reopen the artifact link from your submission. ",-1),n("a",{href:"/signin"},"Sign in",-1)])])),e.error?(a(),l("p",kv,c(e.error),1)):f("v-if",!0),e.saved?(a(),l("p",Cv,[t[7]||(t[7]=g("Consent recorded. ",-1)),e.handoffEnabled?(a(),l("span",Ev,"Continue to review to finish linking.")):(a(),l("span",Sv,"Artifact linking is not complete. Return to your submission to check its status."))])):f("v-if",!0),e.saved&&e.handoffEnabled?(a(),l("button",{key:3,class:"btn btn-primary",type:"button",onClick:t[0]||(t[0]=(...s)=>e.continueReview&&e.continueReview(...s)),disabled:e.busy},"Continue to review",8,Nv)):f("v-if",!0),e.user?.username&&!e.saved?(a(),l("form",{key:4,onSubmit:t[2]||(t[2]=ae((...s)=>e.loadPreview&&e.loadPreview(...s),["prevent"]))},[t[8]||(t[8]=n("label",{for:"review-repository"},"Anonymous repository ID",-1)),D(n("input",{id:"review-repository",class:"form-control","onUpdate:modelValue":t[1]||(t[1]=s=>e.repositoryId=s),maxlength:"128",autocomplete:"off",disabled:e.busy||e.uncertain,"aria-describedby":"review-repository-help"},null,8,Rv),[[pt,e.repositoryId]]),t[9]||(t[9]=n("p",{id:"review-repository-help"},"Use the ID after /r/ in the anonymous repository URL.",-1)),n("button",{type:"submit",class:"btn btn-primary",disabled:e.busy||e.uncertain},"Preview access and retention",8,Pv)],32)):f("v-if",!0),e.preview&&!e.saved?(a(),l("section",Av,[n("h2",Dv,c(e.preview.repositoryName),1),n("p",null,"Access: "+c(e.preview.policy.access==="anonymous-link"?"Anyone with the anonymous link":"Restricted review access")+".",1),n("p",null,"Retain until "+c(e.preview.policy.retainUntil)+". Policy version "+c(e.preview.policy.version)+".",1),e.expired?(a(),l("p",Tv,"This preview expired. Open a new artifact link from your submission.")):f("v-if",!0),n("div",null,[n("label",null,[D(n("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=s=>e.acceptAccess=s),disabled:e.busy||e.uncertain||e.expired},null,8,Ov),[[sa,e.acceptAccess]]),t[10]||(t[10]=g(" I approve the access policy above.",-1))])]),n("div",null,[n("label",null,[D(n("input",{type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=s=>e.acceptRetention=s),disabled:e.busy||e.uncertain||e.expired},null,8,Iv),[[sa,e.acceptRetention]]),t[11]||(t[11]=g(" I approve retention until the date above.",-1))])]),n("button",{class:"btn btn-primary",type:"button",onClick:t[5]||(t[5]=(...s)=>e.confirmConsent&&e.confirmConsent(...s)),disabled:e.busy||e.expired||!e.acceptAccess||!e.acceptRetention},c(e.uncertain?"Retry confirmation":"Confirm consent"),9,Mv)])):f("v-if",!0),e.busy?(a(),l("p",Vv,"Waiting for the server\u2026")):f("v-if",!0)])}var qv={class:"container paper-page connections-page"},_v={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},$v={key:1,role:"status"},Lv=["disabled"],Fv={key:3},Uv={key:0,class:"connection-resources"},Bv=["disabled"],zv=["disabled"],Hv={key:0,role:"status"},jv={class:"connections-grid"},Gv={key:0},Wv={class:"connection-title"},Kv={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},Yv={class:"connection-actions"},Xv={key:0,class:"btn btn-ink",target:"_self",href:"/github/app/install"},Jv=["disabled"],Qv={key:1,class:"connection-installations"},Zv={key:0},xv=["href"],ey={class:"sr-only"},ty={class:"connection-title"},ny={key:0,target:"_self",href:"/github/login",class:"btn btn-outline-ink"},sy={key:1,class:"connection-revoke"},oy={key:0},iy=["disabled"],ry={class:"connection-resources"},ay={class:"connection-title"},ly={class:"connection-count"},dy={key:0,class:"connection-empty"},uy={class:"connection-resource-name"},cy={key:0,class:"connection-resource-actions"},py=["disabled","onClick"],fy=["disabled","onClick"],hy={key:1,class:"connection-help",role:"status"},my=["disabled","onClick"];function Xc(e,t){return a(),l("div",qv,[t[27]||(t[27]=Ee('
My work \xA0/\xA0 GitHub connections

GitHub connections

Manage how GitHub shares your code. Your anonymizations and URLs stay the same.

',2)),e.connectionError?(a(),l("p",_v,c(e.connectionError),1)):f("v-if",!0),!e.connections&&!e.connectionError?(a(),l("p",$v,"Loading your connections\u2026")):f("v-if",!0),!e.connections&&e.connectionError?(a(),l("button",{key:2,class:"btn btn-outline-ink",disabled:e.busy,onClick:t[0]||(t[0]=s=>e.loadConnections())},"Try again",8,Lv)):f("v-if",!0),e.connections?(a(),l("div",Fv,[e.connections.emailNotificationsEnabled?(a(),l("section",Uv,[t[6]||(t[6]=n("h2",null,"Email alerts",-1)),t[7]||(t[7]=n("p",null,"We will email you if your GitHub connection stops working or a repository becomes inaccessible. Your address is never shown on anonymous pages.",-1)),n("form",{onSubmit:t[2]||(t[2]=ae(s=>e.saveNotificationEmail(),["prevent"]))},[t[5]||(t[5]=n("label",{for:"notification-email"},"Email address",-1)),D(n("input",{id:"notification-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[1]||(t[1]=s=>e.notificationEmail=s),disabled:e.busy},null,8,Bv),[[pt,e.notificationEmail]]),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.busy},"Save email address",8,zv),e.emailSaved?(a(),l("p",Hv,"Email address saved.")):f("v-if",!0)],32)])):f("v-if",!0),n("div",jv,[e.connections.appEnabled?(a(),l("section",Gv,[t[15]||(t[15]=n("div",{class:"connection-top"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",{class:"connection-badge"},"Recommended")],-1)),n("div",Wv,[t[8]||(t[8]=n("h2",null,"GitHub App",-1)),n("span",{class:P(["connection-status",{"is-connected":e.connections.appConnected&&!e.connections.appError}])},c(e.connections.appError?"Needs attention":e.connections.appConnected?"Connected":"Not connected"),3)]),t[16]||(t[16]=n("p",null,"Read-only access to gists and the repositories you choose.",-1)),e.connections.appError?(a(),l("p",Kv,c(e.connections.appError)+". Reconnect to restore access.",1)):f("v-if",!0),n("div",Yv,[e.connections.appConnected&&!e.connections.appError?(a(),l("a",Xv,[...t[9]||(t[9]=[g("Manage repository access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),n("a",{class:P(e.connections.appConnected&&!e.connections.appError?"connection-link":"btn btn-ink"),target:"_self",href:"/github/app/login"},c(e.connections.appConnected?"Reconnect account":"Connect GitHub account"),3),e.connections.appConnected?(a(),l("button",{key:1,class:"connection-link connection-refresh",title:"Refresh access",disabled:e.busy,onClick:t[3]||(t[3]=s=>e.loadConnections())},[...t[10]||(t[10]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),n("span",{class:"sr-only"},"Refresh access",-1)])],8,Jv)):f("v-if",!0)]),t[17]||(t[17]=n("p",{class:"connection-help"},"Choose repositories on GitHub. Organization access may need an administrator's approval.",-1)),e.connections.installations?.length?(a(),l("ul",Qv,[(a(!0),l(q,null,x(e.connections.installations,s=>(a(),l("li",{key:s.id},[n("div",null,[t[11]||(t[11]=n("span",{class:"connection-label"},"Installed on",-1)),t[12]||(t[12]=g()),n("strong",null,c(s.account),1),s.suspended?(a(),l("span",Zv," \xB7 Suspended")):f("v-if",!0)]),e.connections.installations.length>1?(a(),l("a",{key:0,target:"_self",href:"/github/app/install?installationId="+s.id},[t[13]||(t[13]=g("Manage access ",-1)),n("span",ey,"for "+c(s.account),1),t[14]||(t[14]=g(" \u2192",-1))],8,xv)):f("v-if",!0)]))),128))])):f("v-if",!0)])):f("v-if",!0),n("section",null,[t[20]||(t[20]=n("div",{class:"connection-top"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),n("span",{class:"connection-badge connection-badge-muted"},"Legacy")],-1)),n("div",ty,[t[18]||(t[18]=n("h2",null,"GitHub OAuth",-1)),n("span",{class:P(["connection-status",{"is-connected":e.connections.oauthConnected}])},c(e.connections.oauthConnected?"Connected":"Not connected"),3)]),t[21]||(t[21]=n("p",null,"For existing OAuth anonymizations.",-1)),t[22]||(t[22]=n("p",{class:"connection-help"},"This connection uses GitHub's broader repository permissions. Existing work keeps using it until you switch below.",-1)),e.connections.oauthEnabled?(a(),l("a",ny,c(e.connections.oauthConnected?"Reconnect OAuth":"Connect legacy OAuth"),1)):f("v-if",!0),e.connections.oauthConnected?(a(),l("div",sy,[e.connections.gistCount?(a(),l("p",oy,c(e.connections.gistCount)+" gist(s) use your GitHub App connection when available.",1)):f("v-if",!0),t[19]||(t[19]=n("p",null,"Switch all dependent repositories before revoking access. Gists can use your GitHub App connection.",-1)),e.connections.appConnected?(a(),l("button",{key:1,class:"btn btn-sm btn-outline-danger connection-danger",disabled:e.busy||e.connections.resources.some(s=>s.connection==="oauth"),onClick:t[4]||(t[4]=s=>e.disconnectOAuth())},"Revoke OAuth access",8,iy)):f("v-if",!0)])):f("v-if",!0)])]),n("section",ry,[n("div",ay,[t[23]||(t[23]=n("h2",null,"Repository connections",-1)),n("span",ly,c(e.connections.resources?.length||0)+" "+c((e.connections.resources?.length||0)===1?"resource":"resources"),1)]),t[25]||(t[25]=n("p",null,"Check access, then switch each resource to the GitHub App. After reinstalling the App, reconnect existing resources here to keep their anonymous URLs and published snapshots.",-1)),e.connections.resources?.length?f("v-if",!0):(a(),l("div",dy,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),n("div",null,[n("h3",null,"No repository connections yet"),n("p",null,"Your repositories and pull requests will appear here once you anonymize them.")],-1),n("a",{class:"connection-link",href:"/anonymize"},"New anonymization \u2192",-1)])])),(a(!0),l(q,null,x(e.connections.resources,s=>(a(),l("div",{class:"connection-resource",key:s.type+s.id},[n("div",uy,[n("strong",null,c(s.name||s.id),1),n("small",null,c(s.type)+" \xB7 "+c(s.id),1)]),n("span",{class:P(["connection-badge",{"connection-badge-muted":s.connection==="oauth"}])},c(s.connection==="github-app"?"Read-only App":"Legacy OAuth"),3),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&e.connections.appEnabled&&e.connections.appConnected?(a(),l("div",cy,[n("button",{class:"btn btn-outline-ink",disabled:e.busy,onClick:i=>e.changeConnection(s,"github-app",!0)},"Check read-only access",8,py),s.eligible?(a(),l("button",{key:0,class:"btn btn-ink",disabled:e.busy,onClick:i=>e.changeConnection(s,"github-app",!1)},c(s.connection==="github-app"?"Reconnect read-only access":"Switch to read-only access"),9,fy)):f("v-if",!0),s.eligible===!1?(a(),l("span",hy,"Access unavailable. Allow this repository on GitHub, then check again.")):f("v-if",!0)])):f("v-if",!0),!["archived","removed","preparing","queue","removing","expiring"].includes(s.status)&&(s.status!=="download"||s.type==="pull-request"&&(!s.statusDate||new Date(s.statusDate).getTime()<=Date.now()-3e5))&&s.connection==="github-app"&&e.connections.oauthConnected?(a(),l("button",{key:1,class:"connection-link",disabled:e.busy,onClick:i=>e.changeConnection(s,"oauth",!1)},"Use OAuth",8,my)):f("v-if",!0)]))),128)),t[26]||(t[26]=n("p",{class:"connection-footnote"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),g(" Removing access stops new fetches from GitHub. Published content keeps its current expiration and removal settings.")],-1))])])):f("v-if",!0)])}var gy={class:"container paper-page auth-page"},vy={class:"auth-layout"},yy={class:"auth-options"},by={key:0},wy={key:0,class:"btn btn-ink auth-continue",target:"_self",href:"/github/login?recover=1"},ky={key:1},Cy={key:1,class:"auth-card"},Ey={key:2,class:"auth-legacy"},Sy={key:3,role:"status"};function Jc(e,t){let s=Xe("partial-view");return a(),l(q,null,[n("div",gy,[n("div",vy,[t[4]||(t[4]=Ee('
Your research, ready for review

Your code.
Your identity,
protected.
Sign in to GitHub

Sign in to create and manage your anonymizations.

',1)),n("div",yy,[e.accountRecovery?(a(),l("section",by,[t[0]||(t[0]=n("h2",null,"Verify your existing account",-1)),t[1]||(t[1]=n("p",null,"We found an existing account. Verify it with your previous GitHub connection to keep your anonymizations. Future sign-ins will use the GitHub App.",-1)),e.site_options?.GITHUB_OAUTH_ENABLED?(a(),l("a",wy,"Verify with previous GitHub connection")):(a(),l("p",ky,"Account verification is currently unavailable. Please try again later."))])):f("v-if",!0),e.site_options?.GITHUB_APP_ENABLED&&!e.accountRecovery?(a(),l("section",Cy,[...t[2]||(t[2]=[Ee('

Continue with GitHub

Connect through the GitHub App with read-only repository access.

  • You choose which repositories to share
  • No permission to write to your code
Sign in with GitHubYour existing anonymizations and connections stay with your account.',5)])])):f("v-if",!0),!e.site_options?.GITHUB_APP_ENABLED&&e.site_options?.GITHUB_OAUTH_ENABLED&&!e.accountRecovery?(a(),l("section",Ey,[...t[3]||(t[3]=[n("div",{class:"connection-title"},[n("h2",null,"Continue with GitHub")],-1),n("p",null,"Sign in to access your account. GitHub OAuth includes write access to private repositories.",-1),n("a",{class:"connection-link",target:"_self",href:"/github/login"},[g("Sign in with GitHub "),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-arrow-right"})])],-1)])])):f("v-if",!0),e.site_options&&!e.site_options.GITHUB_APP_ENABLED&&!e.site_options.GITHUB_OAUTH_ENABLED?(a(),l("p",Sy,"GitHub sign-in is currently unavailable. Please try again later.")):f("v-if",!0)])])]),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}function Qc(e,t){let s=Xe("partial-view");return a(),l(q,null,[t[0]||(t[0]=Ee('
Error \xB7 404

This link
isn\u2019t here.

The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it.

',1)),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}var Ny={class:"container paper-page admin-page"},Ry={class:"seg-bar"},Py={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},Ay=["aria-checked"],Dy={class:"count"},Ty=["aria-checked"],Oy={class:"count"},Iy=["aria-checked"],My={class:"count"},Vy=["aria-checked"],qy={class:"count"},_y=["aria-checked"],$y={class:"count"},Ly=["aria-checked"],Fy={class:"count"},Uy={class:"seg-countline",role:"status"},By={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},zy={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},Hy={class:"admin-filter-row"},jy={class:"search-wrap"},Gy={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},Wy={key:0,class:"admin-search-hint"},Ky={key:1,class:"admin-filter-inline","aria-label":"Pagination"},Yy=["disabled"],Xy={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},Jy=["disabled"],Qy={key:0,class:"admin-filter-row"},Zy={class:"admin-active-chips"},xy={class:"key"},eb=["onClick"],tb={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},sb={key:0,class:"paper-table-head",role:"row"},ob={role:"columnheader"},ib={role:"columnheader"},rb={role:"columnheader"},ab={class:"paper-table-row",role:"row"},lb={class:"cell-anon",role:"cell"},db={class:"anon-text"},ub=["textContent","href"],cb={class:"anon-sub"},pb={class:"cell-status",role:"cell"},fb=["textContent"],hb={class:"cell-views num",role:"cell"},mb=["textContent","href"],gb={class:"cell-expires",role:"cell"},vb={class:"cell-actions",role:"cell"},yb={class:"dropdown"},bb={class:"dropdown-menu dropdown-menu-right"},wb=["href"],kb=["href"],Cb=["href"],Eb=["onClick"],Sb={key:1,class:"paper-table-empty"},Nb={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},Rb={key:0,class:"pagination-compact"},Pb=["disabled"],Ab=["max"],Db=["disabled"],Tb={class:"admin-filter-inline"},Ob={class:"form-control form-control-sm"};function Zc(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",Ny,[t[55]||(t[55]=Ee('
Admin \xA0/\xA0 Conferences

Conferences

',3)),n("div",Ry,[n("div",Py,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=o=>e.setSegView("all"))},[t[14]||(t[14]=g("All ",-1)),n("span",Dy,c(e.fmt?.number(e.segCount("all"))),1)],10,Ay),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=o=>e.setSegView("ready"))},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=g("Ready ",-1)),n("span",Oy,c(e.fmt?.number(e.segCount("ready"))),1)],10,Ty),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=o=>e.setSegView("preparing"))},[t[17]||(t[17]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[18]||(t[18]=g("Preparing ",-1)),n("span",My,c(e.fmt?.number(e.segCount("preparing"))),1)],10,Iy),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=o=>e.setSegView("error"))},[t[19]||(t[19]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[20]||(t[20]=g("Error ",-1)),n("span",qy,c(e.fmt?.number(e.segCount("error"))),1)],10,Vy),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=o=>e.setSegView("expired"))},[t[21]||(t[21]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[22]||(t[22]=g("Expired ",-1)),n("span",$y,c(e.fmt?.number(e.segCount("expired"))),1)],10,_y),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=o=>e.setSegView("removed"))},[t[23]||(t[23]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[24]||(t[24]=g("Removed ",-1)),n("span",Fy,c(e.fmt?.number(e.segCount("removed"))),1)],10,Ly)]),n("p",Uy,[n("strong",null,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[25]||(t[25]=g(" shown",-1))])]),e.fetchError?(a(),l("div",By,[t[26]||(t[26]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.fetchError),1)])):f("v-if",!0),D((a(),l("form",zy,[n("div",Hy,[n("div",jy,[D(n("input",Gy,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",Wy,"/"))]),t[30]||(t[30]=n("span",{class:"admin-filter-spacer"},null,-1)),e.total>0?(a(),l("button",{key:0,class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=o=>e.exportCsv())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),g(" Export",-1)])])):f("v-if",!0),e.totalPage>1?(a(),l("span",Ky,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,Yy),n("span",Xy,c(e.query?.page)+"/"+c(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,Jy)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",Qy,[n("div",Zy,[(a(!0),l(q,null,x(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",xy,c(o?.label),1),n("span",null,c(o?.value),1),n("button",{type:"button",onClick:d=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,eb)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),n("div",tb,[e.total!==0?(a(),l("div",sb,[n("div",ob,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="name"}]),onClick:t[9]||(t[9]=o=>e.sortBy("name"))},[t[33]||(t[33]=g("Conference ",-1)),e.sortIcon("name")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("name")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",ib,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=o=>e.sortBy("status"))},[t[35]||(t[35]=g("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[38]||(t[38]=n("div",{role:"columnheader",class:"num"},"Repos",-1)),n("div",rb,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[11]||(t[11]=o=>e.sortBy("startDate"))},[t[37]||(t[37]=g("Window ",-1)),e.sortIcon("startDate")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("startDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[36]||(t[36]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[39]||(t[39]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))])):f("v-if",!0),(a(!0),l(q,null,x(e.filteredConferences,(o,r)=>(a(),l("div",ab,[n("div",lb,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[n("use",{href:"#project-icon-conference"})],-1)),n("div",db,[n("a",{class:"repo-name",textContent:c(o?.name),href:e.safeUrl("/conference/"+o?.conferenceID)},null,8,ub),n("div",cb,[n("span",null,c(o?.conferenceID),1),n("span",null,c(e.fmt?.money(o?.price||0)),1)])])]),n("div",pb,[n("span",{class:P(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:c(e.fmt?.statusLabel(o?.status))},null,8,fb)]),n("div",hb,[t[41]||(t[41]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:"Show repositories in this conference",textContent:c(e.fmt?.number(o?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+o?.conferenceID)},null,8,mb)]),n("div",gb,[t[42]||(t[42]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g(" "+c(e.fmt?.date(o?.startDate))+" \u2013 "+c(e.fmt?.date(o?.endDate)),1)]),n("div",vb,[n("div",yb,[t[48]||(t[48]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",bb,[n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/edit")},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit",-1)])],8,wb),n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/")},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View",-1)])],8,kb),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+o?.conferenceID)},[...t[45]||(t[45]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),g(" View repositories",-1)])],8,Cb),t[47]||(t[47]=n("div",{class:"dropdown-divider"},null,-1)),D(n("a",{class:"dropdown-item text-danger",href:"#",onClick:ae(d=>e.removeConference(o),["prevent"])},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove",-1)])],8,Eb),[[Q,o?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(a(),l("div",Sb,[t[49]||(t[49]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,c(e.total?"No conferences match the current filters.":"No conferences yet."),1)])):f("v-if",!0)]),n("div",Nb,[t[54]||(t[54]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",Rb,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),g(" Previous",-1)])],8,Pb),D(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Ab),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+c(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[51]||(t[51]=[g("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,Db)])):f("v-if",!0),n("span",Tb,[t[53]||(t[53]=n("label",null,"Per page",-1)),D((a(),l("select",Ob,[...t[52]||(t[52]=[Ee('',5)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var Ib={class:"container paper-page admin-page errors-page"},Mb={class:"errors-header"},Vb={class:"errors-actions"},qb={class:"kpi-grid"},_b={class:"kpi-card"},$b={class:"kpi-value"},Lb={key:0},Fb={key:1},Ub={key:2},Bb=["aria-pressed"],zb={class:"kpi-value"},Hb={class:"kpi-sub"},jb=["aria-pressed"],Gb={class:"kpi-value"},Wb={class:"kpi-sub"},Kb=["aria-pressed"],Yb={class:"kpi-value"},Xb={class:"kpi-sub"},Jb={class:"kpi-value"},Qb={class:"kpi-sub"},Zb={key:0,class:"dropped-warn"},xb={class:"volume-chart"},e1={class:"volume-head"},t1={class:"volume-legend"},n1={key:0},s1={key:1},o1={key:2},i1={class:"volume-bars"},r1=["title"],a1={class:"errors-toolbar","aria-label":"Error filters"},l1={class:"seg-filter",role:"radiogroup","aria-label":"Filter by severity"},d1=["aria-checked"],u1={class:"count"},c1=["aria-checked"],p1={class:"count"},f1=["aria-checked"],h1={class:"count"},m1=["aria-checked"],g1={class:"count"},v1={class:"search-wrap"},y1={type:"search",class:"form-control",placeholder:"Search errors\u2026",title:"Search messages, or filter with code:repo_not_found module:route status:>=400",autocomplete:"off"},b1={key:0,class:"filter-count"},w1={class:"select-wrap"},k1={class:"form-control form-control-sm"},C1={class:"select-wrap"},E1={class:"form-control form-control-sm"},S1={class:"autoref"},N1={type:"checkbox"},R1={key:0,class:"admin-empty"},P1={key:1,class:"errors-pager"},A1={key:2,class:"errors-list"},D1={key:0,class:"errors-group-head"},T1={class:"errors-group-count"},O1={key:0,class:"errors-group-note"},I1=["onClick"],M1={class:"col-when"},V1={class:"when-rel"},q1={class:"when-abs"},_1={class:"col-sev"},$1={class:"sev-label"},L1={class:"col-mod"},F1={class:"pill pill-module"},U1={class:"col-msg"},B1={class:"msg-code"},z1={key:0,class:"msg-context"},H1={key:1,class:"msg-detail"},j1=["title"],G1={class:"col-count"},W1={key:0,class:"count-pill"},K1={key:1,class:"count-pill count-pill-muted"},Y1={class:"col-status"},X1=["title"],J1={key:1,class:"status-empty",title:"No HTTP status for this event"},Q1={key:0,class:"errors-row-detail"},Z1={class:"detail-tabs"},x1=["onClick"],ew=["onClick"],tw=["onClick"],nw={class:"detail-body"},sw={class:"detail-main"},ow={key:0},iw={key:1,class:"stack-pre"},rw={key:2,class:"related-list"},aw={class:"when-abs"},lw={class:"msg-url"},dw={class:"detail-actions"},uw=["onClick"],cw=["onClick"],pw={key:0,class:"copy-hint"},fw={class:"detail-aside"},hw={class:"aside-block"},mw=["title"],gw={class:"aside-block"},vw=["title"],yw={class:"aside-block"},bw={class:"aside-value"},ww={key:0,class:"aside-sub"},kw={key:0,class:"aside-block"},Cw=["href"],Ew={key:1,class:"aside-block"},Sw={class:"aside-value mono"};function xc(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",Ib,[t[49]||(t[49]=n("div",{class:"paper-crumbs"},[g("Admin \xA0/\xA0 "),n("span",{class:"here"},"Errors")],-1)),n("header",Mb,[t[16]||(t[16]=n("h1",{class:"paper-page-title"},"Errors",-1)),n("div",Vb,[n("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=o=>e.exportCsv())},[...t[14]||(t[14]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),g(" Export CSV",-1)])]),n("button",{class:"btn btn-sm btn-outline-danger",type:"button",onClick:t[1]||(t[1]=o=>e.clearAll())},[...t[15]||(t[15]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Clear all",-1)])])])]),t[50]||(t[50]=Ee('',1)),n("section",qb,[n("div",_b,[t[17]||(t[17]=n("div",{class:"kpi-label"},"Occurrences \xB7 24h",-1)),n("div",$b,c(e.fmt?.number(e.stats?.last24h??0)),1),n("div",{class:P(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h>=20?(a(),l("span",Lb,c((e.stats?.last24h??0)-(e.stats?.prev24h??0)>=0?"+":"")+c(Math.round(((e.stats?.last24h??0)-(e.stats?.prev24h??0))/e.stats.prev24h*100))+"% vs yesterday",1)):e.stats?.prev24h!==void 0?(a(),l("span",Fb,c(e.fmt?.number(e.stats?.prev24h??0))+" in prior 24h",1)):f("v-if",!0),e.stats?.prev24h?f("v-if",!0):(a(),l("span",Ub,"no prior baseline"))],2)]),n("div",{class:P(["kpi-card kpi-error kpi-filter",{"is-selected":e.query?.bucket==="error"}]),role:"button",tabindex:"0","aria-pressed":e.query?.bucket==="error",title:"Show only errors (5xx)",onClick:t[2]||(t[2]=o=>e.setBucket(e.query?.bucket==="error"?"":"error")),onKeydown:t[3]||(t[3]=kt(ae(o=>e.setBucket(e.query?.bucket==="error"?"":"error"),["prevent"]),["enter"]))},[t[18]||(t[18]=n("div",{class:"kpi-label"},"Error",-1)),n("div",zb,c(e.fmt?.number(e.stats?.severity?.error??0)),1),n("div",Hb,"5xx \xB7 "+c(e.stats?.unique?.error)+" unique",1)],42,Bb),n("div",{class:P(["kpi-card kpi-warn kpi-filter",{"is-selected":e.query?.bucket==="warn"}]),role:"button",tabindex:"0","aria-pressed":e.query?.bucket==="warn",title:"Show only warnings (4xx, aborted requests)",onClick:t[4]||(t[4]=o=>e.setBucket(e.query?.bucket==="warn"?"":"warn")),onKeydown:t[5]||(t[5]=kt(ae(o=>e.setBucket(e.query?.bucket==="warn"?"":"warn"),["prevent"]),["enter"]))},[t[19]||(t[19]=n("div",{class:"kpi-label"},"Warning",-1)),n("div",Gb,c(e.fmt?.number(e.stats?.severity?.warn??0)),1),n("div",Wb,"4xx, aborted \xB7 "+c(e.stats?.unique?.warn)+" unique",1)],42,jb),n("div",{class:P(["kpi-card kpi-info kpi-filter",{"is-selected":e.query?.bucket==="info"}]),role:"button",tabindex:"0","aria-pressed":e.query?.bucket==="info",title:"Show only info events",onClick:t[6]||(t[6]=o=>e.setBucket(e.query?.bucket==="info"?"":"info")),onKeydown:t[7]||(t[7]=kt(ae(o=>e.setBucket(e.query?.bucket==="info"?"":"info"),["prevent"]),["enter"]))},[t[20]||(t[20]=n("div",{class:"kpi-label"},"Info",-1)),n("div",Yb,c(e.fmt?.number(e.stats?.severity?.info??0)),1),n("div",Xb,"Auth, 404 \xB7 "+c(e.stats?.unique?.info)+" unique",1)],42,Kb),n("div",{class:P(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[21]||(t[21]=n("div",{class:"kpi-label"},"Distinct errors stored",-1)),n("div",Jb,c(e.fmt?.number(e.total)),1),n("div",Qb,[g(" all time \xB7 cap "+c(e.fmt?.number(e.cap))+" \xB7 "+c(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(a(),l("span",Zb," \xB7 "+c(e.stats?.dropped)+" dropped",1)):f("v-if",!0)])],2)]),n("section",xb,[n("div",e1,[t[25]||(t[25]=n("span",{class:"volume-title"},"Volume \xB7 24h \xB7 1h buckets",-1)),n("span",t1,[e.stats?.severity?.error?(a(),l("span",n1,[...t[22]||(t[22]=[n("span",{class:"dot dot-error"},null,-1),g("Error",-1)])])):f("v-if",!0),e.stats?.severity?.warn?(a(),l("span",s1,[...t[23]||(t[23]=[n("span",{class:"dot dot-warn"},null,-1),g("Warning",-1)])])):f("v-if",!0),e.stats?.severity?.info?(a(),l("span",o1,[...t[24]||(t[24]=[n("span",{class:"dot dot-info"},null,-1),g("Info",-1)])])):f("v-if",!0)])]),n("div",i1,[(a(!0),l(q,null,x(e.stats?.buckets,(o,r)=>(a(),l("div",{class:"volume-bar",key:r,title:e.bucketTitle(o)},[n("span",{class:"seg seg-error",style:Ie({height:e.barPx(o,"error")+"px"})},null,4),n("span",{class:"seg seg-warn",style:Ie({height:e.barPx(o,"warn")+"px"})},null,4),n("span",{class:"seg seg-info",style:Ie({height:e.barPx(o,"info")+"px"})},null,4)],8,r1))),128))]),t[26]||(t[26]=n("div",{class:"volume-axis","aria-hidden":"true"},[n("span",null,"24h ago"),n("span",null,"12h ago"),n("span",null,"now")],-1))]),D((a(),l("form",a1,[n("div",l1,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")===""}]),"aria-checked":(e.query?.bucket||"")==="",onClick:t[8]||(t[8]=o=>e.setBucket(""))},[t[27]||(t[27]=g("All ",-1)),n("span",u1,c(e.fmt?.number((e.stats?.severity?.error??0)+(e.stats?.severity?.warn??0)+(e.stats?.severity?.info??0))),1)],10,d1),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")==="error","is-empty":!e.stats?.severity?.error}]),"aria-checked":(e.query?.bucket||"")==="error",onClick:t[9]||(t[9]=o=>e.setBucket("error"))},[t[28]||(t[28]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[29]||(t[29]=g("Error ",-1)),n("span",p1,c(e.fmt?.number(e.stats?.severity?.error??0)),1)],10,c1),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")==="warn","is-empty":!e.stats?.severity?.warn}]),"aria-checked":(e.query?.bucket||"")==="warn",onClick:t[10]||(t[10]=o=>e.setBucket("warn"))},[t[30]||(t[30]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[31]||(t[31]=g("Warning ",-1)),n("span",h1,c(e.fmt?.number(e.stats?.severity?.warn??0)),1)],10,f1),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:(e.query?.bucket||"")==="info","is-empty":!e.stats?.severity?.info}]),"aria-checked":(e.query?.bucket||"")==="info",onClick:t[11]||(t[11]=o=>e.setBucket("info"))},[t[32]||(t[32]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[33]||(t[33]=g("Info ",-1)),n("span",g1,c(e.fmt?.number(e.stats?.severity?.info??0)),1)],10,m1)]),n("div",v1,[t[34]||(t[34]=n("svg",{class:"ui-icon search-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)),D(n("input",y1,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(a(),l("span",b1,c(e.parsedFilterCount)+" filter"+c(e.parsedFilterCount>1?"s":""),1)):f("v-if",!0)]),n("div",w1,[t[36]||(t[36]=n("label",null,"Sort",-1)),D((a(),l("select",k1,[...t[35]||(t[35]=[n("option",{value:"recent"},"Most recent",-1),n("option",{value:"count"},"Most frequent",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.sort=o},value:e.query?.sort,form:null,options:{}}]])]),n("div",C1,[t[38]||(t[38]=n("label",{title:"Rows are always sectioned by severity. This merges repeated events inside each section."},"Merge",-1)),D((a(),l("select",E1,[...t[37]||(t[37]=[n("option",{value:""},"Don't merge",-1),n("option",{value:"code"},"Same error",-1),n("option",{value:"module"},"Same module",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.group=o},value:e.query?.group,form:null,options:{}}]])]),n("label",S1,[D(n("input",N1,null,512),[[s,{state:e.viewState,set:o=>{e.query.autoRefresh=o},value:e.query?.autoRefresh,form:null,options:{}}]]),t[39]||(t[39]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))]),n("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[12]||(t[12]=o=>e.refreshNow()),"aria-label":"Refresh"},[...t[40]||(t[40]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])])),[[i,e.viewState]]),e.visible?.length?f("v-if",!0):(a(),l("div",R1,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(a(),l("div",P1,[n("span",null,c(e.query?.group&&e.visible?.length!==e.entries?.length?e.fmt?.number(e.visible?.length)+(e.visible?.length===1?" group":" groups")+" from ":"")+c(e.fmt?.number(e.entries?.length))+" of "+c(e.fmt?.number(e.total))+" stored errors loaded",1),n("button",{class:"btn btn-sm",type:"button",onClick:t[13]||(t[13]=o=>e.loadMore())},"Load 250 older")])):f("v-if",!0),e.visible?.length?(a(),l("div",A1,[t[48]||(t[48]=Ee('
WhenSeverityModuleMessageTotalStatus
',1)),(a(!0),l(q,null,x(e.visible,(o,r)=>(a(),l(q,{key:o?._key},[r===0||e.visible[r-1]?._bucket!==o?._bucket?(a(),l("div",D1,[n("span",{class:P(["sev-dot","sev-"+o?._bucket])},null,2),g(c(o?._bucket==="error"?"Error":o?._bucket==="warn"?"Warning":"Info"),1),n("span",T1,c(e.fmt?.number(e.visible.filter(d=>d?._bucket===o?._bucket).length)),1),r===0?(a(),l("span",O1,"By severity \xB7 "+c(e.query?.group==="code"?"repeats merged by error \xB7 ":e.query?.group==="module"?"repeats merged by module \xB7 ":"")+c(e.query?.sort==="count"?"most frequent first":"most recent first"),1)):f("v-if",!0)])):f("v-if",!0),n("div",{class:P(["errors-row",{open:e.expanded[o?._key]}])},[n("div",{class:"errors-row-main",onClick:d=>e.toggle(o)},[n("div",M1,[n("div",V1,c(e.relTime(o?.ts)),1),n("div",q1,c(e.absTimeShort(o?.ts)),1)]),n("div",_1,[n("span",{class:P(["sev-dot","sev-"+o?._bucket])},null,2),n("span",$1,c(o?._bucket==="error"?"Error":o?._bucket==="warn"?"Warning":"Info"),1)]),n("div",L1,[n("span",F1,c(o?.module),1)]),n("div",U1,[n("strong",B1,c(o?.displayMessage),1),o?.displayContext&&o?.displayContext!==o?.displayMessage?(a(),l("span",z1,c(o?.displayContext),1)):f("v-if",!0),o?._detail?(a(),l("span",H1,c(o?._detail),1)):f("v-if",!0),o?._url?(a(),l("div",{key:2,class:"msg-url",title:o?._url},c(o?._url),9,j1)):f("v-if",!0)]),n("div",G1,[o?.count>1?(a(),l("span",W1,"\xD7"+c(o?.count),1)):f("v-if",!0),o?.count===1?(a(),l("span",K1,"\xD71")):f("v-if",!0)]),n("div",Y1,[o?._status?(a(),l("span",{key:0,class:P(["status-pill",String(o?._status).match(/^[23]/)?"status-neutral":"status-"+o?._bucket]),title:String(o?._status).match(/^2/)&&o?._bucket==="warn"?"Client closed the connection":null},c(String(o?._status).match(/^2/)&&o?._bucket==="warn"?"\u2014":o?._status),11,X1)):f("v-if",!0),o?._status?f("v-if",!0):(a(),l("span",J1,"\u2014"))])],8,I1),e.expanded[o?._key]?(a(),l("div",Q1,[n("div",Z1,[n("button",{type:"button",class:P({active:e.detailTab[o?._key]==="raw"||!e.detailTab[o?._key]}),onClick:d=>e.detailTab[o._key]="raw"},"Raw",10,x1),o?._stack?(a(),l("button",{key:0,type:"button",class:P({active:e.detailTab[o?._key]==="stack"}),onClick:d=>e.detailTab[o._key]="stack"},"Stack",10,ew)):f("v-if",!0),o?.count>1?(a(),l("button",{key:1,type:"button",class:P({active:e.detailTab[o?._key]==="related"}),onClick:d=>e.detailTab[o._key]="related"},"Related ("+c(o?.count)+")",11,tw)):f("v-if",!0)]),n("div",nw,[n("div",sw,[(e.detailTab[o?._key]||"raw")==="raw"?(a(),l("pre",ow,c(o?._detailJson),1)):f("v-if",!0),e.detailTab[o?._key]==="stack"?(a(),l("pre",iw,c(o?._stack),1)):f("v-if",!0),e.detailTab[o?._key]==="related"?(a(),l("div",rw,[(a(!0),l(q,null,x(o?._related,(d,p)=>(a(),l("div",{class:"related-row",key:p},[n("span",aw,c(e.absTimeShort(d?.ts)),1),n("span",lw,c(d?._url),1),d?._status?(a(),l("span",{key:0,class:P(["status-pill","status-"+d?._bucket])},c(d?._status),3)):f("v-if",!0)]))),128))])):f("v-if",!0),n("div",dw,[n("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:d=>e.copyCurl(o)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g(" Copy curl",-1)])],8,uw),n("button",{class:"btn btn-sm",type:"button",onClick:d=>e.copyJson(o)},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-clipboard"})],-1),g(" Copy JSON",-1)])],8,cw),e.copyHint?(a(),l("span",pw,c(e.copyHint),1)):f("v-if",!0)])]),n("aside",fw,[n("div",hw,[t[43]||(t[43]=n("div",{class:"aside-label"},"First seen",-1)),n("div",{class:"aside-value",title:e.absTime(o?._firstSeen)},c(e.relTime(o?._firstSeen)),9,mw)]),n("div",gw,[t[44]||(t[44]=n("div",{class:"aside-label"},"Last seen",-1)),n("div",{class:"aside-value",title:e.absTime(o?.ts)},c(e.relTime(o?.ts)),9,vw)]),n("div",yw,[t[45]||(t[45]=n("div",{class:"aside-label"},"Occurrences",-1)),n("div",bw,[g(c(o?.count),1),o?._lastHourCount?(a(),l("span",ww," \xB7 "+c(o?._lastHourCount)+" this hour",1)):f("v-if",!0)])]),o?._repoId?(a(),l("div",kw,[t[46]||(t[46]=n("div",{class:"aside-label"},"Repository",-1)),n("a",{class:"aside-value",href:e.safeUrl("/r/"+o?._repoId)},c(o?._repoId),9,Cw)])):f("v-if",!0),o?._url?(a(),l("div",Ew,[t[47]||(t[47]=n("div",{class:"aside-label"},"URL",-1)),n("div",Sw,c(o?._url),1)])):f("v-if",!0)])])])):f("v-if",!0)],2)],64))),128))])):f("v-if",!0)])}var Nw={class:"container paper-page admin-page overview-page"},Rw={key:0,class:"admin-empty"},Pw={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},Aw={class:"ov-views",role:"tablist","aria-label":"Overview sections"},Dw=["aria-selected","onClick"],Tw={key:2},Ow={key:0,class:"ov-health",role:"status"},Iw={class:"ov-kpi-row"},Mw={class:"ov-kpi-card"},Vw={class:"ov-kpi-value"},qw={class:"ov-kpi-sub"},_w={class:"ov-kpi-card"},$w={class:"ov-kpi-sub"},Lw={class:"ov-kpi-card"},Fw={class:"ov-kpi-sub"},Uw={class:"ov-kpi-card"},Bw={class:"ov-kpi-sub"},zw={class:"ov-kpi-card"},Hw={class:"ov-kpi-value"},jw={class:"ov-kpi-sub"},Gw={class:"ov-daily-row"},Ww={class:"ov-daily-card"},Kw={class:"ov-daily-value"},Yw={class:"ov-daily-card"},Xw={class:"ov-daily-value"},Jw={class:"ov-daily-sub"},Qw={class:"ov-daily-card"},Zw={class:"ov-daily-value"},xw={class:"ov-chart-card"},ek={class:"ov-chart-head"},tk={class:"ov-chart-legends"},nk={class:"ov-chart-legend"},sk={key:0,class:"ov-legend-missing"},ok={key:0,class:"ov-spark-bars ov-has-axis"},ik={class:"ov-yaxis","aria-hidden":"true"},rk=["data-tip","aria-label"],ak={key:1,class:"ov-spark-x"},lk={class:"ov-chart-card"},dk={class:"ov-chart-head"},uk={class:"ov-chart-legends"},ck={class:"ov-chart-legend"},pk={key:0,class:"ov-legend-missing"},fk={key:0,class:"ov-spark-bars ov-has-axis"},hk={class:"ov-yaxis","aria-hidden":"true"},mk=["data-tip","aria-label"],gk={key:1,class:"ov-spark-x"},vk={key:0,class:"ov-chart-card"},yk={class:"ov-chart-head"},bk={class:"ov-chart-legends"},wk={class:"ov-chart-legend"},kk={key:0,class:"ov-legend-missing"},Ck={key:0,class:"ov-spark-bars ov-spark-step ov-has-axis"},Ek={class:"ov-yaxis","aria-hidden":"true"},Sk=["viewBox","aria-label"],Nk=["d"],Rk=["d"],Pk={key:1,class:"ov-spark-x"},Ak={class:"ov-chart-card"},Dk={class:"ov-chart-head"},Tk={class:"ov-chart-legends"},Ok={class:"ov-chart-legend"},Ik={key:0,class:"ov-legend-missing"},Mk={key:0,class:"ov-spark-bars ov-has-axis"},Vk={class:"ov-yaxis","aria-hidden":"true"},qk=["data-tip","aria-label"],_k={key:1,class:"ov-spark-x"},$k={class:"ov-triple-row"},Lk={class:"ov-panel-card"},Fk={class:"ov-panel-head"},Uk={class:"ov-panel-meta"},Bk={class:"ov-stacked-bar"},zk={class:"ov-bar-legend"},Hk={href:"/admin/repositories",class:"ov-legend-item"},jk={class:"ov-legend-n"},Gk={href:"/admin/repositories",class:"ov-legend-item"},Wk={class:"ov-legend-n"},Kk={href:"/admin/repositories",class:"ov-legend-item"},Yk={class:"ov-legend-n"},Xk={href:"/admin/repositories",class:"ov-legend-item"},Jk={class:"ov-legend-n"},Qk={href:"/admin/repositories",class:"ov-legend-item"},Zk={class:"ov-legend-n"},xk={class:"ov-panel-card"},e0={class:"ov-panel-head"},t0={class:"ov-panel-meta"},n0={class:"ov-error-bars"},s0={class:"ov-ebar-row"},o0={class:"ov-ebar-track"},i0={class:"ov-ebar-n"},r0={class:"ov-ebar-row"},a0={class:"ov-ebar-track"},l0={class:"ov-ebar-n"},d0={key:0,class:"ov-ehours",role:"img","aria-label":"Errors per hour over the last 24 hours"},u0={class:"ov-ehours-legend"},c0={class:"ov-ehours-note"},p0={class:"ov-ehours-bars"},f0=["title"],h0={key:0,class:"ov-ehours-zero"},m0={class:"ov-ebar-note"},g0={key:0,class:"ov-panel-foot"},v0={href:"/admin/errors"},y0={class:"ov-panel-card"},b0={class:"ov-routes-table"},w0={class:"ov-route-row",href:"/admin/queues"},k0={class:"ov-route-n"},C0={class:"ov-route-n"},E0={class:"ov-route-row",href:"/admin/queues"},S0={class:"ov-route-n"},N0={class:"ov-route-n"},R0={class:"ov-route-row",href:"/admin/queues"},P0={class:"ov-route-n"},A0={class:"ov-route-n"},D0={class:"ov-services-card"},T0={class:"ov-services-head"},O0={class:"ov-panel-meta"},I0={class:"ov-services-grid"},M0={class:"ov-svc"},V0={class:"ov-svc-info"},q0={class:"ov-svc-meta"},_0={class:"ov-svc"},$0={class:"ov-svc-info"},L0={key:0,class:"ov-svc-meta"},F0={key:1,class:"ov-svc-meta"},U0={class:"ov-svc"},B0={class:"ov-svc-info"},z0={key:0,class:"ov-svc-meta"},H0={key:1,class:"ov-svc-meta"},j0={class:"ov-svc"},G0={class:"ov-svc-info"},W0={key:0,class:"ov-svc-meta"},K0={key:1,class:"ov-svc-meta"},Y0={class:"ov-svc"},X0=["title"],J0={class:"ov-svc-info"},Q0={class:"ov-svc-meta"},Z0={class:"ov-panel-card ov-cache","aria-labelledby":"cache-heading"},x0={class:"ov-panel-head ov-performance-head"},e2={class:"ov-performance-window"},t2={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},n2={key:1,class:"ov-performance-empty",role:"status"},s2={key:0,class:"ov-performance-note"},o2={key:1,class:"ov-performance-note"},i2={key:2,class:"ov-performance-message ov-performance-warning",role:"status"},r2={key:3,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache storage budgets"},a2={class:"ov-metrics-table"},l2={scope:"row",class:"ov-event-name"},d2=["title"],u2={key:0,class:"ov-metric-bad-text"},c2={key:1,class:"budget-bar","aria-hidden":"true"},p2={class:"num"},f2={class:"num"},h2={class:"num"},m2={class:"num"},g2={key:4,class:"ov-cache-rates"},v2={key:5,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Cache events and processing durations"},y2={class:"ov-metrics-table"},b2={scope:"row",class:"ov-event-name"},w2={class:"ov-event-traffic"},k2={class:"num"},C2={class:"num"},E2={key:6,class:"ov-performance-empty",role:"status"},S2={class:"ov-performance-note"},N2={class:"ov-panel-card ov-performance","aria-labelledby":"performance-heading"},R2={class:"ov-panel-head ov-performance-head"},P2={class:"ov-performance-window"},A2={key:0,class:"ov-performance-message ov-performance-warning",role:"alert"},D2={key:1,class:"ov-performance-empty",role:"status"},T2={key:2},O2={id:"performance-routes",role:"region","aria-label":"Routes"},I2={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Route latency metrics, scroll for more columns"},M2={class:"ov-metrics-table"},V2={scope:"row",class:"ov-metric-name"},q2={class:"num"},_2={class:"num"},$2={class:"num"},L2={class:"num"},F2={class:"num"},U2={key:1,class:"ov-performance-empty"},B2={id:"performance-processes",role:"region","aria-label":"Processes"},z2={key:0,class:"ov-performance-message ov-performance-warning",role:"status"},H2={key:1,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Process resource metrics, scroll for more columns"},j2={class:"ov-metrics-table"},G2={scope:"row",class:"ov-metric-name"},W2={key:0,class:"ov-metric-warn"},K2={class:"num"},Y2={class:"num"},X2={class:"num"},J2={class:"num"},Q2={class:"num"},Z2={class:"num"},x2={class:"num"},eC={class:"num"},tC={id:"performance-stages",role:"region","aria-label":"Work stages"},nC={key:0,class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Work stage metrics, scroll for more columns"},sC={class:"ov-metrics-table"},oC={scope:"row",class:"ov-metric-name"},iC={class:"num"},rC={class:"num"},aC={class:"num"},lC={key:1,class:"ov-performance-empty"};function ep(e,t){return a(),l("div",Nw,[t[95]||(t[95]=Ee('
Admin \xA0/\xA0 Overview

Overview

Live \xB7 refreshes every 30s
',2)),e.loading?(a(),l("div",Rw,"Loading overview\u2026")):f("v-if",!0),e.error?(a(),l("div",Pw,[t[8]||(t[8]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.error),1)])):f("v-if",!0),n("div",Aw,[(a(),l(q,null,x([{id:"summary",label:"Summary"},{id:"performance",label:"Performance"},{id:"cache",label:"Cache"}],s=>n("button",{type:"button",role:"tab",key:s.id,"aria-selected":e.ovView===s.id?"true":"false",class:P({active:e.ovView===s.id}),onClick:i=>e.setOvView(s.id)},c(s.label),11,Dw)),64))]),e.data?D((a(),l("div",Tw,[e.data?.system?.memPercent>90||e.data?.system?.diskPercent>90?(a(),l("div",Ow,[t[10]||(t[10]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,[t[9]||(t[9]=n("b",null,"Server needs attention.",-1)),g(" "+c(e.healthAlert()),1)])])):f("v-if",!0),f(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",Iw,[n("div",Mw,[t[11]||(t[11]=n("div",{class:"ov-kpi-label"},"Live repositories",-1)),n("div",Vw,c(e.humanNum((e.data?.repos?.statusBreakdown||[]).filter(s=>s._id!=="removed"&&s._id!=="expired").reduce((s,i)=>s+(i.count||0),0))),1),n("div",qw,c(e.humanNum(((e.data?.repos?.statusBreakdown||[]).find(s=>s._id==="removed")||{}).count||0))+" removed \xB7 "+c(e.humanNum(e.data?.repos?.total))+" total",1)]),n("div",_w,[t[12]||(t[12]=n("div",{class:"ov-kpi-label"},"CPU",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>=75}])},c(e.data?.system?.cpuPercent)+"%",3),n("div",{class:P(["ov-meter",{warn:e.data?.system?.cpuPercent>=75,crit:e.data?.system?.cpuPercent>90}])},[n("span",{style:Ie({width:Math.min(100,e.data?.system?.cpuPercent||0)+"%"})},null,4)],2),n("div",$w,[e.data?.system?.cpuPercent>=75?(a(),l("b",{key:0,class:P(["ov-flag",{critical:e.data?.system?.cpuPercent>90}])},c(e.data?.system?.cpuPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),g(c(e.data?.system?.cpuCount)+" cores \xB7 load "+c(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)])]),n("div",Lw,[t[13]||(t[13]=n("div",{class:"ov-kpi-label"},"Memory",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>=75}])},c(e.data?.system?.memPercent)+"%",3),n("div",{class:P(["ov-meter",{warn:e.data?.system?.memPercent>=75,crit:e.data?.system?.memPercent>90}])},[n("span",{style:Ie({width:Math.min(100,e.data?.system?.memPercent||0)+"%"})},null,4)],2),n("div",Fw,[e.data?.system?.memPercent>=75?(a(),l("b",{key:0,class:P(["ov-flag",{critical:e.data?.system?.memPercent>90}])},c(e.data?.system?.memPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),g(c(e.humanBytes(e.data?.system?.memUsed).replace(/\s*GB$/,""))+" / "+c(e.humanBytes(e.data?.system?.memTotal)),1)])]),n("div",Uw,[t[14]||(t[14]=n("div",{class:"ov-kpi-label"},"Disk",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>=75}])},c(e.data?.system?.diskPercent)+"%",3),n("div",{class:P(["ov-meter",{warn:e.data?.system?.diskPercent>=75,crit:e.data?.system?.diskPercent>90}])},[n("span",{style:Ie({width:Math.min(100,e.data?.system?.diskPercent||0)+"%"})},null,4)],2),n("div",Bw,[e.data?.system?.diskPercent>=75?(a(),l("b",{key:0,class:P(["ov-flag",{critical:e.data?.system?.diskPercent>90}])},c(e.data?.system?.diskPercent>90?"Critical":"High")+" \xB7 ",3)):f("v-if",!0),g(c(e.humanBytes(e.data?.system?.diskUsed).replace(/\s*GB$/,""))+" / "+c(e.humanBytes(e.data?.system?.diskTotal)),1),e.data?.system?.diskMount&&e.data.system.diskMount!=="/"?(a(),l(q,{key:1},[g(" \xB7 "+c(e.data?.system?.diskMount),1)],64)):f("v-if",!0)])]),n("div",zw,[t[15]||(t[15]=n("div",{class:"ov-kpi-label"},"Uptime",-1)),n("div",Hw,c(e.humanDuration(e.data?.system?.uptime)),1),n("div",jw,c(e.data?.system?.nodeVersion)+" \xB7 "+c(e.data?.system?.platform),1)])]),f(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",Gw,[n("div",Ww,[t[16]||(t[16]=n("div",{class:"ov-daily-label"},"New repos today",-1)),n("div",Kw,c(e.fmt?.number(e.data?.daily?.today?.repositories||0)),1),t[17]||(t[17]=n("div",{class:"ov-daily-sub"},"so far today",-1))]),n("div",Yw,[t[18]||(t[18]=n("div",{class:"ov-daily-label"},"New users today",-1)),n("div",Xw,c(e.fmt?.number(e.data?.daily?.today?.users||0)),1),n("div",Jw,c(e.fmt?.number(e.data?.users?.total))+" total \xB7 +"+c(e.fmt?.number(e.usersGained()))+" in 30 days",1)]),n("div",Qw,[t[19]||(t[19]=n("div",{class:"ov-daily-label"},"Page views today",-1)),n("div",Zw,c(e.fmt?.number(e.data?.daily?.today?.pageViews||0)),1),t[20]||(t[20]=n("div",{class:"ov-daily-sub"},"so far today",-1))])]),f(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:P(["ov-chart-row",{"is-three":e.usersTiny()}])},[n("div",xw,[n("div",ek,[t[23]||(t[23]=n("span",{class:"ov-chart-title"},"Daily page views \xB7 30d",-1)),n("span",tk,[n("span",nk,[t[21]||(t[21]=n("span",{class:"ov-dot-legend ov-dot-accent"},null,-1)),g("views/day \xB7 peak "+c(e.fmt?.number(e.historyMax("dailyPageViews"))),1)]),e.historyHasMissing()?(a(),l("span",sk,[...t[22]||(t[22]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),g("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",ok,[n("div",ik,[n("span",null,c(e.fmt?.number(e.axisMax("dailyPageViews"))),1),n("span",null,c(e.fmt?.number(e.axisMax("dailyPageViews")/2)),1),t[24]||(t[24]=n("span",null,"0",-1))]),(a(!0),l(q,null,x(e.data?.history,(s,i)=>(a(),l("div",{class:P(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+(s?.dailyPageViews===1?" view":" views"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyPageViews)+(s?.dailyPageViews===1?" view":" views")},[n("span",{class:"ov-spark-fill",style:Ie({height:e.historyBarH(s,"dailyPageViews")+"px"})},null,4)],10,rk))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",ak,[n("span",null,c(e.historyLabel(e.data?.history[0])),1),n("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),n("div",lk,[n("div",dk,[t[27]||(t[27]=n("span",{class:"ov-chart-title"},"New repos \xB7 30d",-1)),n("span",uk,[n("span",ck,[t[25]||(t[25]=n("span",{class:"ov-dot-legend ov-dot-ok-fill"},null,-1)),g("repos/day \xB7 peak "+c(e.fmt?.number(e.historyMax("dailyRepositories"))),1)]),e.historyHasMissing()?(a(),l("span",pk,[...t[26]||(t[26]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),g("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",fk,[n("div",hk,[n("span",null,c(e.fmt?.number(e.axisMax("dailyRepositories"))),1),n("span",null,c(e.fmt?.number(e.axisMax("dailyRepositories")/2)),1),t[28]||(t[28]=n("span",null,"0",-1))]),(a(!0),l(q,null,x(e.data?.history,(s,i)=>(a(),l("div",{class:P(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+(s?.dailyRepositories===1?" repo":" repos"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyRepositories)+(s?.dailyRepositories===1?" repo":" repos")},[n("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Ie({height:e.historyBarH(s,"dailyRepositories")+"px"})},null,4)],10,mk))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",gk,[n("span",null,c(e.historyLabel(e.data?.history[0])),1),n("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)]),e.usersTiny()?f("v-if",!0):(a(),l("div",vk,[n("div",yk,[t[31]||(t[31]=n("span",{class:"ov-chart-title"},"Users \xB7 30d",-1)),n("span",bk,[n("span",wk,[t[29]||(t[29]=n("span",{class:"ov-dot-legend ov-dot-user-fill"},null,-1)),g("total users \xB7 "+c(e.fmt?.number(e.historyRange("nbUsers").max))+" now \xB7 +"+c(e.fmt?.number(Math.max(0,e.historyRange("nbUsers").max-e.usersFirst())))+" in 30 days",1)]),e.historyHasMissing()?(a(),l("span",kk,[...t[30]||(t[30]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),g("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",Ck,[n("div",Ek,[n("span",null,c(e.fmt?.number(e.userAxis().hi)),1),n("span",null,c(e.fmt?.number((e.userAxis().hi+e.userAxis().lo)/2)),1),n("span",null,c(e.fmt?.number(e.userAxis().lo)),1)]),(a(),l("svg",{class:"ov-step-svg",viewBox:"0 0 "+e.data.history.length+" 140",preserveAspectRatio:"none",role:"img","aria-label":"Total users over 30 days, from "+e.fmt?.number(e.usersFirst())+" to "+e.fmt?.number(e.historyRange("nbUsers").max)},[e.userAxis().lo===0?(a(),l("path",{key:0,class:"ov-step-area",d:e.userStepPath(!0)},null,8,Nk)):f("v-if",!0),n("path",{class:"ov-step-line",d:e.userStepPath(!1),"vector-effect":"non-scaling-stroke"},null,8,Rk)],8,Sk)),e.firstDataIndex()>0?(a(),l("div",{key:0,class:"ov-step-missing",style:Ie({width:e.firstDataIndex()/e.data.history.length*100+"%"})},null,4)):f("v-if",!0)])):f("v-if",!0),e.data?.history?.length?(a(),l("div",Pk,[n("span",null,c(e.historyLabel(e.data?.history[0])),1),n("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])),n("div",Ak,[n("div",Dk,[t[34]||(t[34]=n("span",{class:"ov-chart-title"},"New users \xB7 30d",-1)),n("span",Tk,[n("span",Ok,[t[32]||(t[32]=n("span",{class:"ov-dot-legend ov-dot-new-user-fill"},null,-1)),g("users/day \xB7 peak "+c(e.fmt?.number(e.historyMax("dailyUsers"))),1)]),e.historyHasMissing()?(a(),l("span",Ik,[...t[33]||(t[33]=[n("span",{class:"ov-swatch-missing","aria-hidden":"true"},null,-1),g("No data",-1)])])):f("v-if",!0)])]),e.data?.history?.length?(a(),l("div",Mk,[n("div",Vk,[n("span",null,c(e.fmt?.number(e.axisMax("dailyUsers"))),1),n("span",null,c(e.fmt?.number(e.axisMax("dailyUsers")/2)),1),t[35]||(t[35]=n("span",null,"0",-1))]),(a(!0),l(q,null,x(e.data?.history,(s,i)=>(a(),l("div",{class:P(["ov-spark-col has-tip",{"is-missing":s?._empty}]),key:i,"data-tip":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+(s?.dailyUsers===1?" user":" users"),"aria-label":s?._empty?e.historyLabel(s)+": no data":e.historyLabel(s)+": +"+e.fmt?.number(s?.dailyUsers)+(s?.dailyUsers===1?" user":" users")},[n("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Ie({height:e.historyBarH(s,"dailyUsers")+"px"})},null,4)],10,qk))),128))])):f("v-if",!0),e.data?.history?.length?(a(),l("div",_k,[n("span",null,c(e.historyLabel(e.data?.history[0])),1),n("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),n("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):f("v-if",!0)])],2),f(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",$k,[f(" Repo status breakdown "),n("div",Lk,[n("div",Fk,[t[36]||(t[36]=n("span",{class:"ov-panel-title"},"Repo status",-1)),n("span",Uk,c(e.fmt?.number(e.data?.repos?.total))+" total",1)]),n("div",Bk,[e.barPct("ready")>0?(a(),l("span",{key:0,class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Ie({width:e.barPct("ready")+"%"})},null,4)):f("v-if",!0),e.barPct("preparing")>0?(a(),l("span",{key:1,class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Ie({width:e.barPct("preparing")+"%"})},null,4)):f("v-if",!0),e.barPct("error")>0?(a(),l("span",{key:2,class:"ov-bar-seg ov-bar-error",title:"Error",style:Ie({width:e.barPct("error")+"%"})},null,4)):f("v-if",!0),e.barPct("expired")>0?(a(),l("span",{key:3,class:"ov-bar-seg ov-bar-expired",title:"Expiring / expired",style:Ie({width:e.barPct("expired")+"%"})},null,4)):f("v-if",!0),e.barPct("removed")>0?(a(),l("span",{key:4,class:"ov-bar-seg ov-bar-removed",title:"Removing / removed",style:Ie({width:e.barPct("removed")+"%"})},null,4)):f("v-if",!0)]),n("div",zk,[n("a",Hk,[t[37]||(t[37]=n("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[38]||(t[38]=g(" Ready ",-1)),n("span",jk,c(e.fmt?.number(e.statusCount("ready"))),1)]),n("a",Gk,[t[39]||(t[39]=n("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[40]||(t[40]=g(" Preparing ",-1)),n("span",Wk,c(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),n("a",Kk,[t[41]||(t[41]=n("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[42]||(t[42]=g(" Error ",-1)),n("span",Yk,c(e.fmt?.number(e.statusCount("error"))),1)]),n("a",Xk,[t[43]||(t[43]=n("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[44]||(t[44]=g(" Expiring / expired ",-1)),n("span",Jk,c(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),n("a",Qk,[t[45]||(t[45]=n("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[46]||(t[46]=g(" Removing / removed ",-1)),n("span",Zk,c(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),f(" Error breakdown "),n("div",xk,[n("div",e0,[t[47]||(t[47]=n("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),n("span",t0,c(e.fmt?.number(e.realErrors()))+" "+c(e.realErrors()===1?"error":"errors"),1)]),n("div",n0,[n("div",s0,[t[48]||(t[48]=n("span",{class:"ov-ebar-label"},"Error",-1)),n("span",o0,[n("span",{class:"ov-ebar-fill ov-ebar-error",style:Ie({width:e.errPct("error")+"%"})},null,4)]),n("span",i0,c(e.data?.errors?.severity?.error),1)]),n("div",r0,[t[49]||(t[49]=n("span",{class:"ov-ebar-label"},"Warning",-1)),n("span",a0,[n("span",{class:"ov-ebar-fill ov-ebar-warn",style:Ie({width:e.errPct("warn")+"%"})},null,4)]),n("span",l0,c(e.data?.errors?.severity?.warn),1)]),e.errorHours().length?(a(),l("div",d0,[n("div",u0,[t[52]||(t[52]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-error","aria-hidden":"true"}),g("Error")],-1)),t[53]||(t[53]=n("span",{class:"ov-ehours-key"},[n("span",{class:"ov-ehours-swatch is-warn","aria-hidden":"true"}),g("Warning")],-1)),n("span",c0,[t[50]||(t[50]=g("Per hour",-1)),t[51]||(t[51]=n("span",{class:"seg-sep","aria-hidden":"true"},"\xB7",-1)),g("peak "+c(e.fmt?.number(e.errorHoursPeak())),1)])]),n("div",p0,[(a(!0),l(q,null,x(e.errorHours(),s=>(a(),l("span",{key:s.key,class:P({"is-bad":s.bad,"is-zero":s.zero}),title:s.title},[s.zero?(a(),l("i",h0)):(a(),l(q,{key:1},[s.errPct?(a(),l("i",{key:0,class:"ov-ehours-e",style:Ie({height:s.errPct+"%"})},null,4)):f("v-if",!0),s.warnPct?(a(),l("i",{key:1,class:"ov-ehours-w",style:Ie({height:s.warnPct+"%"})},null,4)):f("v-if",!0)],64))],10,f0))),128))]),t[54]||(t[54]=n("div",{class:"ov-ehours-x"},[n("span",null,"24h ago"),n("span",null,"now")],-1))])):f("v-if",!0),n("p",m0,"Info "+c(e.fmt?.number(e.data?.errors?.severity?.info||0))+" \xB7 logged, not counted as errors",1)]),e.data?.repos?.recentErrors24h?(a(),l("div",g0,[n("a",v0,c(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):f("v-if",!0)]),f(" Top routes / queues "),n("div",y0,[t[59]||(t[59]=n("div",{class:"ov-panel-head"},[n("span",{class:"ov-panel-title"},"Queues"),n("span",{class:"ov-panel-meta"},"by state")],-1)),n("div",b0,[t[58]||(t[58]=Ee('
QueueActiveWaitFailed
',1)),n("a",w0,[t[55]||(t[55]=n("span",{class:"ov-route-name"},"Download",-1)),n("span",k0,c(e.data?.queues?.download?.active),1),n("span",C0,c(e.data?.queues?.download?.waiting),1),n("span",{class:P(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},c(e.data?.queues?.download?.failed),3)]),n("a",E0,[t[56]||(t[56]=n("span",{class:"ov-route-name"},"Remove",-1)),n("span",S0,c(e.data?.queues?.remove?.active),1),n("span",N0,c(e.data?.queues?.remove?.waiting),1),n("span",{class:P(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},c(e.data?.queues?.remove?.failed),3)]),n("a",R0,[t[57]||(t[57]=n("span",{class:"ov-route-name"},"Cache cleanup",-1)),n("span",P0,c(e.data?.queues?.cache?.active),1),n("span",A0,c(e.data?.queues?.cache?.waiting),1),n("span",{class:P(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},c(e.data?.queues?.cache?.failed),3)])])])]),f(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",D0,[n("div",T0,[t[60]||(t[60]=n("span",{class:"ov-panel-title"},"Services",-1)),n("span",O0,"5 services \xB7 "+c(e.realErrors()>0?"1 needs attention":"all healthy"),1)]),n("div",I0,[n("div",M0,[t[62]||(t[62]=n("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),n("div",V0,[t[61]||(t[61]=n("span",{class:"ov-svc-name"},"web",-1)),n("span",q0,c(e.data?.system?.nodeVersion)+" \xB7 up "+c(e.humanDuration(e.data?.system?.uptime)),1)])]),n("div",_0,[n("span",{class:P(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",$0,[t[63]||(t[63]=n("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(a(),l("span",L0,c(e.queueTotal(e.data?.queues?.download))+" "+c(e.queueTotal(e.data?.queues?.download)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.download)?f("v-if",!0):(a(),l("span",F0,"idle"))])]),n("div",U0,[n("span",{class:P(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",B0,[t[64]||(t[64]=n("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(a(),l("span",z0,c(e.queueTotal(e.data?.queues?.cache))+" "+c(e.queueTotal(e.data?.queues?.cache)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.cache)?f("v-if",!0):(a(),l("span",H0,"idle"))])]),n("div",j0,[n("span",{class:P(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),n("div",G0,[t[65]||(t[65]=n("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(a(),l("span",W0,c(e.queueTotal(e.data?.queues?.remove))+" "+c(e.queueTotal(e.data?.queues?.remove)===1?"job":"jobs"),1)):f("v-if",!0),e.queueTotal(e.data?.queues?.remove)?f("v-if",!0):(a(),l("span",K0,"idle"))])]),n("div",Y0,[n("span",{class:P(["ov-svc-dot",e.realErrors()>0?"ov-dot-warn":"ov-dot-ok"]),title:e.realErrors()>0?"Errors in the last 24 hours":"No errors in the last 24 hours"},null,10,X0),n("div",J0,[t[66]||(t[66]=n("span",{class:"ov-svc-name"},"errors",-1)),n("span",Q0,c(e.fmt?.number(e.realErrors()))+" / 24h",1)])])])])],512)),[[Q,e.ovView==="summary"]]):f("v-if",!0),D(n("section",Z0,[n("div",x0,[t[71]||(t[71]=n("div",null,[n("h2",{class:"ov-panel-title",id:"cache-heading"},"Cache"),n("p",{class:"ov-performance-note"},"Shared storage, repeated reads and anonymization work")],-1)),n("div",e2,[t[69]||(t[69]=n("label",{for:"cache-window"},"Time range",-1)),D(n("select",{id:"cache-window",class:"form-control form-control-sm","onUpdate:modelValue":t[0]||(t[0]=s=>e.cacheMinutes=s),onChange:t[1]||(t[1]=s=>e.loadCache())},[...t[67]||(t[67]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1),n("option",{value:1440},"Last 24 hours",-1),n("option",{value:10080},"Last 7 days",-1)])],544),[[mn,e.cacheMinutes,void 0,{number:!0}]]),t[70]||(t[70]=n("label",{for:"cache-traffic"},"Traffic",-1)),D(n("select",{id:"cache-traffic",class:"form-control form-control-sm","onUpdate:modelValue":t[2]||(t[2]=s=>e.cacheTraffic=s)},[...t[68]||(t[68]=[Ee('',6)])],512),[[mn,e.cacheTraffic]])])]),e.cacheError?(a(),l("div",t2,[n("span",null,c(e.cacheError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[3]||(t[3]=s=>e.loadCache())},"Retry")])):f("v-if",!0),!e.cacheReport&&!e.cacheError?(a(),l("p",n2,"Loading cache monitoring\u2026")):f("v-if",!0),e.cacheReport?.available?(a(),l(q,{key:2},[e.cacheReport.enabled?f("v-if",!0):(a(),l("p",s2,"Shared blob storage is disabled. Inspection and legacy-cache activity are still measured.")),e.cacheReport.filesystemSupported?f("v-if",!0):(a(),l("p",o2,"Shared blobs require a local filesystem. The configured storage continues to use its existing cache.")),e.cacheReport.dropped?(a(),l("p",i2,c(e.cacheReport.dropped)+" telemetry events were dropped. Totals may be incomplete.",1)):f("v-if",!0),e.cacheReport.source?(a(),l("div",r2,[n("table",a2,[t[72]||(t[72]=n("caption",{class:"sr-only"},"Current shared-cache storage and byte budgets",-1)),t[73]||(t[73]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Pool"),n("th",{scope:"col",class:"num"},"Allocated / budget"),n("th",{scope:"col",class:"num"},"Reserved for fills"),n("th",{scope:"col",class:"num"},"Original bytes"),n("th",{scope:"col",class:"num"},"Blobs"),n("th",{scope:"col",class:"num"},"Active readers")])],-1)),n("tbody",null,[(a(!0),l(q,null,x([{name:"Source blobs",data:e.cacheReport.source},{name:"Transformed output",data:e.cacheReport.results}],s=>D((a(),l("tr",{key:s.name},[n("th",l2,c(s.name),1),n("td",{class:P(["num budget-cell",{"is-over":s.data?.budgetBytes&&s.data?.allocatedBytes>s.data?.budgetBytes}]),title:s.data?.budgetBytes?Math.round(100*(s.data?.allocatedBytes||0)/s.data.budgetBytes)+"% of budget":null},[s.data?.budgetBytes&&s.data?.allocatedBytes>s.data?.budgetBytes?(a(),l("span",u2,"Over budget \xB7 ")):f("v-if",!0),g(c(e.humanBytes(s.data?.allocatedBytes))+" / "+c(e.humanBytes(s.data?.budgetBytes)),1),s.data?.budgetBytes?(a(),l("span",c2,[n("i",{style:Ie({width:Math.min(100,Math.round(100*(s.data?.allocatedBytes||0)/s.data.budgetBytes))+"%"})},null,4)])):f("v-if",!0)],10,d2),n("td",p2,c(e.humanBytes(s.data?.reservedBytes)),1),n("td",f2,c(e.humanBytes(s.data?.originalBytes)),1),n("td",h2,c(e.fmt?.number(s.data?.blobs)),1),n("td",m2,c(e.fmt?.number(s.data?.activeReaders)),1)])),[[Q,s.data]])),128))])])])):f("v-if",!0),e.cacheReport.source?(a(),l("dl",g2,[n("div",null,[t[74]||(t[74]=n("dt",null,"Source request hit rate",-1)),n("dd",null,c(e.cacheRate("source","count")),1)]),n("div",null,[t[75]||(t[75]=n("dt",null,"Source byte hit rate",-1)),n("dd",null,c(e.cacheRate("source","bytes")),1)]),n("div",null,[t[76]||(t[76]=n("dt",null,"Decision hit rate",-1)),n("dd",null,c(e.cacheRate("decision","count")),1)])])):f("v-if",!0),t[79]||(t[79]=n("p",{class:"ov-performance-note"},"Reuse counts measure consecutive reads of the same blob within each interval. Codec timings are elapsed stream time, not CPU time; eviction times measure how long a blob was idle. Known monitors are identified by request metadata; other automation may remain in file reads.",-1)),e.cacheRows().length?(a(),l("div",v2,[n("table",y2,[t[77]||(t[77]=n("caption",{class:"sr-only"},"Cache events for the selected time range and traffic",-1)),t[78]||(t[78]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Event"),n("th",{scope:"col"},"Traffic"),n("th",{scope:"col",class:"num"},"Count"),n("th",{scope:"col",class:"num"},"Bytes"),n("th",{scope:"col",class:"num"},"Mean measured time"),n("th",{scope:"col",class:"num"},"p95 bound")])],-1)),n("tbody",null,[(a(!0),l(q,null,x(e.cacheRows(),s=>(a(),l("tr",{key:s.name+":"+s.traffic},[n("th",b2,c(e.cacheEventName(s.name)),1),n("td",w2,c(s.traffic),1),n("td",k2,c(e.fmt?.number(s.count)),1),n("td",C2,c(e.humanBytes(s.bytes)),1),n("td",{class:P(["num",{"ov-muted":!s.ms}])},c(s.ms?e.fmt.duration(s.ms/s.count):"Not timed"),3),n("td",{class:P(["num",{"ov-muted":!s.ms}])},c(e.cacheP95(s)),3)]))),128))])])])):(a(),l("p",E2,"No cache events in this time range for the selected traffic.")),n("p",S2,"Updated "+c(e.sampleAge(e.cacheReport))+" seconds ago. Minute history is retained for 48 hours; hourly history for 30 days.",1)],64)):f("v-if",!0)],512),[[Q,e.ovView==="cache"]]),D(n("section",N2,[n("div",R2,[t[84]||(t[84]=n("div",null,[n("h2",{class:"ov-panel-title",id:"performance-heading"},"Request performance"),n("p",{class:"ov-performance-note"},"Request latency and process health")],-1)),n("div",P2,[e.performance?.available?(a(),l(q,{key:0},[t[81]||(t[81]=n("label",{for:"performance-view"},"Show",-1)),D(n("select",{id:"performance-view",class:"form-control form-control-sm","onUpdate:modelValue":t[4]||(t[4]=s=>e.performanceTab=s),"aria-label":"Performance metrics"},[...t[80]||(t[80]=[n("option",{value:"routes"},"Routes",-1),n("option",{value:"processes"},"Processes",-1),n("option",{value:"stages"},"Work stages",-1)])],512),[[mn,e.performanceTab]])],64)):f("v-if",!0),t[83]||(t[83]=n("label",{for:"performance-window"},"Time range",-1)),D(n("select",{id:"performance-window",class:"form-control form-control-sm","onUpdate:modelValue":t[5]||(t[5]=s=>e.performanceMinutes=s),onChange:t[6]||(t[6]=s=>e.loadPerformance()),"aria-label":"Performance time range"},[...t[82]||(t[82]=[n("option",{value:15},"Last 15 minutes",-1),n("option",{value:60},"Last hour",-1)])],544),[[mn,e.performanceMinutes,void 0,{number:!0}]])])]),e.performanceError?(a(),l("div",A2,[t[85]||(t[85]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,c(e.performanceError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[7]||(t[7]=s=>e.loadPerformance())},"Retry")])):f("v-if",!0),!e.performance&&!e.performanceError?(a(),l("p",D2,"Loading performance monitoring\u2026")):f("v-if",!0),e.performance?.available?(a(),l("div",T2,[D(n("div",O2,[e.performance.routes?.length?(a(),l("div",I2,[n("table",M2,[t[86]||(t[86]=n("caption",{class:"sr-only"},"Route latency for the selected time range",-1)),t[87]||(t[87]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Route"),n("th",{scope:"col",class:"num"},"Requests"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"First byte p95"),n("th",{scope:"col",class:"num"},"p95"),n("th",{scope:"col",class:"num"},"p99"),n("th",{scope:"col",class:"num"},"Interrupted"),n("th",{scope:"col",class:"num"},"5xx"),n("th",{scope:"col",class:"num"},"Slow")])],-1)),n("tbody",null,[(a(!0),l(q,null,x(e.performance.routes,s=>(a(),l("tr",{key:s.service+s.method+s.route},[n("th",V2,[n("span",null,c(s.route),1),n("small",null,c(s.service)+" \xB7 "+c(s.method),1)]),n("td",q2,c(e.fmt.number(s.count)),1),n("td",_2,c(e.formatMs(s.avgMs)),1),n("td",$2,c(e.firstByteBound(s)),1),n("td",L2,c(e.latencyBound(s,"p95UpperMs")),1),n("td",F2,c(e.latencyBound(s,"p99UpperMs")),1),n("td",{class:P(["num",{"ov-metric-warn":s.aborted>0}])},c(e.fmt.number(s.aborted)),3),n("td",{class:P(["num",{"ov-metric-bad":s.errors>0}])},c(e.fmt.number(s.errors)),3),n("td",{class:P(["num",{"ov-metric-warn":s.slow>0}])},c(e.fmt.number(s.slow)),3)]))),128))])])])):(a(),l("p",U2,"No recorded requests in this time range yet."))],512),[[Q,e.performanceTab==="routes"]]),D(n("div",B2,[t[91]||(t[91]=n("p",{class:"ov-performance-note"},"API and streamer processes \xB7 latest sample per instance",-1)),e.performance.instances?.length?(a(),l("div",H2,[n("table",j2,[t[89]||(t[89]=n("caption",{class:"sr-only"},"API and streamer process resource usage",-1)),t[90]||(t[90]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Process"),n("th",{scope:"col",class:"num"},"RSS / limit"),n("th",{scope:"col",class:"num"},"CPU"),n("th",{scope:"col",class:"num"},"Event loop p95"),n("th",{scope:"col",class:"num"},"Active requests"),n("th",{scope:"col",class:"num"},"Sockets / CLOSE_WAIT"),n("th",{scope:"col",class:"num"},"Workers / waiting"),n("th",{scope:"col",class:"num"},"Sample age"),n("th",{scope:"col",class:"num"},"Dropped batches / metrics")])],-1)),n("tbody",null,[(a(!0),l(q,null,x(e.performance.instances,s=>(a(),l("tr",{key:s.instance,class:P({"ov-metric-warning-row":e.performanceWarning(s)})},[n("th",G2,[n("span",null,c(s.instance),1),e.performanceWarning(s)?(a(),l("small",W2,[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),g(" Needs attention",-1)])])):f("v-if",!0)]),n("td",K2,[g(c(e.humanBytes(s.memory.rss))+" / "+c(e.humanBytes(s.memoryLimitBytes)),1),n("small",null,"Peak "+c(e.humanBytes(e.peakRss(s))),1)]),n("td",Y2,c(s.cpuPercent==null?"Unavailable":s.cpuPercent.toFixed(1)+"%"),1),n("td",X2,c(s.eventLoop?.p95Ms==null?"Not applicable":e.fmt.duration(s.eventLoop.p95Ms)),1),n("td",J2,c(s.activeRequests),1),n("td",Q2,c(s.sockets?.descriptors??"Unavailable")+" / "+c(s.sockets?.closeWait??"Unavailable"),1),n("td",Z2,c(s.workers?.running??0)+" / "+c(s.workers?.waiting??0),1),n("td",x2,c(e.sampleAge(s))+" s",1),n("td",eC,c(s.droppedBatches)+" / "+c(s.droppedMetrics),1)],2))),128))])])])):(a(),l("div",z2,"No recent process samples. Monitoring coverage is incomplete."))],512),[[Q,e.performanceTab==="processes"]]),D(n("div",tC,[e.performance.stages?.some(s=>s.metric!=="first_byte")?(a(),l("div",nC,[n("table",sC,[t[92]||(t[92]=n("caption",{class:"sr-only"},"Work stages and cache results",-1)),t[93]||(t[93]=n("thead",null,[n("tr",null,[n("th",{scope:"col"},"Work stage"),n("th",{scope:"col",class:"num"},"Samples"),n("th",{scope:"col",class:"num"},"Average"),n("th",{scope:"col",class:"num"},"p95")])],-1)),n("tbody",null,[(a(!0),l(q,null,x(e.performance.stages.filter(s=>s.metric!=="first_byte"),s=>(a(),l("tr",{key:s.service+s.metric},[n("th",oC,[n("span",null,c(s.metric),1),n("small",null,c(s.service),1)]),n("td",iC,c(e.fmt.number(s.count)),1),n("td",rC,c(e.formatMs(s.avgMs)),1),n("td",aC,c(e.latencyBound(s,"p95UpperMs")),1)]))),128))])])])):(a(),l("p",lC,"No recorded work stages or cache results in this time range yet."))],512),[[Q,e.performanceTab==="stages"]]),t[94]||(t[94]=n("details",{class:"ov-performance-help"},[n("summary",null,"How to read these metrics"),n("p",null,"Latency includes upstream waits and response transfer. Percentiles show histogram bucket upper bounds, not exact timings. Process rows marked \u201CNeeds attention\u201D have stale samples, dropped monitoring data, CLOSE_WAIT sockets, high event loop delay, or high memory usage.")],-1))])):f("v-if",!0)],512),[[Q,e.ovView==="performance"]])])}var dC={class:"container paper-page admin-page"},uC={class:"q-header"},cC={class:"q-header-actions"},pC={class:"q-cards"},fC=["aria-pressed","onKeydown","onClick"],hC={class:"q-card-head"},mC=["title"],gC=["textContent"],vC=["textContent"],yC={class:"q-card-sub"},bC={class:"q-card-failed"},wC={key:0,class:"q-card-bar"},kC={key:0,class:"q-detail"},CC={class:"q-throughput"},EC={class:"q-range-btns"},SC={class:"q-section-label"},NC={key:0,class:"q-section-right"},RC={class:"q-chart-wrap"},PC={key:0,class:"q-chart-empty"},AC={class:"q-stats-panel"},DC={class:"q-section-label"},TC={class:"q-stats-grid"},OC={class:"q-stat"},IC=["textContent"],MC={class:"q-stat"},VC=["textContent"],qC={class:"q-stat"},_C=["textContent"],$C={class:"q-stat"},LC=["textContent"],FC={class:"q-stat"},UC=["textContent"],BC={class:"q-stat"},zC=["textContent"],HC={class:"q-stats-actions"},jC=["disabled"],GC={class:"q-danger-group"},WC={class:"q-jobs"},KC={class:"q-jobs-header"},YC={class:"q-section-label"},XC={class:"seg-filter",role:"radiogroup","aria-label":"Filter jobs by state"},JC=["aria-checked"],QC={class:"count"},ZC=["aria-checked"],xC={class:"count"},eE=["aria-checked"],tE={class:"count"},nE=["aria-checked"],sE={class:"count"},oE=["aria-checked"],iE={class:"count"},rE=["aria-checked"],aE={class:"count"},lE={class:"q-search-row"},dE={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},uE={class:"q-auto-refresh"},cE={type:"checkbox"},pE={key:0,class:"q-table"},fE=["onClick"],hE={class:"q-cell-state"},mE=["textContent"],gE=["textContent"],vE=["title"],yE=["textContent","href"],bE=["title","textContent"],wE=["textContent"],kE=["textContent"],CE={class:"q-cell-progress"},EE=["aria-label"],SE=["textContent"],NE={class:"q-cell-actions"},RE=["onClick"],PE=["onClick"],AE={key:0,class:"q-detail-row"},DE={colspan:"7"},TE={class:"q-job-detail"},OE={class:"q-job-detail-grid"},IE={class:"q-job-detail-item"},ME={class:"q-job-detail-value"},VE=["textContent","href"],qE={class:"q-job-detail-item"},_E={class:"q-job-detail-value"},$E=["textContent"],LE={key:0,class:"q-job-detail-item"},FE=["textContent"],UE={key:1,class:"q-job-detail-item"},BE=["textContent"],zE={key:2,class:"q-job-detail-item"},HE={class:"q-job-detail-value"},jE={key:3,class:"q-job-detail-item"},GE=["textContent"],WE={key:4,class:"q-job-detail-item"},KE=["textContent"],YE={key:5,class:"q-job-detail-item"},XE=["textContent"],JE={key:6,class:"q-job-detail-item"},QE=["textContent"],ZE={key:7,class:"q-job-detail-item"},xE=["textContent"],eS={key:0,class:"q-job-detail-error"},tS=["textContent"],nS={key:1},sS=["textContent"],oS={class:"q-job-detail-actions"},iS=["onClick"],rS=["onClick"],aS=["href"],lS={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},dS={key:0},uS={key:1};function tp(e,t){let s=Ae("field");return a(),l("div",dC,[t[71]||(t[71]=n("div",{class:"paper-crumbs"},[g("Admin \xA0/\xA0 "),n("span",{class:"here"},"Queues")],-1)),n("div",uC,[t[18]||(t[18]=n("h1",{class:"paper-page-title"},"Queues",-1)),n("div",cC,[n("button",{class:"btn btn-sm",onClick:t[0]||(t[0]=i=>e.pauseAll())},"Pause all queues")])]),t[72]||(t[72]=Ee('',1)),f(" Queue overview cards "),n("div",pC,[(a(!0),l(q,null,x(e.queueList,(i,o)=>(a(),l("div",{class:P(["q-card",{selected:e.selectedQueue==i?.key,paused:i?.paused}]),role:"button",tabindex:"0","aria-pressed":e.selectedQueue===i.key,onKeydown:[kt(ae(r=>e.selectQueue(i.key),["prevent"]),["enter"]),kt(ae(r=>e.selectQueue(i.key),["prevent"]),["space"])],onClick:r=>e.selectQueue(i.key)},[n("div",hC,[n("span",{class:P(["q-dot",{"q-dot-red":i?.paused||i?.counts?.failed>0,"q-dot-idle":!i?.counts?.active&&!i?.counts?.waiting}]),title:i?.paused?"Paused":i?.counts?.failed>0?i.counts.failed+" failed jobs":i?.counts?.active||i?.counts?.waiting?"Running":"Idle"},null,10,mC),n("span",{class:"q-card-name",textContent:c(i?.label)},null,8,gC)]),n("div",{class:"q-card-count",textContent:c((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0))},null,8,vC),n("div",yC,[n("span",null,[g("waiting \xB7 "+c(i?.counts?.active||0)+" active",1),i?.counts?.failed?(a(),l(q,{key:0},[t[19]||(t[19]=g(" \xB7 ",-1)),n("b",bC,c(i.counts.failed)+" failed",1)],64)):f("v-if",!0),i?.paused?(a(),l(q,{key:1},[t[20]||(t[20]=g(" \xB7 ",-1)),t[21]||(t[21]=n("b",{class:"q-card-failed"},"paused",-1))],64)):f("v-if",!0)]),i?.counts?.active?(a(),l("div",wC,[n("div",{class:"q-card-bar-fill",style:Ie({width:i?.counts?.active/((i?.counts?.waiting||0)+(i?.counts?.active||0)+(i?.counts?.delayed||0)||1)*100+"%"})},null,4)])):f("v-if",!0)])],42,fC))),256))]),f(" Detail: throughput chart + stats panel "),e.selectedStats?(a(),l("div",kC,[n("div",CC,[n("div",EC,[n("button",{class:P(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[1]||(t[1]=i=>e.setRange("1h"))},"1h",2),n("button",{class:P(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[2]||(t[2]=i=>e.setRange("6h"))},"6h",2),n("button",{class:P(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[3]||(t[3]=i=>e.setRange("24h"))},"24h",2),n("button",{class:P(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[4]||(t[4]=i=>e.setRange("7d"))},"7d",2)]),n("div",SC,[g("Throughput \xB7 "+c(e.selectedQueue)+" ",1),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l("span",NC,[t[23]||(t[23]=n("span",{class:"q-legend-completed"},"\u25CF",-1)),t[24]||(t[24]=g(" Completed ",-1)),t[25]||(t[25]=n("span",{class:"q-legend-failed"},"\u25CF",-1)),t[26]||(t[26]=g(" Failed ",-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)>0?(a(),l(q,{key:0},[t[22]||(t[22]=n("span",{class:"q-legend-exec","aria-hidden":"true"},null,-1)),g(" Avg time \xB7 "+c(e.range),1)],64)):f("v-if",!0)])):f("v-if",!0)]),n("div",RC,[t[28]||(t[28]=n("canvas",{id:"q-throughput-chart",height:"180"},null,-1)),(e.selectedStats?.completed24h||0)+(e.selectedStats?.failed24h||0)===0?(a(),l("div",PC,[...t[27]||(t[27]=[n("strong",null,"No jobs processed in this window",-1),n("span",null,"Completed and failed jobs will chart here.",-1)])])):f("v-if",!0),t[29]||(t[29]=n("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}},null,-1)),t[30]||(t[30]=n("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}},null,-1))])]),n("div",AC,[n("div",DC,"Stats \xB7 "+c(e.selectedQueue),1),n("div",TC,[n("div",OC,[t[31]||(t[31]=n("div",{class:"q-stat-label"},"Waiting",-1)),n("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.waiting||0)},null,8,IC)]),n("div",MC,[t[32]||(t[32]=n("div",{class:"q-stat-label"},"Active",-1)),n("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.active||0)},null,8,VC)]),n("div",qC,[t[33]||(t[33]=n("div",{class:"q-stat-label"},"Completed (24h)",-1)),n("div",{class:"q-stat-value",textContent:c(e.fmt?.number(e.selectedStats?.completed24h))},null,8,_C)]),n("div",$C,[t[34]||(t[34]=n("div",{class:"q-stat-label"},"Failed (24h)",-1)),n("div",{class:"q-stat-value",textContent:c(e.selectedStats?.failed24h||0)},null,8,LC)]),n("div",FC,[t[35]||(t[35]=n("div",{class:"q-stat-label"},"Delayed",-1)),n("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.delayed||0)},null,8,UC)]),n("div",BC,[t[36]||(t[36]=n("div",{class:"q-stat-label"},"Workers",-1)),n("div",{class:"q-stat-value",textContent:c(e.selectedStats?.workers||0)},null,8,zC)])]),n("div",HC,[n("button",{class:"btn btn-sm",onClick:t[5]||(t[5]=i=>e.togglePause())},c(e.selectedStats?.paused?"Resume "+e.selectedQueue:"Pause "+e.selectedQueue),1),n("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=i=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,jC),n("span",GC,[n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[7]||(t[7]=i=>e.drainSelected())},"Drain"),n("button",{class:"btn btn-sm btn-outline-danger",onClick:t[8]||(t[8]=i=>e.emptyQueue())},"Empty")])])])])):f("v-if",!0),e.actionError?(a(),l("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=i=>e.actionError=null)},[t[37]||(t[37]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),g(" "+c(e.actionError),1)])):f("v-if",!0),f(" Jobs table "),n("div",WC,[n("div",KC,[n("div",YC,"All jobs \xB7 "+c(e.selectedQueue),1),n("div",XC,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[10]||(t[10]=i=>e.setSegView("all"))},[t[38]||(t[38]=g("All ",-1)),n("span",QC,c(e.fmt?.number(e.segCount("all"))),1)],10,JC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="active","is-empty":!e.segCount("active")}]),"aria-checked":e.segView()==="active",onClick:t[11]||(t[11]=i=>e.setSegView("active"))},[t[39]||(t[39]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[40]||(t[40]=g("Active ",-1)),n("span",xC,c(e.fmt?.number(e.segCount("active"))),1)],10,ZC),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="waiting","is-empty":!e.segCount("waiting")}]),"aria-checked":e.segView()==="waiting",onClick:t[12]||(t[12]=i=>e.setSegView("waiting"))},[t[41]||(t[41]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[42]||(t[42]=g("Waiting ",-1)),n("span",tE,c(e.fmt?.number(e.segCount("waiting"))),1)],10,eE),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="delayed","is-empty":!e.segCount("delayed")}]),"aria-checked":e.segView()==="delayed",onClick:t[13]||(t[13]=i=>e.setSegView("delayed"))},[t[43]||(t[43]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[44]||(t[44]=g("Delayed ",-1)),n("span",sE,c(e.fmt?.number(e.segCount("delayed"))),1)],10,nE),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="failed","is-empty":!e.segCount("failed")}]),"aria-checked":e.segView()==="failed",onClick:t[14]||(t[14]=i=>e.setSegView("failed"))},[t[45]||(t[45]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[46]||(t[46]=g("Failed ",-1)),n("span",iE,c(e.fmt?.number(e.segCount("failed"))),1)],10,oE),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="completed","is-empty":!e.segCount("completed")}]),"aria-checked":e.segView()==="completed",onClick:t[15]||(t[15]=i=>e.setSegView("completed"))},[t[47]||(t[47]=n("span",{class:"seg-dot done","aria-hidden":"true"},null,-1)),t[48]||(t[48]=g("Completed ",-1)),n("span",aE,c(e.fmt?.number(e.segCount("completed"))),1)],10,rE)])]),n("div",lE,[D(n("input",dE,null,512),[[s,{state:e.viewState,set:i=>{e.query.search=i},value:e.query?.search,form:null,options:{}}]]),n("label",uE,[D(n("input",cE,null,512),[[s,{state:e.viewState,set:i=>{e.query.autoRefresh=i},value:e.query?.autoRefresh,form:null,options:{}}]]),t[49]||(t[49]=n("span",{class:"auto-refresh-label"},"Auto-refresh",-1))]),n("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[16]||(t[16]=i=>e.refreshNow()),"aria-label":"Refresh"},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])]),e.filteredJobs().length>0?(a(),l("table",pE,[t[69]||(t[69]=n("thead",null,[n("tr",null,[n("th",null,"State"),n("th",null,"Job"),n("th",null,"Detail"),n("th",null,"Attempts"),n("th",{class:"q-th-num"},"Duration"),n("th",null,"Progress"),n("th")])],-1)),(a(!0),l(q,null,x(e.filteredJobs(),(i,o)=>(a(),l("tbody",null,[n("tr",{style:{cursor:"pointer"},class:P({"q-row-failed":i?._state=="failed","q-row-expanded":e.expanded[i?.id]}),onClick:r=>e.toggleJob(i)},[n("td",hE,[n("span",{textContent:c(i?._state),class:P("q-state-badge q-state-"+i?._state)},null,10,mE),i?._state=="delayed"&&i?.delayUntil?(a(),l("span",{key:0,class:"q-delay-hint",textContent:c(e.delayCountdown(i?.delayUntil))},null,8,gE)):f("v-if",!0)]),n("td",{class:"q-cell-id",title:"job:"+i?.id+(i?.name&&i?.name!==i?.id?" \xB7 "+i.name:"")+(i?.data?.repoId&&i?.data?.repoId!==i?.id?" \xB7 "+i.data.repoId:"")},[(a(),l("svg",{class:P(["ui-icon q-chevron",{"q-chevron-open":e.expanded[i?.id]}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#ui-icon-chevron-right"},null,-1)])],2)),n("a",{target:"_blank",class:"q-job-link",textContent:c(i?.data?.repoId||i?.id),onClick:t[17]||(t[17]=r=>r.stopPropagation()),href:e.safeUrl("/r/"+(i?.data?.repoId||i?.id))},null,8,yE)],8,vE),n("td",{class:P(["q-cell-detail",{"is-error":i?._state=="failed"}]),title:i?._state=="failed"?i?.failedReason:"",textContent:c(e.jobDetail(i))},null,10,bE),n("td",{class:"q-cell-num",textContent:c(i?.attemptsMade||1)},null,8,wE),n("td",{class:"q-cell-num q-cell-duration",textContent:c(e.jobDuration(i))},null,8,kE),n("td",CE,[n("div",{class:P(["q-progress-wrap",{"is-indeterminate":e.jobProgressPct(i)===null}]),"aria-label":e.jobProgressPct(i)===null?"Progress not reported":e.jobProgressPct(i)+"% done"},[n("div",{class:"q-progress-bar",style:Ie({"--pct":(e.jobProgressPct(i)||0)+"%"})},null,4),n("span",{class:"q-progress-label",textContent:c(e.jobProgressPct(i)===null?"\u2014":e.jobProgressPct(i)+"%")},null,8,SE)],10,EE)]),n("td",NE,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm btn-icon",title:"Retry",onClick:r=>{e.retryJob(i),r.stopPropagation()},"aria-label":"Retry job"},[...t[52]||(t[52]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])],8,RE)):f("v-if",!0),n("button",{class:"btn btn-sm btn-icon",title:"Remove","aria-label":"Remove job",onClick:r=>{e.removeJob(i),r.stopPropagation()}},[...t[53]||(t[53]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,PE)])],10,fE),e.expanded[i?.id]?(a(),l("tr",AE,[n("td",DE,[n("div",TE,[n("div",OE,[n("div",IE,[t[54]||(t[54]=n("span",{class:"q-job-detail-label"},"Job id",-1)),n("span",ME,[n("a",{target:"_blank",textContent:c(i?.id),href:e.safeUrl("/r/"+i?.id)},null,8,VE)])]),n("div",qE,[t[55]||(t[55]=n("span",{class:"q-job-detail-label"},"State",-1)),n("span",_E,[n("span",{textContent:c(i?._state),class:P("q-state-badge q-state-"+i?._state)},null,10,$E)])]),i?.data?.repoId?(a(),l("div",LE,[t[56]||(t[56]=n("span",{class:"q-job-detail-label"},"Repo ID",-1)),n("span",{class:"q-job-detail-value",textContent:c(i?.data?.repoId)},null,8,FE)])):f("v-if",!0),i?.timestamp?(a(),l("div",UE,[t[57]||(t[57]=n("span",{class:"q-job-detail-label"},"Created",-1)),n("span",{class:"q-job-detail-value",textContent:c(e.humanTime(i?.timestamp))},null,8,BE)])):f("v-if",!0),i?._state=="delayed"&&i?.delayUntil?(a(),l("div",zE,[t[58]||(t[58]=n("span",{class:"q-job-detail-label"},"Retry at",-1)),n("span",HE,c(e.humanTime(i?.delayUntil))+" ("+c(e.delayCountdown(i?.delayUntil))+")",1)])):f("v-if",!0),i?.processedOn?(a(),l("div",jE,[t[59]||(t[59]=n("span",{class:"q-job-detail-label"},"Processed",-1)),n("span",{class:"q-job-detail-value",textContent:c(e.humanTime(i?.processedOn))},null,8,GE)])):f("v-if",!0),i?.finishedOn?(a(),l("div",WE,[t[60]||(t[60]=n("span",{class:"q-job-detail-label"},"Finished",-1)),n("span",{class:"q-job-detail-value",textContent:c(e.humanTime(i?.finishedOn))},null,8,KE)])):f("v-if",!0),i?.attemptsMade?(a(),l("div",YE,[t[61]||(t[61]=n("span",{class:"q-job-detail-label"},"Attempts",-1)),n("span",{class:"q-job-detail-value",textContent:c(i?.attemptsMade)},null,8,XE)])):f("v-if",!0),i?.progress&&i?.progress?.status?(a(),l("div",JE,[t[62]||(t[62]=n("span",{class:"q-job-detail-label"},"Status",-1)),n("span",{class:"q-job-detail-value",textContent:c(i?.progress?.status)},null,8,QE)])):f("v-if",!0),e.jobProgressPct(i)!==null?(a(),l("div",ZE,[t[63]||(t[63]=n("span",{class:"q-job-detail-label"},"Progress",-1)),n("span",{class:"q-job-detail-value",textContent:c(e.jobProgressPct(i)+"%")},null,8,xE)])):f("v-if",!0)]),i?.failedReason?(a(),l("div",eS,[t[64]||(t[64]=n("span",{class:"q-job-detail-label"},"Error",-1)),n("div",{class:"q-error-reason",textContent:c(i?.failedReason)},null,8,tS)])):f("v-if",!0),i?.stacktrace?.length?(a(),l("div",nS,[t[65]||(t[65]=n("span",{class:"q-job-detail-label"},"Stacktrace",-1)),(a(!0),l(q,null,x(i?.stacktrace,(r,d)=>(a(),l("pre",{class:"q-error-stack",key:d},[n("code",{textContent:c(r)},null,8,sS)]))),128))])):f("v-if",!0),n("div",oS,[i?._state=="failed"?(a(),l("button",{key:0,class:"btn btn-sm",onClick:r=>e.retryJob(i)},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Retry",-1)])],8,iS)):f("v-if",!0),n("button",{class:"btn btn-sm",onClick:r=>e.removeJob(i)},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove",-1)])],8,rS),n("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+i?.id)},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1),g(" View repo",-1)])],8,aS)])])])])):f("v-if",!0)]))),256))])):f("v-if",!0),e.filteredJobs().length==0?(a(),l("div",lS,[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1)),e.query?.search?f("v-if",!0):(a(),l("span",dS,"No jobs in the "+c(e.selectedQueue)+" queue.",1)),e.query?.search?(a(),l("span",uS,"No jobs match the current filters.")):f("v-if",!0)])):f("v-if",!0)])])}var cS={class:"container paper-page admin-page"},pS={class:"seg-bar"},fS={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},hS=["aria-checked"],mS={class:"count"},gS=["aria-checked"],vS={class:"count"},yS=["aria-checked"],bS={class:"count"},wS=["aria-checked"],kS={class:"count"},CS=["aria-checked"],ES={class:"count"},SS=["aria-checked"],NS={class:"count"},RS={class:"seg-countline",role:"status"},PS={class:"seg-meta"},AS={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},DS={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},TS=["aria-expanded"],OS={class:"search-wrap"},IS={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories\u2026",autocomplete:"off"},MS={key:0,class:"admin-search-hint"},VS={class:"admin-filter-inline"},qS={type:"text",class:"form-control form-control-sm",placeholder:"username"},_S={class:"admin-filter-inline"},$S={type:"text",class:"form-control form-control-sm",placeholder:"ID"},LS={key:0,class:"admin-filter-inline","aria-label":"Pagination"},FS=["disabled"],US={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},BS=["disabled"],zS={key:0,class:"admin-filter-row"},HS={class:"admin-active-chips"},jS={class:"key"},GS=["onClick"],WS={key:1,class:"bulk-bar"},KS={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},YS={class:"paper-table-head",role:"row"},XS={role:"columnheader",style:{width:"28px"}},JS=["checked"],QS={role:"columnheader"},ZS={role:"columnheader"},xS={role:"columnheader",class:"num"},eN={role:"columnheader"},tN={role:"cell",style:{width:"28px"}},nN={type:"checkbox","aria-label":"Select repository"},sN={class:"cell-anon",role:"cell"},oN={class:"anon-text"},iN=["textContent","href"],rN=["title"],aN=["href"],lN=["textContent"],dN=["textContent"],uN=["data-meta-label"],cN=["title","textContent","href"],pN=["data-meta-label"],fN=["textContent","href"],hN=["data-meta-label"],mN={key:3,class:"meta-item"},gN={class:"meta-item"},vN={class:"cell-status",role:"cell"},yN={class:"status-line"},bN=["textContent"],wN=["textContent","title"],kN=["data-unit"],CN=["textContent"],EN={class:"cell-expires",role:"cell"},SN=["textContent"],NN={class:"cell-actions",role:"cell"},RN={class:"dropdown"},PN={class:"dropdown-menu dropdown-menu-right"},AN=["href"],DN=["href"],TN=["href"],ON=["onClick"],IN=["onClick"],MN=["onClick"],VN=["onClick"],qN=["onClick"],_N=["onClick"],$N={key:0,class:"paper-table-empty"},LN={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},FN={key:0,class:"pagination-compact"},UN=["disabled"],BN=["max"],zN=["disabled"],HN={class:"admin-filter-inline"},jN={class:"form-control form-control-sm"};function np(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",cS,[t[80]||(t[80]=Ee('
Admin \xA0/\xA0 Repositories

Repositories

',3)),n("div",pS,[n("div",fS,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[0]||(t[0]=o=>e.setSegView("all"))},[t[21]||(t[21]=g("All ",-1)),n("span",mS,c(e.fmt?.number(e.segCount("all"))),1)],10,hS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[1]||(t[1]=o=>e.setSegView("ready"))},[t[22]||(t[22]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[23]||(t[23]=g("Ready ",-1)),n("span",vS,c(e.fmt?.number(e.segCount("ready"))),1)],10,gS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[2]||(t[2]=o=>e.setSegView("preparing"))},[t[24]||(t[24]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[25]||(t[25]=g("Preparing ",-1)),n("span",bS,c(e.fmt?.number(e.segCount("preparing"))),1)],10,yS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[3]||(t[3]=o=>e.setSegView("error"))},[t[26]||(t[26]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[27]||(t[27]=g("Error ",-1)),n("span",kS,c(e.fmt?.number(e.segCount("error"))),1)],10,wS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[4]||(t[4]=o=>e.setSegView("expired"))},[t[28]||(t[28]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[29]||(t[29]=g("Expiring / expired ",-1)),n("span",ES,c(e.fmt?.number(e.segCount("expired"))),1)],10,CS),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[5]||(t[5]=o=>e.setSegView("removed"))},[t[30]||(t[30]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[31]||(t[31]=g("Removing / removed ",-1)),n("span",NS,c(e.fmt?.number(e.segCount("removed"))),1)],10,SS)]),n("p",RS,[n("strong",null,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[32]||(t[32]=g(" shown",-1)),t[33]||(t[33]=n("span",{class:"seg-sep"},"\xB7",-1)),n("span",PS,c(e.fmt?.humanFileSize(e.totalSize))+" on disk",1)])]),e.fetchError?(a(),l("div",AS,[t[34]||(t[34]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.fetchError),1)])):f("v-if",!0),D((a(),l("form",DS,[f(" Row 1: search + scoped inputs + headline actions "),n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=o=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},"Filters",8,TS),n("div",{class:P(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",OS,[D(n("input",IS,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",MS,"/"))]),n("span",VS,[t[35]||(t[35]=n("label",null,"Owner",-1)),D(n("input",qS,null,512),[[s,{state:e.viewState,set:o=>{e.query.owner=o},value:e.query?.owner,form:null,options:{}}]])]),n("span",_S,[t[36]||(t[36]=n("label",null,"Conference",-1)),D(n("input",$S,null,512),[[s,{state:e.viewState,set:o=>{e.query.conference=o},value:e.query?.conference,form:null,options:{}}]])]),t[40]||(t[40]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[7]||(t[7]=o=>e.exportCsv())},[...t[37]||(t[37]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),g(" Export",-1)])]),e.totalPage>1?(a(),l("span",LS,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[38]||(t[38]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,FS),n("span",US,c(e.query?.page)+"/"+c(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[9]||(t[9]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[39]||(t[39]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,BS)])):f("v-if",!0)],2),f(" Row 2: appears only when there are active filter chips "),e.chips?.length?(a(),l("div",zS,[n("div",HS,[(a(!0),l(q,null,x(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",jS,c(o?.label),1),n("span",null,c(o?.value),1),n("button",{type:"button","aria-label":"Remove filter",onClick:d=>e.clearFilter(o.key)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,GS)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",WS,[n("span",null,[n("strong",null,c(e.selectedCount()),1),t[42]||(t[42]=g(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=o=>e.bulkRefresh())},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[11]||(t[11]=o=>e.bulkRemoveCache())},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),g(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[12]||(t[12]=o=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",KS,[n("div",YS,[n("div",XS,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[13]||(t[13]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,JS)]),n("div",QS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[14]||(t[14]=o=>e.sortBy("source.repositoryName"))},[t[46]||(t[46]=g("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[45]||(t[45]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",ZS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[15]||(t[15]=o=>e.sortBy("status"))},[t[48]||(t[48]=g("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[47]||(t[47]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",xS,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[16]||(t[16]=o=>e.sortBy("pageView"))},[t[50]||(t[50]=g("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[49]||(t[49]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",eN,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[17]||(t[17]=o=>e.sortBy("anonymizeDate"))},[t[52]||(t[52]=g("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[51]||(t[51]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[53]||(t[53]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(q,null,x(e.filteredRepositories,(o,r)=>(a(),l("div",{class:P(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error","row-selected":e.selected[o?.repoId]}]),role:"row"},[n("div",tN,[D(n("input",nN,null,512),[[s,{state:e.viewState,set:d=>{e.selected[o.repoId]=d},value:e.selected[o?.repoId],form:null,options:{}}]])]),n("div",sN,[t[56]||(t[56]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",oN,[n("a",{class:"repo-name",target:"_blank",textContent:c(o?.repoId),href:e.safeUrl("/r/"+o?.repoId)},null,8,iN),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[o?.source?.fullName||o?.source?.repositoryName,o?.options?.update?"branch "+o?.source?.branch:"commit "+o?.source?.commit?.substring(0,7),o?.conference?"conference "+o?.conference:"",o?.size?.storage>0?e.fmt?.humanFileSize(o?.size?.storage):"",e.fmt?.number(o?.options?.terms?.length)+(o?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+o?.source?.repositoryName+"/")},[(o?.source?.repositoryName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:c((d=>d.length>16?d.slice(0,14)+"\u2026":d)((o?.source?.repositoryName||"").split("/")[0]))},null,8,lN)):f("v-if",!0),n("span",{class:"src-repo",textContent:c((o?.source?.repositoryName||"").includes("/")?"/"+(o?.source?.repositoryName||"").split("/").slice(1).join("/"):o?.source?.repositoryName)},null,8,dN)],8,aN),o?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(o?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:o?.source?.commit,textContent:c(o?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.commit)},null,8,cN)],8,uN)),o?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(o?.source?.branch||"")},[n("a",{textContent:c(o?.source?.branch),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.branch)},null,8,fN)],8,pN)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+o?.conference},[t[54]||(t[54]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),g(" "+c(o?.conference),1)],8,hN)):f("v-if",!0),o?.size?.storage>0?(a(),l("span",mN,c(e.fmt?.humanFileSize(o?.size?.storage)),1)):f("v-if",!0),n("span",gN,c(e.fmt?.number(o?.options?.terms?.length))+" "+c(o?.options?.terms?.length===1?"term":"terms"),1),t[55]||(t[55]=n("span",{class:"meta-more",hidden:""},null,-1))],8,rN)])]),n("div",vN,[n("span",yN,[n("span",{class:P(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:c(e.fmt?.statusLabel(o?.status))},null,8,bN)]),o?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,wN)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views"},[t[57]||(t[57]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),t[58]||(t[58]=g()),n("span",{textContent:c(e.fmt?.number(o?.pageView||0))},null,8,CN)],8,kN),n("div",EN,[t[59]||(t[59]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[60]||(t[60]=g()),n("span",{textContent:c((e.fmt?.humanTime(o?.anonymizeDate)||"").replace(/^on /,""))},null,8,SN)]),n("div",NN,[n("div",RN,[t[72]||(t[72]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",PN,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit",-1)])],8,AN),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View repo",-1)])],8,DN),o?.options?.page&&o?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+o?.repoId+"/")},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),g(" View page",-1)])],8,TN)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.fetchGithubInfo(o),["prevent"])},[...t[64]||(t[64]=[n("i",{class:"fab fa-github"},null,-1),g(" Live GitHub info",-1)])],8,ON),t[70]||(t[70]=n("div",{class:"dropdown-divider"},null,-1)),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updateRepository(o),["prevent"])},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Force update",-1)])],8,IN),[[Q,o?.status=="ready"||o?.status=="error"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updateRepository(o),["prevent"])},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),g(" Enable",-1)])],8,MN),[[Q,o?.status=="removed"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.showStatusMessage(o),["prevent"])},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),g(" View status message",-1)])],8,VN),[[Q,o?.statusMessage]]),t[71]||(t[71]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.removeCache(o),["prevent"])},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),g(" Remove cache",-1)])],8,qN),D(n("a",{class:"dropdown-item text-danger",href:"#",onClick:ae(d=>e.removeRepository(o),["prevent"])},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove",-1)])],8,_N),[[Q,o?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",$N,[t[73]||(t[73]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),t[74]||(t[74]=n("span",null,"No repositories match the current filters.",-1)),e.query.ready&&e.query.expired&&e.query.removed&&e.query.error&&e.query.preparing?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-outline-ink",onClick:t[18]||(t[18]=o=>e.showAllStatuses())},"Show all statuses"))])):f("v-if",!0)]),n("div",LN,[t[79]||(t[79]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",FN,[n("button",{class:"btn btn-sm",onClick:t[19]||(t[19]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),g(" Previous ",-1)])],8,UN),D(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,BN),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+c(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[20]||(t[20]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[76]||(t[76]=[g(" Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,zN)])):f("v-if",!0),n("span",HN,[t[78]||(t[78]=n("label",null,"Per page",-1)),D((a(),l("select",jN,[...t[77]||(t[77]=[Ee('',5)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var GN={class:"container paper-page admin-page"},WN={class:"paper-crumbs"},KN={class:"here"},YN={class:"paper-page-title"},XN={key:0,class:"user-detail-card"},JN={class:"user-header"},QN=["src"],ZN={class:"user-header-status"},xN={class:"status-dot-wrap"},eR=["textContent"],tR={key:0,class:"type-badge type-repo"},nR={class:"user-actions",style:{"margin-top":"4px"}},sR={class:"user-detail-grid"},oR={class:"detail-value mono-id"},iR={class:"detail-value"},rR=["href"],aR={class:"detail-value"},lR={class:"detail-value"},dR={key:0},uR={key:1,class:"text-muted"},cR={class:"detail-value"},pR={key:0,style:{"margin-top":"20px"}},fR={class:"paper-table w-100",style:{"margin-top":"10px"}},hR={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},mR={class:"cell-anon",role:"cell"},gR={class:"anon-text"},vR=["textContent"],yR={class:"cell-expires",role:"cell"},bR={key:1,class:"admin-section-header"},wR={class:"section-count"},kR={key:2,class:"user-detail-card"},CR={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},ER={key:0,class:"alert alert-warning",role:"alert"},SR={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},NR={key:1,class:"paper-table w-100"},RR={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},PR=["textContent"],AR=["textContent"],DR={role:"cell"},TR={key:0},OR={key:1,class:"text-muted"},IR={role:"cell"},MR=["onClick"],VR={key:2,class:"paper-table-empty"},qR={class:"admin-section-header"},_R={class:"section-count"},$R={class:"seg-bar"},LR={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},FR=["aria-checked"],UR={class:"count"},BR=["aria-checked"],zR={class:"count"},HR=["aria-checked"],jR={class:"count"},GR=["aria-checked"],WR={class:"count"},KR=["aria-checked"],YR={class:"count"},XR=["aria-checked"],JR={class:"count"},QR={class:"seg-countline",role:"status"},ZR={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},xR={class:"admin-filter-row"},e4={class:"search-wrap"},t4={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories or errors\u2026",autocomplete:"off"},n4={key:3,class:"bulk-bar"},s4={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},o4={class:"paper-table-head",role:"row"},i4={role:"columnheader",style:{width:"28px"}},r4=["checked"],a4={role:"columnheader"},l4={role:"columnheader"},d4={role:"columnheader",class:"num"},u4={role:"columnheader"},c4={role:"cell",style:{width:"28px"}},p4={type:"checkbox","aria-label":"Select repository"},f4={class:"cell-anon",role:"cell"},h4={class:"anon-text"},m4=["textContent","href"],g4=["title"],v4=["href"],y4=["textContent"],b4=["textContent"],w4=["data-meta-label"],k4=["title","textContent","href"],C4=["data-meta-label"],E4=["textContent","href"],S4=["data-meta-label"],N4={key:3,class:"meta-item"},R4={class:"meta-item"},P4={class:"cell-status",role:"cell"},A4={class:"status-line"},D4=["textContent"],T4=["textContent","title"],O4=["data-unit","textContent"],I4=["textContent"],M4={class:"cell-actions",role:"cell"},V4={class:"dropdown"},q4={class:"dropdown-menu dropdown-menu-right"},_4=["href"],$4=["href"],L4=["href"],F4=["onClick"],U4=["onClick"],B4=["onClick"],z4=["onClick"],H4=["onClick"],j4=["onClick"],G4={key:0,class:"paper-table-empty"};function sp(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",GN,[n("div",WN,[t[23]||(t[23]=n("a",{href:"/admin/"},"Admin",-1)),t[24]||(t[24]=g(" \xA0/\xA0 ",-1)),t[25]||(t[25]=n("a",{href:"/admin/users"},"Users",-1)),t[26]||(t[26]=g(" \xA0/\xA0 ",-1)),n("span",KN,c(e.userInfo?.username||"Profile"),1)]),n("h1",YN,c(e.userInfo?.username||"User"),1),t[93]||(t[93]=Ee('',1)),e.userInfo?(a(),l("div",XN,[n("div",JN,[e.userInfo?.photo?(a(),l("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,QN)):f("v-if",!0),n("div",null,[n("div",ZN,[n("span",xN,[n("span",{class:P(["status-dot","st-"+(e.userInfo?.status||"unknown")])},null,2),n("span",{textContent:c(e.fmt?.title(e.userInfo?.status))},null,8,eR)]),e.userInfo?.isAdmin?(a(),l("span",tR,"Admin")):f("v-if",!0)]),n("div",nR,[e.userInfo?.status!=="banned"&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:0,class:"btn btn-sm btn-outline-danger",onClick:t[0]||(t[0]=o=>e.banUser())},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),g(" Ban",-1)])])):f("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(a(),l("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=o=>e.activateUser())},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),g(" Activate",-1)])])):f("v-if",!0),e.userInfo?.isAdmin?f("v-if",!0):(a(),l("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=o=>e.promoteUser())},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-shield"})],-1),g(" Promote to admin",-1)])])),e.userInfo?.isAdmin&&e.userInfo?.username!==e.user?.username?(a(),l("button",{key:3,class:"btn btn-sm btn-outline-ink",onClick:t[3]||(t[3]=o=>e.demoteUser())},[...t[30]||(t[30]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-minus"})],-1),g(" Remove admin",-1)])])):f("v-if",!0)])])]),n("div",sR,[t[33]||(t[33]=n("div",{class:"detail-label"},"ID",-1)),n("div",oR,c(e.userInfo?._id),1),t[34]||(t[34]=n("div",{class:"detail-label"},"Email",-1)),n("div",{class:P(["detail-value",{"is-empty":!e.userInfo?.emails?.[0]?.email}])},c(e.userInfo?.emails?.[0]?.email||"Not shared"),3),t[35]||(t[35]=n("div",{class:"detail-label"},"Access token",-1)),n("div",{class:P(["detail-value",{"is-empty":!e.userInfo?.accessTokens?.github}]),style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},c(e.userInfo?.accessTokens?.github||"Not stored"),3),t[36]||(t[36]=n("div",{class:"detail-label"},"GitHub",-1)),n("div",iR,[n("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[31]||(t[31]=n("i",{class:"fab fa-github"},null,-1)),g(" "+c(e.userInfo?.username),1)],8,rR)]),t[37]||(t[37]=n("div",{class:"detail-label"},"Created",-1)),n("div",aR,c(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[38]||(t[38]=n("div",{class:"detail-label"},"Last connection",-1)),n("div",lR,[e.userInfo?.accessTokenDates?.github?(a(),l("span",dR,c(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):f("v-if",!0),e.userInfo?.accessTokenDates?.github?f("v-if",!0):(a(),l("span",uR,"Not recorded (GitHub App sign-in)"))]),t[39]||(t[39]=n("div",{class:"detail-label"},"GitHub repos",-1)),n("div",cR,[g(c(e.userInfo?.repositories?.length?e.userInfo.repositories.length+" repositories":"Not synced")+" ",1),e.userInfo?.repositories?.length?(a(),l("button",{key:0,class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=o=>e.showRepos=!e.showRepos)},c(e.showRepos?"Hide repos":"Show repos"),1)):f("v-if",!0),n("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=o=>e.getGitHubRepositories())},[...t[32]||(t[32]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Refresh ",-1)])])])]),e.showRepos?(a(),l("div",pR,[t[42]||(t[42]=n("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),n("div",fR,[(a(!0),l(q,null,x(e.userInfo?.repositories,(o,r)=>(a(),l("div",hR,[n("div",mR,[t[40]||(t[40]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",gR,[n("span",{class:"repo-name",textContent:c(o?.name)},null,8,vR)])]),n("div",yR,[t[41]||(t[41]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-database"})],-1)),g(" "+c(e.fmt?.humanFileSize(o?.size)),1)])]))),256))])])):f("v-if",!0)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",bR,[t[43]||(t[43]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-key"})]),g(" API tokens")],-1)),n("span",wR,c(e.tokens?.length),1)])):f("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(a(),l("div",kR,[t[49]||(t[49]=n("p",{class:"paper-page-lede"},[g("Personal API tokens for this admin account. Send as "),n("code",null,"Authorization: Bearer "),g(" to authenticate without GitHub OAuth (useful for development).")],-1)),D((a(),l("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=ae(o=>e.submitForm(o,()=>{e.createToken()}),["prevent"]))},[D(n("input",CR,null,512),[[s,{state:e.viewState,set:o=>{e.tokenForm.name=o},value:e.tokenForm?.name,form:null,options:{}}]]),t[44]||(t[44]=n("button",{type:"submit",class:"btn btn-ink"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})]),g(" Generate")],-1))],32)),[[i,e.viewState]]),e.tokenForm?.plaintext?(a(),l("div",ER,[t[45]||(t[45]=n("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),n("pre",SR,c(e.tokenForm?.plaintext),1),n("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=o=>e.tokenForm.plaintext=null)},"Dismiss")])):f("v-if",!0),e.tokens?.length?(a(),l("div",NR,[t[47]||(t[47]=n("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[n("div",{role:"columnheader"},"Name"),n("div",{role:"columnheader"},"Created"),n("div",{role:"columnheader"},"Last used"),n("div",{role:"columnheader","aria-label":"Actions"})],-1)),(a(!0),l(q,null,x(e.tokens,(o,r)=>(a(),l("div",RR,[n("div",{role:"cell",textContent:c(o?.name)},null,8,PR),n("div",{role:"cell",textContent:c(e.fmt?.humanTime(o?.createdAt))},null,8,AR),n("div",DR,[o?.lastUsedAt?(a(),l("span",TR,c(e.fmt?.humanTime(o?.lastUsedAt)),1)):f("v-if",!0),o?.lastUsedAt?f("v-if",!0):(a(),l("span",OR,"never"))]),n("div",IR,[n("button",{class:"btn btn-sm text-danger btn-icon",title:"Revoke","aria-label":"Revoke token",onClick:d=>e.revokeToken(o)},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)])],8,MR)])]))),256))])):f("v-if",!0),e.tokens?.length?f("v-if",!0):(a(),l("div",VR,[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No tokens yet.",-1)])]))])):f("v-if",!0),n("div",qR,[t[50]||(t[50]=n("h2",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})]),g(" Anonymized repositories")],-1)),n("span",_R,c(e.repositories?.length),1)]),n("div",$R,[n("div",LR,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="all"}]),"aria-checked":e.segView()==="all",onClick:t[8]||(t[8]=o=>e.setSegView("all"))},[t[51]||(t[51]=g("All ",-1)),n("span",UR,c(e.fmt?.number(e.segCount("all"))),1)],10,FR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="ready","is-empty":!e.segCount("ready")}]),"aria-checked":e.segView()==="ready",onClick:t[9]||(t[9]=o=>e.setSegView("ready"))},[t[52]||(t[52]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[53]||(t[53]=g("Ready ",-1)),n("span",zR,c(e.fmt?.number(e.segCount("ready"))),1)],10,BR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="preparing","is-empty":!e.segCount("preparing")}]),"aria-checked":e.segView()==="preparing",onClick:t[10]||(t[10]=o=>e.setSegView("preparing"))},[t[54]||(t[54]=n("span",{class:"seg-dot warn","aria-hidden":"true"},null,-1)),t[55]||(t[55]=g("Preparing ",-1)),n("span",jR,c(e.fmt?.number(e.segCount("preparing"))),1)],10,HR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="error","is-empty":!e.segCount("error")}]),"aria-checked":e.segView()==="error",onClick:t[11]||(t[11]=o=>e.setSegView("error"))},[t[56]||(t[56]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[57]||(t[57]=g("Error ",-1)),n("span",WR,c(e.fmt?.number(e.segCount("error"))),1)],10,GR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="expired","is-empty":!e.segCount("expired")}]),"aria-checked":e.segView()==="expired",onClick:t[12]||(t[12]=o=>e.setSegView("expired"))},[t[58]||(t[58]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[59]||(t[59]=g("Expiring / expired ",-1)),n("span",YR,c(e.fmt?.number(e.segCount("expired"))),1)],10,KR),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.segView()==="removed","is-empty":!e.segCount("removed")}]),"aria-checked":e.segView()==="removed",onClick:t[13]||(t[13]=o=>e.setSegView("removed"))},[t[60]||(t[60]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[61]||(t[61]=g("Removing / removed ",-1)),n("span",JR,c(e.fmt?.number(e.segCount("removed"))),1)],10,XR)]),n("p",QR,[n("strong",null,c(e.fmt.number(e.filteredRepositories?.length||0)),1),t[62]||(t[62]=g(" shown",-1))])]),D((a(),l("form",ZR,[n("div",xR,[n("div",e4,[D(n("input",t4,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),t[64]||(t[64]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[14]||(t[14]=o=>e.exportCsv())},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),g(" Export",-1)])])])])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",n4,[n("span",null,[n("strong",null,c(e.selectedCount()),1),t[65]||(t[65]=g(" selected",-1))]),n("button",{class:"btn btn-sm",type:"button",onClick:t[15]||(t[15]=o=>e.bulkRefresh())},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Force refresh",-1)])]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[16]||(t[16]=o=>e.bulkRemoveCache())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),g(" Remove cache",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[17]||(t[17]=o=>e.clearSelection())},"Clear")])):f("v-if",!0),n("div",s4,[n("div",o4,[n("div",i4,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[18]||(t[18]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,r4)]),n("div",a4,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[19]||(t[19]=o=>e.sortBy("source.repositoryName"))},[t[69]||(t[69]=g("Repository ",-1)),e.sortIcon("source.repositoryName")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("source.repositoryName")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[68]||(t[68]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",l4,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[20]||(t[20]=o=>e.sortBy("status"))},[t[71]||(t[71]=g("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[70]||(t[70]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",d4,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[21]||(t[21]=o=>e.sortBy("pageView"))},[t[73]||(t[73]=g("Views ",-1)),e.sortIcon("pageView")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("pageView")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[72]||(t[72]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("div",u4,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[22]||(t[22]=o=>e.sortBy("anonymizeDate"))},[t[75]||(t[75]=g("Anonymized ",-1)),e.sortIcon("anonymizeDate")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("anonymizeDate")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[74]||(t[74]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[76]||(t[76]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(q,null,x(e.filteredRepositories,(o,r)=>(a(),l("div",{class:P(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error","row-selected":e.selected[o?.repoId]}]),role:"row"},[n("div",c4,[D(n("input",p4,null,512),[[s,{state:e.viewState,set:d=>{e.selected[o.repoId]=d},value:e.selected[o?.repoId],form:null,options:{}}]])]),n("div",f4,[t[79]||(t[79]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Repository"},[n("use",{href:"#project-type-repo"})],-1)),n("div",h4,[n("a",{class:"repo-name",target:"_blank",textContent:c(o?.repoId),href:e.safeUrl("/r/"+o?.repoId)},null,8,m4),n("div",{class:"anon-sub anon-meta","data-meta-fit":"",title:[o?.source?.fullName||o?.source?.repositoryName,o?.options?.update?"branch "+o?.source?.branch:"commit "+o?.source?.commit?.substring(0,7),o?.conference?"conference "+o?.conference:"",o?.size?.storage>0?e.fmt?.humanFileSize(o?.size?.storage):"",e.fmt?.number(o?.options?.terms?.length)+(o?.options?.terms?.length===1?" term":" terms")].filter(Boolean).join(" \xB7 ")},[n("a",{class:"src-path",href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/")},[(o?.source?.fullName||"").includes("/")?(a(),l("span",{key:0,class:"src-owner",textContent:c((d=>d.length>16?d.slice(0,14)+"\u2026":d)((o?.source?.fullName||"").split("/")[0]))},null,8,y4)):f("v-if",!0),n("span",{class:"src-repo",textContent:c((o?.source?.fullName||"").includes("/")?"/"+(o?.source?.fullName||"").split("/").slice(1).join("/"):o?.source?.fullName)},null,8,b4)],8,v4),o?.options?.update?f("v-if",!0):(a(),l("span",{key:0,class:"meta-item","data-meta-label":"commit "+(o?.source?.commit||"").substring(0,7)},[n("a",{class:"mono-hash",title:o?.source?.commit,textContent:c(o?.source?.commit?.substring(0,7)),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.commit)},null,8,k4)],8,w4)),o?.options?.update?(a(),l("span",{key:1,class:"meta-item","data-meta-label":"branch "+(o?.source?.branch||"")},[n("a",{textContent:c(o?.source?.branch),href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/tree/"+o?.source?.branch)},null,8,E4)],8,C4)):f("v-if",!0),o?.conference?(a(),l("span",{key:2,class:"meta-item meta-conf","data-meta-label":"conference "+o?.conference},[t[77]||(t[77]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),g(" "+c(o?.conference),1)],8,S4)):f("v-if",!0),o?.size?.storage>0?(a(),l("span",N4,c(e.fmt?.humanFileSize(o?.size?.storage)),1)):f("v-if",!0),n("span",R4,c(e.fmt?.number(o?.options?.terms?.length))+" "+c(o?.options?.terms?.length===1?"term":"terms"),1),t[78]||(t[78]=n("span",{class:"meta-more",hidden:""},null,-1))],8,g4)])]),n("div",P4,[n("span",A4,[n("span",{class:P(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:c(e.fmt?.statusLabel(o?.status))},null,8,D4)]),o?.statusMessage?(a(),l("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,T4)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views",textContent:c(e.fmt?.number(o?.pageView||0))},null,8,O4),n("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(o?.anonymizeDate))},null,8,I4),n("div",M4,[n("div",V4,[t[91]||(t[91]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",q4,[n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit",-1)])],8,_4),n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},[...t[81]||(t[81]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View repo",-1)])],8,$4),o?.options?.page&&o?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+o?.repoId+"/")},[...t[82]||(t[82]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),g(" View page",-1)])],8,L4)):f("v-if",!0),n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.fetchGithubInfo(o),["prevent"])},[...t[83]||(t[83]=[n("i",{class:"fab fa-github"},null,-1),g(" Live GitHub info",-1)])],8,F4),t[89]||(t[89]=n("div",{class:"dropdown-divider"},null,-1)),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updateRepository(o),["prevent"])},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Force update",-1)])],8,U4),[[Q,o?.status=="ready"||o?.status=="error"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updateRepository(o),["prevent"])},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),g(" Enable",-1)])],8,B4),[[Q,o?.status=="removed"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.showStatusMessage(o),["prevent"])},[...t[86]||(t[86]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1),g(" View status message",-1)])],8,z4),[[Q,o?.statusMessage]]),t[90]||(t[90]=n("div",{class:"dropdown-divider"},null,-1)),n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.removeCache(o),["prevent"])},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-broom"})],-1),g(" Remove cache",-1)])],8,H4),D(n("a",{class:"dropdown-item text-danger",href:"#",onClick:ae(d=>e.removeRepository(o),["prevent"])},[...t[88]||(t[88]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove",-1)])],8,j4),[[Q,o?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(a(),l("div",G4,[...t[92]||(t[92]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No repositories match the current filters.",-1)])])):f("v-if",!0)])])}var W4={class:"container paper-page admin-page"},K4={class:"seg-bar"},Y4={class:"seg-filter",role:"radiogroup","aria-label":"Filter by status"},X4=["aria-checked"],J4={class:"count"},Q4=["aria-checked"],Z4={class:"count"},x4=["aria-checked"],eP={class:"count"},tP=["aria-checked"],nP={class:"count"},sP={class:"seg-countline",role:"status"},oP={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},iP={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},rP={class:"admin-filter-row"},aP={class:"search-wrap"},lP={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},dP={key:0,class:"admin-search-hint"},uP={class:"admin-filter-inline"},cP={class:"form-control form-control-sm"},pP={key:0,class:"admin-filter-inline","aria-label":"Pagination"},fP=["disabled"],hP={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},mP=["disabled"],gP={key:0,class:"admin-filter-row"},vP={class:"admin-active-chips"},yP={class:"key"},bP=["onClick"],wP={key:1,class:"bulk-bar"},kP={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},CP={class:"paper-table-head admin-users-row",role:"row"},EP={role:"columnheader",style:{width:"28px"}},SP=["checked"],NP={role:"columnheader"},RP={role:"columnheader"},PP={role:"cell",style:{width:"28px"}},AP={type:"checkbox","aria-label":"Select user"},DP={class:"cell-anon",role:"cell"},TP=["src"],OP={key:1,class:"avatar-fallback","aria-hidden":"true"},IP={class:"anon-text"},MP={class:"user-name-line"},VP=["textContent","href"],qP=["href","title","aria-label"],_P={class:"anon-sub meta-dots"},$P=["title"],LP={key:1},FP={class:"cell-views num",role:"cell"},UP=["title","textContent","href"],BP={class:"cell-status",role:"cell"},zP=["textContent"],HP={class:"cell-status",role:"cell"},jP={key:0,class:"role-pill"},GP={key:1,class:"empty-dash"},WP={class:"cell-actions",role:"cell"},KP={class:"dropdown"},YP={class:"dropdown-menu dropdown-menu-right"},XP=["href"],JP=["href"],QP=["onClick"],ZP=["onClick"],xP={key:0,class:"paper-table-empty"},eA={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},tA={key:0,class:"pagination-compact"},nA=["disabled"],sA=["max"],oA=["disabled"],iA={class:"admin-filter-inline"},rA={class:"form-control form-control-sm"};function op(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",W4,[t[53]||(t[53]=Ee('
Admin \xA0/\xA0 Users

Users

',3)),n("div",K4,[n("div",Y4,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:!e.query?.status}]),"aria-checked":!e.query?.status,onClick:t[0]||(t[0]=o=>{e.query.status="",e.query.page=1})},[t[14]||(t[14]=g("All ",-1)),n("span",J4,c(e.fmt?.number(e.statusCountFor("active")+e.statusCountFor("banned")+e.statusCountFor("removed"))),1)],10,X4),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.query?.status==="active","is-empty":!e.statusCountFor("active")}]),"aria-checked":e.query?.status==="active",onClick:t[1]||(t[1]=o=>{e.query.status="active",e.query.page=1})},[t[15]||(t[15]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[16]||(t[16]=g("Active ",-1)),n("span",Z4,c(e.fmt?.number(e.statusCountFor("active"))),1)],10,Q4),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.query?.status==="banned","is-empty":!e.statusCountFor("banned")}]),"aria-checked":e.query?.status==="banned",onClick:t[2]||(t[2]=o=>{e.query.status="banned",e.query.page=1})},[t[17]||(t[17]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[18]||(t[18]=g("Banned ",-1)),n("span",eP,c(e.fmt?.number(e.statusCountFor("banned"))),1)],10,x4),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.query?.status==="removed","is-empty":!e.statusCountFor("removed")}]),"aria-checked":e.query?.status==="removed",onClick:t[3]||(t[3]=o=>{e.query.status="removed",e.query.page=1})},[t[19]||(t[19]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[20]||(t[20]=g("Removed ",-1)),n("span",nP,c(e.fmt?.number(e.statusCountFor("removed"))),1)],10,tP)]),n("p",sP,[n("strong",null,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[21]||(t[21]=g(" shown",-1))])]),e.fetchError?(a(),l("div",oP,[t[22]||(t[22]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.fetchError),1)])):f("v-if",!0),D((a(),l("form",iP,[n("div",rP,[n("div",aP,[D(n("input",lP,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]]),e.query?.search?f("v-if",!0):(a(),l("span",dP,"/"))]),n("span",uP,[t[24]||(t[24]=n("label",null,"Role",-1)),D((a(),l("select",cP,[...t[23]||(t[23]=[n("option",{value:""},"Any",-1),n("option",{value:"admin"},"Admin",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.role=o},value:e.query?.role,form:null,options:{}}]])]),t[28]||(t[28]=n("span",{class:"admin-filter-spacer"},null,-1)),n("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=o=>e.exportCsv())},[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-export"})],-1),g(" Export",-1)])]),e.totalPage>1?(a(),l("span",pP,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[5]||(t[5]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[26]||(t[26]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,fP),n("span",hP,c(e.query?.page)+"/"+c(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[6]||(t[6]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,mP)])):f("v-if",!0)]),e.chips?.length?(a(),l("div",gP,[n("div",vP,[(a(!0),l(q,null,x(e.chips,(o,r)=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",yP,c(o?.label),1),n("span",null,c(o?.value),1),n("button",{type:"button",onClick:d=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[29]||(t[29]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,bP)]))),128))])])):f("v-if",!0)])),[[i,e.viewState]]),e.selectedCount()>0?(a(),l("div",wP,[n("span",null,[n("strong",null,c(e.selectedCount()),1),t[30]||(t[30]=g(" selected",-1))]),n("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[7]||(t[7]=o=>e.bulkBan())},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),g(" Ban",-1)])]),n("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=o=>{e.selected={},e.allSelected=!1})},"Clear")])):f("v-if",!0),n("div",kP,[n("div",CP,[n("div",EP,[n("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[9]||(t[9]=o=>e.selectAllOnPage()),checked:e.allSelected},null,8,SP)]),n("div",NP,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="username"}]),onClick:t[10]||(t[10]=o=>e.sortBy("username"))},[t[33]||(t[33]=g("User ",-1)),e.sortIcon("username")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("username")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[32]||(t[32]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[36]||(t[36]=n("div",{role:"columnheader",class:"num",title:"Repositories discovered on the user's GitHub account"},"GitHub repos",-1)),n("div",RP,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="status"}]),onClick:t[11]||(t[11]=o=>e.sortBy("status"))},[t[35]||(t[35]=g("Status ",-1)),e.sortIcon("status")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("status")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[34]||(t[34]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[37]||(t[37]=n("div",{role:"columnheader"},"Role",-1)),t[38]||(t[38]=n("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(a(!0),l(q,null,x(e.filteredUsers,(o,r)=>(a(),l("div",{class:P(["paper-table-row admin-users-row",{"row-selected":e.selected[o?.username]}]),role:"row"},[n("div",PP,[D(n("input",AP,null,512),[[s,{state:e.viewState,set:d=>{e.selected[o.username]=d},value:e.selected[o?.username],form:null,options:{}}]])]),n("div",DP,[o?.photo?(a(),l("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(o?.photo)},null,8,TP)):(a(),l("span",OP,c((o?.username||"?").charAt(0).toUpperCase()),1)),n("div",IP,[n("span",MP,[n("a",{class:"repo-name",textContent:c(o?.username),href:e.safeUrl("/admin/users/"+o?.username)},null,8,VP),n("a",{class:"user-gh-link",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+o?.username),title:o?.username+" on GitHub","aria-label":o?.username+" on GitHub"},[...t[39]||(t[39]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)])],8,qP)]),n("div",_P,[o?.emails?.[0]?.email?(a(),l("span",{key:0,class:"meta-email meta-tail",title:o?.emails?.[0]?.email},c(o?.emails?.[0]?.email),9,$P)):f("v-if",!0),o?.dateOfEntry?(a(),l("span",LP,"Joined "+c(e.fmt?.humanTime(o?.dateOfEntry)),1)):f("v-if",!0)])])]),n("div",FP,[t[40]||(t[40]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("a",{title:o?.repoCount?"Show this user\u2019s repositories":"Repositories not synced yet",textContent:c(o?.repoCount?e.fmt?.number(o.repoCount):"Not synced"),class:P({"is-unsynced":!o?.repoCount}),href:e.safeUrl("/admin/repositories?owner="+o?.username)},null,10,UP)]),n("div",BP,[n("span",{class:P(["status-dot","st-"+(o?.status||"unknown")])},null,2),n("span",{textContent:c(e.fmt?.title(o?.status))},null,8,zP)]),n("div",HP,[o?.isAdmin?(a(),l("span",jP,"Admin")):f("v-if",!0),o?.isAdmin?f("v-if",!0):(a(),l("span",GP,"\u2014"))]),n("div",WP,[n("div",KP,[t[46]||(t[46]=n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})])],-1)),n("div",YP,[n("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+o?.username)},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View details",-1)])],8,XP),n("a",{class:"dropdown-item",href:e.safeUrl("/admin/repositories?owner="+o?.username)},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),g(" View repositories",-1)])],8,JP),t[45]||(t[45]=n("div",{class:"dropdown-divider"},null,-1)),D(n("a",{class:"dropdown-item text-danger",href:"#",onClick:ae(d=>e.banUser(o),["prevent"])},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-ban"})],-1),g(" Ban",-1)])],8,QP),[[Q,o?.status=="active"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.activateUser(o),["prevent"])},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),g(" Activate",-1)])],8,ZP),[[Q,o?.status=="removed"||o?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(a(),l("div",xP,[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No users match the current filters.",-1)])])):f("v-if",!0)]),n("div",eA,[t[52]||(t[52]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",tA,[n("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[48]||(t[48]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),g(" Previous",-1)])],8,nA),D(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,sA),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+c(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[49]||(t[49]=[g("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,oA)])):f("v-if",!0),n("span",iA,[t[51]||(t[51]=n("label",null,"Per page",-1)),D((a(),l("select",rA,[...t[50]||(t[50]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])])}var aA={class:"anonymize-landing"},lA={class:"anonymize-landing-inner"},dA={class:"form-group mt-4 mb-2"},uA={class:"source-url-label-row"},cA={key:0,class:"repo-access","aria-label":"GitHub access"},pA={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},fA=["aria-pressed","disabled"],hA=["aria-pressed","disabled"],mA={key:1,class:"connection-badge"},gA={class:"landing-url-row"},vA={id:"sourceUrl-landing",onblur:"this.scrollLeft=0",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},yA=["aria-disabled"],bA={key:0,class:"text-danger",role:"alert"},wA={class:"repo-picker","aria-labelledby":"repo-picker-title"},kA={class:"repo-picker-head"},CA={class:"repo-picker-title"},EA={key:0,class:"repo-picker-count","aria-live":"polite"},SA={key:0,class:"repo-picker-list","aria-busy":"true","aria-label":"Loading your repositories"},NA={class:"repo-picker-row is-skeleton","aria-hidden":"true"},RA={key:1,class:"repo-picker-list"},PA=["title"],AA={class:"repo-picker-owner"},DA={class:"repo-picker-repo"},TA=["onClick","aria-label"],OA={key:2,class:"repo-picker-state"},IA={key:3,class:"repo-picker-state"},MA={key:4,class:"repo-picker-state",role:"alert"},VA={key:5,class:"repo-access-details","aria-label":"GitHub access"},qA={class:"repo-access-main"},_A={class:"repo-access-controls"},$A={key:0,class:"access-q"},LA={key:2,class:"connection-link",href:"/connections"},FA={class:"repo-access-note"},UA={key:0},BA={class:"anonymize-workspace"},zA={class:"anonymize-topbar"},HA={class:"anonymize-topbar-inner"},jA={class:"paper-crumbs"},GA={class:"here"},WA={class:"anonymize-topbar-head"},KA={class:"paper-page-title anonymize-topbar-title"},YA={key:0},XA={key:1},JA={class:"paper-page-lede anonymize-topbar-lede"},QA={key:0,class:"task-trail flow-trail","aria-label":"Anonymization steps"},ZA={key:0,class:"alert alert-info",role:"status"},xA={key:1,class:"alert alert-info",role:"status"},eD={key:1},tD={class:"anonymize-mobile-tabs",role:"tablist","aria-label":"Anonymization workspace"},nD=["aria-selected","tabindex"],sD=["aria-selected","tabindex"],oD={class:"anonymize-split"},iD=["role","aria-labelledby"],rD={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},aD={class:"anonymize-fields"},lD={class:"paper-settings-section"},dD={class:"form-group"},uD={class:"source-url-label-row"},cD={key:0,class:"repo-access","aria-label":"GitHub access"},pD={key:0,class:"repo-access-switch",role:"group","aria-label":"Repository connection"},fD=["aria-pressed","disabled"],hD=["aria-pressed","disabled"],mD={key:1,class:"connection-badge"},gD=["disabled"],vD={key:0,class:"source-summary"},yD={class:"invalid-feedback"},bD={class:"invalid-feedback"},wD={class:"invalid-feedback"},kD={class:"invalid-feedback"},CD={key:0,class:"repo-access-details","aria-label":"Previous repository configuration"},ED={key:0,class:"form-group"},SD=["value"],ND={key:1},RD={class:"repo-access-controls"},PD=["href"],AD={key:1,class:"repo-access-details","aria-label":"GitHub access"},DD={class:"repo-access-main"},TD={class:"repo-access-controls"},OD={key:0,class:"access-q"},ID={key:2,class:"connection-link",href:"/connections"},MD={class:"repo-access-note"},VD={key:0},qD={key:1},_D=["open"],$D={key:0,class:"repair-step"},LD=["disabled"],FD={key:0,role:"status"},UD={class:"repair-step"},BD={key:0,role:"status"},zD={key:3,class:"form-grid-2"},HD={class:"form-group"},jD={class:"input-group"},GD={class:"form-control",id:"branch",name:"branch"},WD=["textContent","value"],KD={class:"input-group-append"},YD={class:"form-group"},XD=["disabled"],JD={class:"invalid-feedback"},QD={class:"invalid-feedback"},ZD={class:"form-check-input",type:"checkbox",id:"update",name:"update","aria-describedby":"update-help"},xD={class:"form-check-label",for:"update"},eT={key:0,class:"paid-tag"},tT={key:0,class:"form-text text-muted",id:"update-help"},nT={key:1,class:"form-text text-muted auto-update-paid",id:"update-help"},sT={class:"paper-settings-section"},oT={class:"form-group"},iT=["disabled"],rT={class:"form-text text-muted anon-url-echo"},aT={class:"anon-url-id"},lT={class:"invalid-feedback"},dT={class:"form-group"},uT=["disabled"],cT={class:"form-text text-muted anon-url-echo"},pT={class:"anon-url-id"},fT={class:"invalid-feedback"},hT={class:"form-group"},mT=["disabled"],gT={class:"form-text text-muted anon-url-echo"},vT={class:"anon-url-id"},yT={class:"invalid-feedback"},bT={class:"form-group"},wT=["rows"],kT={class:"redaction-syntax"},CT={class:"form-text text-muted"},ET=["onClick"],ST={key:0,class:"term-hint-more"},NT={class:"invalid-feedback"},RT={class:"preserve-row"},PT={class:"preserve-row-text"},AT={class:"preserve-row-value"},DT=["disabled"],TT={class:"preserve-tree"},OT={key:0,class:"preserve-status"},IT={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},MT=["aria-expanded","aria-label","onClick"],VT={key:1,class:"preserve-caret-space"},qT=["id","aria-label","checked",".indeterminate","disabled","onChange"],_T=["for","onClick"],$T={key:2,class:"preserve-note"},LT={key:0,class:"preserve-status"},FT={key:0,class:"preserve-status"},UT=["open"],BT={class:"preserve-foot"},zT={class:"preserve-count","aria-live":"polite"},HT={class:"preserve-actions"},jT={class:"paper-settings-section"},GT={class:"form-check"},WT={class:"form-check-input",type:"checkbox",id:"link",name:"link"},KT={class:"form-check"},YT={class:"form-check-input",type:"checkbox",id:"image",name:"image"},XT={class:"form-check"},JT={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},QT={class:"form-check"},ZT={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},xT={class:"form-check"},e3=["disabled"],t3={key:0,class:"form-text text-muted"},n3={key:1,class:"form-text text-muted"},s3={key:0,class:"form-text text-muted"},o3={class:"form-check"},i3={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},r3={class:"form-check"},a3={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},l3={class:"form-check"},d3={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},u3={class:"form-check"},c3={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},p3={class:"form-check"},f3={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},h3={class:"form-check"},m3={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},g3={class:"form-check"},v3={class:"form-check-input",type:"checkbox",id:"title",name:"title"},y3={class:"form-check"},b3={class:"form-check-input",type:"checkbox",id:"body",name:"body"},w3={class:"form-check"},k3={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},C3={class:"form-check"},E3={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},S3={class:"form-check"},N3={class:"form-check-input",type:"checkbox",id:"username",name:"username"},R3={class:"form-check"},P3={class:"form-check-input",type:"checkbox",id:"date",name:"date"},A3={class:"form-check"},D3={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},T3={class:"paper-settings-section hosting-settings",id:"repository-hosting","aria-labelledby":"hosting-heading"},O3={class:"form-group conference-field"},I3=["href"],M3={class:"invalid-feedback"},V3={class:"form-text text-muted"},q3={key:0,class:"hosting-usage"},_3={key:0},$3={key:1},L3={key:2},F3={key:1,class:"hosting-limit auto-update-note",role:"status"},U3={key:2,class:"hosting-payment"},B3={key:0,class:"hosting-limit",role:"status"},z3={key:1,class:"hosting-options"},H3={class:"hosting-options-title"},j3=["value","checked","onChange"],G3={class:"hosting-option-body"},W3={key:0,class:"hosting-cycle billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},K3=["aria-checked","onClick"],Y3={key:0,class:"billing-toggle-save"},X3={class:"hosting-option-price"},J3={key:2,role:"status"},Q3={key:3,class:"hosting-terms"},Z3={key:4,class:"hosting-terms"},x3={key:5,class:"capacity-options"},eO=["disabled"],tO={key:3,class:"hosting-subhead"},nO={class:"expiration-choices"},sO={class:"expiration-choice"},oO=["checked","disabled"],iO={key:0,class:"dated-options"},rO={key:0,class:"hosting-date"},aO=["min","max"],lO={key:0,class:"date-echo","aria-live":"polite"},dO={class:"invalid-feedback"},uO={class:"invalid-feedback"},cO={class:"hosting-property"},pO={key:1,class:"expiration-choice"},fO=["checked","disabled"],hO={key:0},mO={key:4,class:"form-text text-muted"},gO={key:5,class:"inline-hosting"},vO={key:0,role:"alert",class:"text-danger"},yO={key:1,role:"alert",class:"text-danger"},bO=["disabled"],wO={key:2,role:"status"},kO={key:3,role:"status",class:"form-text text-muted"},CO={key:4,class:"hosting-terms"},EO={key:5,class:"hosting-terms"},SO={key:6,class:"repository-pass"},NO=["disabled","onClick"],RO={class:"paper-settings-section"},PO={class:"form-group"},AO={style:{position:"relative"}},DO={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},TO={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},OO=["onClick"],IO=["src"],MO=["textContent"],VO=["textContent"],qO={class:"coauthor-list"},_O={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},$O=["src"],LO=["textContent","href"],FO=["onClick"],UO={class:"form-text text-muted"},BO=["textContent"],zO={class:"anonymize-submit-bar"},HO=["disabled"],jO=["disabled"],GO=["disabled"],WO=["disabled"],KO=["disabled"],YO=["disabled"],XO={key:5,class:"submit-reason",role:"status"},JO={key:6,class:"submit-reason",role:"status"},QO={key:7,class:"checkout-return-note"},ZO={key:8,class:"draft-status",role:"status"},xO={key:9,class:"draft-status"},eI=["role","aria-labelledby"],tI={class:"rp-caption"},nI=["aria-expanded"],sI=["title"],oI={class:"redact-slot","aria-hidden":"true"},iI={key:2,class:"rp-count rp-count-none"},rI=["href"],aI=["aria-pressed"],lI={class:"rp-open-icon",viewBox:"0 0 16 16","aria-hidden":"true"},dI={key:0,d:"M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9"},uI={key:1,d:"M13.5 6.5h-4v-4M9.5 6.5 14 2M2.5 9.5h4v4M6.5 9.5 2 14"},cI={class:"rp-window"},pI={class:"rp-chrome","aria-hidden":"true"},fI={class:"rp-url"},hI={class:"rp-bar","aria-hidden":"true"},mI={key:0,class:"rp-bar-id"},gI={key:1,class:"rp-bar-kind"},vI={class:"leftCol-head"},yI={class:"leftCol-body"},bI={key:0,class:"rp-state rp-loading",role:"status"},wI={class:"rp-state-text"},kI={class:"rp-state rp-error",role:"alert"},CI={class:"rp-state-actions"},EI={key:1,class:"btn btn-outline-ink btn-sm",href:"/connections"},SI={key:2,class:"rp-state rp-error",role:"alert"},NI={class:"rp-state-actions"},RI={class:"rp-state rp-error",role:"alert"},PI={class:"rp-state-actions"},AI={class:"rp-state rp-error",role:"alert"},DI={class:"rp-state-actions"},TI={key:5,class:"rp-state rp-empty"},OI={key:7,class:"anonymize-preview-body"},II={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},MI={class:"pr-title mb-1"},VI={key:0},qI=["textContent"],_I={key:0},$I={key:1},LI={key:2},FI={class:"pr-comments mt-3"},UI={class:"pr-comment"},BI={class:"pr-comment-head"},zI=["textContent"],HI={key:0,class:"pr-comment-date"},jI={key:3},GI={class:"pr-comments"},WI={class:"pr-comment"},KI={class:"pr-comment-head"},YI={key:0,class:"pr-comment-author"},XI=["textContent"],JI=["textContent"],QI={key:0,class:"pr-comment-body"},ZI={key:8,class:"anonymize-preview-body"},xI={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},e5={class:"pr-title mb-1"},t5={key:0},n5=["textContent"],s5={key:0},o5={key:1,class:"pr-body"},i5={key:2,class:"paper-tabs",role:"tablist"},r5=["aria-selected","tabindex"],a5=["aria-selected","tabindex"],l5=["textContent"],d5={key:3,class:"anonymize-preview-status"},u5={class:"paper-tab-content"},c5={key:0,role:"tabpanel",id:"preview-pr-diff-panel","aria-labelledby":"preview-pr-diff-tab"},p5=["innerHTML"],f5={key:1,role:"tabpanel",id:"preview-pr-comments-panel","aria-labelledby":"preview-pr-comments-tab"},h5={class:"pr-comments"},m5={class:"pr-comment"},g5={class:"pr-comment-head"},v5={key:0,class:"pr-comment-author"},y5=["textContent"],b5=["textContent"],w5={key:0,class:"pr-comment-body"},k5={key:9,class:"rp-more"},C5=["href"],E5={key:2,class:"rp-more-btn is-hint","aria-hidden":"true"};function ip(e,t){let s=Xe("tree"),i=Xe("partial-view"),o=Xe("gist-file"),r=Xe("markdown"),d=Ae("field"),p=Ae("form");return a(),l("div",{class:P(["anonymize-page h-100",{"mobile-preview-active":e.mobilePane==="preview","preview-expanded":e.previewExpanded}])},[f(" ===== STATE 1: No URL \u2014 centered input ===== "),D(n("div",aA,[n("div",lA,[t[70]||(t[70]=Ee('
My work \xA0/\xA0 New anonymization

New anonymization

Paste a repository, pull request, or gist URL, or pick one of your repositories. You\u2019ll choose the terms to redact next.

  1. 1. Repository
  2. 2. Review and hosting
  3. 3. Review link
',2)),n("div",dA,[n("div",uA,[t[61]||(t[61]=n("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",cA,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",pA,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[0]||(t[0]=u=>e.chooseGitHubConnection("github-app"))},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),g(),n("span",{class:"sr-only"},"Read-only ",-1),g("GitHub App",-1)])],8,fA),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[1]||(t[1]=u=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,hA)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",mA,c((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),n("div",gA,[D(n("input",vA,null,512),[[d,{state:e.viewState,set:u=>{e.sourceUrl=u},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),n("button",{type:"button",class:"btn btn-primary landing-continue","aria-disabled":e.sourceUrl?.trim()?null:"true",onClick:t[2]||(t[2]=u=>e.sourceUrl?.trim()&&e.urlSelected())},"Continue",8,yA)])]),e.sourceUrlError?(a(),l("p",bA,c(e.sourceUrlError),1)):f("v-if",!0),t[71]||(t[71]=n("small",{class:"form-text landing-help",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1)),n("section",wA,[n("div",kA,[n("div",CA,[t[63]||(t[63]=n("h2",{id:"repo-picker-title"},"Your repositories",-1)),e.userReposStatus==="ready"&&e.userRepos.length>0?(a(),l("span",EA,[e.userRepoFilter&&e.filteredUserRepos().length!==e.userRepos.length?(a(),l(q,{key:0},[g(c(e.filteredUserRepos().length)+" of ",1)],64)):f("v-if",!0),g(c(e.userRepos.length)+" "+c(e.userRepos.length===1?"repository":"repositories"),1),t[62]||(t[62]=n("span",{class:"repo-picker-more"},[n("span",{class:"repo-picker-more-sep"}," \xB7 "),g("scroll for more")],-1))])):f("v-if",!0)]),e.userReposStatus==="ready"&&e.userRepos.length>0?D((a(),l("input",{key:0,type:"search",class:"form-control repo-picker-filter",placeholder:"Filter\u2026","aria-label":"Filter your repositories",autocomplete:"off","onUpdate:modelValue":t[3]||(t[3]=u=>e.userRepoFilter=u)},null,512)),[[pt,e.userRepoFilter]]):f("v-if",!0)]),e.userReposStatus==="loading"||e.userReposStatus==="idle"?(a(),l("ul",SA,[(a(),l(q,null,x([1,2,3,4],(u,y)=>n("li",NA,[n("span",{class:"skeleton skeleton-line",style:Ie({width:34+u*9+"%"})},null,4)])),64))])):f("v-if",!0),e.userReposStatus==="ready"&&e.filteredUserRepos().length>0?(a(),l("ul",RA,[(a(!0),l(q,null,x(e.filteredUserRepos(),(u,y)=>(a(),l("li",{key:u.id||u.fullName,class:"repo-picker-row"},[t[65]||(t[65]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),n("span",{class:"repo-picker-name",title:u.fullName},[n("span",AA,[g(c(u.fullName.split("/")[0]),1),t[64]||(t[64]=n("span",{class:"repo-picker-slash"},"/",-1))]),n("span",DA,c(u.fullName.split("/").slice(1).join("/")),1)],8,PA),n("button",{type:"button",class:"btn btn-outline-ink btn-sm repo-picker-select",onClick:m=>e.selectUserRepo(u),"aria-label":"Select "+u.fullName},"Select",8,TA)]))),128))])):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length>0&&e.filteredUserRepos().length===0?(a(),l("p",OA,"No repository matches \u201C"+c(e.userRepoFilter)+"\u201D.",1)):f("v-if",!0),e.userReposStatus==="ready"&&e.userRepos.length===0?(a(),l("p",IA,"No repositories found for your GitHub account. Paste a URL above, or grant access below.")):f("v-if",!0),e.userReposStatus==="error"?(a(),l("p",MA,[t[66]||(t[66]=g("Your repositories could not be loaded. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[4]||(t[4]=u=>e.loadUserRepos(!0))},"Try again")])):f("v-if",!0),!e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected?(a(),l("aside",VA,[n("div",qA,[n("div",_A,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(a(),l("span",$A,"Repository not listed?")):f("v-if",!0),e.detectedType!=="gist"&&e.githubConnection!=="oauth"?(a(),l("button",{key:1,type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=u=>e.grantGitHubAccess())},[...t[67]||(t[67]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(a(),l("a",LA,[...t[68]||(t[68]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0)])]),n("div",FA,[e.error&&e.detectedType!=="gist"&&e.githubConnection==="github-app"?(a(),l("span",UA,"Signing in does not grant access to private repositories. Use Manage GitHub access to select this repository, then return here. Organization access may require administrator approval.")):f("v-if",!0),t[69]||(t[69]=n("span",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),g(" Anonymized content is public, even from private repositories.")],-1))])])):f("v-if",!0)])])],512),[[Q,!e.workspaceOpen&&!e.isUpdate]]),f(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),D(n("div",BA,[n("header",zA,[n("div",HA,[n("div",jA,[t[72]||(t[72]=n("a",{href:"/dashboard"},"My work",-1)),t[73]||(t[73]=g(" \xA0/\xA0 ",-1)),n("span",GA,c(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),n("div",WA,[n("h1",KA,[e.isUpdate?f("v-if",!0):(a(),l("span",YA,"New anonymization")),e.isUpdate?(a(),l("span",XA,"Edit anonymization")):f("v-if",!0)]),D(n("span",{class:P(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},c(e.detectedType==="repo"?"Repository":e.detectedType==="pr"?"Pull request":"Gist"),3),[[Q,e.detectedType]])]),n("p",JA,c(e.isUpdate?"Changes apply to the existing anonymous link; reviewers keep the same URL.":"Choose the terms to redact, what reviewers see, and when the link expires."),1),e.isUpdate?f("v-if",!0):(a(),l("ol",QA,[...t[74]||(t[74]=[n("li",null,"1. Repository",-1),n("li",{"aria-current":"step"},"2. Review and hosting",-1),n("li",null,"3. Review link",-1)])]))])]),e.detectedType==="gist"&&e.gistAppRequired?(a(),l("aside",ZA,[t[75]||(t[75]=n("p",null,"Reconnect your GitHub account to read this gist. Your draft will be restored when you return.",-1)),n("button",{type:"button",class:"btn btn-ink",onClick:t[6]||(t[6]=u=>e.connectGistApp())},"Connect GitHub App to access gists")])):f("v-if",!0),e.detectedType==="gist"&&e.gistOAuthRequired?(a(),l("aside",xA,[t[76]||(t[76]=n("p",null,"Connect GitHub OAuth to access gists. Your account and existing anonymizations stay the same, and your draft will be restored when you return.",-1)),t[77]||(t[77]=n("p",null,"GitHub's legacy OAuth connection includes write access to private repositories.",-1)),e.githubConnections?.oauthEnabled?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[7]||(t[7]=u=>e.connectGistOAuth())},"Connect GitHub OAuth to access gists")):(a(),l("p",eD,"GitHub OAuth is currently unavailable. Please try again later."))])):f("v-if",!0),n("nav",tD,[n("button",{id:"workspace-settings-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="settings","aria-controls":"workspace-settings",tabindex:e.mobilePane==="settings"?0:-1,onKeydown:t[8]||(t[8]=u=>e.previewTabKeydown(u)),onClick:t[9]||(t[9]=u=>e.selectMobilePane("settings"))},[...t[78]||(t[78]=[n("span",{class:"tab-label"},"Settings",-1)])],40,nD),n("button",{id:"workspace-preview-tab",role:"tab",type:"button","aria-selected":e.mobilePane==="preview","aria-controls":"workspace-preview",tabindex:e.mobilePane==="preview"?0:-1,onKeydown:t[10]||(t[10]=u=>e.previewTabKeydown(u)),onClick:t[11]||(t[11]=u=>e.selectMobilePane("preview"))},[...t[79]||(t[79]=[n("span",{class:"tab-label"},"Reviewer preview",-1)])],40,sD)]),n("div",oD,[f(" Form column (left) "),n("div",{id:"workspace-settings",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-settings-tab":null,class:"anonymize-form-col overflow-auto"},[D((a(),l("form",rD,[n("div",aD,[n("section",lD,[t[99]||(t[99]=n("h2",{class:"paper-section-eyebrow"},"Source & access",-1)),n("div",dD,[n("div",uD,[t[81]||(t[81]=n("label",{class:"paper-field-label",for:"sourceUrl"},"Source URL",-1)),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected&&e.githubConnections.oauthConnected?(a(),l("aside",cD,[!e.isUpdate&&e.detectedType!=="gist"?(a(),l("div",pD,[n("button",{type:"button","aria-pressed":e.githubConnection==="github-app",disabled:e.githubConnection==="github-app",onClick:t[12]||(t[12]=u=>e.chooseGitHubConnection("github-app"))},[...t[80]||(t[80]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),g(),n("span",{class:"sr-only"},"Read-only ",-1),g("GitHub App",-1)])],8,fD),n("button",{type:"button","aria-pressed":e.githubConnection==="oauth",disabled:e.githubConnection==="oauth",onClick:t[13]||(t[13]=u=>e.chooseGitHubConnection("oauth"))},"Legacy OAuth",8,hD)])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"?(a(),l("span",mD,c((e.detectedType==="gist"?e.githubConnections?.gistConnection==="github-app":e.githubConnection==="github-app")?"Read-only GitHub App":"Legacy OAuth"),1)):f("v-if",!0)])):f("v-if",!0)]),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",onblur:"this.scrollLeft=0",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,gD),[[d,{state:e.viewState,set:u=>{e.sourceUrl=u},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),e.sourceSummary()&&!e.anonymize?.sourceUrl?.invalid?(a(),l("p",vD,[t[82]||(t[82]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check"})],-1)),g(c(e.sourceSummary()),1)])):f("v-if",!0),D(n("div",yD," Please provide a valid GitHub URL. ",512),[[Q,e.anonymize?.sourceUrl?.errors?.github]]),D(n("div",bD," Not accessible. The organization may restrict access. ",512),[[Q,e.anonymize?.sourceUrl?.errors?.access]]),D(n("div",wD," Does not exist or is not accessible. ",512),[[Q,e.anonymize?.sourceUrl?.errors?.missing]]),D(n("div",kD," Already anonymized. ",512),[[Q,e.anonymize?.sourceUrl?.errors?.used]])]),!e.isUpdate&&e.previousConfigurations.length?(a(),l("aside",CD,[t[84]||(t[84]=n("p",{role:"status"},"You have already anonymized this repository. Use the existing configuration to keep its anonymous link and avoid creating another repository.",-1)),e.previousConfigurations.length>1?(a(),l("div",ED,[t[83]||(t[83]=n("label",{class:"paper-field-label",for:"previousConfiguration"},"Previous anonymization",-1)),D(n("select",{id:"previousConfiguration",class:"form-control","onUpdate:modelValue":t[14]||(t[14]=u=>e.previousConfigurationId=u)},[(a(!0),l(q,null,x(e.previousConfigurations,u=>(a(),l("option",{key:u.repoId,value:u.repoId},c(u.repoId),9,SD))),128))],512),[[mn,e.previousConfigurationId]])])):(a(),l("p",ND,c(e.previousConfigurationId),1)),t[85]||(t[85]=n("p",null,"You can review and update its settings before saving.",-1)),n("div",RD,[n("a",{class:"btn btn-ink",href:e.existingConfigurationUrl()},"Use existing configuration",8,PD),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[15]||(t[15]=u=>e.previousConfigurations=[])},"Create a separate one")])])):f("v-if",!0),e.sourceUrl&&e.githubConnections?.appEnabled&&e.githubConnections.appConnected?(a(),l("aside",AD,[n("div",DD,[n("div",TD,[e.detectedType!=="gist"&&e.githubConnection!=="oauth"&&!e.details?(a(),l("span",OD,"Repository not listed?")):f("v-if",!0),e.detectedType!=="gist"&&e.githubConnection!=="oauth"&&!e.details?(a(),l("button",{key:1,type:"button",class:"btn btn-outline-ink",onClick:t[16]||(t[16]=u=>e.grantGitHubAccess())},[...t[86]||(t[86]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0),e.isUpdate||e.detectedType==="gist"||e.githubConnection==="oauth"?(a(),l("a",ID,[...t[87]||(t[87]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0)])]),n("div",MD,[e.error&&e.detectedType!=="gist"&&e.githubConnection==="github-app"?(a(),l("span",VD,"Signing in does not grant access to private repositories. Use Manage GitHub access to select this repository, then return here. Organization access may require administrator approval.")):f("v-if",!0),e.detectedType!=="gist"&&e.githubConnection!=="oauth"&&!e.details?(a(),l("span",qD,"Select repositories on GitHub, then return here.")):f("v-if",!0),t[88]||(t[88]=n("span",null,[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),g(" Selected content will be published, including content from private repositories.")],-1))])])):f("v-if",!0),e.isUpdate&&e.detectedType==="repo"&&e.role==="owner"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("details",{key:2,class:"repair-disclosure",open:!!(e.error||e.accessRepairMessage||e.reconnectRepositoryId)},[t[92]||(t[92]=n("summary",null,"Connection problems?",-1)),e.accessRepairAllowed&&e.githubConnections?.appEnabled&&e.githubConnection==="github-app"&&e.sourceUrl==="https://github.com/"+e._originalFullName?(a(),l("div",$D,[t[90]||(t[90]=n("p",null,"If this repository became private or its App installation changed, repair its access here. This keeps the same anonymous URL and published commit.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.repairingGitHubAccess,onClick:t[17]||(t[17]=u=>e.repairGitHubAccess())},"Repair GitHub access",8,LD),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[18]||(t[18]=u=>e.grantGitHubAccess())},[...t[89]||(t[89]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]),e.accessRepairMessage?(a(),l("p",FD,c(e.accessRepairMessage),1)):f("v-if",!0)])):f("v-if",!0),n("div",UD,[t[91]||(t[91]=n("p",null,"If you deleted and recreated this repository, reconnect it before choosing a branch.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[19]||(t[19]=u=>e.reconnectSource())},"Reconnect source repository"),e.reconnectRepositoryId?(a(),l("p",BD,"Source reloaded. Review the branch, commit, and anonymization preview, then save to replace the published snapshot.")):f("v-if",!0)])],8,_D)):f("v-if",!0),e.detectedType==="repo"?(a(),l("div",zD,[n("div",HD,[t[94]||(t[94]=n("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),n("div",jD,[D((a(),l("select",GD,[(a(!0),l(q,null,x(e.branches,(u,y)=>(a(),l("option",{textContent:c(u?.name),value:u?.name},null,8,WD))),256))])),[[d,{state:e.viewState,set:u=>{e.source.branch=u},value:e.source?.branch,form:"anonymize",options:{}}]]),n("div",KD,[n("button",{class:"btn btn-icon refresh-branches",type:"button",title:"Refresh branches",onClick:t[20]||(t[20]=u=>e.getBranches(!0)),"aria-label":"Refresh branches"},[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1)])])])])]),n("div",YD,[t[95]||(t[95]=n("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),D(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,XD),[[d,{state:e.viewState,set:u=>{e.source.commit=u},value:e.source?.commit,form:"anonymize",options:{}}]]),D(n("div",JD," The commit SHA is not valid. ",512),[[Q,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),D(n("div",QD," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[Q,e.anonymize?.commit?.errors?.exists]])])])):f("v-if",!0),D(n("div",{class:P(["form-check auto-update-check",{"is-paid":!e.liveUpdatesIncluded()}])},[D(n("input",ZD,null,512),[[d,{state:e.viewState,set:u=>{e.options.update=u},value:e.options?.update,form:"anonymize",options:{}}]]),n("label",xD,[t[96]||(t[96]=g("Auto-update from GitHub",-1)),e.liveUpdatesIncluded()?f("v-if",!0):(a(),l("span",eT,"Paid"))]),e.liveUpdatesIncluded()?(a(),l("small",tT,"Follows the latest version, at most once an hour.")):(a(),l("small",nT,[t[97]||(t[97]=g("Needs Live updates",-1)),e.liveUpdatesPrice()?(a(),l(q,{key:0},[g(" \xB7 "+c(e.liveUpdatesPrice()),1)],64)):f("v-if",!0),t[98]||(t[98]=g(", a Paper pack or an author subscription. ",-1)),n("a",{href:"#repository-hosting",onClick:t[21]||(t[21]=ae(u=>e.showHostingOptions(),["prevent"]))},"Hosting options")]))],2),[[Q,e.detectedType]])]),D(n("section",sT,[t[133]||(t[133]=n("h2",{class:"paper-section-eyebrow"},"Anonymization",-1)),D(n("div",oT,[t[104]||(t[104]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,iT),[[d,{state:e.viewState,set:u=>{e.repoId=u},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",rT,[t[100]||(t[100]=g("anonymous.4open.science/",-1)),t[101]||(t[101]=n("wbr",null,null,-1)),t[102]||(t[102]=g("r/",-1)),t[103]||(t[103]=n("wbr",null,null,-1)),n("span",aT,c(e.repoId),1)]),D(n("div",lT,"ID can only contain letters and numbers.",512),[[Q,e.anonymize?.repoId?.errors?.format]]),D(n("div",{class:"invalid-feedback"},c(e.repoId)+" is already used.",513),[[Q,e.anonymize?.repoId?.errors?.used]])],512),[[Q,e.detectedType==="repo"]]),D(n("div",dT,[t[109]||(t[109]=n("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,uT),[[d,{state:e.viewState,set:u=>{e.pullRequestId=u},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",cT,[t[105]||(t[105]=g("anonymous.4open.science/",-1)),t[106]||(t[106]=n("wbr",null,null,-1)),t[107]||(t[107]=g("pr/",-1)),t[108]||(t[108]=n("wbr",null,null,-1)),n("span",pT,c(e.pullRequestId),1)]),D(n("div",fT,"ID can only contain letters and numbers.",512),[[Q,e.anonymize?.pullRequestId?.errors?.format]]),D(n("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used.",513),[[Q,e.anonymize?.pullRequestId?.errors?.used]])],512),[[Q,e.detectedType==="pr"]]),D(n("div",hT,[t[114]||(t[114]=n("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,mT),[[d,{state:e.viewState,set:u=>{e.gistId=u},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",gT,[t[110]||(t[110]=g("anonymous.4open.science/",-1)),t[111]||(t[111]=n("wbr",null,null,-1)),t[112]||(t[112]=g("gist/",-1)),t[113]||(t[113]=n("wbr",null,null,-1)),n("span",vT,c(e.gistId),1)]),D(n("div",yT,"ID can only contain letters and numbers.",512),[[Q,e.anonymize?.gistId?.errors?.format]]),D(n("div",{class:"invalid-feedback"},c(e.gistId)+" is already used.",513),[[Q,e.anonymize?.gistId?.errors?.used]])],512),[[Q,e.detectedType==="gist"]]),n("div",bT,[t[125]||(t[125]=n("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),D(n("textarea",{class:P(["form-control terms-input",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:Math.min(14,Math.max(4,String(e.terms||"").split(` `).length+1)),placeholder:`Jane Smith MIT CSAIL -jane.smith@example.org`},null,10,hT),[[d,{state:e.viewState,set:u=>{e.terms=u},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[126]||(t[126]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",mT,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=v()),n("small",gT,[t[115]||(t[115]=v("Regex is supported. Replaced by ",-1)),n("code",null,p(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[116]||(t[116]=v(", or use ",-1)),t[117]||(t[117]=n("code",null,"term=>replacement",-1)),t[118]||(t[118]=v(" to pick your own (e.g. ",-1)),t[119]||(t[119]=n("code",null,"Anonymous=>ABC",-1)),t[120]||(t[120]=v(").",-1))])]),(a(!0),l(F,null,se((e.termHints||[]).slice(0,3),u=>(a(),l("div",{class:"term-hint",key:u.line},[n("span",null,[t[123]||(t[123]=v("In ",-1)),n("code",null,p(u.term),1),t[124]||(t[124]=v(", ",-1)),n("code",null,p(u.symbols.join(" ")),1),v(" "+p(u.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:y=>e.matchTermAsWritten(u.line)},"Match as written",8,vT)]))),128)),(e.termHints||[]).length>3?(a(),l("div",yT,p(e.termHints.length-3)+" more "+p(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),T(n("div",bT,"Terms are in an invalid format.",512),[[Z,e.anonymize?.terms?.errors?.format]])]),T(n("div",wT,[n("div",kT,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",CT,p(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[22]||(t[22]=u=>e.openPreserveFiles())},p((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,ET)],512),[[Z,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=le(u=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=le(u=>e.savePreserveFiles(),["prevent"]))},[t[131]||(t[131]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[132]||(t[132]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),T(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=u=>e.preserve.search=u)},null,512),[[pt,e.preserve.search]]),n("div",ST,[e.preserve.loading?(a(),l("p",NT,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",RT,p(e.preserve.error),1)):(a(),l(F,{key:2},[(a(!0),l(F,null,se(e.preserveRows(),(u,y)=>(a(),l("div",{class:"preserve-item",key:u.kind+":"+u.path,style:$e({paddingLeft:u.depth*18+6+"px"})},[u.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":u.open?"true":"false","aria-label":(u.open?"Collapse ":"Expand ")+u.label,onClick:h=>e.togglePreserveDir(u.path)},p(u.open?"\u25BE":"\u25B8"),9,DT)):(a(),l("span",PT)),n("input",{type:"checkbox",id:"pf-"+y,"aria-label":u.kind==="dir"?"Leave folder "+u.path+" unredacted":null,checked:u.state==="all",".indeterminate":u.state==="some",disabled:u.locked,onChange:h=>u.kind==="dir"?e.togglePreserveFolder(u.path):e.togglePreserveFile(u.path)},null,40,AT),n("label",{for:u.kind==="file"?"pf-"+y:null,class:"preserve-name",onClick:h=>u.kind==="dir"&&e.togglePreserveDir(u.path)},p(u.label),9,TT),u.note?(a(),l("span",OT,p(u.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",IT,p(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",MT,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[128]||(t[128]=n("summary",null,"Patterns",-1)),T(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib -paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=u=>e.preserve.patterns=u)},null,512),[[pt,e.preserve.patterns]]),t[129]||(t[129]=n("small",{class:"form-text text-muted"},[v("One per line, as in .gitignore: "),n("code",null,"*.bib"),v(" matches in any folder; "),n("code",null,"/refs.bib"),v(" and "),n("code",null,"paper/refs.bib"),v(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),v(" covers everything inside it; "),n("code",null,"!private.bib"),v(" excludes again.")],-1))],8,_T),n("div",VT,[n("span",qT,p(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",$T,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=u=>e.closePreserveFiles())},"Cancel"),t[130]||(t[130]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[Z,e.detectedType]]),T(n("section",LT,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),T(n("div",null,[n("div",FT,[T(n("input",UT,null,512),[[d,{state:e.viewState,set:u=>{e.options.link=u},value:e.options?.link,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",BT,[T(n("input",zT,null,512),[[d,{state:e.viewState,set:u=>{e.options.image=u},value:e.options?.image,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",HT,[T(n("input",jT,null,512),[[d,{state:e.viewState,set:u=>{e.options.pdf=u},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",GT,[T(n("input",WT,null,512),[[d,{state:e.viewState,set:u=>{e.options.notebook=u},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",KT,[T(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,YT),[[d,{state:e.viewState,set:u=>{e.options.page=u},value:e.options?.page,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",XT,p(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",QT,p(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[Z,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",JT,[...t[139]||(t[139]=[v("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),T(n("div",null,[n("div",ZT,[T(n("input",xT,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",e3,[T(n("input",t3,null,512),[[d,{state:e.viewState,set:u=>{e.options.content=u},value:e.options?.content,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",n3,[T(n("input",o3,null,512),[[d,{state:e.viewState,set:u=>{e.options.comments=u},value:e.options?.comments,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",s3,[T(n("input",i3,null,512),[[d,{state:e.viewState,set:u=>{e.options.username=u},value:e.options?.username,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",r3,[T(n("input",a3,null,512),[[d,{state:e.viewState,set:u=>{e.options.date=u},value:e.options?.date,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",l3,[T(n("input",d3,null,512),[[d,{state:e.viewState,set:u=>{e.options.origin=u},value:e.options?.origin,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Z,e.detectedType==="gist"]]),T(n("div",null,[n("div",u3,[T(n("input",c3,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",p3,[T(n("input",f3,null,512),[[d,{state:e.viewState,set:u=>{e.options.body=u},value:e.options?.body,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",h3,[T(n("input",m3,null,512),[[d,{state:e.viewState,set:u=>{e.options.diff=u},value:e.options?.diff,form:"anonymize",options:{}}]]),t[148]||(t[148]=n("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),n("div",g3,[T(n("input",v3,null,512),[[d,{state:e.viewState,set:u=>{e.options.comments=u},value:e.options?.comments,form:"anonymize",options:{}}]]),t[149]||(t[149]=n("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),n("div",y3,[T(n("input",b3,null,512),[[d,{state:e.viewState,set:u=>{e.options.username=u},value:e.options?.username,form:"anonymize",options:{}}]]),t[150]||(t[150]=n("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),n("div",w3,[T(n("input",k3,null,512),[[d,{state:e.viewState,set:u=>{e.options.date=u},value:e.options?.date,form:"anonymize",options:{}}]]),t[151]||(t[151]=n("label",{class:"form-check-label",for:"date"},"Dates",-1))]),n("div",C3,[T(n("input",E3,null,512),[[d,{state:e.viewState,set:u=>{e.options.origin=u},value:e.options?.origin,form:"anonymize",options:{}}]]),t[152]||(t[152]=n("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[Z,e.detectedType==="pr"]])],512),[[Z,e.detectedType]]),T(n("section",S3,[t[170]||(t[170]=n("h2",{class:"paper-section-eyebrow",id:"hosting-heading"},"Hosting & expiration",-1)),n("div",N3,[t[154]||(t[154]=n("label",{class:"paper-field-label",for:"conference"},[v("Conference code "),n("span",{class:"paper-optional"},"(optional)")],-1)),T(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[d,{state:e.viewState,set:u=>{e.conference=u},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),T(n("p",{class:P(["conference-hosting",{"is-covered":e.conferenceHosting()}]),role:"status"},[n("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},p(e.conference_data?.name),9,R3),e.conferenceHosting()?(a(),l(F,{key:0},[v(" hosts this repository until "+p(e.fmt?.date(e.conference_data?.endDate))+", with automatic updates. You don't pay anything.",1)],64)):e.billing?.enabled&&e.detectedType==="repo"?(a(),l(F,{key:1},[v(" runs until "+p(e.fmt?.date(e.conference_data?.endDate))+". It doesn't pay for hosting, so this repository uses your own allowance.",1)],64)):(a(),l(F,{key:2},[v(" runs until "+p(e.fmt?.date(e.conference_data?.endDate))+".",1)],64))],2),[[Z,e.conference_data]]),T(n("div",D3,"The conference is not activated.",512),[[Z,e.anonymize?.conference?.errors?.activated]]),T(n("small",P3,"Submitting to a conference? Its code applies the venue's settings, and a paid conference hosts the repository for you.",512),[[Z,!e.conference_data]])]),e.detectedType==="repo"&&e.billing?.enabled&&!e.conferenceHosting()?(a(),l("p",A3,[e.isUpdate&&e.role!=="owner"?(a(),l("span",T3,"Uses the owner's hosting")):e.hasAuthorHosting()?(a(),l("span",O3,"Your author subscription is active.")):e.hostingQuota?.repository?(a(),l("span",I3,p(e.hostingQuota.repository.used)+" of "+p(e.hostingQuota.repository.total)+" active repositories \xB7 Free",1)):f("v-if",!0)])):f("v-if",!0),e.detectedType==="repo"&&e.options?.update&&!e.liveUpdatesIncluded()?(a(),l("p",M3,[t[155]||(t[155]=v("Automatic updates need a paid option. On free hosting, the link keeps the version you create until you refresh it from My work. Once it exists, add Live updates",-1)),e.liveUpdatesPrice()?(a(),l(F,{key:0},[v(" ("+p(e.liveUpdatesPrice())+" once)",1)],64)):f("v-if",!0),t[156]||(t[156]=v(" or a Paper pack in ",-1)),t[157]||(t[157]=n("a",{href:"/profile?billing=1"},"Settings \u203A Hosting & billing",-1)),t[158]||(t[158]=v(", or take an author subscription.",-1))])):f("v-if",!0),e.detectedType==="repo"&&e.billing?.enabled?(a(),l("div",_3,[e.hostingNeedsPayment()&&!e.billingPending?(a(),l(F,{key:0},[e.options.expirationMode!=="never"||e.hostingQuotaBlocked?(a(),l("p",V3,p(e.options.update&&!e.hostingQuotaBlocked&&e.hostingQuota?.repository?.used(a(),l("label",{class:P(["hosting-option",{"is-selected":e.hostingChoice()===u.id||u.interval&&e.authorPlans().some(y=>y.id===e.hostingChoice())}]),key:u.id},[n("input",{type:"radio",name:"hosting-plan",value:u.id,checked:e.hostingChoice()===u.id||u.interval&&e.authorPlans().some(y=>y.id===e.hostingChoice()),onChange:y=>e.hostingPlan=u.interval?e.hostingSubscriptionPlan().id:u.id},null,40,L3),n("span",F3,[n("strong",null,p(e.hostingOptionName(u)),1),n("small",null,p(e.hostingOptionBlurb(u)),1),u.interval&&e.authorPlans().length>1&&e.authorPlans().some(y=>y.id===e.hostingChoice())?(a(),l("span",U3,[(a(!0),l(F,null,se(e.authorPlans(),y=>(a(),l("button",{type:"button",role:"radio",key:y.id,"aria-checked":e.hostingSubscriptionPlan().id===y.id?"true":"false",class:P({"is-on":e.hostingSubscriptionPlan().id===y.id}),onClick:le(h=>{e.hostingCycle=y.id,e.hostingPlan=y.id},["prevent"])},[v(p(y.interval==="year"?"Yearly":"Monthly"),1),y.interval==="year"&&e.hostingAnnualSavings()?(a(),l("span",z3,"\u2212"+p(e.hostingAnnualSavings())+"%",1)):f("v-if",!0)],10,B3))),128))])):f("v-if",!0)]),n("span",H3,[n("strong",null,p(e.billingAmount(u.interval?e.hostingSubscriptionPlan():u)),1),n("small",null,p(u.interval?"per "+e.hostingSubscriptionPlan().interval:"once"),1)])],2))),128))])):(a(),l("p",j3,"New purchases are temporarily unavailable. Your draft is kept.")),e.authorPlans().some(u=>u.id===e.hostingChoice())?(a(),l("p",G3,"Renews "+p(e.hostingChoice()==="author_annual"?"yearly":"monthly")+" until you cancel. Tax shown at checkout.",1)):(a(),l("p",W3,"One-time payment, nothing renews. Tax shown at checkout.")),e.options.expirationMode!=="never"?(a(),l("details",K3,[t[159]||(t[159]=n("summary",null,"Keep using free hosting",-1)),t[160]||(t[160]=n("p",null,"Remove a repository you no longer need, or enter the code of a paid conference above. Removing a repository affects its review link.",-1)),t[161]||(t[161]=n("a",{href:"/dashboard"},"Review my repositories",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[28]||(t[28]=u=>e.anonymizeRepo(u)),disabled:e.sourceLoading||e.billingBusy},"Recheck capacity and submit",8,Y3)])):f("v-if",!0)],64)):f("v-if",!0)])):f("v-if",!0),e.hostingNeedsPayment()&&!e.billingPending?(a(),l("h4",X3,"Expiration")):f("v-if",!0),n("fieldset",Q3,[t[167]||(t[167]=n("legend",{class:"sr-only"},"Expiration",-1)),n("label",J3,[n("input",{type:"radio",name:"expiration-choice",checked:e.options.expirationMode!=="never",onChange:t[29]||(t[29]=u=>e.useDatedHosting()),disabled:e.billingPending},null,40,Z3),t[162]||(t[162]=n("span",null,"Expire on a date",-1))]),e.options.expirationMode!=="never"?(a(),l("div",x3,[e.options?.expirationMode!=="never"?(a(),l("div",eO,[t[163]||(t[163]=n("label",{class:"paper-field-label",for:"expirationDate"},"Expires",-1)),T(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,tO),[[d,{state:e.viewState,set:u=>{e.options.expirationDate=u},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),e.fmt?.dateEcho(e.options?.expirationDate)?(a(),l("p",nO,"Expires "+p(e.fmt?.dateEcho(e.options?.expirationDate)),1)):f("v-if",!0),T(n("div",oO,"Pick a date in the future.",512),[[Z,e.anonymize?.expirationDate?.errors?.min]]),T(n("div",{class:"invalid-feedback"},"Pick a date on or before "+p(e.fmt?.date(e.maxExpirationDate))+".",513),[[Z,e.anonymize?.expirationDate?.errors?.max]]),T(n("div",sO,"Enter a valid expiration date.",512),[[Z,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])):f("v-if",!0),n("div",iO,[t[165]||(t[165]=n("label",{for:"expiration"},"Then",-1)),T(n("select",{id:"expiration",class:"form-control","onUpdate:modelValue":t[30]||(t[30]=u=>e.options.expirationMode=u)},[...t[164]||(t[164]=[n("option",{value:"remove"},"Remove content",-1),n("option",{value:"redirect"},"Redirect to GitHub",-1)])],512),[[mn,e.options.expirationMode]])])])):f("v-if",!0),e.detectedType==="repo"?(a(),l("label",rO,[n("input",{type:"radio",name:"expiration-choice",checked:e.options.expirationMode==="never",onChange:t[31]||(t[31]=u=>e.options.expirationMode="never"),disabled:e.billingPending},null,40,aO),n("span",null,[t[166]||(t[166]=v("Never expire",-1)),(e.options.expirationMode!=="never"||e.hasAuthorHosting()||e.repositoryGrants("repo_never").length)&&!(e.hostingNeedsPayment()&&e.hostingOptionPlans().length)?(a(),l("small",lO,p(e.neverExpireTag()),1)):f("v-if",!0)])])):f("v-if",!0)]),e.options.expirationMode==="redirect"?(a(),l("p",dO,"Visitors will be redirected to the original GitHub source on this date, revealing its identity.")):f("v-if",!0),e.detectedType==="repo"&&e.billing?.enabled?(a(),l("div",uO,[e.taskValidationError?(a(),l("p",cO,p(e.taskValidationError),1)):f("v-if",!0),e.billingError?(a(),l("p",pO,[v(p(e.billingError)+" ",1),n("button",{type:"button",class:"task-text-button",onClick:t[32]||(t[32]=u=>e.loadBilling()),disabled:e.billingBusy},"Reload billing",8,fO)])):f("v-if",!0),e.billingPending?(a(),l("div",hO,[...t[168]||(t[168]=[n("p",null,[n("strong",null,"Confirming your payment\u2026")],-1),n("p",{class:"form-text text-muted"},"Your draft is saved. Please do not pay again.",-1)])])):e.billingNotice?(a(),l("p",mO,p(e.billingNotice),1)):e.options.expirationMode==="never"&&!e.billingPending&&!e.hasAuthorHosting()&&e.repositoryGrants("repo_never").length?(a(),l("p",gO,"No scheduled expiration. Paid once for this repository.")):e.options.expirationMode==="never"&&!e.billingPending?(a(),l("p",vO,"No scheduled expiration while subscribed. A 90-day grace period applies if paid access ends.")):f("v-if",!0),e.isUpdate&&e.role==="owner"&&!e.hasAuthorHosting()&&!e.hostingNeedsPayment()&&e.repositoryAddonPlans().length?(a(),l("details",yO,[t[169]||(t[169]=n("summary",null,"Pay once for just this repository",-1)),(a(!0),l(F,null,se(e.repositoryAddonPlans(),u=>(a(),l("div",{key:u.id},[n("p",null,[n("strong",null,p(u.name),1),v(" \xB7 "+p(e.billingPrice(u))+". "+p(u.description),1)]),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.billingBusy||e.hostingSaving||e.sourceLoading||e.billing.checkoutEnabled===!1||e.billingPending,onClick:y=>e.checkoutRepository(u.id)},"Buy "+p(u.name.toLowerCase()),9,bO)]))),128))])):f("v-if",!0)])):f("v-if",!0)],512),[[Z,e.detectedType]]),T(n("section",wO,[t[174]||(t[174]=n("h2",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[175]||(t[175]=n("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),T(n("div",kO,[t[171]||(t[171]=n("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),n("div",CO,[T(n("input",EO,null,512),[[d,{state:e.viewState,set:u=>{e.coauthorSearch=u},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),T(n("div",SO,[(a(!0),l(F,null,se(e.coauthorResults,(u,y)=>(a(),l("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:le(h=>e.addCoauthor(u,h),["prevent"])},[n("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(u?.photo)},null,8,RO),n("span",{textContent:p(u?.username)},null,8,DO)],8,NO))),256))],512),[[Z,e.coauthorResults?.length>0]])]),T(n("small",{class:"form-text text-muted",textContent:p(e.coauthorError)},null,8,PO),[[Z,e.coauthorError]])],512),[[Z,e.role==="owner"||e.role==="admin"]]),n("div",AO,[(a(!0),l(F,null,se(e.coauthors,(u,y)=>(a(),l("div",TO,[u?.photo?(a(),l("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(u?.photo)},null,8,OO)):f("v-if",!0),n("a",{target:"_blank",textContent:p(u?.username),href:e.safeUrl("https://github.com/"+u?.username)},null,8,IO),t[173]||(t[173]=n("span",{class:"type-badge type-coauthor"},"Co-author",-1)),T(n("button",{type:"button",class:"btn btn-sm btn-icon",style:{"margin-left":"auto"},title:"Remove co-author",onClick:h=>e.removeCoauthor(u),"aria-label":"Remove co-author"},[...t[172]||(t[172]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,MO),[[Z,e.role==="owner"||e.role==="admin"]])]))),256)),T(n("div",_O," No co-authors yet. ",512),[[Z,!e.coauthors||e.coauthors?.length===0]])])],512),[[Z,e.isUpdate&&e.detectedType==="repo"]]),e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:p(e.error)},null,8,VO)):f("v-if",!0)]),n("button",{type:"button",class:"btn btn-outline-ink mobile-preview-jump",onClick:t[33]||(t[33]=u=>e.selectMobilePane("preview"))},[...t[176]||(t[176]=[v("Review preview ",-1),n("span",{"aria-hidden":"true"},"\u2192",-1)])]),T(n("div",qO,[e.detectedType==="repo"?(a(),l(F,{key:0},[e.billingPending?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[34]||(t[34]=u=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,$O)):(a(),l("button",{key:1,type:"submit",class:"btn btn-ink",disabled:e.sourceLoading||e.billingBusy||e.hostingSaving||e.billingLoading||e.hostingNeedsPayment()&&(!e.authorPlans().length&&!e.hostingOneTime()||e.billing?.checkoutEnabled===!1),onClick:t[35]||(t[35]=le(u=>e.submitForm(u,()=>{e.submitRepository(u)}),["prevent"]))},p(e.hostingSaving?"Saving draft\u2026":e.hostingNeedsPayment()?"Continue to checkout":e.isUpdate?"Save changes":"Create anonymous link"),9,LO))],64)):f("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(a(),l("button",{key:1,type:"submit",disabled:e.sourceLoading||!e.details,class:"btn btn-ink",onClick:t[36]||(t[36]=le(u=>e.submitForm(u,()=>{e.anonymizePullRequest(u)}),["prevent"]))}," Create anonymous link ",8,FO)):f("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(a(),l("button",{key:2,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[37]||(t[37]=le(u=>e.submitForm(u,()=>{e.anonymizePullRequest(u)}),["prevent"]))}," Save changes ",8,UO)):f("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(a(),l("button",{key:3,type:"submit",disabled:e.sourceLoading||!e.details,class:"btn btn-ink",onClick:t[38]||(t[38]=le(u=>e.submitForm(u,()=>{e.anonymizeGist(u)}),["prevent"]))}," Create anonymous link ",8,BO)):f("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(a(),l("button",{key:4,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[39]||(t[39]=le(u=>e.submitForm(u,()=>{e.anonymizeGist(u)}),["prevent"]))}," Save changes ",8,zO)):f("v-if",!0),e.sourceLoading?(a(),l("p",HO,p(e.detectedType==="pr"?"Waiting for the pull request to load from GitHub\u2026":e.detectedType==="gist"?"Waiting for the gist to load from GitHub\u2026":"Waiting for the repository to load from GitHub\u2026"),1)):!e.details&&!e.isUpdate?(a(),l("p",jO,"Load an accessible source to continue. See the preview for details.")):f("v-if",!0),e.hostingNeedsPayment()&&!e.billingPending?(a(),l("p",GO,"You pay in Stripe, then come back here to finish.")):f("v-if",!0),e.draftRestored?(a(),l("div",WO,[t[177]||(t[177]=v("Your unsaved draft was restored. ",-1)),n("button",{type:"button",class:"draft-discard",onClick:t[40]||(t[40]=u=>e.discardDraft())},"Discard draft")])):e.unsavedChanges?(a(),l("div",KO,[v(p(e.draftSaved?"Draft saved \xB7":"Unsaved changes \xB7")+" ",1),n("button",{type:"button",class:"draft-discard",onClick:t[41]||(t[41]=u=>e.discardDraft())},p(e.isUpdate?"Restore saved":"Discard"),1)])):f("v-if",!0)],512),[[Z,e.detectedType]])])),[[c,e.viewState]])],8,xA),f(' Preview column (right): "What reviewers will see", a miniature reviewer window '),e.detectedType?(a(),l("div",{key:0,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col reviewer-preview"},[n("div",XO,[t[180]||(t[180]=n("span",{class:"rp-title"},"What reviewers will see",-1)),e.detectedType==="repo"?(a(),l("button",{key:0,type:"button",class:"rp-open",onClick:t[42]||(t[42]=u=>e.previewViewer.sidebarCollapsed=!e.previewViewer.sidebarCollapsed),"aria-expanded":!e.previewViewer.sidebarCollapsed,"aria-controls":"preview-file-tree"},"Files",8,QO)):f("v-if",!0),e.previewStatus==="ready"&&e.previewRedactions()>0?(a(),l("span",{key:1,class:"rp-count",title:e.previewRedactions()+" redacted terms in this preview"},[n("span",ZO,[n("i",null,p(e.previewRedactions()),1)]),t[178]||(t[178]=v(" redacted",-1))],8,JO)):e.previewStatus==="ready"&&!String(e.terms||"").trim()?(a(),l("span",xO,"No terms yet")):e.previewStatus==="ready"&&e.previewPreserved()?(a(),l("button",{key:3,type:"button",class:"rp-count rp-count-none",onClick:t[43]||(t[43]=u=>e.openPreserveFiles()),title:"Change it in Leave files unredacted"},p(e.previewName(e.previewFile?e.previewFile.slice(e.previewFile.lastIndexOf("/")+1):e.readmeName()))+" left unredacted",1)):f("v-if",!0),t[181]||(t[181]=n("span",{class:"rp-spacer"},null,-1)),e.isUpdate&&e.previewUrl()?(a(),l("a",{key:4,class:"rp-open is-external",href:e.safeUrl(e.previewPath()),target:"_blank",rel:"noopener"},[...t[179]||(t[179]=[v("Open reviewer page ",-1),n("span",{"aria-hidden":"true"},"\u2197",-1)])],8,eI)):(a(),l("button",{key:5,type:"button",class:"rp-open is-toggle",onClick:t[44]||(t[44]=u=>e.previewExpanded=!e.previewExpanded),"aria-pressed":!!e.previewExpanded},[(a(),l("svg",nI,[e.previewExpanded?(a(),l("path",sI)):(a(),l("path",oI))])),v(p(e.previewExpanded?"Back to settings":"Expand preview"),1)],8,tI))]),n("div",iI,[n("div",rI,[t[182]||(t[182]=n("i",null,null,-1)),t[183]||(t[183]=n("i",null,null,-1)),t[184]||(t[184]=n("i",null,null,-1)),n("span",aI,p(e.previewUrl()||"anonymous.4open.science"),1)]),n("div",lI,[t[185]||(t[185]=n("span",{class:"vb-logo"},[v("Anonymous "),n("em",null,"GitHub")],-1)),e.previewId()?(a(),l("span",dI,p(e.previewId()),1)):f("v-if",!0),e.detectedType!=="repo"?(a(),l("span",uI,p(e.detectedType==="pr"?"Pull request":"Gist"),1)):f("v-if",!0)]),n("div",{class:P(["rp-body",{"reviewer-explorer":e.detectedType==="repo"}])},[e.detectedType==="repo"?(a(),l("aside",{key:0,id:"preview-file-tree",class:P(["leftCol",{collapsed:e.previewViewer.sidebarCollapsed}]),"aria-label":"Files reviewers will see"},[n("div",cI,[t[187]||(t[187]=n("span",{class:"leftCol-eyebrow"},"Files",-1)),n("button",{type:"button",class:"leftCol-close","aria-label":"Close files",onClick:t[45]||(t[45]=u=>e.previewViewer.sidebarCollapsed=!0)},[...t[186]||(t[186]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])])]),n("div",pI,[Oe(o,{class:"files",file:e.previewTreeFiles(),page:e.previewViewer,"selected-path":"/"+e.previewPathName(e.previewOpenPath()),onSelect:t[46]||(t[46]=u=>e.selectPreviewPath(u))},null,8,["file","page","selected-path"])])],2)):f("v-if",!0),e.detectedType==="repo"?T((a(),l("div",{key:1,class:"leftCol-backdrop",onClick:t[47]||(t[47]=u=>e.previewViewer.sidebarCollapsed=!0)},null,512)),[[Z,!e.previewViewer.sidebarCollapsed]]):f("v-if",!0),n("div",{class:P(e.detectedType==="repo"?"explorer-main":"rp-main")},[n("div",{class:P(e.detectedType==="repo"?"explorer-content":"rp-document")},[f(" Loading: skeleton inside the window "),e.previewStatus==="loading"||e.sourceLoading&&e.previewStatus!=="ready"&&e.previewStatus!=="error"?(a(),l("div",fI,[n("span",hI,p(e.previewDoc.loading?"Loading "+e.previewName(e.previewFile.slice(e.previewFile.lastIndexOf("/")+1))+" from GitHub\u2026":e.previewStatus==="loading"?"Updating the anonymized preview\u2026":e.detectedType==="pr"?"Loading the pull request from GitHub\u2026":e.detectedType==="gist"?"Loading the gist from GitHub\u2026":"Loading the repository from GitHub\u2026"),1),t[188]||(t[188]=Se('',7))])):!e.details&&e.detectedType!=="repo"?(a(),l(F,{key:1},[f(" The source itself could not be loaded "),n("div",mI,[n("strong",null,"Couldn't load "+p(e.sourceSummary()||(e.detectedType==="pr"?"this pull request":"this gist")),1),n("p",null,p(e.error||"GitHub did not return it. Check that the link is right and that Anonymous GitHub can read it."),1),n("div",gI,[n("button",{type:"button",class:"btn btn-ink btn-sm",onClick:t[48]||(t[48]=u=>e.urlSelected(!0))},"Retry"),e.detectedType==="pr"&&e.githubConnection!=="oauth"?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink btn-sm",onClick:t[49]||(t[49]=u=>e.grantGitHubAccess())},[...t[189]||(t[189]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):(a(),l("a",vI,[...t[190]||(t[190]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]))])])],2112)):!e.details&&e.detectedType==="repo"&&!e.isUpdate&&e.error?(a(),l("div",yI,[t[192]||(t[192]=n("strong",null,"Couldn't load this repository",-1)),n("p",null,p(e.error),1),n("div",bI,[n("button",{type:"button",class:"btn btn-ink btn-sm",onClick:t[50]||(t[50]=u=>e.urlSelected(!0))},"Retry"),e.githubConnection!=="oauth"?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink btn-sm",onClick:t[51]||(t[51]=u=>e.grantGitHubAccess())},[...t[191]||(t[191]=[v("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0)])])):e.previewStatus==="error"&&e.previewDoc.loadError?(a(),l(F,{key:3},[f(" The open file could not be read from GitHub "),n("div",wI,[n("strong",null,"Couldn't load "+p(e.previewName(e.previewFile.slice(e.previewFile.lastIndexOf("/")+1))),1),n("p",null,p(e.previewDoc.loadError),1),n("div",kI,[n("button",{class:"btn btn-ink btn-sm",type:"button",onClick:t[52]||(t[52]=u=>e.retryPreview())},"Retry"),n("button",{class:"btn btn-outline-ink btn-sm",type:"button",onClick:t[53]||(t[53]=u=>e.openPreviewFile(""))},"Back to the README")])])],2112)):e.previewStatus==="error"?(a(),l(F,{key:4},[f(" The anonymized preview failed "),n("div",CI,[t[193]||(t[193]=n("strong",null,"Couldn't apply the redactions",-1)),t[194]||(t[194]=n("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),n("div",EI,[n("button",{class:"btn btn-ink btn-sm",type:"button",onClick:t[54]||(t[54]=u=>e.retryPreview())},"Retry preview")])])],2112)):e.detectedType==="repo"&&!e.previewFile&&!e.readme&&e.previewStatus==="idle"?(a(),l("div",SI,[...t[195]||(t[195]=[n("strong",null,"No README",-1),n("p",null,"Reviewers land on the file list. Open the files you will share and check them before sending the link.",-1)])])):e.detectedType==="repo"&&e.previewStatus==="ready"?(a(),Gt(i,{key:6,name:"partials/pageView.htm",state:e.previewViewer},null,8,["state"])):e.detectedType==="gist"&&e.previewStatus==="ready"?(a(),l("div",NI,[n("div",RI,[n("h2",DI,[e.options?.title?(a(),l("span",PI,p(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):f("v-if",!0),n("span",{class:P(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},p(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(a(),l("small",{key:0,textContent:p(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,AI)):f("v-if",!0)]),e.options?.origin?(a(),l("small",TI,"Gist ID: "+p(e.details?.source?.gistId),1)):f("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(a(),l("small",OI,"By @"+p(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):f("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(a(),l("div",II,[n("ul",MI,[(a(!0),l(F,null,se(e.previewGistFiles,(u,y)=>(a(),l("li",_I,[n("div",VI,[n("strong",{textContent:p(u?.filename)},null,8,qI),u?.language?(a(),l("span",$I,p(u?.language),1)):f("v-if",!0)]),Oe(s,{file:u,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):f("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(a(),l("div",LI,[t[198]||(t[198]=n("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),n("ul",FI,[(a(!0),l(F,null,se(e.details?.gist?.comments,(u,y)=>(a(),l("li",UI,[n("div",BI,[e.options?.username?(a(),l("span",zI,[t[196]||(t[196]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[197]||(t[197]=v(" @",-1)),n("span",{textContent:p(e.anonymizeGistContent(u?.author))},null,8,HI)])):f("v-if",!0),e.options?.date?(a(),l("span",{key:1,class:"pr-comment-date",textContent:p(e.fmt?.date(u?.updatedDate))},null,8,jI)):f("v-if",!0)]),e.options?.body?(a(),l("div",GI,[Oe(r,{content:e.anonymizeGistContent(u?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])):e.detectedType==="pr"&&e.previewStatus==="ready"?(a(),l("div",WI,[n("div",KI,[n("h2",YI,[e.options?.title?(a(),l("span",XI,p(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):f("v-if",!0),n("span",{class:P(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},p(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(a(),l("small",{key:0,textContent:p(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,QI)):f("v-if",!0)]),e.options?.origin?(a(),l("small",JI,"Pull Request on "+p(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(a(),l("div",ZI,[Oe(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),e.options?.diff||e.options?.comments?(a(),l("nav",xI,[e.options?.diff?(a(),l("button",{key:0,class:P(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",id:"preview-pr-diff-tab","aria-selected":e.prTabState?.active==="diff","aria-controls":"preview-pr-diff-panel",tabindex:e.prTabState?.active==="diff"?0:-1,onKeydown:t[55]||(t[55]=u=>e.previewTabKeydown(u)),onClick:t[56]||(t[56]=u=>e.prTabState.active="diff")},[...t[199]||(t[199]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v(" Diff ",-1)])],42,e5)):f("v-if",!0),e.options?.comments?(a(),l("button",{key:1,class:P(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",id:"preview-pr-comments-tab","aria-selected":e.prTabState?.active==="comments","aria-controls":"preview-pr-comments-panel",tabindex:e.prTabState?.active==="comments"?0:-1,onKeydown:t[57]||(t[57]=u=>e.previewTabKeydown(u)),onClick:t[58]||(t[58]=u=>e.prTabState.active="comments")},[t[200]||(t[200]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:p(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,n5)],42,t5)):f("v-if",!0)])):f("v-if",!0),!e.options?.diff&&!e.options?.comments?(a(),l("div",o5,"Diff and comments are hidden by your display settings.")):f("v-if",!0),n("div",s5,[e.options?.diff&&e.prTabState?.active=="diff"?(a(),l("div",i5,[n("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,r5)])):f("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(a(),l("div",a5,[n("ul",l5,[(a(!0),l(F,null,se(e.details?.pullRequest?.comments,(u,y)=>(a(),l("li",d5,[n("div",u5,[e.options?.username?(a(),l("span",c5,[t[201]||(t[201]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[202]||(t[202]=v(" @",-1)),n("span",{textContent:p(e.anonymizePrContent(u?.author))},null,8,p5)])):f("v-if",!0),e.options?.date?(a(),l("span",{key:1,class:"pr-comment-date",textContent:p(e.fmt?.date(u?.updatedDate))},null,8,f5)):f("v-if",!0)]),e.options?.body?(a(),l("div",h5,[Oe(r,{content:e.anonymizePrContent(u?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])])):f("v-if",!0),f(" More below: a fade with a way to keep reading (hidden by CSS once the window is scrolled to the end) "),e.previewStatus==="ready"&&!(e.detectedType==="repo"&&e.previewFile&&e.previewDoc.note)?(a(),l("div",m5,[e.isUpdate&&e.previewUrl()?(a(),l("a",{key:0,class:"rp-more-btn",href:e.safeUrl(e.previewPath()),target:"_blank",rel:"noopener"},[...t[203]||(t[203]=[v("Continue reading on the reviewer page ",-1),n("span",{"aria-hidden":"true"},"\u2197",-1)])],8,g5)):e.previewExpanded?(a(),l("span",v5,"Scroll for more")):(a(),l("button",{key:1,type:"button",class:"rp-more-btn",onClick:t[59]||(t[59]=u=>e.previewExpanded=!0)},"Continue reading in the expanded preview"))])):f("v-if",!0)],2)],2)],2)])],8,YO)):f("v-if",!0)])],512),[[Z,e.workspaceOpen||e.isUpdate]])],2)}var y5={class:"container-fluid h-100 anonymize-page"},b5={class:"row h-100 flex-column flex-md-row"},w5={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},k5={class:"form-group"},C5={class:"form-group"},E5={class:"form-check"},S5={class:"form-check-input",type:"checkbox",id:"update",name:"update"},N5={class:"form-group"},R5={class:"form-text text-muted"},D5=["href"],P5={class:"invalid-feedback"},A5={class:"form-text text-muted"},T5={class:"form-group"},O5={id:"idHelp",class:"form-text text-muted"},I5={class:"invalid-feedback"},M5={class:"form-group"},_5={class:"invalid-feedback"},V5={class:"form-group"},q5={class:"form-control",id:"expiration",name:"expiration"},$5={class:"form-group",id:"expiration-date-form"},L5={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},F5={key:0,class:"date-echo","aria-live":"polite"},U5={class:"accordion mb-3",id:"options"},B5={class:"card"},z5={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},H5={class:"card-body"},j5={class:"form-group mb-0"},G5={class:"form-check"},W5={class:"form-check-input",type:"checkbox",id:"link",name:"link"},K5={class:"form-check"},Y5={class:"form-check-input",type:"checkbox",id:"image",name:"image"},X5={class:"form-check"},Q5={class:"form-check-input",type:"checkbox",id:"date",name:"date"},J5={class:"form-check"},Z5={class:"form-check-input",type:"checkbox",id:"username",name:"username"},x5={class:"form-check"},e8={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},t8={class:"form-check"},n8={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},o8={class:"form-check"},s8={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},i8={class:"form-check"},r8={class:"form-check-input",type:"checkbox",id:"title",name:"title"},a8={class:"form-check"},l8={class:"form-check-input",type:"checkbox",id:"body",name:"body"},d8=["textContent"],u8={class:"anonymize-submit-bar"},c8={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},p8={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},f8={class:"pr-title mb-1"},h8={key:0},m8=["textContent"],g8={key:0},v8={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},y8={class:"nav nav-tabs",id:"myTab",role:"tablist"},b8={key:0,class:"nav-item",role:"presentation"},w8={key:1,class:"nav-item",role:"presentation"},k8=["textContent"],C8={class:"tab-content",id:"pills-tabContent"},E8={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},S8={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},N8={style:{"overflow-x":"auto"}},R8=["innerHTML"],D8={key:0,class:"pr-comments list-group"},P8={class:"pr-comment list-group-item"},A8={class:"d-flex w-100 justify-content-between flex-wrap"},T8={key:0,class:"mb-1"},O8=["textContent"],I8={class:"mb-1"};function op(e,t){let o=Xe("markdown"),i=Pe("field"),s=Pe("form");return a(),l("div",y5,[n("div",b5,[n("div",w5,[n("div",{class:P(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[T((a(),l("form",{class:P(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=Se('
Anonymize \xA0/\xA0 Pull request

Anonymize a pull request

Fill in the details \u2014 it only takes a minute.

Source
',4)),f(" pullRequestUrl "),n("div",k5,[t[2]||(t[2]=n("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[i,{state:e.viewState,set:r=>{e.pullRequestUrl=r},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),T(n("div",{class:"invalid-feedback"},p(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[Z,e.anonymize?.pullRequestUrl?.errors?.access]]),T(n("div",{class:"invalid-feedback"},p(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[Z,e.anonymize?.pullRequestUrl?.errors?.missing]]),T(n("div",{class:"invalid-feedback"},p(e.pullRequestUrl)+" is already anonymized ",513),[[Z,e.anonymize?.pullRequestUrl?.errors?.used]])]),T(n("div",null,[n("div",C5,[n("div",E5,[T(n("input",S5,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=n("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=n("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=n("div",{class:"paper-section-eyebrow anonymize-section-title"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})]),v(" Conference ID ")],-1)),f(" Conference "),n("div",N5,[t[5]||(t[5]=n("label",{for:"conference"},[v("Conference ID "),n("span",{class:"text-muted"},"(Optional)")],-1)),T(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[i,{state:e.viewState,set:r=>{e.conference=r},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),T(n("small",R5,[n("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},p(e.conference_data?.name),9,D5),v(" will expire on "+p(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[Z,e.conference_data]]),T(n("div",P5," The conference is not activated. ",512),[[Z,e.anonymize?.conference?.errors?.activated]]),T(n("small",A5," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[Z,!e.conference_data]])]),t[27]||(t[27]=n("div",{class:"paper-section-eyebrow anonymize-section-title"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),v(" Anonymization Options ")],-1)),f(" Pull Request ID "),n("div",T5,[t[6]||(t[6]=n("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[i,{state:e.viewState,set:r=>{e.pullRequestId=r},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",O5,"Id used in the url: https://anonymous.4open.science/r/"+p(e.pullRequestId),1),T(n("div",I5," Repository id can only contain letters and numbers ",512),[[Z,e.anonymize?.pullRequestId?.errors?.format]]),T(n("div",{class:"invalid-feedback"},p(e.pullRequestId)+" is already used ",513),[[Z,e.anonymize?.pullRequestId?.errors?.used]])]),f(" Terms "),n("div",M5,[t[7]||(t[7]=n("label",{for:"terms"},"Terms to anonymize",-1)),T(n("textarea",{class:P(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=n("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),T(n("div",_5," Terms are in an invalid format ",512),[[Z,e.anonymize?.terms?.errors?.format]])]),n("div",V5,[t[10]||(t[10]=n("label",{for:"expiration"},"Expiration strategy",-1)),T((a(),l("select",q5,[...t[9]||(t[9]=[n("option",{value:"never",selected:""},"Never expire",-1),n("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),n("option",{value:"remove"},"Remove when expired",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=n("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),T(n("div",$5,[t[12]||(t[12]=n("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),T(n("input",L5,null,512),[[i,{state:e.viewState,set:r=>{e.options.expirationDate=r},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),e.fmt?.dateEcho(e.options?.expirationDate)?(a(),l("p",F5,"Expires "+p(e.fmt?.dateEcho(e.options?.expirationDate)),1)):f("v-if",!0),T(n("small",{class:"form-text text-muted"},"After "+p(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[Z,e.options?.expirationMode=="remove"]]),T(n("small",{class:"form-text text-muted"},"After "+p(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+p(e.pullRequestUrl)+".",513),[[Z,e.options?.expirationMode=="redirect"]])],512),[[Z,e.options?.expirationMode!="never"]]),n("div",U5,[n("div",B5,[t[25]||(t[25]=Se('

',1)),n("div",z5,[n("div",H5,[n("div",j5,[n("div",G5,[T(n("input",W5,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=n("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),n("div",K5,[T(n("input",Y5,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=n("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=n("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),n("div",X5,[T(n("input",Q5,null,512),[[i,{state:e.viewState,set:r=>{e.options.date=r},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=n("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=n("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),n("div",J5,[T(n("input",Z5,null,512),[[i,{state:e.viewState,set:r=>{e.options.username=r},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=n("label",{class:"form-check-label",for:"username"},"Display username",-1))]),n("div",x5,[T(n("input",e8,null,512),[[i,{state:e.viewState,set:r=>{e.options.comments=r},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=n("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),n("div",t8,[T(n("input",n8,null,512),[[i,{state:e.viewState,set:r=>{e.options.diff=r},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=n("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),n("div",o8,[T(n("input",s8,null,512),[[i,{state:e.viewState,set:r=>{e.options.origin=r},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=n("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),n("div",i8,[T(n("input",r8,null,512),[[i,{state:e.viewState,set:r=>{e.options.title=r},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=n("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),n("div",a8,[T(n("input",l8,null,512),[[i,{state:e.viewState,set:r=>{e.options.body=r},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[Z,e.pullRequestUrl]]),e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:p(e.error)},null,8,d8)):f("v-if",!0),T(n("div",u8,[e.isUpdate?f("v-if",!0):(a(),l("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=le(r=>e.submitForm(r,()=>{e.anonymizePullRequest(r)}),["prevent"]))},[...t[28]||(t[28]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),v(" Anonymize ",-1)])])),e.isUpdate?(a(),l("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=le(r=>e.submitForm(r,()=>{e.updatePullRequest(r)}),["prevent"]))},[...t[29]||(t[29]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-save"})],-1),v(" Update ",-1)])])):f("v-if",!0)],512),[[Z,e.pullRequestUrl]])],2)),[[s,e.viewState]])],2)]),e.details?(a(),l("div",c8,[n("div",p8,[n("h2",f8,[e.options?.title?(a(),l("span",h8,p(e.anonymize(e.details?.pullRequest?.title)),1)):f("v-if",!0),n("span",{class:P(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},p(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(a(),l("small",{key:0,textContent:p(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,m8)):f("v-if",!0)]),e.options?.origin?(a(),l("small",g8,"Pull Request on "+p(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(a(),l("div",v8,[Oe(o,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),n("ul",y8,[e.options?.diff?(a(),l("li",b8,[...t[31]||(t[31]=[n("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):f("v-if",!0),e.options?.comments?(a(),l("li",w8,[n("button",{class:P(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[n("span",{textContent:p(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,k8)],2)])):f("v-if",!0)]),n("div",C8,[n("div",E8,[e.options?.diff?(a(),l("div",S8,[n("pre",N8,[n("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,R8)])])):f("v-if",!0)]),n("div",{class:P(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(a(),l("ul",D8,[(a(!0),l(F,null,se(e.details?.pullRequest?.comments,(r,d)=>(a(),l("li",P8,[n("div",A8,[e.options?.username?(a(),l("h5",T8," @"+p(e.anonymize(r?.author)),1)):f("v-if",!0),e.options?.date?(a(),l("small",{key:1,textContent:p(e.fmt?.date(r?.updatedDate))},null,8,O8)):f("v-if",!0)]),n("p",I8,[e.options?.body?(a(),Gt(o,{key:0,class:"pr-comment-body",content:e.anonymize(r?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):f("v-if",!0)])]))),256))])):f("v-if",!0)],2)])])):f("v-if",!0)])])}var M8={class:"container paper-page claim-page"},_8={class:"paper-settings-main claim-form"},V8={class:"form-group"},q8={class:"invalid-feedback"},$8={class:"form-group"};function sp(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",M8,[t[6]||(t[6]=Se('
My work \xA0/\xA0 Claim

Claim an anonymization

Take ownership of an existing anonymized repository so it appears on your dashboard.

',3)),n("div",_8,[t[5]||(t[5]=n("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),T((a(),l("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=le(s=>e.submitForm(s,()=>{e.claim()}),["prevent"]))},[n("div",V8,[t[1]||(t[1]=n("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",placeholder:"https://github.com/owner/repository",required:""},null,2),[[o,{state:e.viewState,set:s=>{e.repoUrl=s},value:e.repoUrl,form:"claimForm",options:{}}]]),T(n("div",q8," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[Z,e.claimForm?.repoUrl?.errors?.not_found]])]),n("div",$8,[t[2]||(t[2]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",placeholder:"e.g. my-paper-7F2A","aria-describedby":"idHelp",required:""},null,2),[[o,{state:e.viewState,set:s=>{e.repoId=s},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=n("small",{id:"idHelp",class:"form-text text-muted"},[v("The ID is the last part of the anonymized URL: "),n("code",null,"anonymous.4open.science/r/"),v(".")],-1))]),t[4]||(t[4]=n("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[i,e.viewState]])])])}var L8={class:"container page paper-page conference-page"},F8={class:"paper-crumbs"},U8={class:"here"},B8={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},z8={class:"conf-title-row"},H8=["textContent"],j8={key:0,class:"conf-status"},G8=["textContent"],W8={key:0,class:"paper-page-lede"},K8=["textContent","href"],Y8={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},X8=["href"],Q8={class:"paper-meta-rule"},J8=["textContent"],Z8=["textContent"],x8={key:0},eM={key:0,class:"conference-payment-status",role:"status"},tM=["disabled"],nM={key:1,role:"alert"},oM={key:2,class:"paper-settings-section","aria-labelledby":"conference-payment-heading"},sM={key:0,role:"status"},iM={key:1,role:"alert"},rM=["onClick","disabled"],aM={class:"dashboard-meta conf-view-meta"},lM={class:"dashboard-view-tabs",role:"group","aria-label":"Repository view"},dM=["aria-pressed"],uM=["aria-pressed","aria-label"],cM=["aria-pressed"],pM={class:"attention-count"},fM={class:"dashboard-count",role:"status"},hM={class:"search-wrap"},mM={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories\u2026",autocomplete:"off"},gM={class:"dashboard-filter-controls"},vM={class:"dropdown"},yM={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},bM={class:"filter-btn-value"},wM={class:"dropdown-menu","aria-labelledby":"dropdownSort"},kM={class:"form-check dropdown-item"},CM={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},EM={class:"form-check dropdown-item"},SM={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},NM={class:"form-check dropdown-item"},RM={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},DM={class:"form-check dropdown-item"},PM={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},AM={class:"dashboard-page conf-rows"},TM={class:"cell-anon",role:"cell"},OM={class:"anon-text"},IM={class:"anon-title"},MM=["title","href"],_M={class:"rn-owner"},VM={class:"rn-repo"},qM={class:"anon-sub"},$M=["title"],LM={class:"id-head"},FM={class:"id-tail"},UM=["title"],BM={class:"dashboard-row-meta",role:"presentation"},zM={class:"cell-status",role:"cell"},HM={class:"status-line"},jM=["textContent"],GM=["textContent","title"],WM=["href"],KM=["onClick","disabled"],YM={key:3,class:"status-sub status-sub-date"},XM=["data-unit","aria-label"],QM={class:"cell-expires",role:"cell"},JM={key:0,class:"expires-never"},ZM=["textContent"],xM={key:2,class:"expires-past"},e_={key:3,class:"empty-dash","aria-label":"Not applicable"},t_={class:"cell-actions",role:"cell"},n_=["onClick","disabled","title","aria-label"],o_={class:"sr-only","aria-live":"polite"},s_={class:"project-type-svg","aria-hidden":"true"},i_=["href"],r_={class:"copy-url-label","aria-hidden":"true"},a_=["href","aria-label"],l_={class:"dropdown"},d_=["aria-label"],u_={class:"dropdown-menu dropdown-menu-right"},c_=["href"],p_=["href"],f_=["href"],h_={key:0,class:"paper-table-empty"},m_={key:0},g_={key:1},v_={key:2,class:"paper-table-empty-actions"};function ip(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",L8,[n("div",null,[n("div",F8,[t[6]||(t[6]=n("a",{href:"/dashboard"},"My work",-1)),t[7]||(t[7]=v(" \xA0/\xA0 ",-1)),t[8]||(t[8]=n("a",{href:"/conferences"},"Conferences",-1)),t[9]||(t[9]=v(" \xA0/\xA0 ",-1)),n("span",U8,p(e.conference?.conferenceID),1)]),n("div",B8,[n("div",null,[n("div",z8,[n("h1",{class:"paper-page-title",textContent:p(e.conference?.name)},null,8,H8),e.conference?.status?(a(),l("span",j8,[n("span",{class:P(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),n("span",{textContent:p(e.fmt?.statusLabel(e.conference?.status))},null,8,G8)])):f("v-if",!0)]),e.conference?.url?(a(),l("p",W8,[n("a",{target:"_blank",rel:"noopener",textContent:p(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,K8)])):f("v-if",!0)]),n("div",Y8,[n("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[10]||(t[10]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit conference",-1)])],8,X8)])]),n("div",Q8,[n("span",null,[t[11]||(t[11]=v("ID ",-1)),n("b",{class:"commit-hash",textContent:p(e.conference?.conferenceID)},null,8,J8)]),n("span",null,[t[12]||(t[12]=v("Review window ",-1)),n("b",null,p(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+p(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),n("span",null,[t[13]||(t[13]=v("Repositories ",-1)),n("b",null,p(e.fmt?.number(e.conference?.repositories?.length)),1)]),n("span",null,[t[14]||(t[14]=v("Plan ",-1)),n("b",{textContent:p(e.conferencePlanName(e.conference?.plan?.planID))},null,8,Z8)]),e.conference?.price?(a(),l("span",x8,[t[15]||(t[15]=v("Cost so far ",-1)),n("b",null,p(e.fmt?.money(e.conference?.price)),1)])):f("v-if",!0)]),e.billingNotice?(a(),l("div",eM,[n("p",null,p(e.billingNotice),1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[0]||(t[0]=s=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,tM)])):f("v-if",!0),e.billingError&&e.conference?.status!=="pending_payment"?(a(),l("p",nM,p(e.billingError),1)):f("v-if",!0),e.conference?.status==="pending_payment"?(a(),l("section",oM,[t[16]||(t[16]=n("h2",{id:"conference-payment-heading"},"Activate your review package",-1)),t[17]||(t[17]=n("p",null,"This conference is waiting for payment. Authors can join after payment is confirmed. Checkout returns to this conference. Authors within the package do not pay separately.",-1)),e.billingLoading?(a(),l("p",sM,"Loading payment options\u2026")):f("v-if",!0),e.billingError?(a(),l("p",iM,p(e.billingError),1)):f("v-if",!0),(a(!0),l(F,null,se((e.billing?.plans||[]).filter(s=>s.id===e.conference?.plan?.planID),s=>(a(),l("div",{key:s.id},[n("p",null,[n("strong",null,p(s.name)+" package",1),v(": "+p(e.billingPrice(s))+" for up to "+p(s.repositories)+" repositories and "+p(e.billingBytes(s.storage))+" of source files during the review window. Taxes, if applicable, appear at checkout.",1)]),n("button",{type:"button",class:"btn btn-primary",onClick:r=>e.checkout(s.id,e.conference.conferenceID),disabled:e.billingBusy||e.billingPending||e.billing?.checkoutEnabled===!1},p(e.billingBusy?"Please wait\u2026":"Pay for review package"),9,rM)]))),128)),t[18]||(t[18]=n("p",null,[n("a",{href:"/profile#settings-billing"},"Manage invoices")],-1))])):f("v-if",!0),n("div",aM,[n("div",lM,[n("button",{type:"button","aria-pressed":e.confView()==="current",onClick:t[1]||(t[1]=s=>e.setConfView("current")),title:"Every repository except removed links"},"Current",8,dM),e.confCount("attention")>0||e.confView()==="attention"?(a(),l("button",{key:0,type:"button","aria-pressed":e.confView()==="attention",onClick:t[2]||(t[2]=s=>e.setConfView("attention")),"aria-label":"Needs attention "+e.confCount("attention")},[t[19]||(t[19]=n("span",{class:"dashboard-attention-prefix"},"Needs ",-1)),t[20]||(t[20]=n("span",null,"attention",-1)),t[21]||(t[21]=v()),n("span",{class:P(["attention-count",{"has-attention":e.confCount("attention")>0}])},p(e.fmt?.number(e.confCount("attention"))),3)],8,uM)):f("v-if",!0),e.confCount("removed")>0||e.confView()==="removed"?(a(),l("button",{key:1,type:"button","aria-pressed":e.confView()==="removed",onClick:t[3]||(t[3]=s=>e.setConfView("removed")),title:"Links reviewers can no longer open"},[t[22]||(t[22]=v("Removed ",-1)),n("span",pM,p(e.fmt?.number(e.confCount("removed"))),1)],8,cM)):f("v-if",!0)]),n("span",fM,p(e.search.trim()?e.fmt?.number(e.filteredRepositories?.length||0)+" shown":e.fmt?.number(e.filteredRepositories?.length||0)+((e.filteredRepositories?.length||0)===1?" repository":" repositories")),1)]),T((a(),l("form",{class:"w-100 conf-repo-toolbar","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[4]||(t[4]=le(s=>e.submitForm(s,()=>{s.preventDefault()}),["prevent"]))},[n("div",hM,[T(n("input",mM,null,512),[[o,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),n("div",gM,[n("div",vM,[n("button",yM,[t[23]||(t[23]=n("span",{class:"filter-btn-label"},"Sort",-1)),n("span",bM,p({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),n("div",wM,[t[28]||(t[28]=n("h6",{class:"dropdown-header"},"Order by",-1)),n("div",kM,[T(n("input",CM,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),n("div",EM,[T(n("input",SM,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[25]||(t[25]=n("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),n("div",NM,[T(n("input",RM,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[26]||(t[26]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),n("div",DM,[T(n("input",PM,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[27]||(t[27]=n("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])])])],32)),[[i,e.viewState]]),n("div",AM,[n("div",{class:P(["paper-table paper-table-dashboard paper-table-conf w-100",{"is-removed-view":e.confView()==="removed"}]),role:"table","aria-label":"Repositories"},[t[37]||(t[37]=n("div",{class:"paper-table-head",role:"row"},[n("div",{role:"columnheader"},"Repository"),n("div",{role:"columnheader"},"Status"),n("div",{role:"columnheader",class:"num"},"Views"),n("div",{role:"columnheader"},"Expires"),n("div",{role:"columnheader"},[n("span",{class:"sr-only"},"Actions")])],-1)),(a(!0),l(F,null,se(e.filteredRepositories,(s,r)=>(a(),l("div",{class:P(["paper-table-row",{"repo-inactive":s?.status=="expired"||s?.status=="removed","repo-error":s?.status=="error"}]),role:"row",key:s?.repoId},[n("div",TM,[t[30]||(t[30]=n("span",{class:"project-type-icon",role:"img","aria-label":"Repository",title:"Repository"},[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})])],-1)),n("div",OM,[n("div",IM,[n("a",{class:"repo-name",title:s?.source?.fullName,href:e.safeUrl("/r/"+s?.repoId+"/")},[(s?.source?.fullName||"").indexOf("/")>0?(a(),l(F,{key:0},[n("span",_M,p(s.source.fullName.slice(0,s.source.fullName.indexOf("/")+1)),1),t[29]||(t[29]=n("wbr",null,null,-1)),n("span",VM,p(s.source.fullName.slice(s.source.fullName.indexOf("/")+1)),1)],64)):(a(),l(F,{key:1},[v(p(s?.source?.fullName||s?.repoId),1)],64))],8,MM)]),n("div",qM,[n("code",{class:"anonymous-id",title:s?.repoId},[(s?.repoId||"").length>14?(a(),l(F,{key:0},[n("span",LM,p(s.repoId.slice(0,-6)),1),n("span",FM,p(s.repoId.slice(-6)),1)],64)):(a(),l(F,{key:1},[v(p(s?.repoId),1)],64))],8,$M),s?.source?.commit?(a(),l("span",{key:0,class:"commit-hash",title:s.source.commit},p(s.source.commit.substring(0,7)),9,UM)):f("v-if",!0)])])]),n("div",BM,[n("div",zM,[n("div",HM,[n("span",{class:P(["status-dot","status-"+(s?.status=="error"?"error":s?.status=="ready"?"ready":s?.status=="expired"||s?.status=="removed"?s?.status:"progress")]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:p(e.fmt?.statusLabel(s?.status))},null,8,jM)]),s?.status=="error"&&s?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:p(e.fmt?.statusMsg(s?.statusMessage)),title:s?.statusMessage},null,8,GM)):f("v-if",!0),s?.status=="error"?(a(),l("a",{key:1,class:"project-attention-action",href:e.safeUrl("/status/"+s?.repoId)},"View status",8,WM)):f("v-if",!0),s?.status=="expired"?(a(),l("button",{key:2,type:"button",class:"project-attention-action",onClick:le(d=>e.extendRepo(s),["stop"]),disabled:e.extendingId===s?.repoId,title:"Reviewers can no longer open this link"},"Extend 6 months",8,KM)):f("v-if",!0),s?.anonymizeDate&&s?.status!="error"&&s?.status!="expired"?(a(),l("div",YM,"anonymized "+p(e.fmt?.humanTime(s?.anonymizeDate)),1)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(s?.pageView||0)===1?"view":"views","aria-label":e.fmt?.number(s?.pageView||0)+((s?.pageView||0)===1?" view":" views")},[t[31]||(t[31]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),n("span",null,p(e.fmt?.number(s?.pageView||0)),1)],8,XM),n("div",QM,[t[33]||(t[33]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),s?.status=="ready"&&(s?.options?.expirationMode==="never"||!s?.options?.expirationDate)?(a(),l("span",JM,"No expiry")):f("v-if",!0),s?.status=="ready"&&s?.options?.expirationMode!=="never"&&s?.options?.expirationDate?(a(),l("span",{key:1,textContent:p((e.fmt?.humanTime(s?.options?.expirationDate)||"").replace(/^on /,""))},null,8,ZM)):f("v-if",!0),s?.status=="expired"?(a(),l("span",xM,[t[32]||(t[32]=n("span",{class:"expires-past-prefix"},"Expired ",-1)),v(p(e.fmt?.shortDate(s?.options?.expirationDate)),1)])):f("v-if",!0),s?.status!="ready"&&s?.status!="expired"?(a(),l("span",e_,"\u2014")):f("v-if",!0)])]),n("div",t_,[s?.status!="expired"&&s?.status!="removed"?(a(),l("button",{key:0,type:"button",class:"copy-url",onClick:le(d=>e.copyRepoLink(s),["stop"]),disabled:!!e.copyingId,title:"Copy link: /r/"+s?.repoId+"/","aria-label":"Copy anonymous link for "+s?.repoId},[n("span",o_,p(e.copyingId===s?.repoId?"Link copied":""),1),(a(),l("svg",s_,[n("use",{href:e.copyingId===s?.repoId?"#ui-icon-check":"#project-icon-copy"},null,8,i_)])),n("span",r_,p(e.copyingId===s?.repoId?"Copied":"Copy link"),1)],8,n_)):f("v-if",!0),s?.status!="expired"&&s?.status!="removed"?(a(),l("a",{key:1,class:"row-edit row-open",href:e.safeUrl("/r/"+s?.repoId+"/"),target:"_blank",rel:"noopener",title:"Open what reviewers see","aria-label":"Open anonymous page for "+s?.repoId},[...t[34]||(t[34]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])],8,a_)):f("v-if",!0),n("div",l_,[n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+s?.repoId},[...t[35]||(t[35]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,d_),n("div",u_,[n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+s?.repoId+"/")},"View",8,c_),n("a",{class:"dropdown-item",href:e.safeUrl("https://github.com/"+s?.source?.fullName+"/"),target:"_blank",rel:"noopener"},"Open source on GitHub",8,p_),n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+s?.repoId)},"Edit",8,f_)])])])],2))),128)),e.filteredRepositories?.length==0?(a(),l("div",h_,[t[36]||(t[36]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),e.conference?.repositories?.length?f("v-if",!0):(a(),l("span",m_,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(a(),l("span",g_,"Nothing matches the current filters.")):f("v-if",!0),e.conference?.repositories?.length?(a(),l("div",v_,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=s=>{e.search="",e.setConfView("current")})},"Clear filters")])):f("v-if",!0)])):f("v-if",!0)],2)])])])}var y_={class:"container page paper-page conferences-page"},b_={class:"row"},w_={class:"w-100"},k_={class:"d-flex align-items-start justify-content-between flex-wrap page-head-row page-head page-head-main",style:{gap:"12px"}},C_={key:0,href:"/conference/new",class:"btn btn-primary"},E_={class:"search-wrap"},S_={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},N_={class:"dashboard-filter-controls"},R_={class:"dropdown"},D_={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},P_={class:"filter-btn-value"},A_={class:"dropdown-menu","aria-labelledby":"dropdownSort"},T_={class:"form-check dropdown-item"},O_={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},I_={class:"form-check dropdown-item"},M_={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},__={class:"form-check dropdown-item"},V_={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},q_={class:"dropdown"},$_={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},L_={key:0,class:"filter-btn-value"},F_={key:1,class:"filter-btn-value"},U_={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},B_={class:"form-check dropdown-item"},z_=["id"],H_=["for"],j_={key:1,class:"dashboard-meta"},G_={class:"dashboard-count"},W_={key:0},K_={key:0},Y_={key:1},X_={key:0,class:"filter-chip"},Q_=["onClick","aria-label"],J_={key:0,class:"conference-feedback",role:"alert"},Z_={key:1,class:"conference-feedback",role:"status"},x_={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},eV={class:"cell-anon",role:"cell"},tV={class:"anon-text"},nV=["textContent","href"],oV={class:"anon-sub"},sV={class:"anon-source"},iV=["textContent"],rV={key:0},aV=["textContent","href"],lV={class:"cell-status",role:"cell"},dV={class:"status-line"},uV=["textContent"],cV={class:"cell-views num",role:"cell"},pV=["textContent"],fV={class:"cell-expires",role:"cell"},hV={key:0},mV={key:1,class:"empty-dash","aria-label":"No review window"},gV={class:"cell-actions",role:"cell"},vV={class:"dropdown"},yV=["disabled","aria-label"],bV={class:"dropdown-menu dropdown-menu-right"},wV=["href"],kV=["href"],CV={key:0},EV=["onClick"],SV={key:0,class:"paper-table-empty"},NV={key:0,class:"empty-icon","aria-hidden":"true"},RV={key:1,class:"ui-icon","aria-hidden":"true"},DV={key:3},PV={class:"paper-table-empty-actions"},AV={key:0,href:"/conference/new",class:"btn btn-primary conf-empty-new"};function rp(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",y_,[n("div",b_,[n("div",w_,[n("div",k_,[t[4]||(t[4]=n("div",null,[n("h1",{class:"paper-page-title"},[v("Your "),n("em",null,"conferences")]),n("p",{class:"paper-page-lede"},"Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.")],-1)),e.conferences&&e.conferences.length==0?f("v-if",!0):(a(),l("a",C_,[...t[3]||(t[3]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})],-1),v(" New conference ",-1)])]))]),e.conferences?.length>0?T((a(),l("form",{key:0,class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=le(s=>e.submitForm(s,()=>{s.preventDefault()}),["prevent"]))},[n("div",E_,[T(n("input",S_,null,512),[[o,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),n("div",N_,[n("div",R_,[n("button",D_,[t[5]||(t[5]=n("span",{class:"filter-btn-label"},"Sort",-1)),n("span",P_,p({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),n("div",A_,[t[9]||(t[9]=n("h6",{class:"dropdown-header"},"Order by",-1)),n("div",T_,[T(n("input",O_,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[6]||(t[6]=n("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),n("div",I_,[T(n("input",M_,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[7]||(t[7]=n("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),n("div",__,[T(n("input",V_,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[8]||(t[8]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),n("div",q_,[n("button",$_,[t[10]||(t[10]=n("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(a(),l("span",L_,"All")):f("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?f("v-if",!0):(a(),l("span",F_,p((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),n("div",U_,[t[11]||(t[11]=n("h6",{class:"dropdown-header"},"Show statuses",-1)),(a(!0),l(F,null,se(e.statusLabels,(s,r,d)=>(a(),l("div",B_,[T(n("input",{class:"form-check-input",type:"checkbox",id:"status-"+r},null,8,z_),[[o,{state:e.viewState,set:c=>{e.filters.status[r]=c},value:e.filters?.status[r],form:null,options:{}}]]),n("label",{class:"form-check-label",for:"status-"+r},p(s),9,H_)]))),256))])])])],32)),[[i,e.viewState]]):f("v-if",!0),e.conferences?.length>0?(a(),l("div",j_,[n("span",G_,[e.filteredConferences?.length===e.conferences?.length?(a(),l("span",W_,[v(p(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(a(),l("span",K_,"s")):f("v-if",!0)])):f("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(a(),l("span",Y_,p(e.fmt?.number(e.filteredConferences?.length))+" of "+p(e.fmt?.number(e.conferences?.length))+" shown",1)):f("v-if",!0)]),(a(!0),l(F,null,se(e.filters?.status,(s,r,d)=>(a(),l(F,null,[s===!1?(a(),l("span",X_,[v(" Hiding "+p(e.statusLabels[r])+" ",1),n("button",{type:"button",class:"filter-chip-close",onClick:c=>{e.filters.status[r]=!0},"aria-label":"Show "+e.statusLabels[r]+" again"},"\xD7",8,Q_)])):f("v-if",!0)],64))),256))])):f("v-if",!0)]),e.error?(a(),l("div",J_,[n("span",null,p(e.error),1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=s=>e.loadConferences())},"Retry")])):f("v-if",!0),e.loading?(a(),l("div",Z_,"Loading conferences\u2026")):f("v-if",!0),n("div",x_,[t[28]||(t[28]=n("div",{class:"paper-table-head",role:"row"},[n("div",{role:"columnheader"},"Conference"),n("div",{role:"columnheader"},"Status"),n("div",{role:"columnheader",class:"num"},"Repos"),n("div",{role:"columnheader"},"Review window"),n("div",{role:"columnheader"},[n("span",{class:"sr-only"},"Actions")])],-1)),(a(!0),l(F,null,se(e.filteredConferences,(s,r)=>(a(),l("div",{class:P(["paper-table-row row-clickable",{"repo-inactive":s?.status=="expired"||s?.status=="removed"}]),role:"row",key:s?.conferenceID},[n("div",eV,[t[14]||(t[14]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[n("use",{href:"#project-icon-conference"})],-1)),n("div",tV,[n("a",{class:"repo-name",textContent:p(s?.name),href:e.safeUrl("/conference/"+s?.conferenceID)},null,8,nV),n("div",oV,[n("span",sV,[t[13]||(t[13]=v("ID ",-1)),n("span",{class:"commit-hash",textContent:p(s?.conferenceID)},null,8,iV),s?.url?(a(),l("span",rV,[t[12]||(t[12]=v(" \xB7 ",-1)),n("a",{target:"_blank",rel:"noopener",textContent:p(e.fmt?.limitTo(s?.url,60)),href:e.safeUrl(s?.url)},null,8,aV)])):f("v-if",!0)])])])]),n("div",lV,[n("div",dV,[n("span",{class:P(["status-dot","status-"+s?.status]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:p(e.fmt?.statusLabel(s?.status))},null,8,uV)])]),n("div",cV,[t[15]||(t[15]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),t[16]||(t[16]=v()),n("span",{textContent:p(e.fmt?.number(s?.nbRepositories||0))},null,8,pV)]),n("div",fV,[t[17]||(t[17]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),s?.startDate?(a(),l("span",hV,p(e.fmt?.date(s?.startDate,"mediumDate"))+" \u2013 "+p(e.fmt?.date(s?.endDate,"mediumDate")),1)):f("v-if",!0),s?.startDate?f("v-if",!0):(a(),l("span",mV,"\u2014"))]),n("div",gV,[n("div",vV,[n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:s?.removing,"aria-label":"Actions for "+s?.name},[...t[18]||(t[18]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,yV),n("div",bV,[n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/")},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" View ",-1)])],8,wV),n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+s?.conferenceID+"/edit")},[...t[20]||(t[20]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit ",-1)])],8,kV),s?.status!="removed"?(a(),l("div",CV,[t[22]||(t[22]=n("div",{class:"dropdown-divider"},null,-1)),n("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:d=>e.removeConference(s)},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Remove ",-1)])],8,EV)])):f("v-if",!0)])])])],2))),128)),!e.loading&&!e.error&&e.filteredConferences?.length==0?(a(),l("div",SV,[e.conferences?.length==0?(a(),l("span",NV,[...t[23]||(t[23]=[n("svg",{class:"ui-icon"},[n("use",{href:"#project-icon-conference"})],-1)])])):f("v-if",!0),e.conferences?.length>0?(a(),l("svg",RV,[...t[24]||(t[24]=[n("use",{href:"#project-icon-inbox"},null,-1)])])):f("v-if",!0),e.conferences?.length==0?(a(),l(F,{key:2},[t[25]||(t[25]=n("strong",{class:"empty-title"},"No conferences yet",-1)),t[26]||(t[26]=n("span",null,"Create one to group submissions for a venue, share a dashboard with chairs, and set a single expiry date.",-1))],64)):f("v-if",!0),e.conferences?.length>0?(a(),l("span",DV,"Nothing matches the current filters.")):f("v-if",!0),n("div",PV,[e.conferences?.length==0?(a(),l("a",AV,[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})],-1),v(" New conference",-1)])])):f("v-if",!0),e.conferences?.length>0?(a(),l("button",{key:1,type:"button",class:"btn btn-outline-ink",onClick:t[2]||(t[2]=s=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):f("v-if",!0)])])):f("v-if",!0)])])])}var TV={class:"container page dashboard-page paper-page"},OV={class:"row"},IV={class:"w-100"},MV={class:"dashboard-heading page-head page-head-main"},_V={class:"dashboard-title-line"},VV={key:0,class:"dashboard-count-head","aria-hidden":"true"},qV={key:0},$V={class:"dashboard-heading-actions"},LV=["open"],FV=["aria-expanded"],UV=["stroke-dasharray"],BV={key:1,d:"M7 12c0-4 4-4 5 0s5 4 5 0-4-4-5 0-5 4-5 0",class:"quota-ring-unlimited"},zV={key:0,class:"quota-summary-value"},HV={key:0},jV={class:"quota-panel",id:"dashboard-usage"},GV={class:"quota-panel-heading"},WV={key:1,class:"quota-loading",role:"status"},KV={key:0,class:"dashboard-meta"},YV={key:0,class:"dashboard-view-tabs",role:"group","aria-label":"Project view"},XV=["aria-pressed"],QV=["aria-pressed","aria-label"],JV=["aria-pressed","aria-label"],ZV={key:0,class:"attention-count"},xV={key:0},e6={key:0},t6={key:1},n6={class:"search-wrap"},o6={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search projects\u2026",autocomplete:"off"},s6=["aria-expanded"],i6={class:"btn-group",role:"group","aria-label":"Type"},r6=["aria-pressed"],a6=["aria-pressed"],l6=["aria-pressed"],d6=["aria-pressed"],u6={class:"dropdown"},c6={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},p6={class:"filter-btn-value"},f6={class:"sr-only"},h6={class:"dropdown-menu","aria-labelledby":"dropdownSort"},m6={class:"form-check dropdown-item"},g6=["onClick","checked","id"],v6=["for"],y6=["inert"],b6={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},w6={class:"filter-btn-value"},k6={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},C6={key:0,class:"form-check dropdown-item"},E6=["id"],S6=["for"],N6={key:1,class:"dashboard-active-filters dashboard-active-filters-row"},R6=["onClick","aria-label","title"],D6=["aria-busy"],P6={class:"paper-table-head",role:"row"},A6=["aria-sort"],T6=["aria-sort"],O6=["aria-sort"],I6=["aria-sort"],M6={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},_6=["onClick"],V6={class:"cell-anon",role:"cell"},q6=["aria-label","title"],$6={class:"project-type-svg","aria-hidden":"true"},L6=["href"],F6={class:"anon-text"},U6={class:"anon-title"},B6=["title","href"],z6={class:"rn-owner"},H6={class:"rn-repo"},j6={key:1,class:"repo-name repo-name-static"},G6={class:"rn-owner"},W6={class:"rn-repo"},K6={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},Y6={key:0,class:"anon-sub"},X6=["title"],Q6={class:"id-head"},J6={class:"id-tail"},Z6=["title"],x6=["title"],eq=["textContent"],tq={class:"dashboard-row-meta",role:"presentation"},nq={class:"cell-status",role:"cell"},oq={class:"status-line"},sq=["textContent"],iq=["onClick"],rq=["textContent","title"],aq=["title"],lq=["href"],dq={key:3,class:"status-action-line"},uq={key:0,class:"status-stuck"},cq=["onClick","data-project-actions","aria-controls","aria-expanded"],pq=["onClick"],fq={key:5,class:"status-sub status-sub-date status-sub-removed"},hq={key:6,class:"status-sub status-sub-date"},mq=["data-unit","aria-label"],gq={class:"cell-expires",role:"cell"},vq={key:0,class:"expires-never"},yq=["textContent"],bq=["title"],wq={key:3,class:"expires-past"},kq={key:4,class:"expires-past"},Cq={key:5,class:"empty-dash","aria-label":"Not applicable"},Eq={class:"cell-actions",role:"cell"},Sq=["onClick","disabled","title","aria-label"],Nq={class:"sr-only","aria-live":"polite"},Rq={class:"project-type-svg","aria-hidden":"true"},Dq=["href"],Pq={class:"copy-url-label","aria-hidden":"true"},Aq=["href","aria-label"],Tq=["href","title","aria-label"],Oq=["title","aria-label"],Iq=["title","aria-label"],Mq=["aria-label"],_q={key:6,class:"dropdown is-disabled"},Vq=["aria-label"],qq={key:7,class:"dropdown"},$q=["data-project-actions","aria-label"],Lq={class:"dropdown-menu dropdown-menu-right"},Fq=["onClick","aria-controls","aria-expanded"],Uq=["href"],Bq=["href"],zq=["onClick","disabled"],Hq=["href"],jq=["onClick"],Gq=["onClick"],Wq=["onClick"],Kq={key:5},Yq=["onClick"],Xq={key:1,class:"project-details-row",role:"row"},Qq=["id","onKeydown"],Jq={class:"project-details-heading"},Zq=["onClick"],xq={class:"project-details-list"},e$={key:0},t$={key:1},n$={key:0},o$={key:2},s$={key:0,class:"project-progress-help"},i$=["href"],r$=["onSubmit"],a$=["for"],l$=["id"],d$={class:"project-name-controls"},u$=["id","aria-describedby","disabled"],c$=["disabled"],p$={key:0,class:"project-name-error",role:"alert"},f$={key:1,role:"status"},h$={key:0,class:"paper-table-empty"},m$={key:0},g$={key:1},v$={class:"paper-table-empty-actions"},y$={key:1,href:"/anonymize",class:"btn btn-ink"},b$={key:0,class:"dashboard-pagination"},w$={key:0,role:"alert"},k$=["disabled"];function ap(e,t){let o=Xe("quota-usage"),i=Pe("field"),s=Pe("form");return a(),l("div",TV,[n("div",OV,[n("div",IV,[n("div",MV,[n("div",null,[n("div",_V,[t[27]||(t[27]=n("h1",{class:"paper-page-title"},"My work",-1)),!e.loading&&e.isPlainView()?(a(),l("span",VV,[v(p(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" project",1),(e.dashboardTotals?.filtered??e.filteredItems?.length)!==1?(a(),l("span",qV,"s")):f("v-if",!0)])):f("v-if",!0)]),t[28]||(t[28]=n("p",{class:"paper-page-lede"},"Manage your anonymous links.",-1))]),n("div",$V,[n("details",{class:"dashboard-quota",open:e.quotaExpanded,onToggle:t[1]||(t[1]=r=>e.quotaExpanded=r.target.open),onKeydown:t[2]||(t[2]=kt(le(r=>e.closeQuota(),["prevent","stop"]),["esc"]))},[n("summary",{"aria-controls":"dashboard-usage","aria-expanded":e.quotaExpanded,class:P(e.quota?"quota-level-"+e.quota.repository.level:""),style:$e(e.quota&&!e.quota.repository.unlimited?{"--quota-pct":e.quota.repository.percent+"%"}:null)},[(a(),l("svg",{class:P(["quota-summary-ring",e.quota?"quota-"+e.quota.repository.level:""]),viewBox:"0 0 24 24","aria-hidden":"true"},[t[29]||(t[29]=n("circle",{class:"quota-ring-track",cx:"12",cy:"12",r:"9"},null,-1)),e.quota&&!e.quota.repository.unlimited?(a(),l("circle",{key:0,class:"quota-ring-fill",cx:"12",cy:"12",r:"9",pathLength:"100","stroke-dasharray":e.quota.repository.percent+" 100"},null,8,UV)):f("v-if",!0),e.quota?.repository.unlimited?(a(),l("path",BV)):f("v-if",!0)],2)),t[31]||(t[31]=n("span",{class:"quota-summary-label"},"Usage",-1)),e.quota?(a(),l("span",zV,[v(p(e.fmt.number(e.quota.repository.used)),1),e.quota.repository.unlimited?f("v-if",!0):(a(),l("span",HV," / "+p(e.fmt.number(e.quota.repository.total)),1)),t[30]||(t[30]=v(" repos",-1))])):f("v-if",!0),t[32]||(t[32]=n("svg",{class:"project-type-svg quota-summary-chevron","aria-hidden":"true"},[n("use",{href:"#project-icon-chevron"})],-1))],14,FV),n("div",jV,[n("div",GV,[t[34]||(t[34]=n("h2",null,"Account usage",-1)),n("button",{type:"button",class:"project-close","aria-label":"Close usage",onClick:t[0]||(t[0]=r=>e.closeQuota())},[...t[33]||(t[33]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])])]),e.quota?(a(),Gt(o,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(a(),l("p",WV,"Loading usage\u2026"))])],40,LV),t[35]||(t[35]=Se('New anonymization',1))])]),f(" Result count + active filter chips "),e.loading?f("v-if",!0):(a(),l("div",KV,[e.showViewTabs()?(a(),l("div",YV,[n("button",{type:"button","aria-pressed":e.statusView()==="active",onClick:t[3]||(t[3]=r=>e.setStatusView("active")),title:"Every project except removed links"},"Current",8,XV),e.attentionCount()>0||e.statusView()==="attention"?(a(),l("button",{key:0,type:"button","aria-pressed":e.statusView()==="attention",onClick:t[4]||(t[4]=r=>e.setStatusView("attention")),"aria-label":"Needs attention "+e.attentionCount()},[t[36]||(t[36]=n("span",{class:"dashboard-attention-prefix"},"Needs ",-1)),t[37]||(t[37]=n("span",null,"attention",-1)),t[38]||(t[38]=v()),n("span",{class:P(["attention-count",{"has-attention":e.attentionCount()>0}])},p(e.attentionCount()),3)],8,QV)):f("v-if",!0),e.removedCount>0||e.statusView()==="removed"||e.removedCount==null&&e.dashboardTotals?.total>e.dashboardTotals?.filtered?(a(),l("button",{key:1,type:"button","aria-pressed":e.statusView()==="removed",onClick:t[5]||(t[5]=r=>e.setStatusView("removed")),"aria-label":"Removed "+(e.removedCount??""),title:"Links reviewers can no longer open"},[t[39]||(t[39]=v("Removed ",-1)),e.removedCount!=null?(a(),l("span",ZV,p(e.fmt?.number(e.removedCount)),1)):f("v-if",!0)],8,JV)):f("v-if",!0)])):f("v-if",!0),n("span",{class:P(["dashboard-count",{"is-plain":e.isPlainView()}])},[e.isPlainView()?(a(),l("span",xV,[v(p(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" project",1),(e.dashboardTotals?.filtered??e.filteredItems?.length)!==1?(a(),l("span",e6,"s")):f("v-if",!0)])):(a(),l("span",t6,p(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" shown",1))],2)])),f(" Search + filters "),T((a(),l("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[13]||(t[13]=le(r=>e.submitForm(r,()=>{r.preventDefault()}),["prevent"]))},[n("div",n6,[T(n("input",o6,null,512),[[i,{state:e.viewState,set:r=>{e.search=r},value:e.search,form:null,options:{}}]])]),n("button",{class:"btn dashboard-filters-toggle",type:"button","aria-expanded":e.filtersExpanded,"aria-controls":"dashboard-filter-controls",onClick:t[6]||(t[6]=r=>e.filtersExpanded=!e.filtersExpanded)},[...t[40]||(t[40]=[v("Filters",-1),n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-filter"})],-1)])],8,s6),n("div",{id:"dashboard-filter-controls",class:P(["dashboard-filter-controls",{expanded:e.filtersExpanded}])},[n("div",i6,[n("button",{type:"button",class:P(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[7]||(t[7]=r=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,r6),n("button",{type:"button",class:P(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="repo"}]),title:"Repositories",onClick:t[8]||(t[8]=r=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},[...t[41]||(t[41]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),n("span",{class:"type-filter-label"},"Repos",-1)])],10,a6),n("button",{type:"button",class:P(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="pr"}]),title:"Pull requests",onClick:t[9]||(t[9]=r=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},[...t[42]||(t[42]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-pr"})],-1),n("span",{class:"type-filter-label"},"PRs",-1)])],10,l6),n("button",{type:"button",class:P(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="gist"}]),title:"Gists",onClick:t[10]||(t[10]=r=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},[...t[43]||(t[43]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-gist"})],-1),n("span",{class:"type-filter-label"},"Gists",-1)])],10,d6)]),n("div",{id:"dashboard-extra-filters",class:P(["dashboard-extra-filters",{expanded:e.filtersExpanded}])},[n("div",u6,[n("button",c6,[t[45]||(t[45]=n("span",{class:"filter-btn-label"},"Sort",-1)),n("span",p6,p(e.sortLabel()),1),(a(),l("svg",{class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[44]||(t[44]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)),n("span",f6,p(e.sortDesc()?"descending":"ascending"),1)]),n("div",h6,[t[46]||(t[46]=n("h6",{class:"dropdown-header"},"Order by",-1)),(a(!0),l(F,null,se(e.sortFields,(r,d,c)=>(a(),l("div",m6,[n("input",{class:"form-check-input",type:"radio",name:"sort",onClick:u=>e.setSort(d,r.defaultDesc),checked:e.isSortedBy(d),id:"sort-"+c},null,8,g6),n("label",{class:"form-check-label",for:"sort-"+c},p(r?.label),9,v6)]))),256)),t[47]||(t[47]=n("div",{class:"dropdown-divider"},null,-1)),n("button",{type:"button",class:"dropdown-item",onClick:t[11]||(t[11]=r=>e.toggleSortDirection())},p(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])]),n("div",{class:P(["dropdown dashboard-status-filter",{"is-view-hidden":e.statusView()==="removed"}]),inert:e.statusView()==="removed"?!0:null},[n("button",b6,[t[48]||(t[48]=n("span",{class:"filter-btn-label"},"Status",-1)),n("span",w6,p(e.statusChipKeys().length===0?"Any":e.statusChipKeys().length===1?"Hiding "+(e.statusKeyLabels[e.statusChipKeys()[0]]||"").toLowerCase():e.statusChipKeys().length+" hidden"),1)]),n("div",k6,[t[49]||(t[49]=n("h6",{class:"dropdown-header"},"Show statuses",-1)),n("button",{type:"button",class:P(["dropdown-item status-preset",{active:e.statusChipKeys().length===0}]),onClick:t[12]||(t[12]=r=>e.statusChipKeys().forEach(d=>{e.filters.status[d]=!0}))},"Any status",2),t[50]||(t[50]=n("div",{class:"dropdown-divider"},null,-1)),(a(!0),l(F,null,se(e.statusKeyLabels,(r,d,c)=>(a(),l(F,{key:d},[d!=="removed"?(a(),l("div",C6,[T(n("input",{class:"form-check-input",type:"checkbox",id:"status-"+d},null,8,E6),[[i,{state:e.viewState,set:u=>{e.filters.status[d]=u},value:e.filters?.status[d],form:null,options:{}}]]),n("label",{class:"form-check-label",for:"status-"+d},p(r),9,S6)])):f("v-if",!0)],64))),128))])],10,y6)],2)],2)],32)),[[s,e.viewState]]),!e.loading&&e.showClearFilters()?(a(),l("div",N6,[(a(!0),l(F,null,se(e.statusChipKeys(),r=>(a(),l("button",{key:r,type:"button",class:"filter-chip",onClick:d=>e.filters.status[r]=!0,"aria-label":"Show "+e.statusKeyLabels[r]+" again",title:"Show "+e.statusKeyLabels[r]+" again"},[v("Hiding "+p((e.statusKeyLabels[r]||"").toLowerCase()),1),t[51]||(t[51]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1))],8,R6))),128)),e.typeFilter!=="all"?(a(),l("button",{key:0,type:"button",class:"filter-chip",onClick:t[14]||(t[14]=r=>e.typeFilter="all"),"aria-label":"Show all project types"},[v(p(e.typeFilter==="repo"?"Repositories":e.typeFilter==="pr"?"Pull requests":"Gists"),1),t[52]||(t[52]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1))])):f("v-if",!0),e.showClearFilters()?(a(),l("button",{key:1,type:"button",class:"btn-link-inline",onClick:t[15]||(t[15]=r=>e.clearFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0)]),f(" Table "),n("div",{class:P(["paper-table paper-table-dashboard",{"is-removed-view":e.statusView()==="removed"}]),role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[n("div",P6,[n("div",{role:"columnheader","aria-sort":e.isSortedBy("_label")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("_label")}]),onClick:t[16]||(t[16]=r=>e.setSort("_label"))},[t[54]||(t[54]=v(" Project ",-1)),e.isSortedBy("_label")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[53]||(t[53]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,A6),n("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("status")}]),onClick:t[17]||(t[17]=r=>e.setSort("status"))},[t[56]||(t[56]=v(" Status ",-1)),e.isSortedBy("status")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[55]||(t[55]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,T6),n("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[18]||(t[18]=r=>e.setSort("pageView"))},[t[58]||(t[58]=v(" Views ",-1)),e.isSortedBy("pageView")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[57]||(t[57]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,O6),n("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[19]||(t[19]=r=>e.setSort("options.expirationDate"))},[t[60]||(t[60]=v(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[59]||(t[59]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,I6),t[61]||(t[61]=n("div",{role:"columnheader",class:"col-link"},[n("span",{class:"sr-only"},"Actions")],-1))]),f(" Loading skeleton: keeps the layout stable while the three lists load "),(a(),l(F,null,se([1,2,3,4],(r,d)=>(a(),l(F,null,[e.loading?(a(),l("div",M6,[...t[62]||(t[62]=[n("div",{class:"cell-anon",role:"cell"},[n("span",{class:"skeleton skeleton-badge"}),n("div",{class:"anon-text"},[n("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),n("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),n("div",{class:"cell-status",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),n("div",{class:"cell-views num",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),n("div",{class:"cell-expires",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),n("div",{class:"cell-actions",role:"cell"},null,-1)])])):f("v-if",!0)],64))),64)),(a(!0),l(F,null,se(e.filteredItems,(r,d)=>(a(),l(F,{key:r?._type+":"+(r?._id||d)},[e.loading?f("v-if",!0):(a(),l("div",{key:0,class:P(["paper-table-row",{"repo-inactive":r?._statusKey=="expired"||r?._statusKey=="removed","repo-error":r?.status=="error","row-clickable":!!r?._viewUrl}]),role:"row",onClick:c=>e.openItem(r,c)},[n("div",V6,[n("span",{class:"project-type-icon",role:"img","aria-label":r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist",title:r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist"},[(a(),l("svg",$6,[n("use",{href:"#project-type-"+r._type},null,8,L6)]))],8,q6),n("div",F6,[n("div",U6,[r?._viewUrl?(a(),l("a",{key:0,class:"repo-name",title:r._label,href:e.safeUrl(r?._viewUrl)},[(r?._label||"").indexOf("/")>0?(a(),l(F,{key:0},[n("span",z6,p(r._label.slice(0,r._label.indexOf("/")+1)),1),t[63]||(t[63]=n("wbr",null,null,-1)),n("span",H6,p(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(F,{key:1},[v(p(r?._label),1)],64))],8,B6)):f("v-if",!0),r?._viewUrl?f("v-if",!0):(a(),l("span",j6,[(r?._label||"").indexOf("/")>0?(a(),l(F,{key:0},[n("span",G6,p(r._label.slice(0,r._label.indexOf("/")+1)),1),t[64]||(t[64]=n("wbr",null,null,-1)),n("span",W6,p(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(F,{key:1},[v(p(r?._label),1)],64))])),r?.role==="coauthor"?(a(),l("span",K6,"Co-author")):f("v-if",!0)]),r?._id||r?._type==="repo"&&r?.source?.commit||r?.conference?(a(),l("div",Y6,[r?._id?(a(),l("code",{key:0,class:"anonymous-id",title:r._id},[r._id.length>14?(a(),l(F,{key:0},[n("span",Q6,p(r._id.slice(0,-6)),1),n("span",J6,p(r._id.slice(-6)),1)],64)):(a(),l(F,{key:1},[v(p(r._id),1)],64))],8,X6)):f("v-if",!0),r?._type==="repo"&&r?.source?.commit?(a(),l("span",{key:1,class:"commit-hash",title:r.source.commit},p(r.source.commit.substring(0,7)),9,Z6)):f("v-if",!0),r?.conference?(a(),l("span",{key:2,class:"cell-conf conf-tag",title:"Conference: "+r.conference},[t[65]||(t[65]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),n("span",{class:"conf-name",textContent:p(r?.conference)},null,8,eq)],8,x6)):f("v-if",!0)])):f("v-if",!0)])]),n("div",tq,[n("div",nq,[n("div",oq,[n("span",{class:P(["status-dot","status-"+r?._statusKey]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:p(e.fmt?.statusLabel(r?.status))},null,8,sq),r?.status=="removed"?(a(),l(F,{key:0},[t[66]||(t[66]=n("span",{class:"seg-sep status-removed-sep","aria-hidden":"true"},"\xB7",-1)),n("button",{type:"button",class:"project-attention-action status-enable",onClick:le(c=>e.refreshItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Enable again",8,iq)],64)):f("v-if",!0)]),r?.status=="error"&&r?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:p(e.fmt?.statusMsg(r?.statusMessage)),title:r?.statusMessage},null,8,rq)):f("v-if",!0),r?._stale?(a(),l("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(r?.anonymizeDate||r?.lastView)},p(e.idleText(r)),9,aq)):f("v-if",!0),r.status==="error"&&r._editUrl?(a(),l("a",{key:2,class:"project-attention-action",href:e.safeUrl(r._editUrl)},"Fix source",8,lq)):f("v-if",!0),r._stale||r._broken?(a(),l("div",dq,[r._stale&&!r._broken?(a(),l("span",uq,[...t[67]||(t[67]=[v("May be stuck",-1),n("span",{"aria-hidden":"true"}," \xB7 ",-1)])])):f("v-if",!0),r._stale||r._broken?(a(),l("button",{key:1,type:"button",class:"project-attention-action",onClick:le(c=>e.showProjectDetails(r),["stop"]),"data-project-actions":r._broken?encodeURIComponent(r._type+":"+r._id):null,"aria-controls":r._broken?e.projectDetailsId(r):null,"aria-expanded":r._broken?e.selectedProject===r:null},p(r._broken?"Review details":"Check progress"),9,cq)):f("v-if",!0)])):f("v-if",!0),r?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"project-attention-action",onClick:le(c=>e.extendItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Extend 6 months",8,pq)):f("v-if",!0),r?.status=="removed"&&r?.anonymizeDate?(a(),l("div",fq,"anonymized "+p(e.fmt?.humanTime(r?.anonymizeDate)),1)):f("v-if",!0),r?.status!="error"&&r?.status!="expired"&&r?.status!="removed"&&!r?._stale&&r?.anonymizeDate?(a(),l("div",hq," anonymized "+p(e.fmt?.humanTime(r?.anonymizeDate)),1)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":r.pageView===1?"view":"views","aria-label":e.fmt.number(r.pageView)+(r.pageView===1?" view":" views")},[t[68]||(t[68]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),n("span",null,p(e.fmt.number(r.pageView)),1)],8,mq),n("div",gq,[t[72]||(t[72]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),r?._expiry?.kind==="never"?(a(),l("span",vq,"No expiry")):f("v-if",!0),r?._expiry?.kind==="date"&&!r?._expiry?.soon?(a(),l("span",{key:1,textContent:p((e.fmt?.humanTime(r?._expiry?.date)||"").replace(/^on /,""))},null,8,yq)):f("v-if",!0),r?._expiry?.kind==="date"&&r?._expiry?.soon?(a(),l("span",{key:2,class:"expires-soon",title:"Expires "+e.fmt?.humanTime(r?._expiry?.date)},[t[69]||(t[69]=n("svg",{class:"project-type-svg expires-soon-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[70]||(t[70]=n("span",{class:"expires-soon-prefix"},"Expires ",-1)),v(p(r._expiry.soon),1)],8,bq)):f("v-if",!0),r?._expiry?.kind==="expired"&&r?._expiry?.date?(a(),l("span",wq,[t[71]||(t[71]=n("span",{class:"expires-past-prefix"},"Expired ",-1)),v(p(r?._expiry?.label||e.fmt?.humanTime(r?._expiry?.date)),1)])):f("v-if",!0),r?._expiry?.kind==="expired"&&!r?._expiry?.date?(a(),l("span",kq,"Expired")):f("v-if",!0),r?._expiry?.kind==="none"?(a(),l("span",Cq,"\u2014")):f("v-if",!0)])]),n("div",Eq,[r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed")?(a(),l("button",{key:0,type:"button",class:"copy-url",onClick:le(c=>e.copyLink(r),["stop"]),disabled:!!e.copyingId,title:"Copy link: "+r._viewUrl,"aria-label":"Copy anonymous link for "+r._label},[n("span",Nq,p(e.copyingId===r._type+":"+r._id?"Link copied":""),1),(a(),l("svg",Rq,[n("use",{href:e.copyingId===r._type+":"+r._id?"#ui-icon-check":"#project-icon-copy"},null,8,Dq)])),n("span",Pq,p(e.copyingId===r._type+":"+r._id?"Copied":"Copy link"),1)],8,Sq)):f("v-if",!0),r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed")?(a(),l("a",{key:1,class:"row-edit row-open",href:e.safeUrl(r._viewUrl),target:"_blank",rel:"noopener",title:"Open what reviewers see","aria-label":"Open anonymous page for "+r._label},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])],8,Aq)):f("v-if",!0),r?._editUrl&&!r?._broken&&r?._statusKey!="removed"?(a(),l("a",{key:2,class:"row-edit",href:e.safeUrl(r._editUrl),title:"Edit "+r._name,"aria-label":"Edit "+r._name},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1)])],8,Tq)):f("v-if",!0),!(r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed"))&&r?._statusKey!="removed"&&r?._statusKey!="expired"?(a(),l("button",{key:3,type:"button",class:"copy-url is-disabled","aria-disabled":"true",onClick:t[20]||(t[20]=le(()=>{},["stop"])),title:r?._statusKey=="expired"?"Link expired: reviewers can no longer open it":r?._statusKey=="removed"?"Link offline: reviewers can no longer open it":"No link: this record is incomplete","aria-label":"Copy link unavailable for "+r._label},[...t[75]||(t[75]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-copy"})],-1),n("span",{class:"copy-url-label","aria-hidden":"true"},"Copy link",-1)])],8,Oq)):f("v-if",!0),!(r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed"))&&r?._statusKey!="removed"&&r?._statusKey!="expired"?(a(),l("button",{key:4,type:"button",class:"row-edit row-open is-disabled","aria-disabled":"true",onClick:t[21]||(t[21]=le(()=>{},["stop"])),title:r?._statusKey=="expired"?"Link expired: reviewers can no longer open it":r?._statusKey=="removed"?"Link offline: reviewers can no longer open it":"No link: this record is incomplete","aria-label":"Open unavailable for "+r._label},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])],8,Iq)):f("v-if",!0),r?._editUrl&&!r?._broken?f("v-if",!0):(a(),l("button",{key:5,type:"button",class:"row-edit is-disabled","aria-disabled":"true",onClick:t[22]||(t[22]=le(()=>{},["stop"])),title:"Can't edit: this record is incomplete","aria-label":"Edit unavailable for "+r._label},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1)])],8,Mq)),r?._broken?(a(),l("div",_q,[n("button",{type:"button",class:"btn btn-icon-dots is-disabled","aria-disabled":"true",onClick:t[23]||(t[23]=le(()=>{},["stop"])),title:"No actions: this record is incomplete. Use Review details.","aria-label":"No actions available for "+r._label},[...t[78]||(t[78]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,Vq)])):f("v-if",!0),r?._broken?f("v-if",!0):(a(),l("div",qq,[n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","data-project-actions":encodeURIComponent(r._type+":"+r._id),"aria-label":"Actions for "+r?._name},[...t[79]||(t[79]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,$q),n("div",Lq,[n("button",{type:"button",class:"dropdown-item",onClick:c=>e.showProjectDetails(r),"aria-controls":e.projectDetailsId(r),"aria-expanded":e.selectedProject===r},"Project details & name",8,Fq),n("a",{class:"dropdown-item",href:e.safeUrl(r?._viewUrl)}," View ",8,Uq),r?._type==="repo"&&r?.options?.page&&r?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+r?.repoId+"/")}," View page ",8,Bq)):f("v-if",!0),r?._viewUrl?(a(),l("button",{key:1,type:"button",class:"dropdown-item",onClick:c=>e.copyLink(r),disabled:!!e.copyingId}," Copy anonymous link ",8,zq)):f("v-if",!0),n("a",{class:"dropdown-item",href:e.safeUrl(r?._editUrl)}," Edit ",8,Hq),r?.status=="ready"||r?.status=="error"?(a(),l("button",{key:2,type:"button",class:"dropdown-item",onClick:c=>e.refreshItem(r)}," Force update ",8,jq)):f("v-if",!0),r?.status=="removed"?(a(),l("button",{key:3,type:"button",class:"dropdown-item",onClick:c=>e.refreshItem(r)}," Enable ",8,Gq)):f("v-if",!0),r?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"dropdown-item",onClick:c=>e.extendItem(r)}," Extend 6 months ",8,Wq)):f("v-if",!0),(r?.status=="ready"||r?.status=="expired"||r?.status=="error")&&r?.role!=="coauthor"?(a(),l("div",Kq,[t[80]||(t[80]=n("div",{class:"dropdown-divider"},null,-1)),n("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:c=>e.removeItem(r)}," Remove ",8,Yq)])):f("v-if",!0)])]))])],10,_6)),!e.loading&&e.selectedProject===r?(a(),l("div",Xq,[n("div",{class:"project-details",role:"cell","aria-colspan":"5",id:e.projectDetailsId(r),tabindex:"-1",onKeydown:kt(le(c=>e.closeProjectDetails(r),["stop"]),["esc"])},[n("div",Jq,[t[82]||(t[82]=n("h2",null,"Project details",-1)),n("button",{type:"button",class:"project-close",onClick:c=>e.closeProjectDetails(r),"aria-label":"Close project details"},[...t[81]||(t[81]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,Zq)]),n("dl",xq,[n("div",null,[t[83]||(t[83]=n("dt",null,"Source",-1)),n("dd",null,p(r._source||"Not available"),1)]),n("div",null,[t[84]||(t[84]=n("dt",null,"Anonymous ID",-1)),n("dd",null,[n("code",null,p(r._id||"Missing identifier"),1)])]),r.source?.commit?(a(),l("div",e$,[t[85]||(t[85]=n("dt",null,"Commit",-1)),n("dd",null,[n("code",null,p(r.source.commit),1)])])):f("v-if",!0),r.conference?(a(),l("div",t$,[t[86]||(t[86]=n("dt",null,"Conference",-1)),n("dd",null,p(r.conference),1)])):f("v-if",!0),n("div",null,[t[87]||(t[87]=n("dt",null,"Status",-1)),n("dd",null,[v(p(e.fmt.statusLabel(r.status)),1),r.statusMessage?(a(),l("span",n$," \xB7 "+p(e.fmt.statusMsg(r.statusMessage)),1)):f("v-if",!0)])]),r.anonymizeDate?(a(),l("div",o$,[t[88]||(t[88]=n("dt",null,"Last anonymized",-1)),n("dd",null,p(e.fmt.humanTime(r.anonymizeDate)),1)])):f("v-if",!0)]),r._stale?(a(),l("p",s$,"This download has not progressed recently. Check the source access and selected branch before retrying.")):f("v-if",!0),r._editUrl?(a(),l("a",{key:1,class:"project-attention-action",href:e.safeUrl(r._editUrl)},p(e.needsAttention(r)?"Check source settings":"Edit anonymization settings"),9,i$)):f("v-if",!0),r._id?(a(),l("form",{key:2,class:"project-name-form",onSubmit:le(c=>e.saveProjectName(r),["prevent"])},[n("label",{for:"project-name-"+r._type+"-"+r._id},"Project name",8,a$),n("p",{id:"project-name-help-"+r._type+"-"+r._id},"Only you see this name. Leave it blank to use the default.",8,l$),n("div",d$,[T(n("input",{class:"form-control",type:"text",id:"project-name-"+r._type+"-"+r._id,"aria-describedby":"project-name-help-"+r._type+"-"+r._id,maxlength:"100","onUpdate:modelValue":t[24]||(t[24]=c=>e.projectName=c),disabled:e.nameSaving},null,8,u$),[[pt,e.projectName]]),n("button",{class:"btn btn-ink",type:"submit",disabled:e.nameSaving},p(e.nameSaving?"Saving\u2026":"Save name"),9,c$)]),e.nameError?(a(),l("p",p$,p(e.nameError),1)):f("v-if",!0),e.nameMessage?(a(),l("p",f$,p(e.nameMessage),1)):f("v-if",!0)],40,r$)):f("v-if",!0)],40,Qq)])):f("v-if",!0)],64))),128)),!e.loading&&e.filteredItems?.length==0?(a(),l("div",h$,[t[90]||(t[90]=n("svg",{class:"project-type-svg project-empty-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),e.hasProjects()?f("v-if",!0):(a(),l("span",m$,"You have no anonymizations yet.")),e.hasProjects()?(a(),l("span",g$,"Nothing matches the current filters.")):f("v-if",!0),n("div",v$,[e.hasActiveFilters()?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=r=>e.clearFilters())},"Clear filters")):f("v-if",!0),e.hasProjects()?f("v-if",!0):(a(),l("a",y$,[...t[89]||(t[89]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})],-1),v(" New anonymization",-1)])]))])])):f("v-if",!0)],10,D6)]),e.dashboardCursor||e.dashboardError?(a(),l("div",b$,[e.dashboardError?(a(),l("p",w$,p(e.dashboardError),1)):f("v-if",!0),e.dashboardCursor?(a(),l("button",{key:1,type:"button",class:"btn",onClick:t[26]||(t[26]=r=>e.loadMoreProjects()),disabled:e.loadingMore},p(e.loadingMore?"Loading\u2026":"Load more projects"),9,k$)):f("v-if",!0)])):f("v-if",!0)])}var C$={class:"viewer-bar"},E$={class:"vb-left"},S$=["aria-label","title"],N$=["href","title"],R$={class:"vb-artifact-id"},D$={class:"vb-right"},P$=["title"],A$={class:"vb-help"},T$=["aria-expanded"],O$={key:0,class:"acct-menu vb-help-menu",role:"menu"},I$=["aria-label","title"],M$={class:"ui-icon","aria-hidden":"true"},_$=["href"],V$={key:1,class:"acct"},q$=["aria-label","aria-expanded"],$$=["src"],L$={key:1,class:"acct-initial"},F$={key:0,class:"acct-menu",role:"menu"},U$={class:"acct-menu-head"},B$={key:2,class:"vb-signin",href:"/signin",target:"_self"},z$={key:0,class:"vb-context"},H$=["href","title"],j$={key:0,class:"vb-context-date"},G$=["aria-label"],W$={class:"ui-icon","aria-hidden":"true"},K$=["href"],Y$=["textContent"],X$={class:"leftCol-head"},Q$={class:"leftCol-search"},J$={class:"tree-search-box"},Z$=["href"],x$={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},eL=["title","href"],tL={class:"leftCol-body"},nL={key:0,class:"paper-inline-warning",role:"alert"},oL={key:1,class:"paper-inline-warning",role:"alert"},sL={class:"explorer-main"},iL={class:"breadcrumb paths","aria-label":"Path"},rL={class:"breadcrumb-item breadcrumb-root"},aL=["href","title","textContent"],lL=["aria-current","textContent"],dL=["aria-label","title"],uL={class:"ui-icon","aria-hidden":"true"},cL=["href"],pL={class:"status-bar-actions"},fL=["href"],hL={class:"d-none d-md-inline"},mL={class:"ui-icon","aria-hidden":"true"},gL=["href"],vL={class:"d-none d-md-inline"},yL=["href"],bL={class:"explorer-content"};function lp(e,t){let o=Xe("tree"),i=Xe("partial-view"),s=Pe("field");return a(),l("div",{class:P(["explorer-page",{"files-hidden":e.sidebarHidden}]),style:$e({"--sidebar-w":e.sidebarWidth+"px"})},[n("header",C$,[n("div",E$,[t[15]||(t[15]=n("a",{class:"vb-logo",href:"/"},[v("Anonymous "),n("em",null,"GitHub")],-1)),n("button",{type:"button",class:"vb-icon vb-sidebar","aria-label":e.sidebarHidden?"Show file tree":"Hide file tree",title:e.sidebarHidden?"Show file tree":"Hide file tree",onClick:t[0]||(t[0]=r=>e.sidebarHidden=!e.sidebarHidden)},[...t[13]||(t[13]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1)])],8,S$),e.repoId?(a(),l("a",{key:0,class:"vb-artifact",href:e.safeUrl("/r/"+e.repoId+"/"),title:"Anonymous artifact "+e.repoId},[t[14]||(t[14]=n("span",{class:"sr-only"},"Artifact ",-1)),n("span",R$,p(e.repoId),1)],8,N$)):f("v-if",!0)]),n("div",D$,[e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("span",{key:0,class:"vb-snapshot",title:(e.options?.expirationDate?"Available until "+e.fmt?.date(e.options.expirationDate)+". ":"")+(e.options?.anonymizedAt&&!e.options?.publishedAt?"Older repositories have no recorded publication date. The source commit date does not establish when files became available here.":(e.options?.sourceCommitDate?"Source commit ":e.options?.anonymizedAt?"Anonymized ":"Updated ")+e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)+(e.options?.publishedAt?" \xB7 snapshot ready "+e.fmt?.date(e.options.publishedAt):""))},[t[16]||(t[16]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[17]||(t[17]=n("span",null,"Snapshot",-1)),n("span",null,p(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)],8,P$)):f("v-if",!0),t[25]||(t[25]=n("a",{class:"vb-support",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Support Anonymous GitHub \u2014 help keep it free for researchers"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),n("span",null,"Support")],-1)),n("div",A$,[n("button",{type:"button",class:"vb-help-btn","aria-haspopup":"true","aria-expanded":e.helpOpen?"true":"false",onClick:t[1]||(t[1]=le(r=>e.helpOpen=!e.helpOpen,["stop"]))},[...t[18]||(t[18]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})],-1),n("span",null,"Help",-1)])],8,T$),e.helpOpen?(a(),l("div",O$,[...t[19]||(t[19]=[n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),n("span",null,[v("FAQ"),n("small",null,"How anonymization works")])],-1),n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),n("span",null,[v("Report a bug"),n("small",null,"About this service, not the paper")])],-1)])])):f("v-if",!0)]),n("button",{type:"button",class:"vb-icon","aria-label":e.isDarkMode?"Switch to light mode":"Switch to dark mode",title:e.isDarkMode?"Light mode":"Dark mode",onClick:t[2]||(t[2]=r=>e.darkMode(!e.isDarkMode))},[(a(),l("svg",M$,[n("use",{href:e.isDarkMode?"#ui-icon-sun":"#ui-icon-moon"},null,8,_$)]))],8,I$),e.user?(a(),l("div",V$,[n("button",{type:"button",class:"acct-chip","aria-haspopup":"true","aria-label":"Account: "+e.user?.username,"aria-expanded":e.accountOpen?"true":"false",onClick:t[3]||(t[3]=le(r=>e.accountOpen=!e.accountOpen,["stop"]))},[e.user?.photo?(a(),l("img",{key:0,src:e.safeUrl(e.user.photo),alt:"",width:"26",height:"26"},null,8,$$)):(a(),l("span",L$,p((e.user?.username||"?").charAt(0).toUpperCase()),1))],8,q$),e.accountOpen?(a(),l("div",F$,[n("div",U$,[t[20]||(t[20]=v("Signed in as ",-1)),n("b",null,"@"+p(e.user?.username),1)]),t[21]||(t[21]=n("a",{role:"menuitem",href:"/dashboard"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-grid"})]),v("My work")],-1)),t[22]||(t[22]=n("a",{role:"menuitem",href:"/profile"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})]),v("Settings")],-1)),t[23]||(t[23]=n("a",{role:"menuitem",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),v("Sign out")],-1))])):f("v-if",!0)])):(a(),l("a",B$,[...t[24]||(t[24]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1),v("Sign in",-1)])]))])]),e.repoId?(a(),l("div",z$,[n("a",{class:"vb-context-id",href:e.safeUrl("/r/"+e.repoId+"/"),title:"Anonymous artifact "+e.repoId},p(e.repoId),9,H$),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("span",j$,"Snapshot "+p(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)):f("v-if",!0)])):f("v-if",!0),T(n("button",{class:"sidebar-toggle",onClick:t[4]||(t[4]=r=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[(a(),l("svg",W$,[n("use",{href:e.sidebarCollapsed?"#ui-icon-folder":"#project-icon-close"},null,8,K$)])),n("span",{textContent:p(e.sidebarCollapsed?"Files":"Close")},null,8,Y$)],8,G$),[[Z,e.files?.length]]),T(n("div",{class:P(["leftCol",{collapsed:e.sidebarCollapsed}])},[n("div",X$,[t[27]||(t[27]=n("span",{class:"leftCol-eyebrow"},"Files",-1)),n("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[5]||(t[5]=r=>e.sidebarCollapsed=!0)},[...t[26]||(t[26]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])])]),n("div",Q$,[n("div",J$,[(a(),l("svg",{class:P(["ui-icon tree-search-icon",{"fa-spin":e.fileSearchLoading}]),"aria-hidden":"true"},[n("use",{href:e.fileSearchLoading?"#ui-icon-spinner":"#ui-icon-search"},null,8,Z$)],2)),T(n("input",x$,null,512),[[s,{state:e.viewState,set:r=>{e.fileSearchQuery=r},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),T(n("kbd",{class:"tree-search-kbd"},p(e.isMac?"\u2318":"Ctrl+")+"K",513),[[Z,!e.fileSearchQuery]]),T(n("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[6]||(t[6]=r=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[Z,e.fileSearchQuery]])]),e.options?.download?(a(),l("a",{key:0,target:"_self",class:"search-zip","aria-label":"Download repository as ZIP",title:"Download the repository (snapshot "+e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)+") as ZIP",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),n("span",{class:"search-zip-label","aria-hidden":"true"},"ZIP",-1)])],8,eL)):f("v-if",!0)]),n("div",tL,[e.options?.truncatedFolders?.length>0?(a(),l("div",nL,[t[29]||(t[29]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),v(" "+p(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):f("v-if",!0),e.options?.hasSubmodules?(a(),l("div",oL,[t[30]||(t[30]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),v(" "+p(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):f("v-if",!0),Oe(o,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])])],2),[[Z,e.files?.length]]),T(n("div",{class:"leftCol-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize file tree",title:"Drag to resize",onPointerdown:t[7]||(t[7]=r=>e.startSidebarResize(r))},null,544),[[Z,e.files?.length&&!e.sidebarHidden]]),T(n("div",{class:"leftCol-backdrop",onClick:t[8]||(t[8]=r=>e.sidebarCollapsed=!0)},null,512),[[Z,e.files?.length&&!e.sidebarCollapsed]]),n("div",sL,[T(n("div",{class:P(["status-bar",{"is-redundant":["code","text","html"].includes(e.type)&&e.content!=null||e.fileFrame()}])},[T(n("button",{type:"button",class:"btn btn-sm status-files-btn","aria-label":"Show files",title:"Show files",onClick:t[9]||(t[9]=r=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-folder"})],-1),n("span",null,"Files",-1)])],512),[[Z,e.files?.length]]),n("ol",iL,[n("li",rL,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:p(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,aL)]),(a(!0),l(F,null,se(e.paths,(r,d)=>(a(),l("li",{class:"breadcrumb-item","aria-current":d===e.paths.length-1?"page":null,textContent:p(r)},null,8,lL))),256))]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy path",title:e.pathCopied?"Path copied":"Copy path",onClick:t[10]||(t[10]=r=>e.copyPath())},[(a(),l("svg",uL,[n("use",{href:e.pathCopied?"#ui-icon-check":"#project-icon-copy"},null,8,cL)]))],8,dL),[[Z,e.filePath]]),n("div",pL,[e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[32]||(t[32]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,fL)):f("v-if",!0),e.type=="html-doc"&&!e.showSource?(a(),l("button",{key:1,class:P(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[11]||(t[11]=r=>e.toggleAllowScripts())},[t[33]||(t[33]=n("i",{class:"fab fa-js"},null,-1)),n("span",hL,p(e.allowScripts?"JS on":"JS off"),1)],2)):f("v-if",!0),e.type=="html-doc"?(a(),l("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[12]||(t[12]=r=>e.toggleSource())},[(a(),l("svg",mL,[n("use",{href:e.showSource?"#project-icon-eye":"#ui-icon-code"},null,8,gL)])),n("span",vL,p(e.showSource?"Rendered":"Source"),1)])):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[34]||(t[34]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),n("span",{class:"d-none d-md-inline"}," Website",-1)])],8,yL)):f("v-if",!0)])],2),[[Z,e.type!="error"||e.files?.length]]),n("div",bL,[Oe(i,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])],6)}var wL={class:"paper-faq"},kL={class:"paper-faq-body"},CL={class:"paper-faq-toc"},EL={class:"faq-search",role:"search"},SL={class:"faq-search-field"},NL={id:"faq-search-status",class:"faq-search-status","aria-live":"polite"},RL={key:0,class:"faq-search-empty"},DL={class:"faq-search-empty-actions"};function dp(e,t){let o=Xe("partial-view"),i=Pe("paper-scrollspy");return a(),l(F,null,[n("div",wL,[t[12]||(t[12]=n("div",{class:"paper-faq-hero"},[n("div",{class:"paper-faq-eyebrow"},"Help"),n("h1",{class:"paper-faq-title"},[v("Mirrors, redaction, and "),n("em",null,"what reviewers see.")]),n("p",{class:"paper-faq-lede"}," How to set up an anonymous mirror, what it hides, and how long it stays online. ")],-1)),n("div",kL,[T((a(),l("aside",CL,[...t[5]||(t[5]=[Se('
Contents
',2)])])),[[i]]),n("section",{class:P(["faq-section",{"faq-searching":!!e.faqQuery.trim()}]),"aria-label":"FAQs"},[n("div",EL,[t[7]||(t[7]=n("label",{for:"faq-search-input"},"Search questions",-1)),n("div",SL,[t[6]||(t[6]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)),T(n("input",{id:"faq-search-input",type:"search",class:"form-control","onUpdate:modelValue":t[0]||(t[0]=s=>e.faqQuery=s),onInput:t[1]||(t[1]=s=>e.filterFaq()),onSearch:t[2]||(t[2]=s=>e.filterFaq()),onKeydown:t[3]||(t[3]=kt(s=>e.clearFaqSearch(),["esc"])),placeholder:"e.g. expiry, pull request, PDF",autocomplete:"off",spellcheck:"false","aria-describedby":"faq-search-status"},null,544),[[pt,e.faqQuery]])]),n("p",NL,[e.faqQuery.trim()&&e.faqResults?(a(),l(F,{key:0},[v(p(e.faqResults===1?"1 result":e.faqResults+" results"),1)],64)):f("v-if",!0)])]),e.faqQuery.trim()&&e.faqResults===0?(a(),l("div",RL,[n("strong",null,"No questions match \u201C"+p(e.faqQuery.trim())+"\u201D.",1),t[9]||(t[9]=n("p",null,"Try a shorter word, or ask us directly.",-1)),n("div",DL,[n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:t[4]||(t[4]=s=>e.clearFaqSearch())},"Clear search"),t[8]||(t[8]=n("a",{class:"btn btn-link btn-sm",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml"},"Open an issue",-1))])])):f("v-if",!0),t[10]||(t[10]=n("div",{class:"faq-list"},[f(" General "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),v("General ")]),n("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[n("h3",{class:"panel-title"},[n("a",{role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"true","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),n("div",{id:"whatIs",class:"panel-collapse collapse show",role:"tabpanel","aria-labelledby":"headingWhatIs"},[n("div",{class:"panel-body p-3"},[n("p",null," Anonymous GitHub is an open-source tool with free hosting and optional paid plans that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information, such as the repository owner, organization name, and custom terms, so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),n("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[n("div",{class:"panel-body p-3"},[n("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),n("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[n("div",{class:"panel-body p-3"},[n("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix, not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),n("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[n("div",{class:"panel-body p-3"},[n("p",null," A free account includes 5 owned repositories and 2 GiB of source files. Optional paid plans offer more capacity, automatic refresh, and, with an author subscription, never-expiring repositories. Reviewers can read shared repositories without an account or payment. "),n("p",null,[v(" See "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),v(" for available plans and current prices. Offers depend on whether payments are enabled on this instance; the checkout shows the amount before you pay. Subscriptions help fund hosting, storage, backups, and continued maintenance. ")]),n("p",null,[v(" You can also support development through "),n("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank",rel:"noopener"},"GitHub Sponsors"),v(" or "),n("a",{href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener"},"Ko-fi"),v(". Donations are separate from subscriptions and do not automatically unlock paid features. ")])])])])]),f(" Plans and billing "),n("h4",{class:"faq-cat",id:"faq-plans-title"},"Plans and billing"),n("div",{class:"panel-group",id:"faq-plans",role:"tablist","aria-label":"Plans and billing","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingWhyPaid"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#whyPaid","aria-expanded":"false","aria-controls":"whyPaid"},"Why is Anonymous GitHub no longer completely free?")])]),n("div",{id:"whyPaid",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhyPaid"},[n("div",{class:"panel-body p-3"},[n("p",null,"Anonymous GitHub started as a small free service and was paid for out of pocket. Three things have changed since then:"),n("ul",null,[n("li",null,[n("strong",null,"Servers cost much more."),v(" Every hosted repository needs storage, bandwidth and backups, and these costs have risen sharply.")]),n("li",null,[n("strong",null,"Many more people use it."),v(" More users means more repositories to store and keep up to date, more support requests and more maintenance.")]),n("li",null,[n("strong",null,"AI has made security work heavier."),v(" AI-driven scrapers and automated abuse send far more traffic than before. Blocking them and keeping hosted content safe takes constant work.")])]),n("p",null,"The core service stays free: anonymizing a repository, sharing the link and reviewer access cost nothing, and reviewers never need an account. Most authors never need to pay. The paid options are small one-time payments for one repository, plus an optional subscription for heavy users. They are priced to cover running costs, not to make a profit."),n("p",null,[v("The source code remains open, so you can still "),n("a",{href:"#faq-hosting"},"host your own instance"),v(" for free.")])])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingFreePlan"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#freePlan","aria-expanded":"false","aria-controls":"freePlan"},"What is included in a free account?")])]),n("div",{id:"freePlan",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFreePlan"},[n("div",{class:"panel-body p-3"},[n("p",null,"The default free allowance is 5 repositories you own and 2 GiB of source files in total. Core anonymization and reviewer access remain free. You can manually refresh a repository within your allowance and choose a dated expiration up to 5 months ahead, then extend it again before it expires. Repositories submitted to a conference can stay online until the end of its review window."),n("p",null,"Repositories shared with you as a co-author do not use your own slots. Gists and pull requests are not included in these repository quotas. The usage shown in your account is the allowance available on this instance.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingAuthorPlans"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#authorPlans","aria-expanded":"false","aria-controls":"authorPlans"},"What do monthly and annual author subscriptions include?")])]),n("div",{id:"authorPlans",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingAuthorPlans"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("Both include 20 owned repositories and 10 GiB of source files in total. They also allow automatic refresh when enabled in repository settings and let the owner choose "),n("strong",null,"Never expire"),v(".")]),n("p",null,[v("Monthly and annual plans offer the same features with different billing periods. They renew automatically until you cancel renewal. Current prices are shown in "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),v(".")]),n("p",null,"Paid plans do not change how anonymization works. File-size limits and other service safeguards still apply. Review your anonymized content before sharing it.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingReviewPass"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#reviewPass","aria-expanded":"false","aria-controls":"reviewPass"},"Can I pay for one repository without subscribing?")])]),n("div",{id:"reviewPass",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingReviewPass"},[n("div",{class:"panel-body p-3"},[n("p",null,"Yes. These one-time add-ons apply to a single repository you own. None of them renews automatically:"),n("ul",null,[n("li",null,[n("strong",null,"Paper pack"),v(": an extra repository, automatic updates for 180 days and one more year before it expires, in a single payment. It covers what one paper usually needs during review.")]),n("li",null,[n("strong",null,"Extra repository"),v(": host one more repository once your free repositories are used up. It has its own 2 GiB allowance and does not count toward your free repositories. It lasts as long as the repository exists.")]),n("li",null,[n("strong",null,"Live updates"),v(": automatic refresh for 180 days, with a separate 2 GiB allowance.")]),n("li",null,[n("strong",null,"Extended expiration"),v(": choose an expiration date up to one year after purchase. Buying it again adds another year.")]),n("li",null,[n("strong",null,"Never expire"),v(": the repository has no expiration date. A full refund or a payment dispute ends it after a 90-day grace period.")])]),n("p",null,[v("When your free allowance is full, the Extra repository and Paper pack options are offered as you create the repository. You can also buy an add-on from the repository's edit page, or enter the anonymized ID of an existing repository in "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),v(". Current prices are shown there.")])])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingConferencePlans"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#conferencePlans","aria-expanded":"false","aria-controls":"conferencePlans"},"Can a conference or lab pay for a group?")])]),n("div",{id:"conferencePlans",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConferencePlans"},[n("div",{class:"panel-body p-3"},[n("p",null,"A conference review package provides a shared allowance for a review window of up to 180 days, with automatic updates for every submission. It comes in three sizes: Workshop (25 repositories, 10 GiB), Conference (100 repositories, 50 GiB) and Large conference (400 repositories, 200 GiB). Choose the size when you create the conference; it cannot change afterwards. The organizer pays once and authors pay nothing (the price is shown when you create the conference); the package does not renew automatically. A lab organizing a review can use this shared package too."),n("p",null,"New conferences no longer have a free plan: every new conference is a review package. Conferences created earlier keep working as before. The conference must be activated by payment before authors can submit under its Conference ID. Eligible repositories use the conference allowance before an author's personal allowance, so authors do not each need a subscription for that capacity."),n("p",null,"The package has a fixed review window. Never expire still requires the repository owner's author subscription or a Never expire add-on for that repository.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPaidCoauthors"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#paidCoauthors","aria-expanded":"false","aria-controls":"paidCoauthors"},"Does every co-author need to pay?")])]),n("div",{id:"paidCoauthors",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPaidCoauthors"},[n("div",{class:"panel-body p-3"},[n("p",null,"No. Co-authors can collaborate without buying a subscription. A shared repository uses its owner's allowance, unless a repository pass or paid conference covers it. It does not consume each co-author's personal allowance."),n("p",null,"A co-author's subscription does not increase the owner's allowance. If the owner's available capacity is exhausted, a co-author's refresh or edit may also be blocked. Reviewers never need a paid account.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCapacity"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#capacity","aria-expanded":"false","aria-controls":"capacity"},"What counts toward my allowance, and what happens at the limit?")])]),n("div",{id:"capacity",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCapacity"},[n("div",{class:"panel-body p-3"},[n("p",null,"The repository limit counts work you own. Storage counts the source-file sizes reserved for those repositories, not just files a reviewer opens. Archived or failed repositories can still reserve capacity, and a refresh does not automatically reduce a previous storage reservation."),n("p",null,"At the repository limit you cannot add another repository to that allowance. An edit or refresh must also fit the available storage. Remove work you no longer need, add an Extra repository for the new one, choose a subscription, or use an eligible conference allowance."),n("p",null,"Removing a repository releases its reservation when capacity is next checked. Expired repositories may continue to reserve capacity until cleanup. Reaching a limit does not itself delete existing review links.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingNeverExpire"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#neverExpire","aria-expanded":"false","aria-controls":"neverExpire"},"What happens to Never expire repositories if I stop subscribing?")])]),n("div",{id:"neverExpire",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingNeverExpire"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("Never expire is available to monthly and annual author subscribers, or for one repository with the one-time Never expire add-on. If a subscription ends, these repositories remain available for a "),n("strong",null,"90-day grace period"),v(", then expire and their hosted content is removed.")]),n("p",null,"Renewing during the grace period keeps them active. After expiration, you must renew and explicitly reactivate the repository; restoring content also requires access to its GitHub source. A repository does not become public on GitHub when it expires."),n("p",null,"Existing never-expiring repositories created before this billing policy retain their settings. Never expire is not a guarantee of perpetual service availability.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCancelPlan"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#cancelPlan","aria-expanded":"false","aria-controls":"cancelPlan"},"How do I cancel, and what happens after paid access ends?")])]),n("div",{id:"cancelPlan",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCancelPlan"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("Open "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),v(" and choose "),n("strong",null,"Manage billing and invoices"),v(" to manage renewal. Cancelling renewal keeps subscription benefits until the end of the paid period.")]),n("p",null,"After paid access ends, repositories fall back to another eligible allowance or the free allowance. Automatic refresh pauses on the free allowance; manual refresh remains available within its limits. Existing review links keep their configured expiration dates, except paid Never expire repositories, which follow the 90-day grace period described above."),n("p",null,"A repository pass or conference package ends after its paid window without automatic renewal.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingRefunds"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#refunds","aria-expanded":"false","aria-controls":"refunds"},"Can I get a refund?")])]),n("div",{id:"refunds",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingRefunds"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("Refunds are handled case by case. "),n("a",{href:"mailto:tdurieux@anonymous.4open.science"},"Email the maintainer"),v(" with the date of the payment and the repository it was for.")]),n("p",null,"A full refund ends what that payment bought. For a Paper pack, this means all three parts: the extra repository, automatic updates and the extended expiration. A Never expire repository then expires after a 90-day grace period. A partial refund keeps your access."),n("p",null,"To stop a subscription, cancel its renewal instead of asking for a refund. You keep access until the end of the period you paid for.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPaymentHandling"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#paymentHandling","aria-expanded":"false","aria-controls":"paymentHandling"},"How are payments handled?")])]),n("div",{id:"paymentHandling",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPaymentHandling"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("Stripe processes checkout and billing management. Anonymous GitHub does not store your card details. You can access billing management and invoices from "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),v(".")]),n("p",null,[v("Paid access is activated after payment is confirmed. If checkout succeeds but your account has not updated, choose "),n("strong",null,"Refresh payment status"),v(" before trying another purchase. If paid plans are unavailable on this instance, no checkout is offered.")])])])])]),f(" Features "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-filter"})]),v("Features ")]),n("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),n("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[n("div",{class:"panel-body p-3"},[n("p",null," Anonymous GitHub can display and render a wide variety of file types: "),n("ul",null,[n("li",null,[n("strong",null,"Text and source code"),v(": displayed with syntax highlighting")]),n("li",null,[n("strong",null,"Markdown"),v(": rendered as formatted HTML")]),n("li",null,[n("strong",null,"Images"),v(" (PNG, JPG, SVG, etc.): displayed inline")]),n("li",null,[n("strong",null,"PDFs"),v(": rendered directly in the browser")]),n("li",null,[n("strong",null,"Jupyter Notebooks"),v(": rendered with code cells and outputs")])]),n("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),n("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[n("div",{class:"panel-body p-3"},[n("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),n("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[n("div",{class:"panel-body p-3"},[n("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),n("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[n("div",{class:"panel-body p-3"},[n("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),n("ul",null,[n("li",null,[n("strong",null,"Never expire"),v(": with a monthly or annual author subscription, no scheduled expiration while subscribed. A 90-day grace period applies after paid access ends. See "),n("a",{href:"#neverExpire"},"the subscription expiration policy"),v(".")]),n("li",null,[n("strong",null,"Redirect to GitHub"),v(": after expiration, visitors are redirected to the original GitHub repository.")]),n("li",null,[n("strong",null,"Remove content"),v(": after expiration, the anonymized content is deleted from the server.")])])])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),n("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[n("div",{class:"panel-body p-3"},[n("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),n("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[n("div",{class:"panel-body p-3"},[n("p",null," You can refresh the anonymized repository from GitHub without creating a new share link. Free accounts can request a manual refresh within their allowance. Automatic refresh requires an eligible paid allowance and must be enabled in repository settings. It pauses when the repository falls back to the free allowance. "),n("p",null," After changing files or contributor names, review your anonymization terms before sharing the updated content. If GitHub access is revoked or the source is deleted, the service cannot fetch updates. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),n("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[n("div",{class:"panel-body p-3"},[n("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),n("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[n("code",null,`npm install -g @tdurieux/anonymous_github -anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),v("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),v("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),v(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),v("Self"),n("span",{class:"serif-hy"},"-"),v("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{class:"panel-body p-3"},[n("p",null,[v(" Yes. Anonymous GitHub is fully open source (GPL-3.0) and supports Docker-based deployment. Billing is optional and disabled by default for self-hosted instances; paid hosted plans are not required to run your own server. You will need to configure a GitHub OAuth app and provide a GitHub token. Detailed setup instructions are available on the "),n("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),v(". ")]),n("p",null," The basic steps are: "),n("ol",null,[n("li",null,"Clone the repository and install dependencies"),n("li",null,[v("Create a "),n("code",null,".env"),v(" file with your GitHub token, OAuth client ID, and client secret")]),n("li",null,[v("Run "),n("code",null,"docker-compose up -d")])])])])])])],-1))],2),t[11]||(t[11]=n("aside",{class:"paper-faq-help","aria-label":"More help"},[n("div",{class:"paper-faq-help-card"},[n("strong",null,"Still stuck?"),n("p",null,"Open an issue on GitHub about the service. For a paper's content, contact the conference instead."),n("a",{class:"btn btn-outline-ink btn-sm",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml"},"Open an issue")])],-1))])]),Oe(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}var PL={class:"pr-page"},AL={class:"container paper-page pr-page-inner"},TL={class:"pr-header"},OL={class:"pr-title-row"},IL={class:"paper-page-title pr-title"},ML=["textContent"],_L={key:1,class:"text-muted"},VL=["href"],qL={class:"pr-header-meta"},$L={key:0,class:"pr-meta-item"},LL=["textContent"],FL={key:1,class:"pr-meta-item"},UL=["textContent"],BL={key:2,class:"pr-meta-item"},zL=["textContent"],HL={key:0,class:"paper-tabs",role:"tablist"},jL=["aria-selected","tabindex"],GL=["textContent"],WL=["aria-selected","tabindex"],KL=["textContent"],YL={class:"paper-tab-content"},XL={key:0,role:"tabpanel",id:"gist-files-panel","aria-labelledby":"gist-files-tab"},QL={class:"pr-comments"},JL={class:"pr-comment"},ZL={class:"pr-comment-head"},xL=["textContent"],eF={key:0,class:"pr-comment-date"},tF={key:0,class:"paper-table-empty"},nF={key:1,role:"tabpanel",id:"gist-comments-panel","aria-labelledby":"gist-comments-tab"},oF={class:"pr-comments"},sF={class:"pr-comment"},iF={class:"pr-comment-head"},rF={key:0,class:"pr-comment-author"},aF=["textContent"],lF=["textContent"],dF={key:0,class:"pr-comment-body"},uF={key:0,class:"paper-table-empty"};function up(e,t){let o=Xe("gist-file"),i=Xe("markdown");return a(),l("div",PL,[n("div",AL,[t[17]||(t[17]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"Reviewer"),v(" \xA0/\xA0 "),n("span",{class:"here"},"Gist")],-1)),n("header",TL,[n("div",OL,[n("h1",IL,[e.details?.description?(a(),l("span",{key:0,textContent:p(e.details?.description)},null,8,ML)):f("v-if",!0),e.details?.description?f("v-if",!0):(a(),l("span",_L,"Untitled gist"))]),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/gist-anonymize/"+e.gistId)},[...t[4]||(t[4]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,VL)):f("v-if",!0)]),n("div",qL,[n("span",{class:P(["paper-pill",{good:e.details?.isPublic,warn:!e.details?.isPublic}])},p(e.details?.isPublic?"Public":"Secret"),3),e.details?.ownerLogin?(a(),l("span",$L,[t[5]||(t[5]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[6]||(t[6]=v(" @",-1)),n("span",{textContent:p(e.details?.ownerLogin)},null,8,LL)])):f("v-if",!0),e.details?.updatedDate?(a(),l("span",FL,[t[7]||(t[7]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=v()),n("span",{textContent:p(e.fmt?.date(e.details?.updatedDate))},null,8,UL)])):f("v-if",!0),e.details?.anonymizeDate?(a(),l("span",BL,[t[9]||(t[9]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=v(" Anonymized ",-1)),n("span",{textContent:p(e.fmt?.date(e.details?.anonymizeDate))},null,8,zL)])):f("v-if",!0)])]),e.details?.files&&e.details?.files?.length||e.details?.comments&&e.details?.comments?.length?(a(),l("nav",HL,[e.details?.files?(a(),l("button",{key:0,class:P(["paper-tab",{active:e.tabState?.active=="files"}]),type:"button",role:"tab",id:"gist-files-tab","aria-selected":e.tabState?.active==="files","aria-controls":"gist-files-panel",tabindex:e.tabState?.active==="files"?0:-1,onKeydown:t[0]||(t[0]=s=>e.previewTabKeydown(s)),onClick:t[1]||(t[1]=s=>e.tabState.active="files")},[t[11]||(t[11]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-gist"})],-1)),n("span",{textContent:p(e.fmt.plural(e.details?.files?.length,{0:"No files",one:"1 file",other:"{} files"}))},null,8,GL)],42,jL)):f("v-if",!0),e.details?.comments?(a(),l("button",{key:1,class:P(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"gist-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"gist-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=s=>e.previewTabKeydown(s)),onClick:t[3]||(t[3]=s=>e.tabState.active="comments")},[t[12]||(t[12]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:p(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,KL)],42,WL)):f("v-if",!0)])):f("v-if",!0),n("div",YL,[e.details?.files&&e.tabState?.active=="files"?(a(),l("div",XL,[n("ul",QL,[(a(!0),l(F,null,se(e.details?.files,(s,r)=>(a(),l("li",JL,[n("div",ZL,[n("strong",{textContent:p(s?.filename)},null,8,xL),s?.language?(a(),l("span",eF,p(s?.language),1)):f("v-if",!0)]),Oe(o,{file:s},null,8,["file"])]))),256)),e.details?.files?.length?f("v-if",!0):(a(),l("li",tF,[...t[13]||(t[13]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("span",null,"No files in this gist.",-1)])]))])])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(a(),l("div",nF,[n("ul",oF,[(a(!0),l(F,null,se(e.details?.comments,(s,r)=>(a(),l("li",sF,[n("div",iF,[s?.author?(a(),l("span",rF,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=v(" @",-1)),n("span",{textContent:p(s?.author)},null,8,aF)])):f("v-if",!0),s?.updatedDate?(a(),l("span",{key:1,class:"pr-comment-date",textContent:p(e.fmt?.date(s?.updatedDate))},null,8,lF)):f("v-if",!0)]),s?.body?(a(),l("div",dF,[Oe(i,{content:s?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(a(),l("li",uF,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1),n("span",null,"No comments on this gist.",-1)])]))])])):f("v-if",!0)])])])}var cF={key:0,class:"nav-support",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs","aria-label":"Donate on Ko-fi to help cover hosting costs"},pF={key:1,class:"nav-heart-m",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener","aria-label":"Support Anonymous GitHub",title:"Support Anonymous GitHub"},fF=["aria-label","title"],hF={class:"ui-icon","aria-hidden":"true"},mF=["href"],gF={key:3,class:"nav-signin-m",href:"/signin",target:"_self","aria-label":"Sign in with GitHub"},vF={class:"collapse navbar-collapse",id:"navbarSupportedContent"},yF={class:"navbar-nav mr-auto smooth-scroll"},bF={key:0,class:"nav-item nav-home-item"},wF={key:1,class:"nav-item"},kF={key:2,class:"nav-item"},CF={key:3,class:"nav-item"},EF={class:"nav-item"},SF={key:4,class:"nav-item"},NF={class:"navbar-nav"},RF={key:0,class:"nav-item d-lg-none"},DF={key:1,class:"nav-item"},PF={key:2,class:"nav-item"},AF={key:3,class:"nav-item nav-signin-item"},TF={key:4,class:"nav-item"},OF={key:5,class:"nav-item dropdown user-chip-wrap"},IF={class:"nav-link user-chip dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},MF=["src"],_F={class:"user-chip-name"},VF={class:"dropdown-menu dropdown-menu-right user-menu","aria-labelledby":"navbarDropdownMenuLink"},qF={class:"dropdown-header"},$F={key:0,class:"dropdown-item um-extra",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener"},LF=["innerHTML"],FF=["disabled"],UF={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},BF={class:"email-prompt-actions"},zF=["disabled"],HF=["disabled"],jF=["disabled"];function cp(e,t){return a(),l(F,null,[n("nav",{class:P(["navbar navbar-expand-lg",{"navbar-dark":e.isDarkMode}])},[t[28]||(t[28]=n("a",{class:"navbar-brand",href:"/"},[v("Anonymous "),n("em",null,"GitHub")],-1)),e.headerShowSupport?(a(),l("a",cF,[...t[9]||(t[9]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",{class:"nav-support-label"},"Support",-1)])])):f("v-if",!0),/^\/(r|w|pr|gist)\//.test(e.path||"")?f("v-if",!0):(a(),l("a",pF,[...t[10]||(t[10]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1)])])),/^\/(r|w|pr|gist)\//.test(e.path||"")?f("v-if",!0):(a(),l("button",{key:2,type:"button",class:"nav-theme-m","aria-label":e.isDarkMode?"Switch to light mode":"Switch to dark mode",title:e.isDarkMode?"Switch to light mode":"Switch to dark mode",onClick:t[0]||(t[0]=o=>e.darkMode(!e.isDarkMode))},[(a(),l("svg",hF,[n("use",{href:e.isDarkMode?"#ui-icon-sun":"#ui-icon-moon"},null,8,mF)]))],8,fF)),!e.user&&!/^\/(r|w|pr|gist)\//.test(e.path||"")?(a(),l("a",gF,[...t[11]||(t[11]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1),v("Sign in",-1)])])):f("v-if",!0),t[29]||(t[29]=n("button",{class:"navbar-toggler",type:"button","data-toggle":"collapse","data-target":"#navbarSupportedContent","aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation"},[n("span",{class:"navbar-toggler-icon"})],-1)),n("div",vF,[n("ul",yF,[e.user?f("v-if",!0):(a(),l("li",bF,[n("a",{class:P(["nav-link",{active:e.path=="/"}]),href:"/"},[...t[12]||(t[12]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-home"})],-1),v(" Home ",-1)])],2)])),e.user?(a(),l("li",wF,[n("a",{class:P(["nav-link",{active:e.path=="/dashboard"}]),href:"/dashboard"},[...t[13]||(t[13]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-grid"})],-1),v(" My work ",-1)])],2)])):f("v-if",!0),e.user?(a(),l("li",kF,[n("a",{class:P(["nav-link",{active:e.path=="/anonymize"||e.path=="/pull-request-anonymize"}]),href:"/anonymize"},[...t[14]||(t[14]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),v(" Anonymize ",-1)])],2)])):f("v-if",!0),e.user?(a(),l("li",CF,[n("a",{class:P(["nav-link",{active:e.path=="/conferences"||e.path?.startsWith("/conference/")}]),href:"/conferences"},[...t[15]||(t[15]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1),v(" Conferences ",-1)])],2)])):f("v-if",!0),n("li",EF,[n("a",{class:P(["nav-link",{active:e.path=="/faq"}]),href:"/faq"},[...t[16]||(t[16]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})],-1),v("FAQ",-1)])],2)]),e.user&&e.user?.isAdmin?(a(),l("li",SF,[n("a",{class:P(["nav-link",{active:e.path?.indexOf("/admin")===0}]),href:"/admin/"},[...t[17]||(t[17]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-shield"})],-1),v(" Admin ",-1)])],2)])):f("v-if",!0)]),n("ul",NF,[e.user||!e.isReviewerRoute?(a(),l("li",RF,[...t[18]||(t[18]=[n("a",{class:"nav-link nav-icon",target:"_blank",href:"https://github.com/tdurieux/anonymous_github/",title:"Anonymous GitHub source code","aria-label":"Anonymous GitHub source code on GitHub",rel:"noopener","data-offset":"30"},[n("i",{class:"fab fa-github","aria-hidden":"true"})],-1)])])):f("v-if",!0),f(` "Report a bug" is about this service. Reviewers who land on an +jane.smith@example.org`},null,10,wT),[[d,{state:e.viewState,set:u=>{e.terms=u},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[126]||(t[126]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",kT,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=g()),n("small",CT,[t[115]||(t[115]=g("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[116]||(t[116]=g(", or use ",-1)),t[117]||(t[117]=n("code",null,"term=>replacement",-1)),t[118]||(t[118]=g(" to pick your own (e.g. ",-1)),t[119]||(t[119]=n("code",null,"Anonymous=>ABC",-1)),t[120]||(t[120]=g(").",-1))])]),(a(!0),l(q,null,x((e.termHints||[]).slice(0,3),u=>(a(),l("div",{class:"term-hint",key:u.line},[n("span",null,[t[123]||(t[123]=g("In ",-1)),n("code",null,c(u.term),1),t[124]||(t[124]=g(", ",-1)),n("code",null,c(u.symbols.join(" ")),1),g(" "+c(u.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:y=>e.matchTermAsWritten(u.line)},"Match as written",8,ET)]))),128)),(e.termHints||[]).length>3?(a(),l("div",ST,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),D(n("div",NT,"Terms are in an invalid format.",512),[[Q,e.anonymize?.terms?.errors?.format]])]),D(n("div",RT,[n("div",PT,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",AT,c(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[22]||(t[22]=u=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,DT)],512),[[Q,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=ae(u=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=ae(u=>e.savePreserveFiles(),["prevent"]))},[t[131]||(t[131]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[132]||(t[132]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),D(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=u=>e.preserve.search=u)},null,512),[[pt,e.preserve.search]]),n("div",TT,[e.preserve.loading?(a(),l("p",OT,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",IT,c(e.preserve.error),1)):(a(),l(q,{key:2},[(a(!0),l(q,null,x(e.preserveRows(),(u,y)=>(a(),l("div",{class:"preserve-item",key:u.kind+":"+u.path,style:Ie({paddingLeft:u.depth*18+6+"px"})},[u.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":u.open?"true":"false","aria-label":(u.open?"Collapse ":"Expand ")+u.label,onClick:m=>e.togglePreserveDir(u.path)},c(u.open?"\u25BE":"\u25B8"),9,MT)):(a(),l("span",VT)),n("input",{type:"checkbox",id:"pf-"+y,"aria-label":u.kind==="dir"?"Leave folder "+u.path+" unredacted":null,checked:u.state==="all",".indeterminate":u.state==="some",disabled:u.locked,onChange:m=>u.kind==="dir"?e.togglePreserveFolder(u.path):e.togglePreserveFile(u.path)},null,40,qT),n("label",{for:u.kind==="file"?"pf-"+y:null,class:"preserve-name",onClick:m=>u.kind==="dir"&&e.togglePreserveDir(u.path)},c(u.label),9,_T),u.note?(a(),l("span",$T,c(u.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",LT,c(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",FT,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[128]||(t[128]=n("summary",null,"Patterns",-1)),D(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib +paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=u=>e.preserve.patterns=u)},null,512),[[pt,e.preserve.patterns]]),t[129]||(t[129]=n("small",{class:"form-text text-muted"},[g("One per line, as in .gitignore: "),n("code",null,"*.bib"),g(" matches in any folder; "),n("code",null,"/refs.bib"),g(" and "),n("code",null,"paper/refs.bib"),g(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),g(" covers everything inside it; "),n("code",null,"!private.bib"),g(" excludes again.")],-1))],8,UT),n("div",BT,[n("span",zT,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",HT,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=u=>e.closePreserveFiles())},"Cancel"),t[130]||(t[130]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[Q,e.detectedType]]),D(n("section",jT,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),D(n("div",null,[n("div",GT,[D(n("input",WT,null,512),[[d,{state:e.viewState,set:u=>{e.options.link=u},value:e.options?.link,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",KT,[D(n("input",YT,null,512),[[d,{state:e.viewState,set:u=>{e.options.image=u},value:e.options?.image,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",XT,[D(n("input",JT,null,512),[[d,{state:e.viewState,set:u=>{e.options.pdf=u},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",QT,[D(n("input",ZT,null,512),[[d,{state:e.viewState,set:u=>{e.options.notebook=u},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",xT,[D(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,e3),[[d,{state:e.viewState,set:u=>{e.options.page=u},value:e.options?.page,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",t3,c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",n3,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[Q,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",s3,[...t[139]||(t[139]=[g("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),D(n("div",null,[n("div",o3,[D(n("input",i3,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",r3,[D(n("input",a3,null,512),[[d,{state:e.viewState,set:u=>{e.options.content=u},value:e.options?.content,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",l3,[D(n("input",d3,null,512),[[d,{state:e.viewState,set:u=>{e.options.comments=u},value:e.options?.comments,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",u3,[D(n("input",c3,null,512),[[d,{state:e.viewState,set:u=>{e.options.username=u},value:e.options?.username,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",p3,[D(n("input",f3,null,512),[[d,{state:e.viewState,set:u=>{e.options.date=u},value:e.options?.date,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",h3,[D(n("input",m3,null,512),[[d,{state:e.viewState,set:u=>{e.options.origin=u},value:e.options?.origin,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Q,e.detectedType==="gist"]]),D(n("div",null,[n("div",g3,[D(n("input",v3,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",y3,[D(n("input",b3,null,512),[[d,{state:e.viewState,set:u=>{e.options.body=u},value:e.options?.body,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",w3,[D(n("input",k3,null,512),[[d,{state:e.viewState,set:u=>{e.options.diff=u},value:e.options?.diff,form:"anonymize",options:{}}]]),t[148]||(t[148]=n("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),n("div",C3,[D(n("input",E3,null,512),[[d,{state:e.viewState,set:u=>{e.options.comments=u},value:e.options?.comments,form:"anonymize",options:{}}]]),t[149]||(t[149]=n("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),n("div",S3,[D(n("input",N3,null,512),[[d,{state:e.viewState,set:u=>{e.options.username=u},value:e.options?.username,form:"anonymize",options:{}}]]),t[150]||(t[150]=n("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),n("div",R3,[D(n("input",P3,null,512),[[d,{state:e.viewState,set:u=>{e.options.date=u},value:e.options?.date,form:"anonymize",options:{}}]]),t[151]||(t[151]=n("label",{class:"form-check-label",for:"date"},"Dates",-1))]),n("div",A3,[D(n("input",D3,null,512),[[d,{state:e.viewState,set:u=>{e.options.origin=u},value:e.options?.origin,form:"anonymize",options:{}}]]),t[152]||(t[152]=n("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[Q,e.detectedType==="pr"]])],512),[[Q,e.detectedType]]),D(n("section",T3,[t[170]||(t[170]=n("h2",{class:"paper-section-eyebrow",id:"hosting-heading"},"Hosting & expiration",-1)),n("div",O3,[t[154]||(t[154]=n("label",{class:"paper-field-label",for:"conference"},[g("Conference code "),n("span",{class:"paper-optional"},"(optional)")],-1)),D(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[d,{state:e.viewState,set:u=>{e.conference=u},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),D(n("p",{class:P(["conference-hosting",{"is-covered":e.conferenceHosting()}]),role:"status"},[n("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,I3),e.conferenceHosting()?(a(),l(q,{key:0},[g(" hosts this repository until "+c(e.fmt?.date(e.conference_data?.endDate))+", with automatic updates. You don't pay anything.",1)],64)):e.billing?.enabled&&e.detectedType==="repo"?(a(),l(q,{key:1},[g(" runs until "+c(e.fmt?.date(e.conference_data?.endDate))+". It doesn't pay for hosting, so this repository uses your own allowance.",1)],64)):(a(),l(q,{key:2},[g(" runs until "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],64))],2),[[Q,e.conference_data]]),D(n("div",M3,"The conference is not activated.",512),[[Q,e.anonymize?.conference?.errors?.activated]]),D(n("small",V3,"Submitting to a conference? Its code applies the venue's settings, and a paid conference hosts the repository for you.",512),[[Q,!e.conference_data]])]),e.detectedType==="repo"&&e.billing?.enabled&&!e.conferenceHosting()?(a(),l("p",q3,[e.isUpdate&&e.role!=="owner"?(a(),l("span",_3,"Uses the owner's hosting")):e.hasAuthorHosting()?(a(),l("span",$3,"Your author subscription is active.")):e.hostingQuota?.repository?(a(),l("span",L3,c(e.hostingQuota.repository.used)+" of "+c(e.hostingQuota.repository.total)+" active repositories \xB7 Free",1)):f("v-if",!0)])):f("v-if",!0),e.detectedType==="repo"&&e.options?.update&&!e.liveUpdatesIncluded()?(a(),l("p",F3,[t[155]||(t[155]=g("Automatic updates need a paid option. On free hosting, the link keeps the version you create until you refresh it from My work. Once it exists, add Live updates",-1)),e.liveUpdatesPrice()?(a(),l(q,{key:0},[g(" ("+c(e.liveUpdatesPrice())+" once)",1)],64)):f("v-if",!0),t[156]||(t[156]=g(" or a Paper pack in ",-1)),t[157]||(t[157]=n("a",{href:"/profile?billing=1"},"Settings \u203A Hosting & billing",-1)),t[158]||(t[158]=g(", or take an author subscription.",-1))])):f("v-if",!0),e.detectedType==="repo"&&e.billing?.enabled?(a(),l("div",U3,[e.hostingNeedsPayment()&&!e.billingPending?(a(),l(q,{key:0},[e.options.expirationMode!=="never"||e.hostingQuotaBlocked?(a(),l("p",B3,c(e.options.update&&!e.hostingQuotaBlocked&&e.hostingQuota?.repository?.used(a(),l("label",{class:P(["hosting-option",{"is-selected":e.hostingChoice()===u.id||u.interval&&e.authorPlans().some(y=>y.id===e.hostingChoice())}]),key:u.id},[n("input",{type:"radio",name:"hosting-plan",value:u.id,checked:e.hostingChoice()===u.id||u.interval&&e.authorPlans().some(y=>y.id===e.hostingChoice()),onChange:y=>e.hostingPlan=u.interval?e.hostingSubscriptionPlan().id:u.id},null,40,j3),n("span",G3,[n("strong",null,c(e.hostingOptionName(u)),1),n("small",null,c(e.hostingOptionBlurb(u)),1),u.interval&&e.authorPlans().length>1&&e.authorPlans().some(y=>y.id===e.hostingChoice())?(a(),l("span",W3,[(a(!0),l(q,null,x(e.authorPlans(),y=>(a(),l("button",{type:"button",role:"radio",key:y.id,"aria-checked":e.hostingSubscriptionPlan().id===y.id?"true":"false",class:P({"is-on":e.hostingSubscriptionPlan().id===y.id}),onClick:ae(m=>{e.hostingCycle=y.id,e.hostingPlan=y.id},["prevent"])},[g(c(y.interval==="year"?"Yearly":"Monthly"),1),y.interval==="year"&&e.hostingAnnualSavings()?(a(),l("span",Y3,"\u2212"+c(e.hostingAnnualSavings())+"%",1)):f("v-if",!0)],10,K3))),128))])):f("v-if",!0)]),n("span",X3,[n("strong",null,c(e.billingAmount(u.interval?e.hostingSubscriptionPlan():u)),1),n("small",null,c(u.interval?"per "+e.hostingSubscriptionPlan().interval:"once"),1)])],2))),128))])):(a(),l("p",J3,"New purchases are temporarily unavailable. Your draft is kept.")),e.authorPlans().some(u=>u.id===e.hostingChoice())?(a(),l("p",Q3,"Renews "+c(e.hostingChoice()==="author_annual"?"yearly":"monthly")+" until you cancel. Tax shown at checkout.",1)):(a(),l("p",Z3,"One-time payment, nothing renews. Tax shown at checkout.")),e.options.expirationMode!=="never"?(a(),l("details",x3,[t[159]||(t[159]=n("summary",null,"Keep using free hosting",-1)),t[160]||(t[160]=n("p",null,"Remove a repository you no longer need, or enter the code of a paid conference above. Removing a repository affects its review link.",-1)),t[161]||(t[161]=n("a",{href:"/dashboard"},"Review my repositories",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[28]||(t[28]=u=>e.anonymizeRepo(u)),disabled:e.sourceLoading||e.billingBusy},"Recheck capacity and submit",8,eO)])):f("v-if",!0)],64)):f("v-if",!0)])):f("v-if",!0),e.hostingNeedsPayment()&&!e.billingPending?(a(),l("h4",tO,"Expiration")):f("v-if",!0),n("fieldset",nO,[t[167]||(t[167]=n("legend",{class:"sr-only"},"Expiration",-1)),n("label",sO,[n("input",{type:"radio",name:"expiration-choice",checked:e.options.expirationMode!=="never",onChange:t[29]||(t[29]=u=>e.useDatedHosting()),disabled:e.billingPending},null,40,oO),t[162]||(t[162]=n("span",null,"Expire on a date",-1))]),e.options.expirationMode!=="never"?(a(),l("div",iO,[e.options?.expirationMode!=="never"?(a(),l("div",rO,[t[163]||(t[163]=n("label",{class:"paper-field-label",for:"expirationDate"},"Expires",-1)),D(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,aO),[[d,{state:e.viewState,set:u=>{e.options.expirationDate=u},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),e.fmt?.dateEcho(e.options?.expirationDate)?(a(),l("p",lO,"Expires "+c(e.fmt?.dateEcho(e.options?.expirationDate)),1)):f("v-if",!0),D(n("div",dO,"Pick a date in the future.",512),[[Q,e.anonymize?.expirationDate?.errors?.min]]),D(n("div",{class:"invalid-feedback"},"Pick a date on or before "+c(e.fmt?.date(e.maxExpirationDate))+".",513),[[Q,e.anonymize?.expirationDate?.errors?.max]]),D(n("div",uO,"Enter a valid expiration date.",512),[[Q,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])):f("v-if",!0),n("div",cO,[t[165]||(t[165]=n("label",{for:"expiration"},"Then",-1)),D(n("select",{id:"expiration",class:"form-control","onUpdate:modelValue":t[30]||(t[30]=u=>e.options.expirationMode=u)},[...t[164]||(t[164]=[n("option",{value:"remove"},"Remove content",-1),n("option",{value:"redirect"},"Redirect to GitHub",-1)])],512),[[mn,e.options.expirationMode]])])])):f("v-if",!0),e.detectedType==="repo"?(a(),l("label",pO,[n("input",{type:"radio",name:"expiration-choice",checked:e.options.expirationMode==="never",onChange:t[31]||(t[31]=u=>e.options.expirationMode="never"),disabled:e.billingPending},null,40,fO),n("span",null,[t[166]||(t[166]=g("Never expire",-1)),(e.options.expirationMode!=="never"||e.hasAuthorHosting()||e.repositoryGrants("repo_never").length)&&!(e.hostingNeedsPayment()&&e.hostingOptionPlans().length)?(a(),l("small",hO,c(e.neverExpireTag()),1)):f("v-if",!0)])])):f("v-if",!0)]),e.options.expirationMode==="redirect"?(a(),l("p",mO,"Visitors will be redirected to the original GitHub source on this date, revealing its identity.")):f("v-if",!0),e.detectedType==="repo"&&e.billing?.enabled?(a(),l("div",gO,[e.taskValidationError?(a(),l("p",vO,c(e.taskValidationError),1)):f("v-if",!0),e.billingError?(a(),l("p",yO,[g(c(e.billingError)+" ",1),n("button",{type:"button",class:"task-text-button",onClick:t[32]||(t[32]=u=>e.loadBilling()),disabled:e.billingBusy},"Reload billing",8,bO)])):f("v-if",!0),e.billingPending?(a(),l("div",wO,[...t[168]||(t[168]=[n("p",null,[n("strong",null,"Confirming your payment\u2026")],-1),n("p",{class:"form-text text-muted"},"Your draft is saved. Please do not pay again.",-1)])])):e.billingNotice?(a(),l("p",kO,c(e.billingNotice),1)):e.options.expirationMode==="never"&&!e.billingPending&&!e.hasAuthorHosting()&&e.repositoryGrants("repo_never").length?(a(),l("p",CO,"No scheduled expiration. Paid once for this repository.")):e.options.expirationMode==="never"&&!e.billingPending?(a(),l("p",EO,"No scheduled expiration while subscribed. A 90-day grace period applies if paid access ends.")):f("v-if",!0),e.isUpdate&&e.role==="owner"&&!e.hasAuthorHosting()&&!e.hostingNeedsPayment()&&e.repositoryAddonPlans().length?(a(),l("details",SO,[t[169]||(t[169]=n("summary",null,"Pay once for just this repository",-1)),(a(!0),l(q,null,x(e.repositoryAddonPlans(),u=>(a(),l("div",{key:u.id},[n("p",null,[n("strong",null,c(u.name),1),g(" \xB7 "+c(e.billingPrice(u))+". "+c(u.description),1)]),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.billingBusy||e.hostingSaving||e.sourceLoading||e.billing.checkoutEnabled===!1||e.billingPending,onClick:y=>e.checkoutRepository(u.id)},"Buy "+c(u.name.toLowerCase()),9,NO)]))),128))])):f("v-if",!0)])):f("v-if",!0)],512),[[Q,e.detectedType]]),D(n("section",RO,[t[174]||(t[174]=n("h2",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[175]||(t[175]=n("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),D(n("div",PO,[t[171]||(t[171]=n("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),n("div",AO,[D(n("input",DO,null,512),[[d,{state:e.viewState,set:u=>{e.coauthorSearch=u},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),D(n("div",TO,[(a(!0),l(q,null,x(e.coauthorResults,(u,y)=>(a(),l("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:ae(m=>e.addCoauthor(u,m),["prevent"])},[n("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(u?.photo)},null,8,IO),n("span",{textContent:c(u?.username)},null,8,MO)],8,OO))),256))],512),[[Q,e.coauthorResults?.length>0]])]),D(n("small",{class:"form-text text-muted",textContent:c(e.coauthorError)},null,8,VO),[[Q,e.coauthorError]])],512),[[Q,e.role==="owner"||e.role==="admin"]]),n("div",qO,[(a(!0),l(q,null,x(e.coauthors,(u,y)=>(a(),l("div",_O,[u?.photo?(a(),l("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(u?.photo)},null,8,$O)):f("v-if",!0),n("a",{target:"_blank",textContent:c(u?.username),href:e.safeUrl("https://github.com/"+u?.username)},null,8,LO),t[173]||(t[173]=n("span",{class:"type-badge type-coauthor"},"Co-author",-1)),D(n("button",{type:"button",class:"btn btn-sm btn-icon",style:{"margin-left":"auto"},title:"Remove co-author",onClick:m=>e.removeCoauthor(u),"aria-label":"Remove co-author"},[...t[172]||(t[172]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,FO),[[Q,e.role==="owner"||e.role==="admin"]])]))),256)),D(n("div",UO," No co-authors yet. ",512),[[Q,!e.coauthors||e.coauthors?.length===0]])])],512),[[Q,e.isUpdate&&e.detectedType==="repo"]]),e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,BO)):f("v-if",!0)]),n("button",{type:"button",class:"btn btn-outline-ink mobile-preview-jump",onClick:t[33]||(t[33]=u=>e.selectMobilePane("preview"))},[...t[176]||(t[176]=[g("Review preview ",-1),n("span",{"aria-hidden":"true"},"\u2192",-1)])]),D(n("div",zO,[e.detectedType==="repo"?(a(),l(q,{key:0},[e.billingPending?(a(),l("button",{key:0,type:"button",class:"btn btn-ink",onClick:t[34]||(t[34]=u=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,HO)):(a(),l("button",{key:1,type:"submit",class:"btn btn-ink",disabled:e.sourceLoading||e.billingBusy||e.hostingSaving||e.billingLoading||e.hostingNeedsPayment()&&(!e.authorPlans().length&&!e.hostingOneTime()||e.billing?.checkoutEnabled===!1),onClick:t[35]||(t[35]=ae(u=>e.submitForm(u,()=>{e.submitRepository(u)}),["prevent"]))},c(e.hostingSaving?"Saving draft\u2026":e.hostingNeedsPayment()?"Continue to checkout":e.isUpdate?"Save changes":"Create anonymous link"),9,jO))],64)):f("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(a(),l("button",{key:1,type:"submit",disabled:e.sourceLoading||!e.details,class:"btn btn-ink",onClick:t[36]||(t[36]=ae(u=>e.submitForm(u,()=>{e.anonymizePullRequest(u)}),["prevent"]))}," Create anonymous link ",8,GO)):f("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(a(),l("button",{key:2,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[37]||(t[37]=ae(u=>e.submitForm(u,()=>{e.anonymizePullRequest(u)}),["prevent"]))}," Save changes ",8,WO)):f("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(a(),l("button",{key:3,type:"submit",disabled:e.sourceLoading||!e.details,class:"btn btn-ink",onClick:t[38]||(t[38]=ae(u=>e.submitForm(u,()=>{e.anonymizeGist(u)}),["prevent"]))}," Create anonymous link ",8,KO)):f("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(a(),l("button",{key:4,type:"submit",disabled:e.sourceLoading,class:"btn btn-ink",onClick:t[39]||(t[39]=ae(u=>e.submitForm(u,()=>{e.anonymizeGist(u)}),["prevent"]))}," Save changes ",8,YO)):f("v-if",!0),e.sourceLoading?(a(),l("p",XO,c(e.detectedType==="pr"?"Waiting for the pull request to load from GitHub\u2026":e.detectedType==="gist"?"Waiting for the gist to load from GitHub\u2026":"Waiting for the repository to load from GitHub\u2026"),1)):!e.details&&!e.isUpdate?(a(),l("p",JO,"Load an accessible source to continue. See the preview for details.")):f("v-if",!0),e.hostingNeedsPayment()&&!e.billingPending?(a(),l("p",QO,"You pay in Stripe, then come back here to finish.")):f("v-if",!0),e.draftRestored?(a(),l("div",ZO,[t[177]||(t[177]=g("Your unsaved draft was restored. ",-1)),n("button",{type:"button",class:"draft-discard",onClick:t[40]||(t[40]=u=>e.discardDraft())},"Discard draft")])):e.unsavedChanges?(a(),l("div",xO,[g(c(e.draftSaved?"Draft saved \xB7":"Unsaved changes \xB7")+" ",1),n("button",{type:"button",class:"draft-discard",onClick:t[41]||(t[41]=u=>e.discardDraft())},c(e.isUpdate?"Restore saved":"Discard"),1)])):f("v-if",!0)],512),[[Q,e.detectedType]])])),[[p,e.viewState]])],8,iD),f(' Preview column (right): "What reviewers will see", a miniature reviewer window '),e.detectedType?(a(),l("div",{key:0,id:"workspace-preview",role:e.mobileWorkspace?"tabpanel":null,"aria-labelledby":e.mobileWorkspace?"workspace-preview-tab":null,class:"anonymize-preview-col reviewer-preview"},[n("div",tI,[t[180]||(t[180]=n("span",{class:"rp-title"},"What reviewers will see",-1)),e.detectedType==="repo"?(a(),l("button",{key:0,type:"button",class:"rp-open",onClick:t[42]||(t[42]=u=>e.previewViewer.sidebarCollapsed=!e.previewViewer.sidebarCollapsed),"aria-expanded":!e.previewViewer.sidebarCollapsed,"aria-controls":"preview-file-tree"},"Files",8,nI)):f("v-if",!0),e.previewStatus==="ready"&&e.previewRedactions()>0?(a(),l("span",{key:1,class:"rp-count",title:e.previewRedactions()+" redacted terms in this preview"},[n("span",oI,[n("i",null,c(e.previewRedactions()),1)]),t[178]||(t[178]=g(" redacted",-1))],8,sI)):e.previewStatus==="ready"&&!String(e.terms||"").trim()?(a(),l("span",iI,"No terms yet")):e.previewStatus==="ready"&&e.previewPreserved()?(a(),l("button",{key:3,type:"button",class:"rp-count rp-count-none",onClick:t[43]||(t[43]=u=>e.openPreserveFiles()),title:"Change it in Leave files unredacted"},c(e.previewName(e.previewFile?e.previewFile.slice(e.previewFile.lastIndexOf("/")+1):e.readmeName()))+" left unredacted",1)):f("v-if",!0),t[181]||(t[181]=n("span",{class:"rp-spacer"},null,-1)),e.isUpdate&&e.previewUrl()?(a(),l("a",{key:4,class:"rp-open is-external",href:e.safeUrl(e.previewPath()),target:"_blank",rel:"noopener"},[...t[179]||(t[179]=[g("Open reviewer page ",-1),n("span",{"aria-hidden":"true"},"\u2197",-1)])],8,rI)):(a(),l("button",{key:5,type:"button",class:"rp-open is-toggle",onClick:t[44]||(t[44]=u=>e.previewExpanded=!e.previewExpanded),"aria-pressed":!!e.previewExpanded},[(a(),l("svg",lI,[e.previewExpanded?(a(),l("path",uI)):(a(),l("path",dI))])),g(c(e.previewExpanded?"Back to settings":"Expand preview"),1)],8,aI))]),n("div",cI,[n("div",pI,[t[182]||(t[182]=n("i",null,null,-1)),t[183]||(t[183]=n("i",null,null,-1)),t[184]||(t[184]=n("i",null,null,-1)),n("span",fI,c(e.previewUrl()||"anonymous.4open.science"),1)]),n("div",hI,[t[185]||(t[185]=n("span",{class:"vb-logo"},[g("Anonymous "),n("em",null,"GitHub")],-1)),e.previewId()?(a(),l("span",mI,c(e.previewId()),1)):f("v-if",!0),e.detectedType!=="repo"?(a(),l("span",gI,c(e.detectedType==="pr"?"Pull request":"Gist"),1)):f("v-if",!0)]),n("div",{class:P(["rp-body",{"reviewer-explorer":e.detectedType==="repo"}])},[e.detectedType==="repo"?(a(),l("aside",{key:0,id:"preview-file-tree",class:P(["leftCol",{collapsed:e.previewViewer.sidebarCollapsed}]),"aria-label":"Files reviewers will see"},[n("div",vI,[t[187]||(t[187]=n("span",{class:"leftCol-eyebrow"},"Files",-1)),n("button",{type:"button",class:"leftCol-close","aria-label":"Close files",onClick:t[45]||(t[45]=u=>e.previewViewer.sidebarCollapsed=!0)},[...t[186]||(t[186]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])])]),n("div",yI,[Oe(s,{class:"files",file:e.previewTreeFiles(),page:e.previewViewer,"selected-path":"/"+e.previewPathName(e.previewOpenPath()),onSelect:t[46]||(t[46]=u=>e.selectPreviewPath(u))},null,8,["file","page","selected-path"])])],2)):f("v-if",!0),e.detectedType==="repo"?D((a(),l("div",{key:1,class:"leftCol-backdrop",onClick:t[47]||(t[47]=u=>e.previewViewer.sidebarCollapsed=!0)},null,512)),[[Q,!e.previewViewer.sidebarCollapsed]]):f("v-if",!0),n("div",{class:P(e.detectedType==="repo"?"explorer-main":"rp-main")},[n("div",{class:P(e.detectedType==="repo"?"explorer-content":"rp-document")},[f(" Loading: skeleton inside the window "),e.previewStatus==="loading"||e.sourceLoading&&e.previewStatus!=="ready"&&e.previewStatus!=="error"?(a(),l("div",bI,[n("span",wI,c(e.previewDoc.loading?"Loading "+e.previewName(e.previewFile.slice(e.previewFile.lastIndexOf("/")+1))+" from GitHub\u2026":e.previewStatus==="loading"?"Updating the anonymized preview\u2026":e.detectedType==="pr"?"Loading the pull request from GitHub\u2026":e.detectedType==="gist"?"Loading the gist from GitHub\u2026":"Loading the repository from GitHub\u2026"),1),t[188]||(t[188]=Ee('',7))])):!e.details&&e.detectedType!=="repo"?(a(),l(q,{key:1},[f(" The source itself could not be loaded "),n("div",kI,[n("strong",null,"Couldn't load "+c(e.sourceSummary()||(e.detectedType==="pr"?"this pull request":"this gist")),1),n("p",null,c(e.error||"GitHub did not return it. Check that the link is right and that Anonymous GitHub can read it."),1),n("div",CI,[n("button",{type:"button",class:"btn btn-ink btn-sm",onClick:t[48]||(t[48]=u=>e.urlSelected(!0))},"Retry"),e.detectedType==="pr"&&e.githubConnection!=="oauth"?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink btn-sm",onClick:t[49]||(t[49]=u=>e.grantGitHubAccess())},[...t[189]||(t[189]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):(a(),l("a",EI,[...t[190]||(t[190]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])]))])])],2112)):!e.details&&e.detectedType==="repo"&&!e.isUpdate&&e.error?(a(),l("div",SI,[t[192]||(t[192]=n("strong",null,"Couldn't load this repository",-1)),n("p",null,c(e.error),1),n("div",NI,[n("button",{type:"button",class:"btn btn-ink btn-sm",onClick:t[50]||(t[50]=u=>e.urlSelected(!0))},"Retry"),e.githubConnection!=="oauth"?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink btn-sm",onClick:t[51]||(t[51]=u=>e.grantGitHubAccess())},[...t[191]||(t[191]=[g("Manage GitHub access ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])])):f("v-if",!0)])])):e.previewStatus==="error"&&e.previewDoc.loadError?(a(),l(q,{key:3},[f(" The open file could not be read from GitHub "),n("div",RI,[n("strong",null,"Couldn't load "+c(e.previewName(e.previewFile.slice(e.previewFile.lastIndexOf("/")+1))),1),n("p",null,c(e.previewDoc.loadError),1),n("div",PI,[n("button",{class:"btn btn-ink btn-sm",type:"button",onClick:t[52]||(t[52]=u=>e.retryPreview())},"Retry"),n("button",{class:"btn btn-outline-ink btn-sm",type:"button",onClick:t[53]||(t[53]=u=>e.openPreviewFile(""))},"Back to the README")])])],2112)):e.previewStatus==="error"?(a(),l(q,{key:4},[f(" The anonymized preview failed "),n("div",AI,[t[193]||(t[193]=n("strong",null,"Couldn't apply the redactions",-1)),t[194]||(t[194]=n("p",null,"Unable to generate the anonymized preview. The latest redactions have not been verified.",-1)),n("div",DI,[n("button",{class:"btn btn-ink btn-sm",type:"button",onClick:t[54]||(t[54]=u=>e.retryPreview())},"Retry preview")])])],2112)):e.detectedType==="repo"&&!e.previewFile&&!e.readme&&e.previewStatus==="idle"?(a(),l("div",TI,[...t[195]||(t[195]=[n("strong",null,"No README",-1),n("p",null,"Reviewers land on the file list. Open the files you will share and check them before sending the link.",-1)])])):e.detectedType==="repo"&&e.previewStatus==="ready"?(a(),Gt(i,{key:6,name:"partials/pageView.htm",state:e.previewViewer},null,8,["state"])):e.detectedType==="gist"&&e.previewStatus==="ready"?(a(),l("div",OI,[n("div",II,[n("h2",MI,[e.options?.title?(a(),l("span",VI,c(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):f("v-if",!0),n("span",{class:P(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},c(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(a(),l("small",{key:0,textContent:c(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,qI)):f("v-if",!0)]),e.options?.origin?(a(),l("small",_I,"Gist ID: "+c(e.details?.source?.gistId),1)):f("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(a(),l("small",$I,"By @"+c(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):f("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(a(),l("div",LI,[n("ul",FI,[(a(!0),l(q,null,x(e.previewGistFiles,(u,y)=>(a(),l("li",UI,[n("div",BI,[n("strong",{textContent:c(u?.filename)},null,8,zI),u?.language?(a(),l("span",HI,c(u?.language),1)):f("v-if",!0)]),Oe(o,{file:u,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):f("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(a(),l("div",jI,[t[198]||(t[198]=n("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),n("ul",GI,[(a(!0),l(q,null,x(e.details?.gist?.comments,(u,y)=>(a(),l("li",WI,[n("div",KI,[e.options?.username?(a(),l("span",YI,[t[196]||(t[196]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[197]||(t[197]=g(" @",-1)),n("span",{textContent:c(e.anonymizeGistContent(u?.author))},null,8,XI)])):f("v-if",!0),e.options?.date?(a(),l("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(u?.updatedDate))},null,8,JI)):f("v-if",!0)]),e.options?.body?(a(),l("div",QI,[Oe(r,{content:e.anonymizeGistContent(u?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])):e.detectedType==="pr"&&e.previewStatus==="ready"?(a(),l("div",ZI,[n("div",xI,[n("h2",e5,[e.options?.title?(a(),l("span",t5,c(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):f("v-if",!0),n("span",{class:P(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(a(),l("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,n5)):f("v-if",!0)]),e.options?.origin?(a(),l("small",s5,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(a(),l("div",o5,[Oe(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),e.options?.diff||e.options?.comments?(a(),l("nav",i5,[e.options?.diff?(a(),l("button",{key:0,class:P(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",id:"preview-pr-diff-tab","aria-selected":e.prTabState?.active==="diff","aria-controls":"preview-pr-diff-panel",tabindex:e.prTabState?.active==="diff"?0:-1,onKeydown:t[55]||(t[55]=u=>e.previewTabKeydown(u)),onClick:t[56]||(t[56]=u=>e.prTabState.active="diff")},[...t[199]||(t[199]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g(" Diff ",-1)])],42,r5)):f("v-if",!0),e.options?.comments?(a(),l("button",{key:1,class:P(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",id:"preview-pr-comments-tab","aria-selected":e.prTabState?.active==="comments","aria-controls":"preview-pr-comments-panel",tabindex:e.prTabState?.active==="comments"?0:-1,onKeydown:t[57]||(t[57]=u=>e.previewTabKeydown(u)),onClick:t[58]||(t[58]=u=>e.prTabState.active="comments")},[t[200]||(t[200]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,l5)],42,a5)):f("v-if",!0)])):f("v-if",!0),!e.options?.diff&&!e.options?.comments?(a(),l("div",d5,"Diff and comments are hidden by your display settings.")):f("v-if",!0),n("div",u5,[e.options?.diff&&e.prTabState?.active=="diff"?(a(),l("div",c5,[n("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,p5)])):f("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(a(),l("div",f5,[n("ul",h5,[(a(!0),l(q,null,x(e.details?.pullRequest?.comments,(u,y)=>(a(),l("li",m5,[n("div",g5,[e.options?.username?(a(),l("span",v5,[t[201]||(t[201]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[202]||(t[202]=g(" @",-1)),n("span",{textContent:c(e.anonymizePrContent(u?.author))},null,8,y5)])):f("v-if",!0),e.options?.date?(a(),l("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(u?.updatedDate))},null,8,b5)):f("v-if",!0)]),e.options?.body?(a(),l("div",w5,[Oe(r,{content:e.anonymizePrContent(u?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0)]))),256))])])):f("v-if",!0)])])):f("v-if",!0),f(" More below: a fade with a way to keep reading (hidden by CSS once the window is scrolled to the end) "),e.previewStatus==="ready"&&!(e.detectedType==="repo"&&e.previewFile&&e.previewDoc.note)?(a(),l("div",k5,[e.isUpdate&&e.previewUrl()?(a(),l("a",{key:0,class:"rp-more-btn",href:e.safeUrl(e.previewPath()),target:"_blank",rel:"noopener"},[...t[203]||(t[203]=[g("Continue reading on the reviewer page ",-1),n("span",{"aria-hidden":"true"},"\u2197",-1)])],8,C5)):e.previewExpanded?(a(),l("span",E5,"Scroll for more")):(a(),l("button",{key:1,type:"button",class:"rp-more-btn",onClick:t[59]||(t[59]=u=>e.previewExpanded=!0)},"Continue reading in the expanded preview"))])):f("v-if",!0)],2)],2)],2)])],8,eI)):f("v-if",!0)])],512),[[Q,e.workspaceOpen||e.isUpdate]])],2)}var S5={class:"container-fluid h-100 anonymize-page"},N5={class:"row h-100 flex-column flex-md-row"},R5={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},P5={class:"form-group"},A5={class:"form-group"},D5={class:"form-check"},T5={class:"form-check-input",type:"checkbox",id:"update",name:"update"},O5={class:"form-group"},I5={class:"form-text text-muted"},M5=["href"],V5={class:"invalid-feedback"},q5={class:"form-text text-muted"},_5={class:"form-group"},$5={id:"idHelp",class:"form-text text-muted"},L5={class:"invalid-feedback"},F5={class:"form-group"},U5={class:"invalid-feedback"},B5={class:"form-group"},z5={class:"form-control",id:"expiration",name:"expiration"},H5={class:"form-group",id:"expiration-date-form"},j5={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},G5={key:0,class:"date-echo","aria-live":"polite"},W5={class:"accordion mb-3",id:"options"},K5={class:"card"},Y5={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},X5={class:"card-body"},J5={class:"form-group mb-0"},Q5={class:"form-check"},Z5={class:"form-check-input",type:"checkbox",id:"link",name:"link"},x5={class:"form-check"},e8={class:"form-check-input",type:"checkbox",id:"image",name:"image"},t8={class:"form-check"},n8={class:"form-check-input",type:"checkbox",id:"date",name:"date"},s8={class:"form-check"},o8={class:"form-check-input",type:"checkbox",id:"username",name:"username"},i8={class:"form-check"},r8={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},a8={class:"form-check"},l8={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},d8={class:"form-check"},u8={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},c8={class:"form-check"},p8={class:"form-check-input",type:"checkbox",id:"title",name:"title"},f8={class:"form-check"},h8={class:"form-check-input",type:"checkbox",id:"body",name:"body"},m8=["textContent"],g8={class:"anonymize-submit-bar"},v8={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},y8={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},b8={class:"pr-title mb-1"},w8={key:0},k8=["textContent"],C8={key:0},E8={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},S8={class:"nav nav-tabs",id:"myTab",role:"tablist"},N8={key:0,class:"nav-item",role:"presentation"},R8={key:1,class:"nav-item",role:"presentation"},P8=["textContent"],A8={class:"tab-content",id:"pills-tabContent"},D8={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},T8={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},O8={style:{"overflow-x":"auto"}},I8=["innerHTML"],M8={key:0,class:"pr-comments list-group"},V8={class:"pr-comment list-group-item"},q8={class:"d-flex w-100 justify-content-between flex-wrap"},_8={key:0,class:"mb-1"},$8=["textContent"],L8={class:"mb-1"};function rp(e,t){let s=Xe("markdown"),i=Ae("field"),o=Ae("form");return a(),l("div",S5,[n("div",N5,[n("div",R5,[n("div",{class:P(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[D((a(),l("form",{class:P(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=Ee('
Anonymize \xA0/\xA0 Pull request

Anonymize a pull request

Fill in the details \u2014 it only takes a minute.

Source
',4)),f(" pullRequestUrl "),n("div",P5,[t[2]||(t[2]=n("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[i,{state:e.viewState,set:r=>{e.pullRequestUrl=r},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),D(n("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[Q,e.anonymize?.pullRequestUrl?.errors?.access]]),D(n("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[Q,e.anonymize?.pullRequestUrl?.errors?.missing]]),D(n("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is already anonymized ",513),[[Q,e.anonymize?.pullRequestUrl?.errors?.used]])]),D(n("div",null,[n("div",A5,[n("div",D5,[D(n("input",T5,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=n("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=n("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=n("div",{class:"paper-section-eyebrow anonymize-section-title"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})]),g(" Conference ID ")],-1)),f(" Conference "),n("div",O5,[t[5]||(t[5]=n("label",{for:"conference"},[g("Conference ID "),n("span",{class:"text-muted"},"(Optional)")],-1)),D(n("input",{class:P(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[i,{state:e.viewState,set:r=>{e.conference=r},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),D(n("small",I5,[n("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,M5),g(" will expire on "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[Q,e.conference_data]]),D(n("div",V5," The conference is not activated. ",512),[[Q,e.anonymize?.conference?.errors?.activated]]),D(n("small",q5," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[Q,!e.conference_data]])]),t[27]||(t[27]=n("div",{class:"paper-section-eyebrow anonymize-section-title"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),g(" Anonymization Options ")],-1)),f(" Pull Request ID "),n("div",_5,[t[6]||(t[6]=n("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[i,{state:e.viewState,set:r=>{e.pullRequestId=r},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),n("small",$5,"Id used in the url: https://anonymous.4open.science/r/"+c(e.pullRequestId),1),D(n("div",L5," Repository id can only contain letters and numbers ",512),[[Q,e.anonymize?.pullRequestId?.errors?.format]]),D(n("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used ",513),[[Q,e.anonymize?.pullRequestId?.errors?.used]])]),f(" Terms "),n("div",F5,[t[7]||(t[7]=n("label",{for:"terms"},"Terms to anonymize",-1)),D(n("textarea",{class:P(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=n("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),D(n("div",U5," Terms are in an invalid format ",512),[[Q,e.anonymize?.terms?.errors?.format]])]),n("div",B5,[t[10]||(t[10]=n("label",{for:"expiration"},"Expiration strategy",-1)),D((a(),l("select",z5,[...t[9]||(t[9]=[n("option",{value:"never",selected:""},"Never expire",-1),n("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),n("option",{value:"remove"},"Remove when expired",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=n("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),D(n("div",H5,[t[12]||(t[12]=n("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),D(n("input",j5,null,512),[[i,{state:e.viewState,set:r=>{e.options.expirationDate=r},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),e.fmt?.dateEcho(e.options?.expirationDate)?(a(),l("p",G5,"Expires "+c(e.fmt?.dateEcho(e.options?.expirationDate)),1)):f("v-if",!0),D(n("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[Q,e.options?.expirationMode=="remove"]]),D(n("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+c(e.pullRequestUrl)+".",513),[[Q,e.options?.expirationMode=="redirect"]])],512),[[Q,e.options?.expirationMode!="never"]]),n("div",W5,[n("div",K5,[t[25]||(t[25]=Ee('

',1)),n("div",Y5,[n("div",X5,[n("div",J5,[n("div",Q5,[D(n("input",Z5,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=n("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),n("div",x5,[D(n("input",e8,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=n("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=n("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),n("div",t8,[D(n("input",n8,null,512),[[i,{state:e.viewState,set:r=>{e.options.date=r},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=n("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=n("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),n("div",s8,[D(n("input",o8,null,512),[[i,{state:e.viewState,set:r=>{e.options.username=r},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=n("label",{class:"form-check-label",for:"username"},"Display username",-1))]),n("div",i8,[D(n("input",r8,null,512),[[i,{state:e.viewState,set:r=>{e.options.comments=r},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=n("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),n("div",a8,[D(n("input",l8,null,512),[[i,{state:e.viewState,set:r=>{e.options.diff=r},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=n("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),n("div",d8,[D(n("input",u8,null,512),[[i,{state:e.viewState,set:r=>{e.options.origin=r},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=n("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),n("div",c8,[D(n("input",p8,null,512),[[i,{state:e.viewState,set:r=>{e.options.title=r},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=n("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),n("div",f8,[D(n("input",h8,null,512),[[i,{state:e.viewState,set:r=>{e.options.body=r},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[Q,e.pullRequestUrl]]),e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,m8)):f("v-if",!0),D(n("div",g8,[e.isUpdate?f("v-if",!0):(a(),l("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=ae(r=>e.submitForm(r,()=>{e.anonymizePullRequest(r)}),["prevent"]))},[...t[28]||(t[28]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),g(" Anonymize ",-1)])])),e.isUpdate?(a(),l("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=ae(r=>e.submitForm(r,()=>{e.updatePullRequest(r)}),["prevent"]))},[...t[29]||(t[29]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-save"})],-1),g(" Update ",-1)])])):f("v-if",!0)],512),[[Q,e.pullRequestUrl]])],2)),[[o,e.viewState]])],2)]),e.details?(a(),l("div",v8,[n("div",y8,[n("h2",b8,[e.options?.title?(a(),l("span",w8,c(e.anonymize(e.details?.pullRequest?.title)),1)):f("v-if",!0),n("span",{class:P(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(a(),l("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,k8)):f("v-if",!0)]),e.options?.origin?(a(),l("small",C8,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):f("v-if",!0),e.options?.body?(a(),l("div",E8,[Oe(s,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):f("v-if",!0),n("ul",S8,[e.options?.diff?(a(),l("li",N8,[...t[31]||(t[31]=[n("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):f("v-if",!0),e.options?.comments?(a(),l("li",R8,[n("button",{class:P(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[n("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,P8)],2)])):f("v-if",!0)]),n("div",A8,[n("div",D8,[e.options?.diff?(a(),l("div",T8,[n("pre",O8,[n("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,I8)])])):f("v-if",!0)]),n("div",{class:P(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(a(),l("ul",M8,[(a(!0),l(q,null,x(e.details?.pullRequest?.comments,(r,d)=>(a(),l("li",V8,[n("div",q8,[e.options?.username?(a(),l("h5",_8," @"+c(e.anonymize(r?.author)),1)):f("v-if",!0),e.options?.date?(a(),l("small",{key:1,textContent:c(e.fmt?.date(r?.updatedDate))},null,8,$8)):f("v-if",!0)]),n("p",L8,[e.options?.body?(a(),Gt(s,{key:0,class:"pr-comment-body",content:e.anonymize(r?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):f("v-if",!0)])]))),256))])):f("v-if",!0)],2)])])):f("v-if",!0)])])}var F8={class:"container paper-page claim-page"},U8={class:"paper-settings-main claim-form"},B8={class:"form-group"},z8={class:"invalid-feedback"},H8={class:"form-group"};function ap(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",F8,[t[6]||(t[6]=Ee('
My work \xA0/\xA0 Claim

Claim an anonymization

Take ownership of an existing anonymized repository so it appears on your dashboard.

',3)),n("div",U8,[t[5]||(t[5]=n("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),D((a(),l("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=ae(o=>e.submitForm(o,()=>{e.claim()}),["prevent"]))},[n("div",B8,[t[1]||(t[1]=n("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",placeholder:"https://github.com/owner/repository",required:""},null,2),[[s,{state:e.viewState,set:o=>{e.repoUrl=o},value:e.repoUrl,form:"claimForm",options:{}}]]),D(n("div",z8," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[Q,e.claimForm?.repoUrl?.errors?.not_found]])]),n("div",H8,[t[2]||(t[2]=n("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",placeholder:"e.g. my-paper-7F2A","aria-describedby":"idHelp",required:""},null,2),[[s,{state:e.viewState,set:o=>{e.repoId=o},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=n("small",{id:"idHelp",class:"form-text text-muted"},[g("The ID is the last part of the anonymized URL: "),n("code",null,"anonymous.4open.science/r/"),g(".")],-1))]),t[4]||(t[4]=n("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[i,e.viewState]])])])}var j8={class:"container page paper-page conference-page"},G8={class:"paper-crumbs"},W8={class:"here"},K8={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},Y8={class:"conf-title-row"},X8=["textContent"],J8={key:0,class:"conf-status"},Q8=["textContent"],Z8={key:0,class:"paper-page-lede"},x8=["textContent","href"],eM={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},tM=["href"],nM={class:"paper-meta-rule"},sM=["textContent"],oM=["textContent"],iM={key:0},rM={key:0,class:"conference-payment-status",role:"status"},aM=["disabled"],lM={key:1,role:"alert"},dM={key:2,class:"paper-settings-section","aria-labelledby":"conference-payment-heading"},uM={key:0,role:"status"},cM={key:1,role:"alert"},pM=["onClick","disabled"],fM={class:"dashboard-meta conf-view-meta"},hM={class:"dashboard-view-tabs",role:"group","aria-label":"Repository view"},mM=["aria-pressed"],gM=["aria-pressed","aria-label"],vM=["aria-pressed"],yM={class:"attention-count"},bM={class:"dashboard-count",role:"status"},wM={class:"search-wrap"},kM={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repositories\u2026",autocomplete:"off"},CM={class:"dashboard-filter-controls"},EM={class:"dropdown"},SM={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},NM={class:"filter-btn-value"},RM={class:"dropdown-menu","aria-labelledby":"dropdownSort"},PM={class:"form-check dropdown-item"},AM={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},DM={class:"form-check dropdown-item"},TM={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},OM={class:"form-check dropdown-item"},IM={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},MM={class:"form-check dropdown-item"},VM={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},qM={class:"dashboard-page conf-rows"},_M={class:"cell-anon",role:"cell"},$M={class:"anon-text"},LM={class:"anon-title"},FM=["title","href"],UM={class:"rn-owner"},BM={class:"rn-repo"},zM={class:"anon-sub"},HM=["title"],jM={class:"id-head"},GM={class:"id-tail"},WM=["title"],KM={class:"dashboard-row-meta",role:"presentation"},YM={class:"cell-status",role:"cell"},XM={class:"status-line"},JM=["textContent"],QM=["textContent","title"],ZM=["href"],xM=["onClick","disabled"],e6={key:3,class:"status-sub status-sub-date"},t6=["data-unit","aria-label"],n6={class:"cell-expires",role:"cell"},s6={key:0,class:"expires-never"},o6=["textContent"],i6={key:2,class:"expires-past"},r6={key:3,class:"empty-dash","aria-label":"Not applicable"},a6={class:"cell-actions",role:"cell"},l6=["onClick","disabled","title","aria-label"],d6={class:"sr-only","aria-live":"polite"},u6={class:"project-type-svg","aria-hidden":"true"},c6=["href"],p6={class:"copy-url-label","aria-hidden":"true"},f6=["href","aria-label"],h6={class:"dropdown"},m6=["aria-label"],g6={class:"dropdown-menu dropdown-menu-right"},v6=["href"],y6=["href"],b6=["href"],w6={key:0,class:"paper-table-empty"},k6={key:0},C6={key:1},E6={key:2,class:"paper-table-empty-actions"};function lp(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",j8,[n("div",null,[n("div",G8,[t[6]||(t[6]=n("a",{href:"/dashboard"},"My work",-1)),t[7]||(t[7]=g(" \xA0/\xA0 ",-1)),t[8]||(t[8]=n("a",{href:"/conferences"},"Conferences",-1)),t[9]||(t[9]=g(" \xA0/\xA0 ",-1)),n("span",W8,c(e.conference?.conferenceID),1)]),n("div",K8,[n("div",null,[n("div",Y8,[n("h1",{class:"paper-page-title",textContent:c(e.conference?.name)},null,8,X8),e.conference?.status?(a(),l("span",J8,[n("span",{class:P(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),n("span",{textContent:c(e.fmt?.statusLabel(e.conference?.status))},null,8,Q8)])):f("v-if",!0)]),e.conference?.url?(a(),l("p",Z8,[n("a",{target:"_blank",rel:"noopener",textContent:c(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,x8)])):f("v-if",!0)]),n("div",eM,[n("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[10]||(t[10]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit conference",-1)])],8,tM)])]),n("div",nM,[n("span",null,[t[11]||(t[11]=g("ID ",-1)),n("b",{class:"commit-hash",textContent:c(e.conference?.conferenceID)},null,8,sM)]),n("span",null,[t[12]||(t[12]=g("Review window ",-1)),n("b",null,c(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),n("span",null,[t[13]||(t[13]=g("Repositories ",-1)),n("b",null,c(e.fmt?.number(e.conference?.repositories?.length)),1)]),n("span",null,[t[14]||(t[14]=g("Plan ",-1)),n("b",{textContent:c(e.conferencePlanName(e.conference?.plan?.planID))},null,8,oM)]),e.conference?.price?(a(),l("span",iM,[t[15]||(t[15]=g("Cost so far ",-1)),n("b",null,c(e.fmt?.money(e.conference?.price)),1)])):f("v-if",!0)]),e.billingNotice?(a(),l("div",rM,[n("p",null,c(e.billingNotice),1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[0]||(t[0]=o=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,aM)])):f("v-if",!0),e.billingError&&e.conference?.status!=="pending_payment"?(a(),l("p",lM,c(e.billingError),1)):f("v-if",!0),e.conference?.status==="pending_payment"?(a(),l("section",dM,[t[16]||(t[16]=n("h2",{id:"conference-payment-heading"},"Activate your review package",-1)),t[17]||(t[17]=n("p",null,"This conference is waiting for payment. Authors can join after payment is confirmed. Checkout returns to this conference. Authors within the package do not pay separately.",-1)),e.billingLoading?(a(),l("p",uM,"Loading payment options\u2026")):f("v-if",!0),e.billingError?(a(),l("p",cM,c(e.billingError),1)):f("v-if",!0),(a(!0),l(q,null,x((e.billing?.plans||[]).filter(o=>o.id===e.conference?.plan?.planID),o=>(a(),l("div",{key:o.id},[n("p",null,[n("strong",null,c(o.name)+" package",1),g(": "+c(e.billingPrice(o))+" for up to "+c(o.repositories)+" repositories and "+c(e.billingBytes(o.storage))+" of source files during the review window. Taxes, if applicable, appear at checkout.",1)]),n("button",{type:"button",class:"btn btn-primary",onClick:r=>e.checkout(o.id,e.conference.conferenceID),disabled:e.billingBusy||e.billingPending||e.billing?.checkoutEnabled===!1},c(e.billingBusy?"Please wait\u2026":"Pay for review package"),9,pM)]))),128)),t[18]||(t[18]=n("p",null,[n("a",{href:"/profile#settings-billing"},"Manage invoices")],-1))])):f("v-if",!0),n("div",fM,[n("div",hM,[n("button",{type:"button","aria-pressed":e.confView()==="current",onClick:t[1]||(t[1]=o=>e.setConfView("current")),title:"Every repository except removed links"},"Current",8,mM),e.confCount("attention")>0||e.confView()==="attention"?(a(),l("button",{key:0,type:"button","aria-pressed":e.confView()==="attention",onClick:t[2]||(t[2]=o=>e.setConfView("attention")),"aria-label":"Needs attention "+e.confCount("attention")},[t[19]||(t[19]=n("span",{class:"dashboard-attention-prefix"},"Needs ",-1)),t[20]||(t[20]=n("span",null,"attention",-1)),t[21]||(t[21]=g()),n("span",{class:P(["attention-count",{"has-attention":e.confCount("attention")>0}])},c(e.fmt?.number(e.confCount("attention"))),3)],8,gM)):f("v-if",!0),e.confCount("removed")>0||e.confView()==="removed"?(a(),l("button",{key:1,type:"button","aria-pressed":e.confView()==="removed",onClick:t[3]||(t[3]=o=>e.setConfView("removed")),title:"Links reviewers can no longer open"},[t[22]||(t[22]=g("Removed ",-1)),n("span",yM,c(e.fmt?.number(e.confCount("removed"))),1)],8,vM)):f("v-if",!0)]),n("span",bM,c(e.search.trim()?e.fmt?.number(e.filteredRepositories?.length||0)+" shown":e.fmt?.number(e.filteredRepositories?.length||0)+((e.filteredRepositories?.length||0)===1?" repository":" repositories")),1)]),D((a(),l("form",{class:"w-100 conf-repo-toolbar","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[4]||(t[4]=ae(o=>e.submitForm(o,()=>{o.preventDefault()}),["prevent"]))},[n("div",wM,[D(n("input",kM,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),n("div",CM,[n("div",EM,[n("button",SM,[t[23]||(t[23]=n("span",{class:"filter-btn-label"},"Sort",-1)),n("span",NM,c({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),n("div",RM,[t[28]||(t[28]=n("h6",{class:"dropdown-header"},"Order by",-1)),n("div",PM,[D(n("input",AM,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),n("div",DM,[D(n("input",TM,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[25]||(t[25]=n("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),n("div",OM,[D(n("input",IM,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[26]||(t[26]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),n("div",MM,[D(n("input",VM,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[27]||(t[27]=n("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])])])],32)),[[i,e.viewState]]),n("div",qM,[n("div",{class:P(["paper-table paper-table-dashboard paper-table-conf w-100",{"is-removed-view":e.confView()==="removed"}]),role:"table","aria-label":"Repositories"},[t[37]||(t[37]=n("div",{class:"paper-table-head",role:"row"},[n("div",{role:"columnheader"},"Repository"),n("div",{role:"columnheader"},"Status"),n("div",{role:"columnheader",class:"num"},"Views"),n("div",{role:"columnheader"},"Expires"),n("div",{role:"columnheader"},[n("span",{class:"sr-only"},"Actions")])],-1)),(a(!0),l(q,null,x(e.filteredRepositories,(o,r)=>(a(),l("div",{class:P(["paper-table-row",{"repo-inactive":o?.status=="expired"||o?.status=="removed","repo-error":o?.status=="error"}]),role:"row",key:o?.repoId},[n("div",_M,[t[30]||(t[30]=n("span",{class:"project-type-icon",role:"img","aria-label":"Repository",title:"Repository"},[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})])],-1)),n("div",$M,[n("div",LM,[n("a",{class:"repo-name",title:o?.source?.fullName,href:e.safeUrl("/r/"+o?.repoId+"/")},[(o?.source?.fullName||"").indexOf("/")>0?(a(),l(q,{key:0},[n("span",UM,c(o.source.fullName.slice(0,o.source.fullName.indexOf("/")+1)),1),t[29]||(t[29]=n("wbr",null,null,-1)),n("span",BM,c(o.source.fullName.slice(o.source.fullName.indexOf("/")+1)),1)],64)):(a(),l(q,{key:1},[g(c(o?.source?.fullName||o?.repoId),1)],64))],8,FM)]),n("div",zM,[n("code",{class:"anonymous-id",title:o?.repoId},[(o?.repoId||"").length>14?(a(),l(q,{key:0},[n("span",jM,c(o.repoId.slice(0,-6)),1),n("span",GM,c(o.repoId.slice(-6)),1)],64)):(a(),l(q,{key:1},[g(c(o?.repoId),1)],64))],8,HM),o?.source?.commit?(a(),l("span",{key:0,class:"commit-hash",title:o.source.commit},c(o.source.commit.substring(0,7)),9,WM)):f("v-if",!0)])])]),n("div",KM,[n("div",YM,[n("div",XM,[n("span",{class:P(["status-dot","status-"+(o?.status=="error"?"error":o?.status=="ready"?"ready":o?.status=="expired"||o?.status=="removed"?o?.status:"progress")]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(o?.status))},null,8,JM)]),o?.status=="error"&&o?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(o?.statusMessage)),title:o?.statusMessage},null,8,QM)):f("v-if",!0),o?.status=="error"?(a(),l("a",{key:1,class:"project-attention-action",href:e.safeUrl("/status/"+o?.repoId)},"View status",8,ZM)):f("v-if",!0),o?.status=="expired"?(a(),l("button",{key:2,type:"button",class:"project-attention-action",onClick:ae(d=>e.extendRepo(o),["stop"]),disabled:e.extendingId===o?.repoId,title:"Reviewers can no longer open this link"},"Extend 6 months",8,xM)):f("v-if",!0),o?.anonymizeDate&&o?.status!="error"&&o?.status!="expired"?(a(),l("div",e6,"anonymized "+c(e.fmt?.humanTime(o?.anonymizeDate)),1)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":(o?.pageView||0)===1?"view":"views","aria-label":e.fmt?.number(o?.pageView||0)+((o?.pageView||0)===1?" view":" views")},[t[31]||(t[31]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),n("span",null,c(e.fmt?.number(o?.pageView||0)),1)],8,t6),n("div",n6,[t[33]||(t[33]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),o?.status=="ready"&&(o?.options?.expirationMode==="never"||!o?.options?.expirationDate)?(a(),l("span",s6,"No expiry")):f("v-if",!0),o?.status=="ready"&&o?.options?.expirationMode!=="never"&&o?.options?.expirationDate?(a(),l("span",{key:1,textContent:c((e.fmt?.humanTime(o?.options?.expirationDate)||"").replace(/^on /,""))},null,8,o6)):f("v-if",!0),o?.status=="expired"?(a(),l("span",i6,[t[32]||(t[32]=n("span",{class:"expires-past-prefix"},"Expired ",-1)),g(c(e.fmt?.shortDate(o?.options?.expirationDate)),1)])):f("v-if",!0),o?.status!="ready"&&o?.status!="expired"?(a(),l("span",r6,"\u2014")):f("v-if",!0)])]),n("div",a6,[o?.status!="expired"&&o?.status!="removed"?(a(),l("button",{key:0,type:"button",class:"copy-url",onClick:ae(d=>e.copyRepoLink(o),["stop"]),disabled:!!e.copyingId,title:"Copy link: /r/"+o?.repoId+"/","aria-label":"Copy anonymous link for "+o?.repoId},[n("span",d6,c(e.copyingId===o?.repoId?"Link copied":""),1),(a(),l("svg",u6,[n("use",{href:e.copyingId===o?.repoId?"#ui-icon-check":"#project-icon-copy"},null,8,c6)])),n("span",p6,c(e.copyingId===o?.repoId?"Copied":"Copy link"),1)],8,l6)):f("v-if",!0),o?.status!="expired"&&o?.status!="removed"?(a(),l("a",{key:1,class:"row-edit row-open",href:e.safeUrl("/r/"+o?.repoId+"/"),target:"_blank",rel:"noopener",title:"Open what reviewers see","aria-label":"Open anonymous page for "+o?.repoId},[...t[34]||(t[34]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])],8,f6)):f("v-if",!0),n("div",h6,[n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+o?.repoId},[...t[35]||(t[35]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,m6),n("div",g6,[n("a",{class:"dropdown-item",href:e.safeUrl("/r/"+o?.repoId+"/")},"View",8,v6),n("a",{class:"dropdown-item",href:e.safeUrl("https://github.com/"+o?.source?.fullName+"/"),target:"_blank",rel:"noopener"},"Open source on GitHub",8,y6),n("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+o?.repoId)},"Edit",8,b6)])])])],2))),128)),e.filteredRepositories?.length==0?(a(),l("div",w6,[t[36]||(t[36]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),e.conference?.repositories?.length?f("v-if",!0):(a(),l("span",k6,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(a(),l("span",C6,"Nothing matches the current filters.")):f("v-if",!0),e.conference?.repositories?.length?(a(),l("div",E6,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=o=>{e.search="",e.setConfView("current")})},"Clear filters")])):f("v-if",!0)])):f("v-if",!0)],2)])])])}var S6={class:"container page paper-page conferences-page"},N6={class:"row"},R6={class:"w-100"},P6={class:"d-flex align-items-start justify-content-between flex-wrap page-head-row page-head page-head-main",style:{gap:"12px"}},A6={key:0,href:"/conference/new",class:"btn btn-primary"},D6={class:"search-wrap"},T6={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},O6={class:"dashboard-filter-controls"},I6={class:"dropdown"},M6={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},V6={class:"filter-btn-value"},q6={class:"dropdown-menu","aria-labelledby":"dropdownSort"},_6={class:"form-check dropdown-item"},$6={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},L6={class:"form-check dropdown-item"},F6={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},U6={class:"form-check dropdown-item"},B6={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},z6={class:"dropdown"},H6={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},j6={key:0,class:"filter-btn-value"},G6={key:1,class:"filter-btn-value"},W6={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},K6={class:"form-check dropdown-item"},Y6=["id"],X6=["for"],J6={key:1,class:"dashboard-meta"},Q6={class:"dashboard-count"},Z6={key:0},x6={key:0},eV={key:1},tV={key:0,class:"filter-chip"},nV=["onClick","aria-label"],sV={key:0,class:"conference-feedback",role:"alert"},oV={key:1,class:"conference-feedback",role:"status"},iV={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},rV={class:"cell-anon",role:"cell"},aV={class:"anon-text"},lV=["textContent","href"],dV={class:"anon-sub"},uV={class:"anon-source"},cV=["textContent"],pV={key:0},fV=["textContent","href"],hV={class:"cell-status",role:"cell"},mV={class:"status-line"},gV=["textContent"],vV={class:"cell-views num",role:"cell"},yV=["textContent"],bV={class:"cell-expires",role:"cell"},wV={key:0},kV={key:1,class:"empty-dash","aria-label":"No review window"},CV={class:"cell-actions",role:"cell"},EV={class:"dropdown"},SV=["disabled","aria-label"],NV={class:"dropdown-menu dropdown-menu-right"},RV=["href"],PV=["href"],AV={key:0},DV=["onClick"],TV={key:0,class:"paper-table-empty"},OV={key:0,class:"empty-icon","aria-hidden":"true"},IV={key:1,class:"ui-icon","aria-hidden":"true"},MV={key:3},VV={class:"paper-table-empty-actions"},qV={key:0,href:"/conference/new",class:"btn btn-primary conf-empty-new"};function dp(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",S6,[n("div",N6,[n("div",R6,[n("div",P6,[t[4]||(t[4]=n("div",null,[n("h1",{class:"paper-page-title"},[g("Your "),n("em",null,"conferences")]),n("p",{class:"paper-page-lede"},"Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.")],-1)),e.conferences&&e.conferences.length==0?f("v-if",!0):(a(),l("a",A6,[...t[3]||(t[3]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})],-1),g(" New conference ",-1)])]))]),e.conferences?.length>0?D((a(),l("form",{key:0,class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=ae(o=>e.submitForm(o,()=>{o.preventDefault()}),["prevent"]))},[n("div",D6,[D(n("input",T6,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),n("div",O6,[n("div",I6,[n("button",M6,[t[5]||(t[5]=n("span",{class:"filter-btn-label"},"Sort",-1)),n("span",V6,c({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),n("div",q6,[t[9]||(t[9]=n("h6",{class:"dropdown-header"},"Order by",-1)),n("div",_6,[D(n("input",$6,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[6]||(t[6]=n("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),n("div",L6,[D(n("input",F6,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[7]||(t[7]=n("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),n("div",U6,[D(n("input",B6,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[8]||(t[8]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),n("div",z6,[n("button",H6,[t[10]||(t[10]=n("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(a(),l("span",j6,"All")):f("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?f("v-if",!0):(a(),l("span",G6,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),n("div",W6,[t[11]||(t[11]=n("h6",{class:"dropdown-header"},"Show statuses",-1)),(a(!0),l(q,null,x(e.statusLabels,(o,r,d)=>(a(),l("div",K6,[D(n("input",{class:"form-check-input",type:"checkbox",id:"status-"+r},null,8,Y6),[[s,{state:e.viewState,set:p=>{e.filters.status[r]=p},value:e.filters?.status[r],form:null,options:{}}]]),n("label",{class:"form-check-label",for:"status-"+r},c(o),9,X6)]))),256))])])])],32)),[[i,e.viewState]]):f("v-if",!0),e.conferences?.length>0?(a(),l("div",J6,[n("span",Q6,[e.filteredConferences?.length===e.conferences?.length?(a(),l("span",Z6,[g(c(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(a(),l("span",x6,"s")):f("v-if",!0)])):f("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(a(),l("span",eV,c(e.fmt?.number(e.filteredConferences?.length))+" of "+c(e.fmt?.number(e.conferences?.length))+" shown",1)):f("v-if",!0)]),(a(!0),l(q,null,x(e.filters?.status,(o,r,d)=>(a(),l(q,null,[o===!1?(a(),l("span",tV,[g(" Hiding "+c(e.statusLabels[r])+" ",1),n("button",{type:"button",class:"filter-chip-close",onClick:p=>{e.filters.status[r]=!0},"aria-label":"Show "+e.statusLabels[r]+" again"},"\xD7",8,nV)])):f("v-if",!0)],64))),256))])):f("v-if",!0)]),e.error?(a(),l("div",sV,[n("span",null,c(e.error),1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=o=>e.loadConferences())},"Retry")])):f("v-if",!0),e.loading?(a(),l("div",oV,"Loading conferences\u2026")):f("v-if",!0),n("div",iV,[t[28]||(t[28]=n("div",{class:"paper-table-head",role:"row"},[n("div",{role:"columnheader"},"Conference"),n("div",{role:"columnheader"},"Status"),n("div",{role:"columnheader",class:"num"},"Repos"),n("div",{role:"columnheader"},"Review window"),n("div",{role:"columnheader"},[n("span",{class:"sr-only"},"Actions")])],-1)),(a(!0),l(q,null,x(e.filteredConferences,(o,r)=>(a(),l("div",{class:P(["paper-table-row row-clickable",{"repo-inactive":o?.status=="expired"||o?.status=="removed"}]),role:"row",key:o?.conferenceID},[n("div",rV,[t[14]||(t[14]=n("svg",{class:"ui-icon record-type-icon",role:"img","aria-label":"Conference"},[n("use",{href:"#project-icon-conference"})],-1)),n("div",aV,[n("a",{class:"repo-name",textContent:c(o?.name),href:e.safeUrl("/conference/"+o?.conferenceID)},null,8,lV),n("div",dV,[n("span",uV,[t[13]||(t[13]=g("ID ",-1)),n("span",{class:"commit-hash",textContent:c(o?.conferenceID)},null,8,cV),o?.url?(a(),l("span",pV,[t[12]||(t[12]=g(" \xB7 ",-1)),n("a",{target:"_blank",rel:"noopener",textContent:c(e.fmt?.limitTo(o?.url,60)),href:e.safeUrl(o?.url)},null,8,fV)])):f("v-if",!0)])])])]),n("div",hV,[n("div",mV,[n("span",{class:P(["status-dot","status-"+o?.status]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(o?.status))},null,8,gV)])]),n("div",vV,[t[15]||(t[15]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1)),t[16]||(t[16]=g()),n("span",{textContent:c(e.fmt?.number(o?.nbRepositories||0))},null,8,yV)]),n("div",bV,[t[17]||(t[17]=n("svg",{class:"ui-icon mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),o?.startDate?(a(),l("span",wV,c(e.fmt?.date(o?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(o?.endDate,"mediumDate")),1)):f("v-if",!0),o?.startDate?f("v-if",!0):(a(),l("span",kV,"\u2014"))]),n("div",CV,[n("div",EV,[n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:o?.removing,"aria-label":"Actions for "+o?.name},[...t[18]||(t[18]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,SV),n("div",NV,[n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/")},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View ",-1)])],8,RV),n("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+o?.conferenceID+"/edit")},[...t[20]||(t[20]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit ",-1)])],8,PV),o?.status!="removed"?(a(),l("div",AV,[t[22]||(t[22]=n("div",{class:"dropdown-divider"},null,-1)),n("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:d=>e.removeConference(o)},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove ",-1)])],8,DV)])):f("v-if",!0)])])])],2))),128)),!e.loading&&!e.error&&e.filteredConferences?.length==0?(a(),l("div",TV,[e.conferences?.length==0?(a(),l("span",OV,[...t[23]||(t[23]=[n("svg",{class:"ui-icon"},[n("use",{href:"#project-icon-conference"})],-1)])])):f("v-if",!0),e.conferences?.length>0?(a(),l("svg",IV,[...t[24]||(t[24]=[n("use",{href:"#project-icon-inbox"},null,-1)])])):f("v-if",!0),e.conferences?.length==0?(a(),l(q,{key:2},[t[25]||(t[25]=n("strong",{class:"empty-title"},"No conferences yet",-1)),t[26]||(t[26]=n("span",null,"Create one to group submissions for a venue, share a dashboard with chairs, and set a single expiry date.",-1))],64)):f("v-if",!0),e.conferences?.length>0?(a(),l("span",MV,"Nothing matches the current filters.")):f("v-if",!0),n("div",VV,[e.conferences?.length==0?(a(),l("a",qV,[...t[27]||(t[27]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})],-1),g(" New conference",-1)])])):f("v-if",!0),e.conferences?.length>0?(a(),l("button",{key:1,type:"button",class:"btn btn-outline-ink",onClick:t[2]||(t[2]=o=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):f("v-if",!0)])])):f("v-if",!0)])])])}var _V={class:"container page dashboard-page paper-page"},$V={class:"row"},LV={class:"w-100"},FV={class:"dashboard-heading page-head page-head-main"},UV={class:"dashboard-title-line"},BV={key:0,class:"dashboard-count-head","aria-hidden":"true"},zV={key:0},HV={class:"dashboard-heading-actions"},jV=["open"],GV=["aria-expanded"],WV=["stroke-dasharray"],KV={key:1,d:"M7 12c0-4 4-4 5 0s5 4 5 0-4-4-5 0-5 4-5 0",class:"quota-ring-unlimited"},YV={key:0,class:"quota-summary-value"},XV={key:0},JV={class:"quota-panel",id:"dashboard-usage"},QV={class:"quota-panel-heading"},ZV={key:1,class:"quota-loading",role:"status"},xV={key:0,class:"dashboard-meta"},eq={key:0,class:"dashboard-view-tabs",role:"group","aria-label":"Project view"},tq=["aria-pressed"],nq=["aria-pressed","aria-label"],sq=["aria-pressed","aria-label"],oq={key:0,class:"attention-count"},iq={key:0},rq={key:0},aq={key:1},lq={class:"search-wrap"},dq={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search projects\u2026",autocomplete:"off"},uq=["aria-expanded"],cq={class:"btn-group",role:"group","aria-label":"Type"},pq=["aria-pressed"],fq=["aria-pressed"],hq=["aria-pressed"],mq=["aria-pressed"],gq={class:"dropdown"},vq={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},yq={class:"filter-btn-value"},bq={class:"sr-only"},wq={class:"dropdown-menu","aria-labelledby":"dropdownSort"},kq={class:"form-check dropdown-item"},Cq=["onClick","checked","id"],Eq=["for"],Sq=["inert"],Nq={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},Rq={class:"filter-btn-value"},Pq={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},Aq={key:0,class:"form-check dropdown-item"},Dq=["id"],Tq=["for"],Oq={key:1,class:"dashboard-active-filters dashboard-active-filters-row"},Iq=["onClick","aria-label","title"],Mq=["aria-busy"],Vq={class:"paper-table-head",role:"row"},qq=["aria-sort"],_q=["aria-sort"],$q=["aria-sort"],Lq=["aria-sort"],Fq={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},Uq=["onClick"],Bq={class:"cell-anon",role:"cell"},zq=["aria-label","title"],Hq={class:"project-type-svg","aria-hidden":"true"},jq=["href"],Gq={class:"anon-text"},Wq={class:"anon-title"},Kq=["title","href"],Yq={class:"rn-owner"},Xq={class:"rn-repo"},Jq={key:1,class:"repo-name repo-name-static"},Qq={class:"rn-owner"},Zq={class:"rn-repo"},xq={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},e_={key:0,class:"anon-sub"},t_=["title"],n_={class:"id-head"},s_={class:"id-tail"},o_=["title"],i_=["title"],r_=["textContent"],a_={class:"dashboard-row-meta",role:"presentation"},l_={class:"cell-status",role:"cell"},d_={class:"status-line"},u_=["textContent"],c_=["onClick"],p_=["textContent","title"],f_=["title"],h_=["href"],m_={key:3,class:"status-action-line"},g_={key:0,class:"status-stuck"},v_=["onClick","data-project-actions","aria-controls","aria-expanded"],y_=["onClick"],b_={key:5,class:"status-sub status-sub-date status-sub-removed"},w_={key:6,class:"status-sub status-sub-date"},k_=["data-unit","aria-label"],C_={class:"cell-expires",role:"cell"},E_={key:0,class:"expires-never"},S_=["textContent"],N_=["title"],R_={key:3,class:"expires-past"},P_={key:4,class:"expires-past"},A_={key:5,class:"empty-dash","aria-label":"Not applicable"},D_={class:"cell-actions",role:"cell"},T_=["onClick","disabled","title","aria-label"],O_={class:"sr-only","aria-live":"polite"},I_={class:"project-type-svg","aria-hidden":"true"},M_=["href"],V_={class:"copy-url-label","aria-hidden":"true"},q_=["href","aria-label"],__=["href","title","aria-label"],$_=["title","aria-label"],L_=["title","aria-label"],F_=["aria-label"],U_={key:6,class:"dropdown is-disabled"},B_=["aria-label"],z_={key:7,class:"dropdown"},H_=["data-project-actions","aria-label"],j_={class:"dropdown-menu dropdown-menu-right"},G_=["onClick","aria-controls","aria-expanded"],W_=["href"],K_=["href"],Y_=["onClick","disabled"],X_=["href"],J_=["onClick"],Q_=["onClick"],Z_=["onClick"],x_={key:5},e$=["onClick"],t$={key:1,class:"project-details-row",role:"row"},n$=["id","onKeydown"],s$={class:"project-details-heading"},o$=["onClick"],i$={class:"project-details-list"},r$={key:0},a$={key:1},l$={key:0},d$={key:2},u$={key:0,class:"project-progress-help"},c$=["href"],p$=["onSubmit"],f$=["for"],h$=["id"],m$={class:"project-name-controls"},g$=["id","aria-describedby","disabled"],v$=["disabled"],y$={key:0,class:"project-name-error",role:"alert"},b$={key:1,role:"status"},w$={key:0,class:"paper-table-empty"},k$={key:0},C$={key:1},E$={class:"paper-table-empty-actions"},S$={key:1,href:"/anonymize",class:"btn btn-ink"},N$={key:0,class:"dashboard-pagination"},R$={key:0,role:"alert"},P$=["disabled"];function up(e,t){let s=Xe("quota-usage"),i=Ae("field"),o=Ae("form");return a(),l("div",_V,[n("div",$V,[n("div",LV,[n("div",FV,[n("div",null,[n("div",UV,[t[27]||(t[27]=n("h1",{class:"paper-page-title"},"My work",-1)),!e.loading&&e.isPlainView()?(a(),l("span",BV,[g(c(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" project",1),(e.dashboardTotals?.filtered??e.filteredItems?.length)!==1?(a(),l("span",zV,"s")):f("v-if",!0)])):f("v-if",!0)]),t[28]||(t[28]=n("p",{class:"paper-page-lede"},"Manage your anonymous links.",-1))]),n("div",HV,[n("details",{class:"dashboard-quota",open:e.quotaExpanded,onToggle:t[1]||(t[1]=r=>e.quotaExpanded=r.target.open),onKeydown:t[2]||(t[2]=kt(ae(r=>e.closeQuota(),["prevent","stop"]),["esc"]))},[n("summary",{"aria-controls":"dashboard-usage","aria-expanded":e.quotaExpanded,class:P(e.quota?"quota-level-"+e.quota.repository.level:""),style:Ie(e.quota&&!e.quota.repository.unlimited?{"--quota-pct":e.quota.repository.percent+"%"}:null)},[(a(),l("svg",{class:P(["quota-summary-ring",e.quota?"quota-"+e.quota.repository.level:""]),viewBox:"0 0 24 24","aria-hidden":"true"},[t[29]||(t[29]=n("circle",{class:"quota-ring-track",cx:"12",cy:"12",r:"9"},null,-1)),e.quota&&!e.quota.repository.unlimited?(a(),l("circle",{key:0,class:"quota-ring-fill",cx:"12",cy:"12",r:"9",pathLength:"100","stroke-dasharray":e.quota.repository.percent+" 100"},null,8,WV)):f("v-if",!0),e.quota?.repository.unlimited?(a(),l("path",KV)):f("v-if",!0)],2)),t[31]||(t[31]=n("span",{class:"quota-summary-label"},"Usage",-1)),e.quota?(a(),l("span",YV,[g(c(e.fmt.number(e.quota.repository.used)),1),e.quota.repository.unlimited?f("v-if",!0):(a(),l("span",XV," / "+c(e.fmt.number(e.quota.repository.total)),1)),t[30]||(t[30]=g(" repos",-1))])):f("v-if",!0),t[32]||(t[32]=n("svg",{class:"project-type-svg quota-summary-chevron","aria-hidden":"true"},[n("use",{href:"#project-icon-chevron"})],-1))],14,GV),n("div",JV,[n("div",QV,[t[34]||(t[34]=n("h2",null,"Account usage",-1)),n("button",{type:"button",class:"project-close","aria-label":"Close usage",onClick:t[0]||(t[0]=r=>e.closeQuota())},[...t[33]||(t[33]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])])]),e.quota?(a(),Gt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(a(),l("p",ZV,"Loading usage\u2026"))])],40,jV),t[35]||(t[35]=Ee('New anonymization',1))])]),f(" Result count + active filter chips "),e.loading?f("v-if",!0):(a(),l("div",xV,[e.showViewTabs()?(a(),l("div",eq,[n("button",{type:"button","aria-pressed":e.statusView()==="active",onClick:t[3]||(t[3]=r=>e.setStatusView("active")),title:"Every project except removed links"},"Current",8,tq),e.attentionCount()>0||e.statusView()==="attention"?(a(),l("button",{key:0,type:"button","aria-pressed":e.statusView()==="attention",onClick:t[4]||(t[4]=r=>e.setStatusView("attention")),"aria-label":"Needs attention "+e.attentionCount()},[t[36]||(t[36]=n("span",{class:"dashboard-attention-prefix"},"Needs ",-1)),t[37]||(t[37]=n("span",null,"attention",-1)),t[38]||(t[38]=g()),n("span",{class:P(["attention-count",{"has-attention":e.attentionCount()>0}])},c(e.attentionCount()),3)],8,nq)):f("v-if",!0),e.removedCount>0||e.statusView()==="removed"||e.removedCount==null&&e.dashboardTotals?.total>e.dashboardTotals?.filtered?(a(),l("button",{key:1,type:"button","aria-pressed":e.statusView()==="removed",onClick:t[5]||(t[5]=r=>e.setStatusView("removed")),"aria-label":"Removed "+(e.removedCount??""),title:"Links reviewers can no longer open"},[t[39]||(t[39]=g("Removed ",-1)),e.removedCount!=null?(a(),l("span",oq,c(e.fmt?.number(e.removedCount)),1)):f("v-if",!0)],8,sq)):f("v-if",!0)])):f("v-if",!0),n("span",{class:P(["dashboard-count",{"is-plain":e.isPlainView()}])},[e.isPlainView()?(a(),l("span",iq,[g(c(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" project",1),(e.dashboardTotals?.filtered??e.filteredItems?.length)!==1?(a(),l("span",rq,"s")):f("v-if",!0)])):(a(),l("span",aq,c(e.fmt?.number(e.dashboardTotals?.filtered??e.filteredItems?.length))+" shown",1))],2)])),f(" Search + filters "),D((a(),l("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[13]||(t[13]=ae(r=>e.submitForm(r,()=>{r.preventDefault()}),["prevent"]))},[n("div",lq,[D(n("input",dq,null,512),[[i,{state:e.viewState,set:r=>{e.search=r},value:e.search,form:null,options:{}}]])]),n("button",{class:"btn dashboard-filters-toggle",type:"button","aria-expanded":e.filtersExpanded,"aria-controls":"dashboard-filter-controls",onClick:t[6]||(t[6]=r=>e.filtersExpanded=!e.filtersExpanded)},[...t[40]||(t[40]=[g("Filters",-1),n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-filter"})],-1)])],8,uq),n("div",{id:"dashboard-filter-controls",class:P(["dashboard-filter-controls",{expanded:e.filtersExpanded}])},[n("div",cq,[n("button",{type:"button",class:P(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[7]||(t[7]=r=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,pq),n("button",{type:"button",class:P(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="repo"}]),title:"Repositories",onClick:t[8]||(t[8]=r=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},[...t[41]||(t[41]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-repo"})],-1),n("span",{class:"type-filter-label"},"Repos",-1)])],10,fq),n("button",{type:"button",class:P(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="pr"}]),title:"Pull requests",onClick:t[9]||(t[9]=r=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},[...t[42]||(t[42]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-pr"})],-1),n("span",{class:"type-filter-label"},"PRs",-1)])],10,hq),n("button",{type:"button",class:P(["btn dashboard-type-filter",{"btn-primary":e.typeFilter==="gist"}]),title:"Gists",onClick:t[10]||(t[10]=r=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},[...t[43]||(t[43]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-type-gist"})],-1),n("span",{class:"type-filter-label"},"Gists",-1)])],10,mq)]),n("div",{id:"dashboard-extra-filters",class:P(["dashboard-extra-filters",{expanded:e.filtersExpanded}])},[n("div",gq,[n("button",vq,[t[45]||(t[45]=n("span",{class:"filter-btn-label"},"Sort",-1)),n("span",yq,c(e.sortLabel()),1),(a(),l("svg",{class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[44]||(t[44]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)),n("span",bq,c(e.sortDesc()?"descending":"ascending"),1)]),n("div",wq,[t[46]||(t[46]=n("h6",{class:"dropdown-header"},"Order by",-1)),(a(!0),l(q,null,x(e.sortFields,(r,d,p)=>(a(),l("div",kq,[n("input",{class:"form-check-input",type:"radio",name:"sort",onClick:u=>e.setSort(d,r.defaultDesc),checked:e.isSortedBy(d),id:"sort-"+p},null,8,Cq),n("label",{class:"form-check-label",for:"sort-"+p},c(r?.label),9,Eq)]))),256)),t[47]||(t[47]=n("div",{class:"dropdown-divider"},null,-1)),n("button",{type:"button",class:"dropdown-item",onClick:t[11]||(t[11]=r=>e.toggleSortDirection())},c(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])]),n("div",{class:P(["dropdown dashboard-status-filter",{"is-view-hidden":e.statusView()==="removed"}]),inert:e.statusView()==="removed"?!0:null},[n("button",Nq,[t[48]||(t[48]=n("span",{class:"filter-btn-label"},"Status",-1)),n("span",Rq,c(e.statusChipKeys().length===0?"Any":e.statusChipKeys().length===1?"Hiding "+(e.statusKeyLabels[e.statusChipKeys()[0]]||"").toLowerCase():e.statusChipKeys().length+" hidden"),1)]),n("div",Pq,[t[49]||(t[49]=n("h6",{class:"dropdown-header"},"Show statuses",-1)),n("button",{type:"button",class:P(["dropdown-item status-preset",{active:e.statusChipKeys().length===0}]),onClick:t[12]||(t[12]=r=>e.statusChipKeys().forEach(d=>{e.filters.status[d]=!0}))},"Any status",2),t[50]||(t[50]=n("div",{class:"dropdown-divider"},null,-1)),(a(!0),l(q,null,x(e.statusKeyLabels,(r,d,p)=>(a(),l(q,{key:d},[d!=="removed"?(a(),l("div",Aq,[D(n("input",{class:"form-check-input",type:"checkbox",id:"status-"+d},null,8,Dq),[[i,{state:e.viewState,set:u=>{e.filters.status[d]=u},value:e.filters?.status[d],form:null,options:{}}]]),n("label",{class:"form-check-label",for:"status-"+d},c(r),9,Tq)])):f("v-if",!0)],64))),128))])],10,Sq)],2)],2)],32)),[[o,e.viewState]]),!e.loading&&e.showClearFilters()?(a(),l("div",Oq,[(a(!0),l(q,null,x(e.statusChipKeys(),r=>(a(),l("button",{key:r,type:"button",class:"filter-chip",onClick:d=>e.filters.status[r]=!0,"aria-label":"Show "+e.statusKeyLabels[r]+" again",title:"Show "+e.statusKeyLabels[r]+" again"},[g("Hiding "+c((e.statusKeyLabels[r]||"").toLowerCase()),1),t[51]||(t[51]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1))],8,Iq))),128)),e.typeFilter!=="all"?(a(),l("button",{key:0,type:"button",class:"filter-chip",onClick:t[14]||(t[14]=r=>e.typeFilter="all"),"aria-label":"Show all project types"},[g(c(e.typeFilter==="repo"?"Repositories":e.typeFilter==="pr"?"Pull requests":"Gists"),1),t[52]||(t[52]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1))])):f("v-if",!0),e.showClearFilters()?(a(),l("button",{key:1,type:"button",class:"btn-link-inline",onClick:t[15]||(t[15]=r=>e.clearFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0)]),f(" Table "),n("div",{class:P(["paper-table paper-table-dashboard",{"is-removed-view":e.statusView()==="removed"}]),role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[n("div",Vq,[n("div",{role:"columnheader","aria-sort":e.isSortedBy("_label")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("_label")}]),onClick:t[16]||(t[16]=r=>e.setSort("_label"))},[t[54]||(t[54]=g(" Project ",-1)),e.isSortedBy("_label")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[53]||(t[53]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,qq),n("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("status")}]),onClick:t[17]||(t[17]=r=>e.setSort("status"))},[t[56]||(t[56]=g(" Status ",-1)),e.isSortedBy("status")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[55]||(t[55]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,_q),n("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[18]||(t[18]=r=>e.setSort("pageView"))},[t[58]||(t[58]=g(" Views ",-1)),e.isSortedBy("pageView")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[57]||(t[57]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,$q),n("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[n("button",{type:"button",class:P(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[19]||(t[19]=r=>e.setSort("options.expirationDate"))},[t[60]||(t[60]=g(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(a(),l("svg",{key:0,class:P(["project-type-svg sort-direction",{ascending:!e.sortDesc()}]),"aria-hidden":"true"},[...t[59]||(t[59]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)],8,Lq),t[61]||(t[61]=n("div",{role:"columnheader",class:"col-link"},[n("span",{class:"sr-only"},"Actions")],-1))]),f(" Loading skeleton: keeps the layout stable while the three lists load "),(a(),l(q,null,x([1,2,3,4],(r,d)=>(a(),l(q,null,[e.loading?(a(),l("div",Fq,[...t[62]||(t[62]=[n("div",{class:"cell-anon",role:"cell"},[n("span",{class:"skeleton skeleton-badge"}),n("div",{class:"anon-text"},[n("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),n("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),n("div",{class:"cell-status",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),n("div",{class:"cell-views num",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),n("div",{class:"cell-expires",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),n("div",{class:"cell-actions",role:"cell"},null,-1)])])):f("v-if",!0)],64))),64)),(a(!0),l(q,null,x(e.filteredItems,(r,d)=>(a(),l(q,{key:r?._type+":"+(r?._id||d)},[e.loading?f("v-if",!0):(a(),l("div",{key:0,class:P(["paper-table-row",{"repo-inactive":r?._statusKey=="expired"||r?._statusKey=="removed","repo-error":r?.status=="error","row-clickable":!!r?._viewUrl}]),role:"row",onClick:p=>e.openItem(r,p)},[n("div",Bq,[n("span",{class:"project-type-icon",role:"img","aria-label":r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist",title:r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist"},[(a(),l("svg",Hq,[n("use",{href:"#project-type-"+r._type},null,8,jq)]))],8,zq),n("div",Gq,[n("div",Wq,[r?._viewUrl?(a(),l("a",{key:0,class:"repo-name",title:r._label,href:e.safeUrl(r?._viewUrl)},[(r?._label||"").indexOf("/")>0?(a(),l(q,{key:0},[n("span",Yq,c(r._label.slice(0,r._label.indexOf("/")+1)),1),t[63]||(t[63]=n("wbr",null,null,-1)),n("span",Xq,c(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(q,{key:1},[g(c(r?._label),1)],64))],8,Kq)):f("v-if",!0),r?._viewUrl?f("v-if",!0):(a(),l("span",Jq,[(r?._label||"").indexOf("/")>0?(a(),l(q,{key:0},[n("span",Qq,c(r._label.slice(0,r._label.indexOf("/")+1)),1),t[64]||(t[64]=n("wbr",null,null,-1)),n("span",Zq,c(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(q,{key:1},[g(c(r?._label),1)],64))])),r?.role==="coauthor"?(a(),l("span",xq,"Co-author")):f("v-if",!0)]),r?._id||r?._type==="repo"&&r?.source?.commit||r?.conference?(a(),l("div",e_,[r?._id?(a(),l("code",{key:0,class:"anonymous-id",title:r._id},[r._id.length>14?(a(),l(q,{key:0},[n("span",n_,c(r._id.slice(0,-6)),1),n("span",s_,c(r._id.slice(-6)),1)],64)):(a(),l(q,{key:1},[g(c(r._id),1)],64))],8,t_)):f("v-if",!0),r?._type==="repo"&&r?.source?.commit?(a(),l("span",{key:1,class:"commit-hash",title:r.source.commit},c(r.source.commit.substring(0,7)),9,o_)):f("v-if",!0),r?.conference?(a(),l("span",{key:2,class:"cell-conf conf-tag",title:"Conference: "+r.conference},[t[65]||(t[65]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),n("span",{class:"conf-name",textContent:c(r?.conference)},null,8,r_)],8,i_)):f("v-if",!0)])):f("v-if",!0)])]),n("div",a_,[n("div",l_,[n("div",d_,[n("span",{class:P(["status-dot","status-"+r?._statusKey]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(r?.status))},null,8,u_),r?.status=="removed"?(a(),l(q,{key:0},[t[66]||(t[66]=n("span",{class:"seg-sep status-removed-sep","aria-hidden":"true"},"\xB7",-1)),n("button",{type:"button",class:"project-attention-action status-enable",onClick:ae(p=>e.refreshItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Enable again",8,c_)],64)):f("v-if",!0)]),r?.status=="error"&&r?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(r?.statusMessage)),title:r?.statusMessage},null,8,p_)):f("v-if",!0),r?._stale?(a(),l("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(r?.anonymizeDate||r?.lastView)},c(e.idleText(r)),9,f_)):f("v-if",!0),r.status==="error"&&r._editUrl?(a(),l("a",{key:2,class:"project-attention-action",href:e.safeUrl(r._editUrl)},"Fix source",8,h_)):f("v-if",!0),r._stale||r._broken?(a(),l("div",m_,[r._stale&&!r._broken?(a(),l("span",g_,[...t[67]||(t[67]=[g("May be stuck",-1),n("span",{"aria-hidden":"true"}," \xB7 ",-1)])])):f("v-if",!0),r._stale||r._broken?(a(),l("button",{key:1,type:"button",class:"project-attention-action",onClick:ae(p=>e.showProjectDetails(r),["stop"]),"data-project-actions":r._broken?encodeURIComponent(r._type+":"+r._id):null,"aria-controls":r._broken?e.projectDetailsId(r):null,"aria-expanded":r._broken?e.selectedProject===r:null},c(r._broken?"Review details":"Check progress"),9,v_)):f("v-if",!0)])):f("v-if",!0),r?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"project-attention-action",onClick:ae(p=>e.extendItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Extend 6 months",8,y_)):f("v-if",!0),r?.status=="removed"&&r?.anonymizeDate?(a(),l("div",b_,"anonymized "+c(e.fmt?.humanTime(r?.anonymizeDate)),1)):f("v-if",!0),r?.status!="error"&&r?.status!="expired"&&r?.status!="removed"&&!r?._stale&&r?.anonymizeDate?(a(),l("div",w_," anonymized "+c(e.fmt?.humanTime(r?.anonymizeDate)),1)):f("v-if",!0)]),n("div",{class:"cell-views num",role:"cell","data-unit":r.pageView===1?"view":"views","aria-label":e.fmt.number(r.pageView)+(r.pageView===1?" view":" views")},[t[68]||(t[68]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),n("span",null,c(e.fmt.number(r.pageView)),1)],8,k_),n("div",C_,[t[72]||(t[72]=n("svg",{class:"project-type-svg mobile-meta-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),r?._expiry?.kind==="never"?(a(),l("span",E_,"No expiry")):f("v-if",!0),r?._expiry?.kind==="date"&&!r?._expiry?.soon?(a(),l("span",{key:1,textContent:c((e.fmt?.humanTime(r?._expiry?.date)||"").replace(/^on /,""))},null,8,S_)):f("v-if",!0),r?._expiry?.kind==="date"&&r?._expiry?.soon?(a(),l("span",{key:2,class:"expires-soon",title:"Expires "+e.fmt?.humanTime(r?._expiry?.date)},[t[69]||(t[69]=n("svg",{class:"project-type-svg expires-soon-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[70]||(t[70]=n("span",{class:"expires-soon-prefix"},"Expires ",-1)),g(c(r._expiry.soon),1)],8,N_)):f("v-if",!0),r?._expiry?.kind==="expired"&&r?._expiry?.date?(a(),l("span",R_,[t[71]||(t[71]=n("span",{class:"expires-past-prefix"},"Expired ",-1)),g(c(r?._expiry?.label||e.fmt?.humanTime(r?._expiry?.date)),1)])):f("v-if",!0),r?._expiry?.kind==="expired"&&!r?._expiry?.date?(a(),l("span",P_,"Expired")):f("v-if",!0),r?._expiry?.kind==="none"?(a(),l("span",A_,"\u2014")):f("v-if",!0)])]),n("div",D_,[r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed")?(a(),l("button",{key:0,type:"button",class:"copy-url",onClick:ae(p=>e.copyLink(r),["stop"]),disabled:!!e.copyingId,title:"Copy link: "+r._viewUrl,"aria-label":"Copy anonymous link for "+r._label},[n("span",O_,c(e.copyingId===r._type+":"+r._id?"Link copied":""),1),(a(),l("svg",I_,[n("use",{href:e.copyingId===r._type+":"+r._id?"#ui-icon-check":"#project-icon-copy"},null,8,M_)])),n("span",V_,c(e.copyingId===r._type+":"+r._id?"Copied":"Copy link"),1)],8,T_)):f("v-if",!0),r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed")?(a(),l("a",{key:1,class:"row-edit row-open",href:e.safeUrl(r._viewUrl),target:"_blank",rel:"noopener",title:"Open what reviewers see","aria-label":"Open anonymous page for "+r._label},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])],8,q_)):f("v-if",!0),r?._editUrl&&!r?._broken&&r?._statusKey!="removed"?(a(),l("a",{key:2,class:"row-edit",href:e.safeUrl(r._editUrl),title:"Edit "+r._name,"aria-label":"Edit "+r._name},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1)])],8,__)):f("v-if",!0),!(r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed"))&&r?._statusKey!="removed"&&r?._statusKey!="expired"?(a(),l("button",{key:3,type:"button",class:"copy-url is-disabled","aria-disabled":"true",onClick:t[20]||(t[20]=ae(()=>{},["stop"])),title:r?._statusKey=="expired"?"Link expired: reviewers can no longer open it":r?._statusKey=="removed"?"Link offline: reviewers can no longer open it":"No link: this record is incomplete","aria-label":"Copy link unavailable for "+r._label},[...t[75]||(t[75]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-copy"})],-1),n("span",{class:"copy-url-label","aria-hidden":"true"},"Copy link",-1)])],8,$_)):f("v-if",!0),!(r._viewUrl&&!(r?._statusKey=="expired"||r?._statusKey=="removed"))&&r?._statusKey!="removed"&&r?._statusKey!="expired"?(a(),l("button",{key:4,type:"button",class:"row-edit row-open is-disabled","aria-disabled":"true",onClick:t[21]||(t[21]=ae(()=>{},["stop"])),title:r?._statusKey=="expired"?"Link expired: reviewers can no longer open it":r?._statusKey=="removed"?"Link offline: reviewers can no longer open it":"No link: this record is incomplete","aria-label":"Open unavailable for "+r._label},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-external-link"})],-1)])],8,L_)):f("v-if",!0),r?._editUrl&&!r?._broken?f("v-if",!0):(a(),l("button",{key:5,type:"button",class:"row-edit is-disabled","aria-disabled":"true",onClick:t[22]||(t[22]=ae(()=>{},["stop"])),title:"Can't edit: this record is incomplete","aria-label":"Edit unavailable for "+r._label},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1)])],8,F_)),r?._broken?(a(),l("div",U_,[n("button",{type:"button",class:"btn btn-icon-dots is-disabled","aria-disabled":"true",onClick:t[23]||(t[23]=ae(()=>{},["stop"])),title:"No actions: this record is incomplete. Use Review details.","aria-label":"No actions available for "+r._label},[...t[78]||(t[78]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,B_)])):f("v-if",!0),r?._broken?f("v-if",!0):(a(),l("div",z_,[n("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","data-project-actions":encodeURIComponent(r._type+":"+r._id),"aria-label":"Actions for "+r?._name},[...t[79]||(t[79]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-more"})],-1)])],8,H_),n("div",j_,[n("button",{type:"button",class:"dropdown-item",onClick:p=>e.showProjectDetails(r),"aria-controls":e.projectDetailsId(r),"aria-expanded":e.selectedProject===r},"Project details & name",8,G_),n("a",{class:"dropdown-item",href:e.safeUrl(r?._viewUrl)}," View ",8,W_),r?._type==="repo"&&r?.options?.page&&r?.status=="ready"?(a(),l("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+r?.repoId+"/")}," View page ",8,K_)):f("v-if",!0),r?._viewUrl?(a(),l("button",{key:1,type:"button",class:"dropdown-item",onClick:p=>e.copyLink(r),disabled:!!e.copyingId}," Copy anonymous link ",8,Y_)):f("v-if",!0),n("a",{class:"dropdown-item",href:e.safeUrl(r?._editUrl)}," Edit ",8,X_),r?.status=="ready"||r?.status=="error"?(a(),l("button",{key:2,type:"button",class:"dropdown-item",onClick:p=>e.refreshItem(r)}," Force update ",8,J_)):f("v-if",!0),r?.status=="removed"?(a(),l("button",{key:3,type:"button",class:"dropdown-item",onClick:p=>e.refreshItem(r)}," Enable ",8,Q_)):f("v-if",!0),r?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"dropdown-item",onClick:p=>e.extendItem(r)}," Extend 6 months ",8,Z_)):f("v-if",!0),(r?.status=="ready"||r?.status=="expired"||r?.status=="error")&&r?.role!=="coauthor"?(a(),l("div",x_,[t[80]||(t[80]=n("div",{class:"dropdown-divider"},null,-1)),n("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:p=>e.removeItem(r)}," Remove ",8,e$)])):f("v-if",!0)])]))])],10,Uq)),!e.loading&&e.selectedProject===r?(a(),l("div",t$,[n("div",{class:"project-details",role:"cell","aria-colspan":"5",id:e.projectDetailsId(r),tabindex:"-1",onKeydown:kt(ae(p=>e.closeProjectDetails(r),["stop"]),["esc"])},[n("div",s$,[t[82]||(t[82]=n("h2",null,"Project details",-1)),n("button",{type:"button",class:"project-close",onClick:p=>e.closeProjectDetails(r),"aria-label":"Close project details"},[...t[81]||(t[81]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,o$)]),n("dl",i$,[n("div",null,[t[83]||(t[83]=n("dt",null,"Source",-1)),n("dd",null,c(r._source||"Not available"),1)]),n("div",null,[t[84]||(t[84]=n("dt",null,"Anonymous ID",-1)),n("dd",null,[n("code",null,c(r._id||"Missing identifier"),1)])]),r.source?.commit?(a(),l("div",r$,[t[85]||(t[85]=n("dt",null,"Commit",-1)),n("dd",null,[n("code",null,c(r.source.commit),1)])])):f("v-if",!0),r.conference?(a(),l("div",a$,[t[86]||(t[86]=n("dt",null,"Conference",-1)),n("dd",null,c(r.conference),1)])):f("v-if",!0),n("div",null,[t[87]||(t[87]=n("dt",null,"Status",-1)),n("dd",null,[g(c(e.fmt.statusLabel(r.status)),1),r.statusMessage?(a(),l("span",l$," \xB7 "+c(e.fmt.statusMsg(r.statusMessage)),1)):f("v-if",!0)])]),r.anonymizeDate?(a(),l("div",d$,[t[88]||(t[88]=n("dt",null,"Last anonymized",-1)),n("dd",null,c(e.fmt.humanTime(r.anonymizeDate)),1)])):f("v-if",!0)]),r._stale?(a(),l("p",u$,"This download has not progressed recently. Check the source access and selected branch before retrying.")):f("v-if",!0),r._editUrl?(a(),l("a",{key:1,class:"project-attention-action",href:e.safeUrl(r._editUrl)},c(e.needsAttention(r)?"Check source settings":"Edit anonymization settings"),9,c$)):f("v-if",!0),r._id?(a(),l("form",{key:2,class:"project-name-form",onSubmit:ae(p=>e.saveProjectName(r),["prevent"])},[n("label",{for:"project-name-"+r._type+"-"+r._id},"Project name",8,f$),n("p",{id:"project-name-help-"+r._type+"-"+r._id},"Only you see this name. Leave it blank to use the default.",8,h$),n("div",m$,[D(n("input",{class:"form-control",type:"text",id:"project-name-"+r._type+"-"+r._id,"aria-describedby":"project-name-help-"+r._type+"-"+r._id,maxlength:"100","onUpdate:modelValue":t[24]||(t[24]=p=>e.projectName=p),disabled:e.nameSaving},null,8,g$),[[pt,e.projectName]]),n("button",{class:"btn btn-ink",type:"submit",disabled:e.nameSaving},c(e.nameSaving?"Saving\u2026":"Save name"),9,v$)]),e.nameError?(a(),l("p",y$,c(e.nameError),1)):f("v-if",!0),e.nameMessage?(a(),l("p",b$,c(e.nameMessage),1)):f("v-if",!0)],40,p$)):f("v-if",!0)],40,n$)])):f("v-if",!0)],64))),128)),!e.loading&&e.filteredItems?.length==0?(a(),l("div",w$,[t[90]||(t[90]=n("svg",{class:"project-type-svg project-empty-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),e.hasProjects()?f("v-if",!0):(a(),l("span",k$,"You have no anonymizations yet.")),e.hasProjects()?(a(),l("span",C$,"Nothing matches the current filters.")):f("v-if",!0),n("div",E$,[e.hasActiveFilters()?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=r=>e.clearFilters())},"Clear filters")):f("v-if",!0),e.hasProjects()?f("v-if",!0):(a(),l("a",S$,[...t[89]||(t[89]=[n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-plus"})],-1),g(" New anonymization",-1)])]))])])):f("v-if",!0)],10,Mq)]),e.dashboardCursor||e.dashboardError?(a(),l("div",N$,[e.dashboardError?(a(),l("p",R$,c(e.dashboardError),1)):f("v-if",!0),e.dashboardCursor?(a(),l("button",{key:1,type:"button",class:"btn",onClick:t[26]||(t[26]=r=>e.loadMoreProjects()),disabled:e.loadingMore},c(e.loadingMore?"Loading\u2026":"Load more projects"),9,P$)):f("v-if",!0)])):f("v-if",!0)])}var A$={class:"viewer-bar"},D$={class:"vb-left"},T$=["aria-label","title"],O$=["href","title"],I$={class:"vb-artifact-id"},M$={class:"vb-right"},V$=["title"],q$={class:"vb-help"},_$=["aria-expanded"],$$={key:0,class:"acct-menu vb-help-menu",role:"menu"},L$=["aria-label","title"],F$={class:"ui-icon","aria-hidden":"true"},U$=["href"],B$={key:1,class:"acct"},z$=["aria-label","aria-expanded"],H$=["src"],j$={key:1,class:"acct-initial"},G$={key:0,class:"acct-menu",role:"menu"},W$={class:"acct-menu-head"},K$={key:2,class:"vb-signin",href:"/signin",target:"_self"},Y$={key:0,class:"vb-context"},X$=["href","title"],J$={key:0,class:"vb-context-date"},Q$=["aria-label"],Z$={class:"ui-icon","aria-hidden":"true"},x$=["href"],eL=["textContent"],tL={class:"leftCol-head"},nL={class:"leftCol-search"},sL={class:"tree-search-box"},oL=["href"],iL={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},rL=["title","href"],aL={class:"leftCol-body"},lL={key:0,class:"paper-inline-warning",role:"alert"},dL={key:1,class:"paper-inline-warning",role:"alert"},uL={class:"explorer-main"},cL={class:"breadcrumb paths","aria-label":"Path"},pL={class:"breadcrumb-item breadcrumb-root"},fL=["href","title","textContent"],hL=["aria-current","textContent"],mL=["aria-label","title"],gL={class:"ui-icon","aria-hidden":"true"},vL=["href"],yL={class:"status-bar-actions"},bL=["href"],wL={class:"d-none d-md-inline"},kL={class:"ui-icon","aria-hidden":"true"},CL=["href"],EL={class:"d-none d-md-inline"},SL=["href"],NL={class:"explorer-content"};function cp(e,t){let s=Xe("tree"),i=Xe("partial-view"),o=Ae("field");return a(),l("div",{class:P(["explorer-page",{"files-hidden":e.sidebarHidden}]),style:Ie({"--sidebar-w":e.sidebarWidth+"px"})},[n("header",A$,[n("div",D$,[t[15]||(t[15]=n("a",{class:"vb-logo",href:"/"},[g("Anonymous "),n("em",null,"GitHub")],-1)),n("button",{type:"button",class:"vb-icon vb-sidebar","aria-label":e.sidebarHidden?"Show file tree":"Hide file tree",title:e.sidebarHidden?"Show file tree":"Hide file tree",onClick:t[0]||(t[0]=r=>e.sidebarHidden=!e.sidebarHidden)},[...t[13]||(t[13]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1)])],8,T$),e.repoId?(a(),l("a",{key:0,class:"vb-artifact",href:e.safeUrl("/r/"+e.repoId+"/"),title:"Anonymous artifact "+e.repoId},[t[14]||(t[14]=n("span",{class:"sr-only"},"Artifact ",-1)),n("span",I$,c(e.repoId),1)],8,O$)):f("v-if",!0)]),n("div",M$,[e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("span",{key:0,class:"vb-snapshot",title:(e.options?.expirationDate?"Available until "+e.fmt?.date(e.options.expirationDate)+". ":"")+(e.options?.anonymizedAt&&!e.options?.publishedAt?"Older repositories have no recorded publication date. The source commit date does not establish when files became available here.":(e.options?.sourceCommitDate?"Source commit ":e.options?.anonymizedAt?"Anonymized ":"Updated ")+e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)+(e.options?.publishedAt?" \xB7 snapshot ready "+e.fmt?.date(e.options.publishedAt):""))},[t[16]||(t[16]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[17]||(t[17]=n("span",null,"Snapshot",-1)),n("span",null,c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)],8,V$)):f("v-if",!0),t[25]||(t[25]=n("a",{class:"vb-support",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Support Anonymous GitHub \u2014 help keep it free for researchers"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),n("span",null,"Support")],-1)),n("div",q$,[n("button",{type:"button",class:"vb-help-btn","aria-haspopup":"true","aria-expanded":e.helpOpen?"true":"false",onClick:t[1]||(t[1]=ae(r=>e.helpOpen=!e.helpOpen,["stop"]))},[...t[18]||(t[18]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})],-1),n("span",null,"Help",-1)])],8,_$),e.helpOpen?(a(),l("div",$$,[...t[19]||(t[19]=[n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),n("span",null,[g("FAQ"),n("small",null,"How anonymization works")])],-1),n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),n("span",null,[g("Report a bug"),n("small",null,"About this service, not the paper")])],-1)])])):f("v-if",!0)]),n("button",{type:"button",class:"vb-icon","aria-label":e.isDarkMode?"Switch to light mode":"Switch to dark mode",title:e.isDarkMode?"Light mode":"Dark mode",onClick:t[2]||(t[2]=r=>e.darkMode(!e.isDarkMode))},[(a(),l("svg",F$,[n("use",{href:e.isDarkMode?"#ui-icon-sun":"#ui-icon-moon"},null,8,U$)]))],8,L$),e.user?(a(),l("div",B$,[n("button",{type:"button",class:"acct-chip","aria-haspopup":"true","aria-label":"Account: "+e.user?.username,"aria-expanded":e.accountOpen?"true":"false",onClick:t[3]||(t[3]=ae(r=>e.accountOpen=!e.accountOpen,["stop"]))},[e.user?.photo?(a(),l("img",{key:0,src:e.safeUrl(e.user.photo),alt:"",width:"26",height:"26"},null,8,H$)):(a(),l("span",j$,c((e.user?.username||"?").charAt(0).toUpperCase()),1))],8,z$),e.accountOpen?(a(),l("div",G$,[n("div",W$,[t[20]||(t[20]=g("Signed in as ",-1)),n("b",null,"@"+c(e.user?.username),1)]),t[21]||(t[21]=n("a",{role:"menuitem",href:"/dashboard"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-grid"})]),g("My work")],-1)),t[22]||(t[22]=n("a",{role:"menuitem",href:"/profile"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})]),g("Settings")],-1)),t[23]||(t[23]=n("a",{role:"menuitem",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),g("Sign out")],-1))])):f("v-if",!0)])):(a(),l("a",K$,[...t[24]||(t[24]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1),g("Sign in",-1)])]))])]),e.repoId?(a(),l("div",Y$,[n("a",{class:"vb-context-id",href:e.safeUrl("/r/"+e.repoId+"/"),title:"Anonymous artifact "+e.repoId},c(e.repoId),9,X$),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("span",J$,"Snapshot "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)):f("v-if",!0)])):f("v-if",!0),D(n("button",{class:"sidebar-toggle",onClick:t[4]||(t[4]=r=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[(a(),l("svg",Z$,[n("use",{href:e.sidebarCollapsed?"#ui-icon-folder":"#project-icon-close"},null,8,x$)])),n("span",{textContent:c(e.sidebarCollapsed?"Files":"Close")},null,8,eL)],8,Q$),[[Q,e.files?.length]]),D(n("div",{class:P(["leftCol",{collapsed:e.sidebarCollapsed}])},[n("div",tL,[t[27]||(t[27]=n("span",{class:"leftCol-eyebrow"},"Files",-1)),n("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[5]||(t[5]=r=>e.sidebarCollapsed=!0)},[...t[26]||(t[26]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])])]),n("div",nL,[n("div",sL,[(a(),l("svg",{class:P(["ui-icon tree-search-icon",{"fa-spin":e.fileSearchLoading}]),"aria-hidden":"true"},[n("use",{href:e.fileSearchLoading?"#ui-icon-spinner":"#ui-icon-search"},null,8,oL)],2)),D(n("input",iL,null,512),[[o,{state:e.viewState,set:r=>{e.fileSearchQuery=r},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),D(n("kbd",{class:"tree-search-kbd"},c(e.isMac?"\u2318":"Ctrl+")+"K",513),[[Q,!e.fileSearchQuery]]),D(n("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[6]||(t[6]=r=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[Q,e.fileSearchQuery]])]),e.options?.download?(a(),l("a",{key:0,target:"_self",class:"search-zip","aria-label":"Download repository as ZIP",title:"Download the repository (snapshot "+e.fmt?.date(e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)+") as ZIP",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[28]||(t[28]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),n("span",{class:"search-zip-label","aria-hidden":"true"},"ZIP",-1)])],8,rL)):f("v-if",!0)]),n("div",aL,[e.options?.truncatedFolders?.length>0?(a(),l("div",lL,[t[29]||(t[29]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):f("v-if",!0),e.options?.hasSubmodules?(a(),l("div",dL,[t[30]||(t[30]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):f("v-if",!0),Oe(s,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])])],2),[[Q,e.files?.length]]),D(n("div",{class:"leftCol-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize file tree",title:"Drag to resize",onPointerdown:t[7]||(t[7]=r=>e.startSidebarResize(r))},null,544),[[Q,e.files?.length&&!e.sidebarHidden]]),D(n("div",{class:"leftCol-backdrop",onClick:t[8]||(t[8]=r=>e.sidebarCollapsed=!0)},null,512),[[Q,e.files?.length&&!e.sidebarCollapsed]]),n("div",uL,[D(n("div",{class:P(["status-bar",{"is-redundant":["code","text","html"].includes(e.type)&&e.content!=null||e.fileFrame()}])},[D(n("button",{type:"button",class:"btn btn-sm status-files-btn","aria-label":"Show files",title:"Show files",onClick:t[9]||(t[9]=r=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[31]||(t[31]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-folder"})],-1),n("span",null,"Files",-1)])],512),[[Q,e.files?.length]]),n("ol",cL,[n("li",pL,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,fL)]),(a(!0),l(q,null,x(e.paths,(r,d)=>(a(),l("li",{class:"breadcrumb-item","aria-current":d===e.paths.length-1?"page":null,textContent:c(r)},null,8,hL))),256))]),D(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy path",title:e.pathCopied?"Path copied":"Copy path",onClick:t[10]||(t[10]=r=>e.copyPath())},[(a(),l("svg",gL,[n("use",{href:e.pathCopied?"#ui-icon-check":"#project-icon-copy"},null,8,vL)]))],8,mL),[[Q,e.filePath]]),n("div",yL,[e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[32]||(t[32]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,bL)):f("v-if",!0),e.type=="html-doc"&&!e.showSource?(a(),l("button",{key:1,class:P(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[11]||(t[11]=r=>e.toggleAllowScripts())},[t[33]||(t[33]=n("i",{class:"fab fa-js"},null,-1)),n("span",wL,c(e.allowScripts?"JS on":"JS off"),1)],2)):f("v-if",!0),e.type=="html-doc"?(a(),l("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[12]||(t[12]=r=>e.toggleSource())},[(a(),l("svg",kL,[n("use",{href:e.showSource?"#project-icon-eye":"#ui-icon-code"},null,8,CL)])),n("span",EL,c(e.showSource?"Rendered":"Source"),1)])):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[34]||(t[34]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),n("span",{class:"d-none d-md-inline"}," Website",-1)])],8,SL)):f("v-if",!0)])],2),[[Q,e.type!="error"||e.files?.length]]),n("div",NL,[Oe(i,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])],6)}var RL={class:"paper-faq"},PL={class:"paper-faq-body"},AL={class:"paper-faq-toc"},DL={class:"faq-search",role:"search"},TL={class:"faq-search-field"},OL={id:"faq-search-status",class:"faq-search-status","aria-live":"polite"},IL={key:0,class:"faq-search-empty"},ML={class:"faq-search-empty-actions"};function pp(e,t){let s=Xe("partial-view"),i=Ae("paper-scrollspy");return a(),l(q,null,[n("div",RL,[t[12]||(t[12]=n("div",{class:"paper-faq-hero"},[n("div",{class:"paper-faq-eyebrow"},"Help"),n("h1",{class:"paper-faq-title"},[g("Mirrors, redaction, and "),n("em",null,"what reviewers see.")]),n("p",{class:"paper-faq-lede"}," How to set up an anonymous mirror, what it hides, and how long it stays online. ")],-1)),n("div",PL,[D((a(),l("aside",AL,[...t[5]||(t[5]=[Ee('
Contents
',2)])])),[[i]]),n("section",{class:P(["faq-section",{"faq-searching":!!e.faqQuery.trim()}]),"aria-label":"FAQs"},[n("div",DL,[t[7]||(t[7]=n("label",{for:"faq-search-input"},"Search questions",-1)),n("div",TL,[t[6]||(t[6]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)),D(n("input",{id:"faq-search-input",type:"search",class:"form-control","onUpdate:modelValue":t[0]||(t[0]=o=>e.faqQuery=o),onInput:t[1]||(t[1]=o=>e.filterFaq()),onSearch:t[2]||(t[2]=o=>e.filterFaq()),onKeydown:t[3]||(t[3]=kt(o=>e.clearFaqSearch(),["esc"])),placeholder:"e.g. expiry, pull request, PDF",autocomplete:"off",spellcheck:"false","aria-describedby":"faq-search-status"},null,544),[[pt,e.faqQuery]])]),n("p",OL,[e.faqQuery.trim()&&e.faqResults?(a(),l(q,{key:0},[g(c(e.faqResults===1?"1 result":e.faqResults+" results"),1)],64)):f("v-if",!0)])]),e.faqQuery.trim()&&e.faqResults===0?(a(),l("div",IL,[n("strong",null,"No questions match \u201C"+c(e.faqQuery.trim())+"\u201D.",1),t[9]||(t[9]=n("p",null,"Try a shorter word, or ask us directly.",-1)),n("div",ML,[n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:t[4]||(t[4]=o=>e.clearFaqSearch())},"Clear search"),t[8]||(t[8]=n("a",{class:"btn btn-link btn-sm",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml"},"Open an issue",-1))])])):f("v-if",!0),t[10]||(t[10]=n("div",{class:"faq-list"},[f(" General "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})]),g("General ")]),n("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[n("h3",{class:"panel-title"},[n("a",{role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"true","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),n("div",{id:"whatIs",class:"panel-collapse collapse show",role:"tabpanel","aria-labelledby":"headingWhatIs"},[n("div",{class:"panel-body p-3"},[n("p",null," Anonymous GitHub is an open-source tool with free hosting and optional paid plans that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information, such as the repository owner, organization name, and custom terms, so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),n("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[n("div",{class:"panel-body p-3"},[n("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),n("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[n("div",{class:"panel-body p-3"},[n("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix, not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),n("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[n("div",{class:"panel-body p-3"},[n("p",null," A free account includes 5 owned repositories and 2 GiB of source files. Optional paid plans offer more capacity, automatic refresh, and, with an author subscription, never-expiring repositories. Reviewers can read shared repositories without an account or payment. "),n("p",null,[g(" See "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),g(" for available plans and current prices. Offers depend on whether payments are enabled on this instance; the checkout shows the amount before you pay. Subscriptions help fund hosting, storage, backups, and continued maintenance. ")]),n("p",null,[g(" You can also support development through "),n("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank",rel:"noopener"},"GitHub Sponsors"),g(" or "),n("a",{href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener"},"Ko-fi"),g(". Donations are separate from subscriptions and do not automatically unlock paid features. ")])])])])]),f(" Plans and billing "),n("h4",{class:"faq-cat",id:"faq-plans-title"},"Plans and billing"),n("div",{class:"panel-group",id:"faq-plans",role:"tablist","aria-label":"Plans and billing","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingWhyPaid"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#whyPaid","aria-expanded":"false","aria-controls":"whyPaid"},"Why is Anonymous GitHub no longer completely free?")])]),n("div",{id:"whyPaid",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhyPaid"},[n("div",{class:"panel-body p-3"},[n("p",null,"Anonymous GitHub started as a small free service and was paid for out of pocket. Three things have changed since then:"),n("ul",null,[n("li",null,[n("strong",null,"Servers cost much more."),g(" Every hosted repository needs storage, bandwidth and backups, and these costs have risen sharply.")]),n("li",null,[n("strong",null,"Many more people use it."),g(" More users means more repositories to store and keep up to date, more support requests and more maintenance.")]),n("li",null,[n("strong",null,"AI has made security work heavier."),g(" AI-driven scrapers and automated abuse send far more traffic than before. Blocking them and keeping hosted content safe takes constant work.")])]),n("p",null,"The core service stays free: anonymizing a repository, sharing the link and reviewer access cost nothing, and reviewers never need an account. Most authors never need to pay. The paid options are small one-time payments for one repository, plus an optional subscription for heavy users. They are priced to cover running costs, not to make a profit."),n("p",null,[g("The source code remains open, so you can still "),n("a",{href:"#faq-hosting"},"host your own instance"),g(" for free.")])])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingFreePlan"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#freePlan","aria-expanded":"false","aria-controls":"freePlan"},"What is included in a free account?")])]),n("div",{id:"freePlan",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFreePlan"},[n("div",{class:"panel-body p-3"},[n("p",null,"The default free allowance is 5 repositories you own and 2 GiB of source files in total. Core anonymization and reviewer access remain free. You can manually refresh a repository within your allowance and choose a dated expiration up to 5 months ahead, then extend it again before it expires. Repositories submitted to a conference can stay online until the end of its review window."),n("p",null,"Repositories shared with you as a co-author do not use your own slots. Gists and pull requests are not included in these repository quotas. The usage shown in your account is the allowance available on this instance.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingAuthorPlans"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#authorPlans","aria-expanded":"false","aria-controls":"authorPlans"},"What do monthly and annual author subscriptions include?")])]),n("div",{id:"authorPlans",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingAuthorPlans"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("Both include 20 owned repositories and 10 GiB of source files in total. They also allow automatic refresh when enabled in repository settings and let the owner choose "),n("strong",null,"Never expire"),g(".")]),n("p",null,[g("Monthly and annual plans offer the same features with different billing periods. They renew automatically until you cancel renewal. Current prices are shown in "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),g(".")]),n("p",null,"Paid plans do not change how anonymization works. File-size limits and other service safeguards still apply. Review your anonymized content before sharing it.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingReviewPass"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#reviewPass","aria-expanded":"false","aria-controls":"reviewPass"},"Can I pay for one repository without subscribing?")])]),n("div",{id:"reviewPass",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingReviewPass"},[n("div",{class:"panel-body p-3"},[n("p",null,"Yes. These one-time add-ons apply to a single repository you own. None of them renews automatically:"),n("ul",null,[n("li",null,[n("strong",null,"Paper pack"),g(": an extra repository, automatic updates for 180 days and one more year before it expires, in a single payment. It covers what one paper usually needs during review.")]),n("li",null,[n("strong",null,"Extra repository"),g(": host one more repository once your free repositories are used up. It has its own 2 GiB allowance and does not count toward your free repositories. It lasts as long as the repository exists.")]),n("li",null,[n("strong",null,"Live updates"),g(": automatic refresh for 180 days, with a separate 2 GiB allowance.")]),n("li",null,[n("strong",null,"Extended expiration"),g(": choose an expiration date up to one year after purchase. Buying it again adds another year.")]),n("li",null,[n("strong",null,"Never expire"),g(": the repository has no expiration date. A full refund or a payment dispute ends it after a 90-day grace period.")])]),n("p",null,[g("When your free allowance is full, the Extra repository and Paper pack options are offered as you create the repository. You can also buy an add-on from the repository's edit page, or enter the anonymized ID of an existing repository in "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),g(". Current prices are shown there.")])])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingConferencePlans"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#conferencePlans","aria-expanded":"false","aria-controls":"conferencePlans"},"Can a conference or lab pay for a group?")])]),n("div",{id:"conferencePlans",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConferencePlans"},[n("div",{class:"panel-body p-3"},[n("p",null,"A conference review package provides a shared allowance for a review window of up to 180 days, with automatic updates for every submission. It comes in three sizes: Workshop (25 repositories, 10 GiB), Conference (100 repositories, 50 GiB) and Large conference (400 repositories, 200 GiB). Choose the size when you create the conference; it cannot change afterwards. The organizer pays once and authors pay nothing (the price is shown when you create the conference); the package does not renew automatically. A lab organizing a review can use this shared package too."),n("p",null,"New conferences no longer have a free plan: every new conference is a review package. Conferences created earlier keep working as before. The conference must be activated by payment before authors can submit under its Conference ID. Eligible repositories use the conference allowance before an author's personal allowance, so authors do not each need a subscription for that capacity."),n("p",null,"The package has a fixed review window. Never expire still requires the repository owner's author subscription or a Never expire add-on for that repository.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPaidCoauthors"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#paidCoauthors","aria-expanded":"false","aria-controls":"paidCoauthors"},"Does every co-author need to pay?")])]),n("div",{id:"paidCoauthors",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPaidCoauthors"},[n("div",{class:"panel-body p-3"},[n("p",null,"No. Co-authors can collaborate without buying a subscription. A shared repository uses its owner's allowance, unless a repository pass or paid conference covers it. It does not consume each co-author's personal allowance."),n("p",null,"A co-author's subscription does not increase the owner's allowance. If the owner's available capacity is exhausted, a co-author's refresh or edit may also be blocked. Reviewers never need a paid account.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCapacity"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#capacity","aria-expanded":"false","aria-controls":"capacity"},"What counts toward my allowance, and what happens at the limit?")])]),n("div",{id:"capacity",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCapacity"},[n("div",{class:"panel-body p-3"},[n("p",null,"The repository limit counts work you own. Storage counts the source-file sizes reserved for those repositories, not just files a reviewer opens. Archived or failed repositories can still reserve capacity, and a refresh does not automatically reduce a previous storage reservation."),n("p",null,"At the repository limit you cannot add another repository to that allowance. An edit or refresh must also fit the available storage. Remove work you no longer need, add an Extra repository for the new one, choose a subscription, or use an eligible conference allowance."),n("p",null,"Removing a repository releases its reservation when capacity is next checked. Expired repositories may continue to reserve capacity until cleanup. Reaching a limit does not itself delete existing review links.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingNeverExpire"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#neverExpire","aria-expanded":"false","aria-controls":"neverExpire"},"What happens to Never expire repositories if I stop subscribing?")])]),n("div",{id:"neverExpire",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingNeverExpire"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("Never expire is available to monthly and annual author subscribers, or for one repository with the one-time Never expire add-on. If a subscription ends, these repositories remain available for a "),n("strong",null,"90-day grace period"),g(", then expire and their hosted content is removed.")]),n("p",null,"Renewing during the grace period keeps them active. After expiration, you must renew and explicitly reactivate the repository; restoring content also requires access to its GitHub source. A repository does not become public on GitHub when it expires."),n("p",null,"Existing never-expiring repositories created before this billing policy retain their settings. Never expire is not a guarantee of perpetual service availability.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCancelPlan"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#cancelPlan","aria-expanded":"false","aria-controls":"cancelPlan"},"How do I cancel, and what happens after paid access ends?")])]),n("div",{id:"cancelPlan",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCancelPlan"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("Open "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),g(" and choose "),n("strong",null,"Manage billing and invoices"),g(" to manage renewal. Cancelling renewal keeps subscription benefits until the end of the paid period.")]),n("p",null,"After paid access ends, repositories fall back to another eligible allowance or the free allowance. Automatic refresh pauses on the free allowance; manual refresh remains available within its limits. Existing review links keep their configured expiration dates, except paid Never expire repositories, which follow the 90-day grace period described above."),n("p",null,"A repository pass or conference package ends after its paid window without automatic renewal.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingRefunds"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#refunds","aria-expanded":"false","aria-controls":"refunds"},"Can I get a refund?")])]),n("div",{id:"refunds",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingRefunds"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("Refunds are handled case by case. "),n("a",{href:"mailto:tdurieux@anonymous.4open.science"},"Email the maintainer"),g(" with the date of the payment and the repository it was for.")]),n("p",null,"A full refund ends what that payment bought. For a Paper pack, this means all three parts: the extra repository, automatic updates and the extended expiration. A Never expire repository then expires after a 90-day grace period. A partial refund keeps your access."),n("p",null,"To stop a subscription, cancel its renewal instead of asking for a refund. You keep access until the end of the period you paid for.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPaymentHandling"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-plans",href:"#paymentHandling","aria-expanded":"false","aria-controls":"paymentHandling"},"How are payments handled?")])]),n("div",{id:"paymentHandling",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPaymentHandling"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("Stripe processes checkout and billing management. Anonymous GitHub does not store your card details. You can access billing management and invoices from "),n("a",{href:"/profile#settings-billing"},"Plans and billing"),g(".")]),n("p",null,[g("Paid access is activated after payment is confirmed. If checkout succeeds but your account has not updated, choose "),n("strong",null,"Refresh payment status"),g(" before trying another purchase. If paid plans are unavailable on this instance, no checkout is offered.")])])])])]),f(" Features "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-filter"})]),g("Features ")]),n("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),n("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[n("div",{class:"panel-body p-3"},[n("p",null," Anonymous GitHub can display and render a wide variety of file types: "),n("ul",null,[n("li",null,[n("strong",null,"Text and source code"),g(": displayed with syntax highlighting")]),n("li",null,[n("strong",null,"Markdown"),g(": rendered as formatted HTML")]),n("li",null,[n("strong",null,"Images"),g(" (PNG, JPG, SVG, etc.): displayed inline")]),n("li",null,[n("strong",null,"PDFs"),g(": rendered directly in the browser")]),n("li",null,[n("strong",null,"Jupyter Notebooks"),g(": rendered with code cells and outputs")])]),n("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),n("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[n("div",{class:"panel-body p-3"},[n("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),n("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[n("div",{class:"panel-body p-3"},[n("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),n("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[n("div",{class:"panel-body p-3"},[n("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),n("ul",null,[n("li",null,[n("strong",null,"Never expire"),g(": with a monthly or annual author subscription, no scheduled expiration while subscribed. A 90-day grace period applies after paid access ends. See "),n("a",{href:"#neverExpire"},"the subscription expiration policy"),g(".")]),n("li",null,[n("strong",null,"Redirect to GitHub"),g(": after expiration, visitors are redirected to the original GitHub repository.")]),n("li",null,[n("strong",null,"Remove content"),g(": after expiration, the anonymized content is deleted from the server.")])])])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),n("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[n("div",{class:"panel-body p-3"},[n("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),n("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[n("div",{class:"panel-body p-3"},[n("p",null," You can refresh the anonymized repository from GitHub without creating a new share link. Free accounts can request a manual refresh within their allowance. Automatic refresh requires an eligible paid allowance and must be enabled in repository settings. It pauses when the repository falls back to the free allowance. "),n("p",null," After changing files or contributor names, review your anonymization terms before sharing the updated content. If GitHub access is revoked or the source is deleted, the service cannot fetch updates. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),n("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[n("div",{class:"panel-body p-3"},[n("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),n("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[n("code",null,`npm install -g @tdurieux/anonymous_github +anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),g("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),g("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),g(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),g("Self"),n("span",{class:"serif-hy"},"-"),g("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{class:"panel-body p-3"},[n("p",null,[g(" Yes. Anonymous GitHub is fully open source (GPL-3.0) and supports Docker-based deployment. Billing is optional and disabled by default for self-hosted instances; paid hosted plans are not required to run your own server. You will need to configure a GitHub OAuth app and provide a GitHub token. Detailed setup instructions are available on the "),n("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),g(". ")]),n("p",null," The basic steps are: "),n("ol",null,[n("li",null,"Clone the repository and install dependencies"),n("li",null,[g("Create a "),n("code",null,".env"),g(" file with your GitHub token, OAuth client ID, and client secret")]),n("li",null,[g("Run "),n("code",null,"docker-compose up -d")])])])])])])],-1))],2),t[11]||(t[11]=n("aside",{class:"paper-faq-help","aria-label":"More help"},[n("div",{class:"paper-faq-help-card"},[n("strong",null,"Still stuck?"),n("p",null,"Open an issue on GitHub about the service. For a paper's content, contact the conference instead."),n("a",{class:"btn btn-outline-ink btn-sm",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml"},"Open an issue")])],-1))])]),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])],64)}var VL={class:"pr-page"},qL={class:"container paper-page pr-page-inner"},_L={class:"pr-header"},$L={class:"pr-title-row"},LL={class:"paper-page-title pr-title"},FL=["textContent"],UL={key:1,class:"text-muted"},BL=["href"],zL={class:"pr-header-meta"},HL={key:0,class:"pr-meta-item"},jL=["textContent"],GL={key:1,class:"pr-meta-item"},WL=["textContent"],KL={key:2,class:"pr-meta-item"},YL=["textContent"],XL={key:0,class:"paper-tabs",role:"tablist"},JL=["aria-selected","tabindex"],QL=["textContent"],ZL=["aria-selected","tabindex"],xL=["textContent"],eF={class:"paper-tab-content"},tF={key:0,role:"tabpanel",id:"gist-files-panel","aria-labelledby":"gist-files-tab"},nF={class:"pr-comments"},sF={class:"pr-comment"},oF={class:"pr-comment-head"},iF=["textContent"],rF={key:0,class:"pr-comment-date"},aF={key:0,class:"paper-table-empty"},lF={key:1,role:"tabpanel",id:"gist-comments-panel","aria-labelledby":"gist-comments-tab"},dF={class:"pr-comments"},uF={class:"pr-comment"},cF={class:"pr-comment-head"},pF={key:0,class:"pr-comment-author"},fF=["textContent"],hF=["textContent"],mF={key:0,class:"pr-comment-body"},gF={key:0,class:"paper-table-empty"};function fp(e,t){let s=Xe("gist-file"),i=Xe("markdown");return a(),l("div",VL,[n("div",qL,[t[17]||(t[17]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"Reviewer"),g(" \xA0/\xA0 "),n("span",{class:"here"},"Gist")],-1)),n("header",_L,[n("div",$L,[n("h1",LL,[e.details?.description?(a(),l("span",{key:0,textContent:c(e.details?.description)},null,8,FL)):f("v-if",!0),e.details?.description?f("v-if",!0):(a(),l("span",UL,"Untitled gist"))]),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/gist-anonymize/"+e.gistId)},[...t[4]||(t[4]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,BL)):f("v-if",!0)]),n("div",zL,[n("span",{class:P(["paper-pill",{good:e.details?.isPublic,warn:!e.details?.isPublic}])},c(e.details?.isPublic?"Public":"Secret"),3),e.details?.ownerLogin?(a(),l("span",HL,[t[5]||(t[5]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[6]||(t[6]=g(" @",-1)),n("span",{textContent:c(e.details?.ownerLogin)},null,8,jL)])):f("v-if",!0),e.details?.updatedDate?(a(),l("span",GL,[t[7]||(t[7]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=g()),n("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,WL)])):f("v-if",!0),e.details?.anonymizeDate?(a(),l("span",KL,[t[9]||(t[9]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=g(" Anonymized ",-1)),n("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,YL)])):f("v-if",!0)])]),e.details?.files&&e.details?.files?.length||e.details?.comments&&e.details?.comments?.length?(a(),l("nav",XL,[e.details?.files?(a(),l("button",{key:0,class:P(["paper-tab",{active:e.tabState?.active=="files"}]),type:"button",role:"tab",id:"gist-files-tab","aria-selected":e.tabState?.active==="files","aria-controls":"gist-files-panel",tabindex:e.tabState?.active==="files"?0:-1,onKeydown:t[0]||(t[0]=o=>e.previewTabKeydown(o)),onClick:t[1]||(t[1]=o=>e.tabState.active="files")},[t[11]||(t[11]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-type-gist"})],-1)),n("span",{textContent:c(e.fmt.plural(e.details?.files?.length,{0:"No files",one:"1 file",other:"{} files"}))},null,8,QL)],42,JL)):f("v-if",!0),e.details?.comments?(a(),l("button",{key:1,class:P(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"gist-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"gist-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=o=>e.previewTabKeydown(o)),onClick:t[3]||(t[3]=o=>e.tabState.active="comments")},[t[12]||(t[12]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,xL)],42,ZL)):f("v-if",!0)])):f("v-if",!0),n("div",eF,[e.details?.files&&e.tabState?.active=="files"?(a(),l("div",tF,[n("ul",nF,[(a(!0),l(q,null,x(e.details?.files,(o,r)=>(a(),l("li",sF,[n("div",oF,[n("strong",{textContent:c(o?.filename)},null,8,iF),o?.language?(a(),l("span",rF,c(o?.language),1)):f("v-if",!0)]),Oe(s,{file:o},null,8,["file"])]))),256)),e.details?.files?.length?f("v-if",!0):(a(),l("li",aF,[...t[13]||(t[13]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("span",null,"No files in this gist.",-1)])]))])])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(a(),l("div",lF,[n("ul",dF,[(a(!0),l(q,null,x(e.details?.comments,(o,r)=>(a(),l("li",uF,[n("div",cF,[o?.author?(a(),l("span",pF,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=g(" @",-1)),n("span",{textContent:c(o?.author)},null,8,fF)])):f("v-if",!0),o?.updatedDate?(a(),l("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(o?.updatedDate))},null,8,hF)):f("v-if",!0)]),o?.body?(a(),l("div",mF,[Oe(i,{content:o?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(a(),l("li",gF,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1),n("span",null,"No comments on this gist.",-1)])]))])])):f("v-if",!0)])])])}var vF={key:0,class:"nav-support",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs","aria-label":"Donate on Ko-fi to help cover hosting costs"},yF={key:1,class:"nav-heart-m",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener","aria-label":"Support Anonymous GitHub",title:"Support Anonymous GitHub"},bF=["aria-label","title"],wF={class:"ui-icon","aria-hidden":"true"},kF=["href"],CF={key:3,class:"nav-signin-m",href:"/signin",target:"_self","aria-label":"Sign in with GitHub"},EF={class:"collapse navbar-collapse",id:"navbarSupportedContent"},SF={class:"navbar-nav mr-auto smooth-scroll"},NF={key:0,class:"nav-item nav-home-item"},RF={key:1,class:"nav-item"},PF={key:2,class:"nav-item"},AF={key:3,class:"nav-item"},DF={class:"nav-item"},TF={key:4,class:"nav-item"},OF={class:"navbar-nav"},IF={key:0,class:"nav-item d-lg-none"},MF={key:1,class:"nav-item"},VF={key:2,class:"nav-item"},qF={key:3,class:"nav-item nav-signin-item"},_F={key:4,class:"nav-item"},$F={key:5,class:"nav-item dropdown user-chip-wrap"},LF={class:"nav-link user-chip dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},FF=["src"],UF={class:"user-chip-name"},BF={class:"dropdown-menu dropdown-menu-right user-menu","aria-labelledby":"navbarDropdownMenuLink"},zF={class:"dropdown-header"},HF={key:0,class:"dropdown-item um-extra",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener"},jF=["innerHTML"],GF=["disabled"],WF={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},KF={class:"email-prompt-actions"},YF=["disabled"],XF=["disabled"],JF=["disabled"];function hp(e,t){return a(),l(q,null,[n("nav",{class:P(["navbar navbar-expand-lg",{"navbar-dark":e.isDarkMode}])},[t[28]||(t[28]=n("a",{class:"navbar-brand",href:"/"},[g("Anonymous "),n("em",null,"GitHub")],-1)),e.headerShowSupport?(a(),l("a",vF,[...t[9]||(t[9]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",{class:"nav-support-label"},"Support",-1)])])):f("v-if",!0),/^\/(r|w|pr|gist)\//.test(e.path||"")?f("v-if",!0):(a(),l("a",yF,[...t[10]||(t[10]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1)])])),/^\/(r|w|pr|gist)\//.test(e.path||"")?f("v-if",!0):(a(),l("button",{key:2,type:"button",class:"nav-theme-m","aria-label":e.isDarkMode?"Switch to light mode":"Switch to dark mode",title:e.isDarkMode?"Switch to light mode":"Switch to dark mode",onClick:t[0]||(t[0]=s=>e.darkMode(!e.isDarkMode))},[(a(),l("svg",wF,[n("use",{href:e.isDarkMode?"#ui-icon-sun":"#ui-icon-moon"},null,8,kF)]))],8,bF)),!e.user&&!/^\/(r|w|pr|gist)\//.test(e.path||"")?(a(),l("a",CF,[...t[11]||(t[11]=[n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1),g("Sign in",-1)])])):f("v-if",!0),t[29]||(t[29]=n("button",{class:"navbar-toggler",type:"button","data-toggle":"collapse","data-target":"#navbarSupportedContent","aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation"},[n("span",{class:"navbar-toggler-icon"})],-1)),n("div",EF,[n("ul",SF,[e.user?f("v-if",!0):(a(),l("li",NF,[n("a",{class:P(["nav-link",{active:e.path=="/"}]),href:"/"},[...t[12]||(t[12]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-home"})],-1),g(" Home ",-1)])],2)])),e.user?(a(),l("li",RF,[n("a",{class:P(["nav-link",{active:e.path=="/dashboard"}]),href:"/dashboard"},[...t[13]||(t[13]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-grid"})],-1),g(" My work ",-1)])],2)])):f("v-if",!0),e.user?(a(),l("li",PF,[n("a",{class:P(["nav-link",{active:e.path=="/anonymize"||e.path=="/pull-request-anonymize"}]),href:"/anonymize"},[...t[14]||(t[14]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1),g(" Anonymize ",-1)])],2)])):f("v-if",!0),e.user?(a(),l("li",AF,[n("a",{class:P(["nav-link",{active:e.path=="/conferences"||e.path?.startsWith("/conference/")}]),href:"/conferences"},[...t[15]||(t[15]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1),g(" Conferences ",-1)])],2)])):f("v-if",!0),n("li",DF,[n("a",{class:P(["nav-link",{active:e.path=="/faq"}]),href:"/faq"},[...t[16]||(t[16]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})],-1),g("FAQ",-1)])],2)]),e.user&&e.user?.isAdmin?(a(),l("li",TF,[n("a",{class:P(["nav-link",{active:e.path?.indexOf("/admin")===0}]),href:"/admin/"},[...t[17]||(t[17]=[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-user-shield"})],-1),g(" Admin ",-1)])],2)])):f("v-if",!0)]),n("ul",OF,[e.user||!e.isReviewerRoute?(a(),l("li",IF,[...t[18]||(t[18]=[n("a",{class:"nav-link nav-icon",target:"_blank",href:"https://github.com/tdurieux/anonymous_github/",title:"Anonymous GitHub source code","aria-label":"Anonymous GitHub source code on GitHub",rel:"noopener","data-offset":"30"},[n("i",{class:"fab fa-github","aria-hidden":"true"})],-1)])])):f("v-if",!0),f(` "Report a bug" is about this service. Reviewers who land on an anonymized repository often think it is about the paper, so the - label names the service and the tooltip says who to contact. `),n("li",{class:P(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug ")],-1)])],2),n("li",{class:P(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),v("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",DF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=o=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",PF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=o=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",AF,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),v(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",TF,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=le(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",OF,[n("a",IF,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,MF)):f("v-if",!0),n("span",_F,p(e.user?.username),1)]),n("div",VF,[n("h6",qF,"Signed in as @"+p(e.user?.username),1),t[25]||(t[25]=Se('SettingsDefaults, quotas, accountGitHub connectionsRepository access and OAuthClaim an anonymizationAttach an existing mirror to your accountReport a bugAbout this service, not a paperSource code',6)),e.headerShowSupport?(a(),l("a",$F,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,LF)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=le(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=le(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),T(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=o=>e.emailPromptAddress=o),disabled:e.emailPromptBusy},null,8,FF),[[pt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p",UF,p(e.emailPromptError),1)):f("v-if",!0),n("div",BF,[n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[5]||(t[5]=o=>e.respondToEmailPrompt("later"))},"Remind me later",8,zF),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[6]||(t[6]=o=>e.respondToEmailPrompt("never"))},"Never",8,HF),n("button",{type:"submit",class:"btn btn-ink",disabled:e.emailPromptBusy},p(e.emailPromptBusy?"Saving\u2026":"Save"),9,jF)])],32)],32)):f("v-if",!0)],64)}var GF={class:"paper-landing"},WF={class:"paper-hero"},KF={class:"paper-hero-copy"},YF={class:"paper-cta-row"},XF={key:0,href:"/signin",target:"_self",class:"btn-hero"},QF={key:1,href:"/anonymize",class:"btn-hero"},JF={class:"paper-stats-meta"},ZF={key:0,class:"paper-stats-meta-left"},xF={key:0,class:"paper-stats-grid"},eU={class:"paper-stat-label"},tU={key:0,class:"paper-stat-delta"},nU={class:"demo paper-wrap","aria-label":"Try redaction"},oU={class:"demo-terms"},sU={class:"demo-panes"},iU={class:"pane"},rU={class:"demo-input-wrap"},aU={class:"pane-body demo-backdrop","aria-hidden":"true"},lU={key:0,class:"demo-match"},dU={class:"pane pane-after"},uU={class:"pane-header"},cU={class:"pane-url"},pU={class:"meta-redact"},fU={class:"pane-body demo-output","aria-live":"polite"},hU=["title"],mU={class:"paper-features paper-wrap","aria-label":"Product features"},gU={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},vU=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],yU={class:"paper-eyebrow"},bU={class:"pf-num"},wU={class:"pf-name"},kU={class:"paper-feature-title"},CU={key:0,class:"serif-hy"},EU={class:"paper-feature-more"},SU={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},NU={key:0,class:"serif-hy"},RU=["href","target"],DU={class:"paper-features-stage"},PU=["id","aria-labelledby"],AU={class:"paper-frame"},TU={class:"paper-frame-bar","aria-hidden":"true"},OU={class:"url"},IU=["aria-label"],MU={key:0,class:"fm-form"},_U={key:1,class:"fm-viewer"},VU={key:2,class:"fm-dash"};function pp(e,t){let o=Xe("partial-view");return a(),l("div",GF,[f(" Hero: copy on the left, the product on the right "),n("section",WF,[n("div",KF,[t[5]||(t[5]=n("div",{class:"paper-eyebrow"},"For double-anonymous peer review",-1)),t[6]||(t[6]=n("h1",{class:"hero-title"},[v(" Share the code,"),n("br"),n("span",{class:"accent"},"not the author.")],-1)),t[7]||(t[7]=n("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist. It redacts the terms you choose in text files, so reviewers can browse your artifact through an anonymous link. ",-1)),n("div",YF,[e.user?f("v-if",!0):(a(),l("a",XF,[...t[3]||(t[3]=[n("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),v("Sign in with GitHub ",-1)])])),e.user?(a(),l("a",QF," Anonymize a repository \u2192 ")):f("v-if",!0),t[4]||(t[4]=n("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[8]||(t[8]=n("ul",{class:"paper-reassure"},[n("li",null,"Free, open source"),n("li",null,"Read-only access"),n("li",null,"Set an expiry date")],-1)),t[9]||(t[9]=n("p",{class:"paper-proof-mobile"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),t[10]||(t[10]=n("div",{class:"paper-hero-shot"},[n("div",{class:"paper-frame"},[n("div",{class:"paper-frame-bar","aria-hidden":"true"},[n("span",{class:"dots"},[n("i"),n("i"),n("i")]),n("span",{class:"url"},"anonymous.4open.science/r/paper-7f2a")]),n("div",{class:"hero-mock",role:"img","aria-label":"A reviewer browsing an anonymized repository: the author, affiliation, and email in the README are replaced by anonymous terms"},[n("div",{class:"hero-mock-tree","aria-hidden":"true"},[n("div",{class:"hero-mock-tree-title"},"Files"),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),v("data")]),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),v("experiments")]),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),v("src")]),n("div",{class:"hero-mock-row"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),v("LICENSE")]),n("div",{class:"hero-mock-row is-active"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),v("README.md")]),n("div",{class:"hero-mock-row"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),v("requirements.txt")])]),n("div",{class:"hero-mock-doc","aria-hidden":"true"},[n("div",{class:"hero-mock-doc-bar"},[n("strong",null,"README.md"),n("span",{class:"hero-mock-count"},"3 redacted")]),n("div",{class:"hero-mock-doc-body"},[n("div",{class:"hero-mock-h1"},"DeepLearnUtils"),n("p",null,[v("Developed by "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 1"},[n("i",null,"1")]),v(" at "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 2"},[n("i",null,"2")]),v(".")]),n("p",{class:"hm-opt"},"Utilities for reproducing the paper\u2019s experiments."),n("div",{class:"hero-mock-h2 hm-opt"},"Quick start"),n("pre",{class:"hm-opt"},`pip install -r requirements.txt -python experiments/run.py`),n("p",null,[v("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:P(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",JF,[e.statsEmpty()?f("v-if",!0):(a(),l("div",ZF,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),v(),n("span",null,[v("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",xF,[(a(!0),l(F,null,se(e.cards,(i,s)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:P(["paper-stat-value",{"is-pending":!e.stat}])},p(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",eU,p(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",tU," +"+p(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[v("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",nU,[n("div",oU,[t[13]||(t[13]=n("label",{for:"demo-terms"},[v("Terms to redact "),n("span",null,[v("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),T(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=kt(le(()=>{},["prevent"]),["enter"]))},null,544),[[pt,e.demoTerms]])]),n("div",sU,[n("div",iU,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[v("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",rU,[n("div",aU,[(a(!0),l(F,null,se(e.demoParts(),(i,s)=>(a(),l(F,{key:s},[i.redacted?(a(),l("mark",lU,p(i.original),1)):(a(),l(F,{key:1},[v(p(i.text),1)],64))],64))),128)),t[14]||(t[14]=v("\u200B",-1))]),T(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[pt,e.demoText]])])]),n("div",dU,[n("div",uU,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",cU,[n("span",pU,p(e.demoCount())+" redacted",1)])]),n("div",fU,[(a(!0),l(F,null,se(e.demoParts(),(i,s)=>(a(),l(F,{key:s},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},p(i.text),9,hU)):(a(),l(F,{key:1},[v(p(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",mU,[n("div",gU,[(a(!0),l(F,null,se(e.features,(i,s)=>(a(),l("div",{class:P(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,s),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",yU,[n("span",bU,p(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",wU,p(i?.eyebrow),1)]),n("span",kU,[v(p(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",CU,"-")):f("v-if",!0),v(p(i?.title.split("-").slice(1).join("-"))+" "+p(i?.accent),1)])],40,vU),n("div",EU,[n("span",SU,[v(p(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",NU,"-")):f("v-if",!0),v(p(i?.title.split("-").slice(1).join("-"))+" "+p(i?.accent),1)]),n("p",null,p(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},p(i?.cta)+" \u2192",9,RU)])],2))),128))]),n("div",DU,[(a(!0),l(F,null,se(e.features,(i,s)=>T((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",AU,[n("div",TU,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",OU,p(i?.url),1)]),n("div",{class:P(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",MU,[...t[19]||(t[19]=[Se('
GitHub repository
github.com/jane-smith/DeepLearnUtils
Terms to redact
Jane SmithMIT CSAILjane.smith@mit.edu+ Add term
Reviewers can see
ImagesPDFsLinksNotebooks
Expires
Mar 31, 2027
Anonymize repository
',6)])])):i?.key==="review"?(a(),l("div",_U,[...t[20]||(t[20]=[Se(`
data
src
train.py
README.md
LICENSE
train.py48 lines \xB7 Python
1# Training loop for DeepLearnUtils
+           label names the service and the tooltip says who to contact. `),n("li",{class:P(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug ")],-1)])],2),n("li",{class:P(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),g("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",MF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",VF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",qF,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),g(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",_F,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=ae(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",$F,[n("a",LF,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,FF)):f("v-if",!0),n("span",UF,c(e.user?.username),1)]),n("div",BF,[n("h6",zF,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ee('SettingsDefaults, quotas, accountGitHub connectionsRepository access and OAuthClaim an anonymizationAttach an existing mirror to your accountReport a bugAbout this service, not a paperSource code',6)),e.headerShowSupport?(a(),l("a",HF,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,jF)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=ae(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=ae(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),D(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,GF),[[pt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p",WF,c(e.emailPromptError),1)):f("v-if",!0),n("div",KF,[n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[5]||(t[5]=s=>e.respondToEmailPrompt("later"))},"Remind me later",8,YF),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[6]||(t[6]=s=>e.respondToEmailPrompt("never"))},"Never",8,XF),n("button",{type:"submit",class:"btn btn-ink",disabled:e.emailPromptBusy},c(e.emailPromptBusy?"Saving\u2026":"Save"),9,JF)])],32)],32)):f("v-if",!0)],64)}var QF={class:"paper-landing"},ZF={class:"paper-hero"},xF={class:"paper-hero-copy"},eU={class:"paper-cta-row"},tU={key:0,href:"/signin",target:"_self",class:"btn-hero"},nU={key:1,href:"/anonymize",class:"btn-hero"},sU={class:"paper-stats-meta"},oU={key:0,class:"paper-stats-meta-left"},iU={key:0,class:"paper-stats-grid"},rU={class:"paper-stat-label"},aU={key:0,class:"paper-stat-delta"},lU={class:"demo paper-wrap","aria-label":"Try redaction"},dU={class:"demo-terms"},uU={class:"demo-panes"},cU={class:"pane"},pU={class:"demo-input-wrap"},fU={class:"pane-body demo-backdrop","aria-hidden":"true"},hU={key:0,class:"demo-match"},mU={class:"pane pane-after"},gU={class:"pane-header"},vU={class:"pane-url"},yU={class:"meta-redact"},bU={class:"pane-body demo-output","aria-live":"polite"},wU=["title"],kU={class:"paper-features paper-wrap","aria-label":"Product features"},CU={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},EU=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],SU={class:"paper-eyebrow"},NU={class:"pf-num"},RU={class:"pf-name"},PU={class:"paper-feature-title"},AU={key:0,class:"serif-hy"},DU={class:"paper-feature-more"},TU={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},OU={key:0,class:"serif-hy"},IU=["href","target"],MU={class:"paper-features-stage"},VU=["id","aria-labelledby"],qU={class:"paper-frame"},_U={class:"paper-frame-bar","aria-hidden":"true"},$U={class:"url"},LU=["aria-label"],FU={key:0,class:"fm-form"},UU={key:1,class:"fm-viewer"},BU={key:2,class:"fm-dash"};function mp(e,t){let s=Xe("partial-view");return a(),l("div",QF,[f(" Hero: copy on the left, the product on the right "),n("section",ZF,[n("div",xF,[t[5]||(t[5]=n("div",{class:"paper-eyebrow"},"For double-anonymous peer review",-1)),t[6]||(t[6]=n("h1",{class:"hero-title"},[g(" Share the code,"),n("br"),n("span",{class:"accent"},"not the author.")],-1)),t[7]||(t[7]=n("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist. It redacts the terms you choose in text files, so reviewers can browse your artifact through an anonymous link. ",-1)),n("div",eU,[e.user?f("v-if",!0):(a(),l("a",tU,[...t[3]||(t[3]=[n("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),g("Sign in with GitHub ",-1)])])),e.user?(a(),l("a",nU," Anonymize a repository \u2192 ")):f("v-if",!0),t[4]||(t[4]=n("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[8]||(t[8]=n("ul",{class:"paper-reassure"},[n("li",null,"Free, open source"),n("li",null,"Read-only access"),n("li",null,"Set an expiry date")],-1)),t[9]||(t[9]=n("p",{class:"paper-proof-mobile"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),t[10]||(t[10]=n("div",{class:"paper-hero-shot"},[n("div",{class:"paper-frame"},[n("div",{class:"paper-frame-bar","aria-hidden":"true"},[n("span",{class:"dots"},[n("i"),n("i"),n("i")]),n("span",{class:"url"},"anonymous.4open.science/r/paper-7f2a")]),n("div",{class:"hero-mock",role:"img","aria-label":"A reviewer browsing an anonymized repository: the author, affiliation, and email in the README are replaced by anonymous terms"},[n("div",{class:"hero-mock-tree","aria-hidden":"true"},[n("div",{class:"hero-mock-tree-title"},"Files"),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),g("data")]),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),g("experiments")]),n("div",{class:"hero-mock-row is-folder"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})]),g("src")]),n("div",{class:"hero-mock-row"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),g("LICENSE")]),n("div",{class:"hero-mock-row is-active"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),g("README.md")]),n("div",{class:"hero-mock-row"},[n("svg",{viewBox:"0 0 16 16"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})]),g("requirements.txt")])]),n("div",{class:"hero-mock-doc","aria-hidden":"true"},[n("div",{class:"hero-mock-doc-bar"},[n("strong",null,"README.md"),n("span",{class:"hero-mock-count"},"3 redacted")]),n("div",{class:"hero-mock-doc-body"},[n("div",{class:"hero-mock-h1"},"DeepLearnUtils"),n("p",null,[g("Developed by "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 1"},[n("i",null,"1")]),g(" at "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 2"},[n("i",null,"2")]),g(".")]),n("p",{class:"hm-opt"},"Utilities for reproducing the paper\u2019s experiments."),n("div",{class:"hero-mock-h2 hm-opt"},"Quick start"),n("pre",{class:"hm-opt"},`pip install -r requirements.txt
+python experiments/run.py`),n("p",null,[g("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:P(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",sU,[e.statsEmpty()?f("v-if",!0):(a(),l("div",oU,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),g(),n("span",null,[g("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",iU,[(a(!0),l(q,null,x(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:P(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",rU,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",aU," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[g("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",lU,[n("div",dU,[t[13]||(t[13]=n("label",{for:"demo-terms"},[g("Terms to redact "),n("span",null,[g("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),D(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=kt(ae(()=>{},["prevent"]),["enter"]))},null,544),[[pt,e.demoTerms]])]),n("div",uU,[n("div",cU,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[g("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",pU,[n("div",fU,[(a(!0),l(q,null,x(e.demoParts(),(i,o)=>(a(),l(q,{key:o},[i.redacted?(a(),l("mark",hU,c(i.original),1)):(a(),l(q,{key:1},[g(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=g("\u200B",-1))]),D(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[pt,e.demoText]])])]),n("div",mU,[n("div",gU,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",vU,[n("span",yU,c(e.demoCount())+" redacted",1)])]),n("div",bU,[(a(!0),l(q,null,x(e.demoParts(),(i,o)=>(a(),l(q,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,wU)):(a(),l(q,{key:1},[g(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",kU,[n("div",CU,[(a(!0),l(q,null,x(e.features,(i,o)=>(a(),l("div",{class:P(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",SU,[n("span",NU,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",RU,c(i?.eyebrow),1)]),n("span",PU,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",AU,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,EU),n("div",DU,[n("span",TU,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",OU,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,IU)])],2))),128))]),n("div",MU,[(a(!0),l(q,null,x(e.features,(i,o)=>D((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",qU,[n("div",_U,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",$U,c(i?.url),1)]),n("div",{class:P(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",FU,[...t[19]||(t[19]=[Ee('
GitHub repository
github.com/jane-smith/DeepLearnUtils
Terms to redact
Jane SmithMIT CSAILjane.smith@mit.edu+ Add term
Reviewers can see
ImagesPDFsLinksNotebooks
Expires
Mar 31, 2027
Anonymize repository
',6)])])):i?.key==="review"?(a(),l("div",UU,[...t[20]||(t[20]=[Ee(`
data
src
train.py
README.md
LICENSE
train.py48 lines \xB7 Python
1# Training loop for DeepLearnUtils
 2# Author: XXXX-1, XXXX-2
 3import torch
 4from utils import load_config
@@ -55,18 +55,18 @@ python experiments/run.py`),n("p",null,[v("Contact: "),n("span",{class:"redact",
 7    model = build_model(config)
 8    for epoch in range(config.epochs):
 9        loss = step(model)
-10        log("epoch %d: %.3f", epoch, loss)
`,2)])])):(a(),l("div",VU,[...t[21]||(t[21]=[Se('
ProjectStatusViewsExpires
DeepLearnUtilspaper-7f2a \xB7 ICSE 2027Ready41Mar 31, 2027
vision-bench#212pull request \xB7 FSE 2027Ready12Never
graph-repairgr-91abUpdating5Jan 5, 2027
JarSiftOOPSLA 2025Expired72Sep 28, 2026
',5)])]))],10,IU)])],8,PU)),[[Z,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Se('
Before you sign in

The questions that come up most.

Read the full FAQ \u2192
What access does GitHub sign-in require?

The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories.

Which file formats are supported?

Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged.

What happens when an anonymized repository expires?

You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over.

Ready for review?

Create an anonymous mirror in a couple of minutes. Reviewers just open the link.

',2)),Oe(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var qU={class:"paper-empty"},$U={class:"paper-empty-inner"},LU={key:0,class:"paper-eyebrow"},FU={key:1,class:"paper-eyebrow"},UU={key:2,class:"paper-empty-title"},BU=["textContent"];function fp(e,t){return a(),l("div",qU,[n("div",$U,[e.error?f("v-if",!0):(a(),l("div",LU,"Working")),e.error?(a(),l("div",FU,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",UU,[...t[0]||(t[0]=[v(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:p(e.fmt.translate(e.error))},null,8,BU)):f("v-if",!0)])])}var zU={class:"container paper-page paper-settings"},HU={class:"paper-crumbs"},jU={class:"here"},GU={class:"paper-page-title"},WU={class:"paper-settings-body"},KU={class:"paper-settings-toc"},YU={href:"#conf-billing"},XU={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},QU={id:"conf-basics",class:"paper-settings-section"},JU={class:"form-group"},ZU={class:"invalid-feedback"},xU={class:"invalid-feedback"},e7={class:"form-group"},t7={class:"invalid-feedback"},n7={class:"form-group"},o7={class:"invalid-feedback"},s7={class:"invalid-feedback"},i7={id:"conf-window",class:"paper-settings-section"},r7={class:"form-grid-2"},a7={class:"form-group"},l7={class:"invalid-feedback"},d7={class:"invalid-feedback"},u7={class:"form-group"},c7={class:"invalid-feedback"},p7={class:"invalid-feedback"},f7={id:"conf-rendering",class:"paper-settings-section"},h7={class:"form-check"},m7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},g7={class:"form-check"},v7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},y7={class:"form-check"},b7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},w7={class:"form-check"},k7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},C7={id:"conf-features",class:"paper-settings-section"},E7={class:"form-check"},S7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},N7={class:"form-check"},R7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},D7={id:"conf-plan",class:"paper-settings-section"},P7={key:0,class:"paper-section-copy"},A7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},T7=["value","checked","onChange"],O7={class:"conference-tier-head"},I7={key:0,class:"conference-tier-pill"},M7={class:"conference-tier-who"},_7={key:0,class:"conference-tier-price"},V7={class:"conference-tier-size"},q7={key:1,class:"conference-tier-per"},$7={key:2,class:"paper-plan-grid"},L7=["value"],F7=["textContent"],U7={class:"paper-plan-price"},B7=["innerHTML"],z7={key:3,class:"settings-notice",role:"status"},H7={key:0,id:"conf-billing",class:"paper-settings-section"},j7={class:"form-group"},G7={class:"form-group"},W7={class:"form-group"},K7={class:"form-group"},Y7={class:"form-grid-3"},X7={class:"form-group"},Q7={class:"form-group"},J7={class:"form-group"},Z7={class:"form-group"},x7={class:"paper-settings-footer"},e9=["textContent"],t9=["textContent"],n9=["disabled"];function hp(e,t){let o=Pe("paper-scrollspy"),i=Pe("field"),s=Pe("form");return a(),l("div",zU,[n("div",HU,[t[1]||(t[1]=n("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=v(" \xA0/\xA0 ",-1)),t[3]||(t[3]=n("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=v(" \xA0/\xA0 ",-1)),n("span",jU,p(e.editionMode?"Edit":"New"),1)]),n("h1",GU,[v(p(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=n("em",null,"conference",-1))]),t[44]||(t[44]=n("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue. One payment hosts every submission, so authors don't pay during the review window. ",-1)),n("div",WU,[T((a(),l("aside",KU,[t[7]||(t[7]=n("div",{class:"paper-settings-toc-head"},"On this page",-1)),n("nav",null,[t[6]||(t[6]=Se('BasicsReview windowRendering defaultsFeaturesPlan',5)),T(n("a",YU,"Billing",512),[[Z,e.plan?.pricePerRepo>0]])])])),[[o]]),T((a(),l("form",XU,[n("section",QU,[t[12]||(t[12]=n("div",{class:"paper-section-eyebrow"},"Basics",-1)),n("div",JU,[t[8]||(t[8]=n("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[i,{state:e.viewState,set:r=>{e.options.name=r},value:e.options?.name,form:"conference",options:{}}]]),T(n("div",ZU," The name of the conference is invalid. ",512),[[Z,e.conference?.name?.errors?.invalid]]),T(n("div",xU," The name of the conference is required. ",512),[[Z,e.conference?.name?.errors?.required]])]),n("div",e7,[t[9]||(t[9]=n("label",{class:"paper-field-label",for:"url"},"Website",-1)),T(n("input",{type:"url",class:P(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.url=r},value:e.options?.url,form:"conference",options:{}}]]),T(n("div",t7," The url of the conference is invalid. ",512),[[Z,e.conference?.url?.errors?.url]])]),n("div",n7,[t[10]||(t[10]=n("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[i,{state:e.viewState,set:r=>{e.options.conferenceID=r},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=n("small",{class:"form-text text-muted"},[v("3\u201310 characters, letters, numbers, "),n("code",null,"-"),v(" and "),n("code",null,"_"),v(". Authors reference this when they anonymize.")],-1)),T(n("div",{class:"invalid-feedback"}," The conference ID '"+p(e.options?.conferenceID)+"' is already used. ",513),[[Z,e.conference?.conferenceID?.errors?.used]]),T(n("div",o7," The conference ID is required. ",512),[[Z,e.conference?.conferenceID?.errors?.required]]),T(n("div",s7," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[Z,e.conference?.conferenceID?.errors?.pattern]])])]),n("section",i7,[t[17]||(t[17]=n("div",{class:"paper-section-eyebrow"},"Review window",-1)),n("div",r7,[n("div",a7,[t[13]||(t[13]=n("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),T(n("input",{type:"date",class:P(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[i,{state:e.viewState,set:r=>{e.options.startDate=r},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=n("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),T(n("div",l7," Start date is required. ",512),[[Z,e.conference?.startDate?.errors?.required]]),T(n("div",d7," Start date must be before end date. ",512),[[Z,e.conference?.startDate?.errors?.invalid]])]),n("div",u7,[t[15]||(t[15]=n("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),T(n("input",{type:"date",class:P(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[i,{state:e.viewState,set:r=>{e.options.endDate=r},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=n("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),T(n("div",c7," End date is required. ",512),[[Z,e.conference?.endDate?.errors?.required]]),T(n("div",p7," End date is invalid. ",512),[[Z,e.conference?.endDate?.errors?.invalid]])])])]),n("section",f7,[t[26]||(t[26]=n("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),n("div",h7,[T(n("input",m7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.link=r},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=n("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),n("div",g7,[T(n("input",v7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.image=r},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=n("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=n("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),n("div",y7,[T(n("input",b7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.pdf=r},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=n("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),n("div",w7,[T(n("input",k7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.notebook=r},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1)),t[25]||(t[25]=n("small",{class:"form-text text-muted"},"Render Jupyter notebooks instead of raw JSON.",-1))])]),n("section",C7,[t[31]||(t[31]=n("div",{class:"paper-section-eyebrow"},"Features",-1)),n("div",E7,[T(n("input",S7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.update=r},value:e.options?.options?.update,form:"conference",options:{}}]]),t[27]||(t[27]=n("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[28]||(t[28]=n("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),n("div",N7,[T(n("input",R7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.page=r},value:e.options?.options?.page,form:"conference",options:{}}]]),t[29]||(t[29]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[30]||(t[30]=n("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),n("section",D7,[t[35]||(t[35]=n("div",{class:"paper-section-eyebrow"},"Plan",-1)),e.editionMode?(a(),l("p",P7,p(e.conferencePlanName(e.options?.plan?.planID))+". The plan and review dates can't change after creation.",1)):e.conferenceTiers().length?(a(),l(F,{key:1},[t[33]||(t[33]=n("p",{class:"paper-section-copy"},"Pick the package that fits the number of submissions you expect. One payment hosts every submission, so authors don't pay.",-1)),n("div",A7,[(a(!0),l(F,null,se(e.conferenceTiers(),r=>(a(),l("label",{class:P(["conference-tier",{"is-selected":e.options?.plan?.planID===r.id}]),key:r.id},[n("input",{type:"radio",name:"planPicker",value:r.id,checked:e.options?.plan?.planID===r.id,onChange:d=>e.options.plan.planID=r.id},null,40,T7),n("span",O7,[n("strong",null,p(r.name),1),r.id==="conference"&&e.conferenceTiers().length>1?(a(),l("span",I7,"Most common")):f("v-if",!0)]),n("span",M7,p(e.conferenceAudience(r.id)),1),r.amount!=null?(a(),l("span",_7,[n("strong",null,p(e.conferenceAmount(r)),1),t[32]||(t[32]=v(" once",-1))])):f("v-if",!0),n("span",V7,"Up to "+p(r.repositories)+" papers \xB7 "+p(e.conferenceBytes(r.storage)),1),r.amount!=null&&r.repositories?(a(),l("span",q7,"About "+p(e.conferenceAmount(r,r.amount/r.repositories))+" per paper",1)):f("v-if",!0)],2))),128))]),t[34]||(t[34]=Se('

Every package includes

  • A review window of up to 180 days
  • Automatic updates for every submission
  • Links stay online until the review window ends
  • A dashboard of every submission for chairs

Nothing renews \xB7 Tax shown at checkout \xB7 Expecting more submissions? Email tdurieux@anonymous.4open.science

Create the conference, then pay from its page. Authors can submit once the payment is confirmed.

',2))],64)):e.plans.length?(a(),l("div",$7,[(a(!0),l(F,null,se(e.plans,r=>(a(),l("label",{class:P(["paper-plan-card",{selected:e.options?.plan?.planID==r?.id}]),key:r.id},[T(n("input",{type:"radio",name:"planPicker",value:r?.id},null,8,L7),[[i,{state:e.viewState,set:d=>{e.options.plan.planID=d},value:e.options?.plan?.planID,form:"conference",options:{}}]]),n("div",{class:"paper-plan-head",textContent:p(r?.name)},null,8,F7),n("div",U7,p(r.pricePerRepo>0?e.fmt?.number(r.pricePerRepo,2)+" \u20AC per repository":"Free"),1),n("div",{class:"paper-plan-desc",innerHTML:e.sanitize(r?.description)},null,8,B7)],2))),128))])):e.plansLoaded?(a(),l("p",z7,"New conferences are unavailable right now. Please try again later.")):f("v-if",!0)]),e.plan?.pricePerRepo>0?(a(),l("section",H7,[t[43]||(t[43]=n("div",{class:"paper-section-eyebrow"},"Billing",-1)),n("div",j7,[t[36]||(t[36]=n("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.name=r},value:e.options?.billing?.name,form:"conference",options:{}}]])]),n("div",G7,[t[37]||(t[37]=n("label",{class:"paper-field-label",for:"email"},"Email",-1)),T(n("input",{type:"email",class:P(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.email=r},value:e.options?.billing?.email,form:"conference",options:{}}]])]),n("div",W7,[t[38]||(t[38]=n("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address=r},value:e.options?.billing?.address,form:"conference",options:{}}]])]),n("div",K7,[T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address2=r},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),n("div",Y7,[n("div",X7,[t[39]||(t[39]=n("label",{class:"paper-field-label",for:"city"},"City",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.city=r},value:e.options?.billing?.city,form:"conference",options:{}}]])]),n("div",Q7,[t[40]||(t[40]=n("label",{class:"paper-field-label",for:"country"},"Country",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.country=r},value:e.options?.billing?.country,form:"conference",options:{}}]])]),n("div",J7,[t[41]||(t[41]=n("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.zip=r},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),n("div",Z7,[t[42]||(t[42]=n("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),T(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.vat=r},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):f("v-if",!0),n("div",x7,[e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:p(e.error)},null,8,e9)):f("v-if",!0),e.message?(a(),l("div",{key:1,class:"alert alert-success",role:"alert",textContent:p(e.message)},null,8,t9)):f("v-if",!0),n("button",{id:"send",disabled:e.saving,type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=le(r=>e.submitForm(r,()=>{e.submit(r)}),["prevent"]))},p(e.saving?e.editionMode?"Updating\u2026":"Creating\u2026":e.editionMode?"Update conference":"Create conference"),9,n9)])])),[[s,e.viewState]])])])}var o9={key:0,class:"dir-card","aria-label":"Repository files"},s9=["onClick"],i9={class:"dir-name"},r9=["href"],a9={class:"dir-name"},l9={class:"dir-meta"},d9={class:"file-card-head"},u9={class:"file-card-path"},c9={class:"breadcrumb paths","aria-label":"Path"},p9={class:"breadcrumb-item breadcrumb-root"},f9=["href","title","textContent"],h9=["aria-current"],m9=["aria-label"],g9={class:"mobile-sub ms"},v9=["title"],y9={class:"ms-item"},b9={key:1,class:"ms-item"},w9={key:2,class:"ms-item"},k9=["aria-label","title"],C9={class:"ui-icon","aria-hidden":"true"},E9=["href"],S9={key:0,class:"file-card-meta"},N9=["title"],R9={class:"meta-extra"},D9={key:1,class:"file-card-meta"},P9=["title"],A9={class:"file-card-actions"},T9={key:0,class:"csv-toggle seg-filter",role:"radiogroup","aria-label":"CSV view"},O9=["aria-checked"],I9=["aria-checked"],M9={key:1,class:"symbols"},_9=["aria-expanded"],V9={key:0,class:"symbols-menu",role:"menu"},q9={class:"symbols-head"},$9=["onClick"],L9={class:"symbols-name"},F9={class:"symbols-line"},U9=["title"],B9={key:3,class:"tb-view",role:"group","aria-label":"View tools"},z9=["title"],H9=["aria-pressed"],j9=["title"],G9={key:4,class:"tb-file",role:"group","aria-label":"File actions"},W9=["target","title","href"],K9=["aria-label","title"],Y9={class:"ui-icon","aria-hidden":"true"},X9=["href"],Q9=["target","href","download"],J9=["aria-label"],Z9={class:"ui-icon","aria-hidden":"true"},x9=["href"],eB={key:6,class:"tb-toc-m"},tB=["aria-expanded"],nB=["onClick"],oB={class:"tb-more"},sB=["aria-expanded"],iB={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},rB={key:0,class:"tb-menu-note"},aB={key:1,class:"tb-menu-note tb-menu-meta"},lB={key:2,class:"tb-menu-sep"},dB={key:4,class:"tb-menu-sep"},uB=["aria-checked"],cB={key:0,class:"tb-menu-check"},pB={class:"ui-icon","aria-hidden":"true"},fB=["href"],hB={key:9,class:"tb-menu-sep"},mB=["target","href"],gB=["target","href"],vB=["target","href","download"],yB=["target","href"],bB=["href"],wB=["target","href"],kB=["placeholder","aria-invalid"],CB=["aria-label"],EB={class:"csv-table"},SB=["aria-label"],NB={class:"csv-rownum"},RB=["aria-label"],DB={key:1,class:"file-card-body"},PB={key:2,class:"md-find-bar",role:"search"},AB=["value"],TB={class:"md-find-nav"},OB=["disabled"],IB=["disabled"],MB={class:"md-find-count","aria-live":"polite"},_B=["aria-pressed"],VB={key:3,class:"reading-layout"},qB=["innerHTML"],$B={key:0,class:"readme-toc","aria-label":"On this page"},LB={class:"toc-rail"},FB=["href","onClick"],UB={class:"file-card-head"},BB={class:"file-card-path"},zB={class:"breadcrumb paths","aria-label":"Path"},HB={class:"breadcrumb-item breadcrumb-root"},jB=["href","title","textContent"],GB=["aria-current"],WB=["aria-label"],KB={class:"mobile-sub ms"},YB=["title"],XB={class:"ms-item"},QB={key:1,class:"ms-item"},JB={key:2,class:"ms-item"},ZB=["aria-label","title"],xB={class:"ui-icon","aria-hidden":"true"},ez=["href"],tz={class:"file-card-meta"},nz=["title"],oz={class:"file-card-actions"},sz={key:0,class:"file-card-state",title:"Files over the size limit can't be previewed or downloaded from this link"},iz={key:1,class:"tb-file",role:"group","aria-label":"File actions"},rz=["target","title","href"],az=["target","href","download"],lz={class:"tb-more"},dz=["aria-expanded"],uz={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},cz={key:0,class:"tb-menu-note"},pz={key:1,class:"tb-menu-sep"},fz=["target","href"],hz=["target","href","download"],mz=["target","href"],gz={key:0,class:"media-stage"},vz=["src","alt"],yz={key:1,class:"media-stage"},bz=["src"],wz={key:2,class:"media-stage is-audio"},kz=["src"],Cz={key:4,class:"notebook-body"},Ez={key:5,class:"file-state"},Sz={class:"file-state-msg"},Nz={key:0,class:"file-state-actions"},Rz=["target","href","download"],Dz={key:6,class:"file-state",role:"alert"},Pz={class:"file-state-title"},Az={key:0,class:"file-state-msg"},Tz={key:1,class:"file-state-msg"},Oz={key:2,class:"file-state-actions"},Iz=["href"],Mz={key:7,class:"file-state"},_z={key:4,class:"file-error container d-flex h-100"},Vz={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},qz={class:"paper-error-msg"},$z={key:5,class:"file-error container d-flex h-100"},Lz={class:"viewer-error paper-error-card file-error-card m-auto",role:"alert","aria-labelledby":"viewer-error-title"},Fz={id:"viewer-error-title",class:"paper-empty-title"},Uz={class:"paper-error-actions"},Bz={key:0,href:"/",class:"btn btn-sm"},zz={key:1,href:"/faq",class:"btn btn-sm"},Hz={key:2,class:"btn btn-outline-ink",href:"/dashboard"},jz={key:6,class:"viewer-loading","aria-busy":"true"},Gz={class:"viewer-loading-status",role:"status","aria-live":"polite"},Wz={class:"viewer-loading-name sr-only"},Kz={key:0},Yz={class:"viewer-loading-lines","aria-hidden":"true"},Xz={key:7,class:"file-error container d-flex h-100"},Qz={key:8,class:"file-error container d-flex h-100"};function mp(e,t){let o=Xe("html-doc"),i=Xe("pdfviewer"),s=Xe("notebook"),r=Pe("code-editor");return a(),l(F,null,[e.sidebarHidden&&e.type=="html"&&e.content!=null&&e.paths?.length===1&&/^readme/i.test(e.paths[0]||"")&&e.files?.length?(a(),l("section",o9,[t[46]||(t[46]=n("header",{class:"dir-card-head"},[n("span",{class:"dir-card-title"},"Files"),n("span",{class:"dir-card-sub"},"Snapshot of the repository at review time")],-1)),n("ul",{class:P(["dir-list",{"is-expanded":e.dirExpanded}])},[(a(!0),l(F,null,se(e.rootEntries(),d=>(a(),l("li",{key:d.name},[d.size==null?(a(),l("button",{key:0,type:"button",class:"dir-row",onClick:c=>e.revealFolder(d.name)},[t[43]||(t[43]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})],-1)),n("span",i9,p(d.name),1),t[44]||(t[44]=n("span",{class:"dir-meta"},"Folder",-1))],8,s9)):(a(),l("a",{key:1,class:P(["dir-row",{"is-current":d.name===e.paths[0]}]),href:e.safeUrl("/r/"+e.repoId+"/"+encodeURIComponent(d.name))},[t[45]||(t[45]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})],-1)),n("span",a9,p(d.name),1),n("span",l9,p(e.formatSize(d.size)),1)],10,r9))]))),128))],2),!e.dirExpanded&&e.files.length>8?(a(),l("button",{key:0,type:"button",class:"dir-more",onClick:t[0]||(t[0]=d=>e.dirExpanded=!0)},"Show all "+p(e.files.length)+" items",1)):f("v-if",!0)])):f("v-if",!0),(e.type=="text"||e.type=="code"||e.type=="html"||e.type=="html-doc"&&e.showSource)&&e.content!=null?(a(),l("section",{key:1,class:P(["file-card",{"is-code":e.type!="html","no-wrap":!e.wrapLines}])},[n("header",d9,[n("div",u9,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[1]||(t[1]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",c9,[n("li",p9,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:p(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,f9)]),(a(!0),l(F,null,se(e.paths,(d,c)=>(a(),l("li",{class:"breadcrumb-item","aria-current":c===e.paths.length-1?"page":null},[(a(!0),l(F,null,se(e.redactParts(d),(u,y)=>(a(),l(F,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,p(u.n),1)],8,m9)):(a(),l(F,{key:1},[v(p(u.t),1)],64))],64))),128))],8,h9))),256))]),n("span",g9,[e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[48]||(t[48]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,v9)):f("v-if",!0),n("span",y9,p(e.type=="html"?"Markdown":e.languageName||"Text"),1),e.fileSize(e.filePath)!=null?(a(),l("span",b9,p(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0),e.type!="html"&&typeof e.content=="string"?(a(),l("span",w9,p(e.fmt?.number(e.content.split(` -`).length))+" lines",1)):f("v-if",!0)]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",C9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,E9)]))],8,k9),[[Z,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",S9,[e.redactionCount()?(a(),l(F,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,N9),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),v(p(e.languageName||"Text"),1),n("span",R9,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.fmt?.number(e.content.split(` -`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",D9,[e.redactionCount()?(a(),l(F,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,P9),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=v("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(F,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",A9,[e.isCsv()?(a(),l("div",T9,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,O9),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,I9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",M9,[n("button",{type:"button",class:P(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,_9),e.symbolsOpen?(a(),l("div",V9,[n("div",q9,p(e.symbols().length)+" "+p(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(F,null,se(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:c=>e.goToSymbol(d.line)},[n("span",{class:P(["symbols-kind","is-"+d.kind])},p(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",L9,p(d.name),1),n("span",F9,p(d.line),1)],8,$9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:P(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,U9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",B9,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,z9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,H9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,j9)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",G9,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,W9),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=d=>e.copyContent())},[(a(),l("svg",Y9,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,X9)]))],8,K9)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,Q9)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",Z9,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,x9)]))],8,J9)):f("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(a(),l("div",eB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-toc-btn",{"is-on":e.tocOpen}]),"aria-label":"On this page",title:"On this page","aria-haspopup":"true","aria-expanded":e.tocOpen?"true":"false",onClick:t[13]||(t[13]=le(d=>{e.tocOpen=!e.tocOpen,e.moreOpen=!1},["stop"]))},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-outline"})],-1)])],10,tB),e.tocOpen?(a(),l("div",{key:0,class:"tb-menu tb-toc-menu",role:"menu",onClick:t[15]||(t[15]=d=>e.tocOpen=!1)},[t[64]||(t[64]=n("div",{class:"tb-menu-label"},"On this page",-1)),n("button",{type:"button",role:"menuitem",class:P(["tb-menu-toc","lvl-2",{"is-active":!e.activeHeading}]),onClick:t[14]||(t[14]=d=>e.scrollToHeading(null))},"Introduction",2),(a(!0),l(F,null,se(e.readmeToc(),d=>(a(),l("button",{type:"button",role:"menuitem",key:"m-"+d.id,class:P(["tb-menu-toc","lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:c=>e.scrollToHeading(d.id)},p(d.text),11,nB))),128))])):f("v-if",!0)])):f("v-if",!0),n("div",oB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[16]||(t[16]=le(d=>{e.tocOpen=!1,e.moreOpen=!e.moreOpen},["stop"]))},[(a(),l("svg",iB,[...t[65]||(t[65]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,sB),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[23]||(t[23]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",rB,[t[66]||(t[66]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),v("Snapshot \xB7 "+p(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),typeof e.content=="string"?(a(),l("div",aB,[v(p(e.type=="html"?"Markdown":e.languageName||"Text")+" \xB7 "+p(e.type=="html"&&e.fileSize(e.filePath)!=null?e.formatSize(e.fileSize(e.filePath)):e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1),e.type!="html"?(a(),l(F,{key:0},[v(" \xB7 "+p(e.fmt?.number(e.content.split(` -`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",lB)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",dB)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),v("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=v("Wrap lines",-1)),e.wrapLines?(a(),l("span",cB,"\u2713")):f("v-if",!0)],8,uB)):f("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=d=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",pB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,fB)])),v(p(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",hB)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,mB)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,gB)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),v("Download file",-1)])],8,vB)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),v("Open website",-1)])],8,yB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v("Edit anonymization",-1)])],8,bB)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),v("Download ZIP",-1)])],8,wB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),v("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),v("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=le(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),T(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(` -`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=kt(le(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,kB),[[pt,e.gotoValue]]),n("span",{class:P(["goto-hint",{"is-error":e.gotoError}])},p(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",EB,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(F,null,se(e.csvRows()[0]||[],(d,c)=>(a(),l("th",{scope:"col",key:c,class:P({"is-num":e.csvNumCol(c)})},[(a(!0),l(F,null,se(e.redactParts(d),(u,y)=>(a(),l(F,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,p(u.n),1)],8,SB)):(a(),l(F,{key:1},[v(p(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(F,null,se(e.csvRows().slice(1),(d,c)=>(a(),l("tr",{key:c},[n("td",NB,p(c+1),1),(a(!0),l(F,null,se(d,(u,y)=>(a(),l("td",{key:y,class:P({"is-num":e.csvNumCol(y)})},[(a(!0),l(F,null,se(e.redactParts(u),(h,b)=>(a(),l(F,{key:b},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,p(h.n),1)],8,RB)):(a(),l(F,{key:1},[v(p(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,CB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?T((a(),l("div",DB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",PB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=kt(le(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=kt(le(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,AB),n("span",TB,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,OB),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,IB)]),n("span",MB,p(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:P(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,_B),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",VB,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,qB),e.readmeToc().length>=3?(a(),l("aside",$B,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",LB,[n("a",{href:"#",class:P(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=le(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(F,null,se(e.readmeToc(),(d,c)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:P(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:le(u=>e.scrollToHeading(d.id),["prevent"])},p(d.text),11,FB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Gt(o,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:P(["file-card file-card-media","view-"+e.type])},[n("header",UB,[n("div",BB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",zB,[n("li",HB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:p(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,jB)]),(a(!0),l(F,null,se(e.paths,(d,c)=>(a(),l("li",{class:"breadcrumb-item","aria-current":c===e.paths.length-1?"page":null},[(a(!0),l(F,null,se(e.redactParts(d),(u,y)=>(a(),l(F,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,p(u.n),1)],8,WB)):(a(),l(F,{key:1},[v(p(u.t),1)],64))],64))),128))],8,GB))),256))]),n("span",KB,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[88]||(t[88]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,YB)):f("v-if",!0),n("span",XB,p(e.fileKind()),1),e.imageSize?(a(),l("span",QB,p(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l("span",JB,p(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0)]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[36]||(t[36]=d=>e.copyPath())},[(a(),l("svg",xB,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,ez)]))],8,ZB),[[Z,e.filePath]])]),n("span",tz,[e.type=="IPython"&&e.redactionCount()?(a(),l(F,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[89]||(t[89]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,nz),t[90]||(t[90]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),v(p(e.fileKind()),1),e.imageSize?(a(),l(F,{key:1},[t[91]||(t[91]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.imageSize),1)],64)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l(F,{key:2},[t[92]||(t[92]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)]),e.preview&&e.previewPreserved()?(a(),l("button",{key:0,type:"button",class:"rp-preserved-tag",onClick:t[37]||(t[37]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",oz,[e.type=="error"&&e.content==="file_too_big"?(a(),l("span",sz,[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),v("Over the size limit",-1)])])):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("div",iz,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="IPython"?"Open the notebook JSON":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,rz),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[94]||(t[94]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,az)])):f("v-if",!0),n("div",lz,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[38]||(t[38]=le(d=>e.moreOpen=!e.moreOpen,["stop"]))},[(a(),l("svg",uz,[...t[95]||(t[95]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,dz),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[40]||(t[40]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",cz,[t[96]||(t[96]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),v("Snapshot \xB7 "+p(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",pz)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:2,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[t[97]||(t[97]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1)),v(p(e.type=="IPython"?"View notebook JSON":"View raw"),1)],8,fz)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:3,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[98]||(t[98]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),v("Download file",-1)])],8,hz)):f("v-if",!0),e.options?.download?(a(),l("a",{key:4,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[99]||(t[99]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),v("Download ZIP",-1)])],8,mz)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[39]||(t[39]=d=>e.copyPath())},[...t[100]||(t[100]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),v("Copy file path",-1)])]),t[101]||(t[101]=n("div",{class:"tb-menu-sep"},null,-1)),t[102]||(t[102]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),v("FAQ")],-1)),t[103]||(t[103]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug")],-1))])):f("v-if",!0)])])]),e.type=="image"?(a(),l("div",gz,[n("img",{class:"image-content",src:e.safeUrl(e.url),alt:e.paths[e.paths.length-1],onLoad:t[41]||(t[41]=d=>e.onImageLoad(d))},null,40,vz)])):f("v-if",!0),e.type=="media"?(a(),l("div",yz,[n("video",{class:"video-content",controls:"",preload:"metadata",playsinline:"",src:e.safeUrl(e.url)},null,8,bz)])):f("v-if",!0),e.type=="audio"?(a(),l("div",wz,[n("audio",{controls:"",preload:"metadata",src:e.safeUrl(e.url)},null,8,kz)])):f("v-if",!0),e.type=="pdf"?(a(),Gt(i,{key:3,src:e.safeUrl(e.url)},null,8,["src"])):f("v-if",!0),e.type=="IPython"?(a(),l("div",Cz,[Oe(s,{class:"markdown-body",file:e.url,content:e.content},null,8,["file","content"])])):f("v-if",!0),e.type=="binary"?(a(),l("div",Ez,[t[105]||(t[105]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1)),t[106]||(t[106]=n("h2",{class:"file-state-title"},"No preview for this file",-1)),n("p",Sz,p(e.preview?"Reviewers can open this file; it is not previewed here.":"This is a binary file. Download it to open it on your computer."),1),e.preview?f("v-if",!0):(a(),l("div",Nz,[n("a",{target:e.preview?"_blank":"_self",class:"btn btn-primary",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[104]||(t[104]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),v("Download file",-1)])],8,Rz)]))])):f("v-if",!0),e.type=="error"?(a(),l("div",Dz,[t[108]||(t[108]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("h2",Pz,p(e.content==="file_too_big"?"This file is too large to preview":"This file can't be shown"),1),e.content==="file_too_big"?(a(),l("p",Az,p(e.preview?"Reviewers can open this file; it is not previewed here. Files over 1 MB are only shown on the reviewer page.":"It is over the size limit for anonymized files, so it can't be previewed or downloaded from this link."),1)):(a(),l("p",Tz,p(e.fmt.translate("ERRORS."+e.content)),1)),e.preview?f("v-if",!0):(a(),l("div",Oz,[n("a",{class:"btn btn-primary",href:e.safeUrl("/r/"+e.repoId+"/")},"Back to the repository",8,Iz),t[107]||(t[107]=n("a",{class:"btn btn-outline-ink",href:"/faq#formats"},"Supported files",-1))]))])):f("v-if",!0),e.content==null&&e.type!="error"?(a(),l("div",Mz,[...t[109]||(t[109]=[n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("h2",{class:"file-state-title"},"This file is empty",-1),n("p",{class:"file-state-msg"},"It has no content in this snapshot.",-1)])])):f("v-if",!0)],2)):f("v-if",!0),e.type=="rate_limited"?(a(),l("div",_z,[n("div",Vz,[t[112]||(t[112]=Se('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",qz,[t[110]||(t[110]=v("This repository will be available in ",-1)),n("strong",null,p(e.rateLimitCountdown),1),t[111]||(t[111]=v(". The page will reload automatically.",-1))])])])):f("v-if",!0),e.type=="error"&&!e.fileFrame()?(a(),l("div",$z,[n("section",Lz,[n("h1",Fz,p(e.fmt.translate(e.isSourceAccessError()?"VIEWER_ERRORS.access_title":"VIEWER_ERRORS.title")),1),n("p",null,p(e.fmt.translate("ERRORS."+e.content)),1),e.isSourceAccessError()?(a(),l(F,{key:0},[n("p",null,p(e.fmt.translate("VIEWER_ERRORS.reader_help")),1),n("p",null,p(e.fmt.translate("VIEWER_ERRORS.owner_help")),1)],64)):f("v-if",!0),n("div",Uz,[e.isSourceAccessError()?f("v-if",!0):(a(),l("a",Bz,"Back to home")),e.isSourceAccessError()?f("v-if",!0):(a(),l("a",zz,"Read the FAQ")),n("button",{type:"button",class:"btn btn-primary",onClick:t[42]||(t[42]=d=>e.retryContent())},p(e.fmt.translate("VIEWER_ERRORS.retry")),1),e.isSourceAccessError()?(a(),l("a",Hz,p(e.fmt.translate("VIEWER_ERRORS.dashboard")),1)):f("v-if",!0)])])])):f("v-if",!0),e.type=="loading"&&!e.error?(a(),l("section",jz,[n("div",Gz,[n("strong",null,p(e.fmt.translate(e.fileReceivedBytes?"VIEWER_LOADING.receiving":"VIEWER_LOADING.loading")),1),n("span",Wz,p(e.filePath),1),e.fileLoadingSlow?(a(),l("p",Kz,p(e.fmt.translate("VIEWER_LOADING.slow")),1)):f("v-if",!0)]),n("div",Yz,[(a(),l(F,null,se(10,d=>n("span",{key:d})),64))])])):f("v-if",!0),e.type=="empty"?(a(),l("div",Xz,[...t[113]||(t[113]=[n("h1",{class:"paper-empty-title m-auto"},[v("Empty "),n("em",null,"repository"),v(".")],-1)])])):f("v-if",!0),e.content==null&&!["empty","loading","error","rate_limited"].includes(e.type)&&!e.fileFrame()?(a(),l("div",Qz,[...t[114]||(t[114]=[n("h1",{class:"paper-empty-title m-auto"},[v("Empty "),n("em",null,"file"),v(".")],-1)])])):f("v-if",!0)],64)}var Jz={class:"container page dashboard-page paper-page"},Zz={class:"row"},xz={class:"w-100"},eH={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},tH={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},nH={class:"flex-grow-1"},oH={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},sH={class:"d-flex flex-wrap",style:{gap:"6px"}},iH={class:"dropdown"},rH={class:"dropdown-menu","aria-labelledby":"dropdownSort"},aH={class:"form-check dropdown-item"},lH={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},dH={class:"form-check dropdown-item"},uH={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},cH={class:"form-check dropdown-item"},pH={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},fH={class:"form-check dropdown-item"},hH={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},mH={class:"form-check dropdown-item"},gH={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},vH={class:"dropdown"},yH={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},bH={class:"form-check dropdown-item"},wH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},kH={class:"form-check dropdown-item"},CH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},EH={class:"form-check dropdown-item"},SH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},NH={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},RH={class:"filter-chip"},DH=["onClick"],PH={class:"repo-list w-100"},AH={class:"repo-list-item-content"},TH={class:"repo-list-item-main"},OH={class:"repo-list-item-header"},IH=["textContent","href"],MH=["textContent"],_H=["textContent"],VH={class:"repo-source"},qH=["href"],$H={class:"repo-date"},LH={class:"repo-meta"},FH={key:0,title:"Conference"},UH=["title"],BH=["title"],zH=["title"],HH={key:1},jH={class:"repo-list-item-actions"},GH={class:"dropdown"},WH={class:"dropdown-menu dropdown-menu-right"},KH=["href"],YH=["onClick"],XH=["onClick"],QH=["onClick"],JH=["href"],ZH={key:0,class:"repo-list-empty"};function gp(e,t){let o=Pe("field"),i=Pe("form");return a(),l("div",Jz,[n("div",Zz,[n("div",xz,[t[12]||(t[12]=Se('
My work \xA0/\xA0 Pull requests

Anonymized pull requests

Track PR mirrors you\u2019ve created and their reviewer traffic.

',2)),f(" Search + filters row "),T((a(),l("form",eH,[n("div",tH,[n("div",nH,[T(n("input",oH,null,512),[[o,{state:e.viewState,set:s=>{e.search=s},value:e.search,form:null,options:{}}]])]),n("div",sH,[n("div",iH,[t[6]||(t[6]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),n("div",rH,[t[5]||(t[5]=n("h6",{class:"dropdown-header"},"Select order",-1)),n("div",aH,[T(n("input",lH,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=n("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),n("div",dH,[T(n("input",uH,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=n("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),n("div",cH,[T(n("input",pH,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),n("div",fH,[T(n("input",hH,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=n("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),n("div",mH,[T(n("input",gH,null,512),[[o,{state:e.viewState,set:s=>{e.orderBy=s},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=n("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),n("div",vH,[t[11]||(t[11]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),n("div",yH,[t[10]||(t[10]=n("h6",{class:"dropdown-header"},"Select status",-1)),n("div",bH,[T(n("input",wH,null,512),[[o,{state:e.viewState,set:s=>{e.filters.status.ready=s},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=n("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),n("div",kH,[T(n("input",CH,null,512),[[o,{state:e.viewState,set:s=>{e.filters.status.expired=s},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=n("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),n("div",EH,[T(n("input",SH,null,512),[[o,{state:e.viewState,set:s=>{e.filters.status.removed=s},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=n("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[i,e.viewState]]),f(" Active filter chips "),T(n("div",NH,[(a(!0),l(F,null,se(e.filters?.status,(s,r,d)=>T((a(),l("span",RH,[v(p(e.fmt?.title(r))+" ",1),n("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:c=>{e.filters.status[r]=!0}}," \xD7 ",8,DH)],512)),[[Z,!s]])),256))],512),[[Z,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),f(" Pull request list "),n("ul",PH,[(a(!0),l(F,null,se(e.filteredPullRequests,(s,r)=>(a(),l("li",{class:P(["repo-list-item",{"repo-inactive":s?.status=="expired"||s?.status=="removed"||s?.status=="error"}])},[n("div",AH,[n("div",TH,[n("div",OH,[n("a",{class:"repo-name",textContent:p(s?.pullRequestId),href:e.safeUrl("/pr/"+s?.pullRequestId)},null,8,IH),n("span",{class:P(["status-badge",{"status-removed":s?.status=="removed"||s?.status=="expired"||s?.status=="removing"||s?.status=="expiring","status-preparing":s?.status=="preparing"||s?.status=="download","status-ready":s?.status=="ready","status-error":s?.status=="error"}])},[n("span",{textContent:p(e.fmt?.title(s?.status))},null,8,MH),s?.status=="error"?(a(),l("span",{key:0,textContent:p(": "+s?.statusMessage)},null,8,_H)):f("v-if",!0)],2)]),n("div",VH,[n("span",null,[t[13]||(t[13]=n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),n("a",{href:e.safeUrl("https://github.com/"+s?.source?.repositoryFullName+"/pull/"+s?.source?.pullRequestId)},p(s?.source?.repositoryFullName)+"#"+p(s?.source?.pullRequestId),9,qH)]),n("span",{class:P(["status-badge",{"status-ready":s?.merged,"status-removed":s?.state=="open","status-error":s?.state=="closed"&&!s?.merged}]),style:{"font-size":"10px"}},p(e.fmt?.title(s?.merged?"merged":s?.state)),3),n("span",$H,"anonymized "+p(e.fmt?.humanTime(s?.anonymizeDate)),1)])]),n("div",LH,[s?.conference?(a(),l("span",FH,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),v(" "+p(s?.conference),1)])):f("v-if",!0),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+s?.options?.terms?.join(", ")},[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),v(" "+p(e.fmt?.number(s?.options?.terms?.length)),1)],8,UH),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(s?.pageView)},[t[16]||(t[16]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),v(" "+p(e.fmt?.number(s?.pageView)),1)],8,BH),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(s?.lastView)},[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-calendar"})],-1)),v(" "+p(e.fmt?.humanTime(s?.lastView)),1)],8,zH),s?.options?.expirationMode!="never"&&s?.status=="ready"?(a(),l("span",HH,[t[18]||(t[18]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),v(" Expire: "+p(e.fmt?.humanTime(s?.options?.expirationDate)),1)])):f("v-if",!0)])]),n("div",jH,[n("div",GH,[t[24]||(t[24]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),n("div",WH,[n("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+s?.pullRequestId)},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit ",-1)])],8,KH),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.updatePullRequest(s),["prevent"])},[...t[20]||(t[20]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),v(" Force update ",-1)])],8,YH),[[Z,s?.status=="ready"||s?.status=="error"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.updatePullRequest(s),["prevent"])},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),v(" Enable ",-1)])],8,XH),[[Z,s?.status=="removed"]]),T(n("a",{class:"dropdown-item",href:"#",onClick:le(d=>e.removePullRequest(s),["prevent"])},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),v(" Remove ",-1)])],8,QH),[[Z,s?.status=="ready"]]),n("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+s?.pullRequestId+"/")},[...t[23]||(t[23]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" View PR ",-1)])],8,JH)])])])],2))),256)),e.filteredPullRequests?.length==0?(a(),l("li",ZH,[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No pull requests to display.",-1)])])):f("v-if",!0)])])])}var xH={class:"container paper-page user-settings"},ej={class:"settings-nav","aria-label":"Settings"},tj=["aria-current","onClick"],nj={class:"settings-row"},oj=["rows"],sj={class:"settings-syntax"},ij={class:"invalid-feedback"},rj={class:"settings-row"},aj={class:"settings-checks"},lj={class:"settings-check"},dj={class:"form-check-input",type:"checkbox",id:"link",name:"link"},uj={class:"settings-check"},cj={class:"form-check-input",type:"checkbox",id:"image",name:"image"},pj={class:"settings-check"},fj={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},hj={class:"settings-check"},mj={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},gj={class:"settings-check"},vj={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},yj={class:"settings-check"},bj={class:"form-check-input",type:"checkbox",id:"page",name:"page"},wj={class:"settings-row"},kj={class:"settings-check"},Cj={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Ej={class:"settings-row"},Sj={class:"form-control",id:"expiration",name:"expiration"},Nj={class:"settings-help"},Rj={class:"settings-save"},Dj={class:"settings-save-status draft-status",role:"status"},Pj={key:0},Aj={key:1},Tj={key:2},Oj=["disabled"],Ij={key:1,class:"settings-save-error",role:"alert"},Mj=["aria-busy"],_j={key:0,role:"status"},Vj={key:1,class:"settings-notice",role:"alert"},qj=["disabled"],$j={key:2,class:"settings-notice",role:"status"},Lj={key:3,class:"settings-notice",role:"status"},Fj=["disabled"],Uj={class:"billing-summary"},Bj={class:"billing-summary-head"},zj={class:"billing-plan-name"},Hj={key:0,class:"billing-plan-meta"},jj={key:1,class:"billing-plan-meta"},Gj={key:0,class:"billing-summary-actions"},Wj=["disabled"],Kj={id:"settings-quota"},Yj={key:1,role:"status"},Xj={key:0,class:"settings-notice"},Qj={key:1,class:"settings-notice"},Jj={key:2,class:"settings-notice"},Zj={key:4,class:"billing-section","aria-labelledby":"settings-plan-comparison"},xj={key:0,class:"billing-offers"},eG={key:0,class:"billing-offer is-recommended"},tG={class:"billing-offer-price"},nG={class:"billing-offer-list"},oG=["disabled"],sG={key:1,class:"billing-offer"},iG={class:"billing-offer-head"},rG={class:"billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},aG=["aria-checked","onClick"],lG={key:0,class:"billing-toggle-save"},dG={class:"billing-offer-price"},uG={class:"billing-offer-list"},cG=["disabled"],pG={key:1,class:"billing-addons"},fG={class:"billing-addon-rows"},hG={class:"billing-addon-price"},mG=["onClick","disabled"],gG={key:2,class:"billing-buy",id:"settings-addons-title",tabindex:"-1"},vG={class:"billing-buy-info"},yG={class:"billing-offer-price"},bG={class:"billing-offer-list"},wG={class:"billing-buy-form"},kG=["value"],CG=["disabled"],EG={key:1,class:"billing-buy-desc"},SG={key:2,class:"billing-footnote"},NG={class:"billing-compare"},RG={class:"billing-compare-card"},DG={class:"settings-comparison"},PG={key:0,scope:"col",class:"is-recommended"},AG={key:1,scope:"col"},TG={key:0,class:"is-recommended"},OG={key:1},IG={key:0,class:"is-recommended"},MG={key:1},_G={key:0,class:"is-recommended"},VG={key:1},qG={key:0,class:"is-recommended"},$G={key:1},LG={key:0,class:"is-recommended"},FG={key:1},UG={key:0,class:"is-recommended"},BG={key:1},zG={key:3,class:"billing-footnote"},HG={key:5,class:"billing-section"},jG={class:"billing-section-head"},GG=["disabled"],WG={key:0,class:"billing-empty"},KG={key:1,class:"billing-history-head","aria-hidden":"true"},YG={key:2,class:"billing-history"},XG={class:"billing-history-main"},QG=["href"],JG=["href"],ZG={class:"billing-history-term"},xG={class:"billing-history-paid"},eW={class:"billing-history-status"},tW={class:"billing-manage"},nW={key:0},oW={key:1},sW=["disabled"],iW={class:"billing-conference"},rW={id:"settings-account",class:"settings-account-panel"},aW={class:"paper-account-card"},lW=["src"],dW={class:"paper-account-identity"},uW={class:"paper-account-name"},cW=["disabled"],pW={key:0,role:"status"},fW={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},hW=["disabled"],mW={key:3,role:"status"},gW={class:"paper-danger-zone"},vW={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},yW=["textContent"],bW=["disabled"],wW={key:1,class:"settings-delete-confirm"},kW={for:"delete-username"},CW={class:"settings-actions"},EW=["disabled"],SW=["disabled"];function vp(e,t){let o=Xe("quota-usage"),i=Pe("field"),s=Pe("form");return a(),l("div",xH,[t[107]||(t[107]=n("header",{class:"settings-title page-head page-head-main"},[n("h1",null,"Settings"),n("p",{class:"paper-page-lede"},"Defaults for new anonymizations, hosting and your account.")],-1)),n("nav",ej,[(a(),l(F,null,se([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:d=>e.settingsTab=r.id},p(r.label),9,tj)),64))]),T(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),T((a(),l("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onInput:t[1]||(t[1]=r=>e.unsavedChanges=!0),onSubmit:t[2]||(t[2]=le(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",nj,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[T(n("textarea",{class:"form-control",id:"terms",name:"terms",rows:Math.min(14,Math.max(3,String(e.terms||"").split(` +10 log("epoch %d: %.3f", epoch, loss)
`,2)])])):(a(),l("div",BU,[...t[21]||(t[21]=[Ee('
ProjectStatusViewsExpires
DeepLearnUtilspaper-7f2a \xB7 ICSE 2027Ready41Mar 31, 2027
vision-bench#212pull request \xB7 FSE 2027Ready12Never
graph-repairgr-91abUpdating5Jan 5, 2027
JarSiftOOPSLA 2025Expired72Sep 28, 2026
',5)])]))],10,LU)])],8,VU)),[[Q,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ee('
Before you sign in

The questions that come up most.

Read the full FAQ \u2192
What access does GitHub sign-in require?

The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories.

Which file formats are supported?

Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged.

What happens when an anonymized repository expires?

You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over.

Ready for review?

Create an anonymous mirror in a couple of minutes. Reviewers just open the link.

',2)),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var zU={class:"paper-empty"},HU={class:"paper-empty-inner"},jU={key:0,class:"paper-eyebrow"},GU={key:1,class:"paper-eyebrow"},WU={key:2,class:"paper-empty-title"},KU=["textContent"];function gp(e,t){return a(),l("div",zU,[n("div",HU,[e.error?f("v-if",!0):(a(),l("div",jU,"Working")),e.error?(a(),l("div",GU,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",WU,[...t[0]||(t[0]=[g(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,KU)):f("v-if",!0)])])}var YU={class:"container paper-page paper-settings"},XU={class:"paper-crumbs"},JU={class:"here"},QU={class:"paper-page-title"},ZU={class:"paper-settings-body"},xU={class:"paper-settings-toc"},e7={href:"#conf-billing"},t7={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},n7={id:"conf-basics",class:"paper-settings-section"},s7={class:"form-group"},o7={class:"invalid-feedback"},i7={class:"invalid-feedback"},r7={class:"form-group"},a7={class:"invalid-feedback"},l7={class:"form-group"},d7={class:"invalid-feedback"},u7={class:"invalid-feedback"},c7={id:"conf-window",class:"paper-settings-section"},p7={class:"form-grid-2"},f7={class:"form-group"},h7={class:"invalid-feedback"},m7={class:"invalid-feedback"},g7={class:"form-group"},v7={class:"invalid-feedback"},y7={class:"invalid-feedback"},b7={id:"conf-rendering",class:"paper-settings-section"},w7={class:"form-check"},k7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},C7={class:"form-check"},E7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},S7={class:"form-check"},N7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},R7={class:"form-check"},P7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},A7={id:"conf-features",class:"paper-settings-section"},D7={class:"form-check"},T7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},O7={class:"form-check"},I7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},M7={id:"conf-plan",class:"paper-settings-section"},V7={key:0,class:"paper-section-copy"},q7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},_7=["value","checked","onChange"],$7={class:"conference-tier-head"},L7={key:0,class:"conference-tier-pill"},F7={class:"conference-tier-who"},U7={key:0,class:"conference-tier-price"},B7={class:"conference-tier-size"},z7={key:1,class:"conference-tier-per"},H7={key:2,class:"paper-plan-grid"},j7=["value"],G7=["textContent"],W7={class:"paper-plan-price"},K7=["innerHTML"],Y7={key:3,class:"settings-notice",role:"status"},X7={key:0,id:"conf-billing",class:"paper-settings-section"},J7={class:"form-group"},Q7={class:"form-group"},Z7={class:"form-group"},x7={class:"form-group"},e9={class:"form-grid-3"},t9={class:"form-group"},n9={class:"form-group"},s9={class:"form-group"},o9={class:"form-group"},i9={class:"paper-settings-footer"},r9=["textContent"],a9=["textContent"],l9=["disabled"];function vp(e,t){let s=Ae("paper-scrollspy"),i=Ae("field"),o=Ae("form");return a(),l("div",YU,[n("div",XU,[t[1]||(t[1]=n("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=g(" \xA0/\xA0 ",-1)),t[3]||(t[3]=n("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=g(" \xA0/\xA0 ",-1)),n("span",JU,c(e.editionMode?"Edit":"New"),1)]),n("h1",QU,[g(c(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=n("em",null,"conference",-1))]),t[44]||(t[44]=n("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue. One payment hosts every submission, so authors don't pay during the review window. ",-1)),n("div",ZU,[D((a(),l("aside",xU,[t[7]||(t[7]=n("div",{class:"paper-settings-toc-head"},"On this page",-1)),n("nav",null,[t[6]||(t[6]=Ee('BasicsReview windowRendering defaultsFeaturesPlan',5)),D(n("a",e7,"Billing",512),[[Q,e.plan?.pricePerRepo>0]])])])),[[s]]),D((a(),l("form",t7,[n("section",n7,[t[12]||(t[12]=n("div",{class:"paper-section-eyebrow"},"Basics",-1)),n("div",s7,[t[8]||(t[8]=n("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[i,{state:e.viewState,set:r=>{e.options.name=r},value:e.options?.name,form:"conference",options:{}}]]),D(n("div",o7," The name of the conference is invalid. ",512),[[Q,e.conference?.name?.errors?.invalid]]),D(n("div",i7," The name of the conference is required. ",512),[[Q,e.conference?.name?.errors?.required]])]),n("div",r7,[t[9]||(t[9]=n("label",{class:"paper-field-label",for:"url"},"Website",-1)),D(n("input",{type:"url",class:P(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.url=r},value:e.options?.url,form:"conference",options:{}}]]),D(n("div",a7," The url of the conference is invalid. ",512),[[Q,e.conference?.url?.errors?.url]])]),n("div",l7,[t[10]||(t[10]=n("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[i,{state:e.viewState,set:r=>{e.options.conferenceID=r},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=n("small",{class:"form-text text-muted"},[g("3\u201310 characters, letters, numbers, "),n("code",null,"-"),g(" and "),n("code",null,"_"),g(". Authors reference this when they anonymize.")],-1)),D(n("div",{class:"invalid-feedback"}," The conference ID '"+c(e.options?.conferenceID)+"' is already used. ",513),[[Q,e.conference?.conferenceID?.errors?.used]]),D(n("div",d7," The conference ID is required. ",512),[[Q,e.conference?.conferenceID?.errors?.required]]),D(n("div",u7," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[Q,e.conference?.conferenceID?.errors?.pattern]])])]),n("section",c7,[t[17]||(t[17]=n("div",{class:"paper-section-eyebrow"},"Review window",-1)),n("div",p7,[n("div",f7,[t[13]||(t[13]=n("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),D(n("input",{type:"date",class:P(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[i,{state:e.viewState,set:r=>{e.options.startDate=r},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=n("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),D(n("div",h7," Start date is required. ",512),[[Q,e.conference?.startDate?.errors?.required]]),D(n("div",m7," Start date must be before end date. ",512),[[Q,e.conference?.startDate?.errors?.invalid]])]),n("div",g7,[t[15]||(t[15]=n("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),D(n("input",{type:"date",class:P(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[i,{state:e.viewState,set:r=>{e.options.endDate=r},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=n("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),D(n("div",v7," End date is required. ",512),[[Q,e.conference?.endDate?.errors?.required]]),D(n("div",y7," End date is invalid. ",512),[[Q,e.conference?.endDate?.errors?.invalid]])])])]),n("section",b7,[t[26]||(t[26]=n("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),n("div",w7,[D(n("input",k7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.link=r},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=n("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),n("div",C7,[D(n("input",E7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.image=r},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=n("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=n("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),n("div",S7,[D(n("input",N7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.pdf=r},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=n("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),n("div",R7,[D(n("input",P7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.notebook=r},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1)),t[25]||(t[25]=n("small",{class:"form-text text-muted"},"Render Jupyter notebooks instead of raw JSON.",-1))])]),n("section",A7,[t[31]||(t[31]=n("div",{class:"paper-section-eyebrow"},"Features",-1)),n("div",D7,[D(n("input",T7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.update=r},value:e.options?.options?.update,form:"conference",options:{}}]]),t[27]||(t[27]=n("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[28]||(t[28]=n("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),n("div",O7,[D(n("input",I7,null,512),[[i,{state:e.viewState,set:r=>{e.options.options.page=r},value:e.options?.options?.page,form:"conference",options:{}}]]),t[29]||(t[29]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[30]||(t[30]=n("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),n("section",M7,[t[35]||(t[35]=n("div",{class:"paper-section-eyebrow"},"Plan",-1)),e.editionMode?(a(),l("p",V7,c(e.conferencePlanName(e.options?.plan?.planID))+". The plan and review dates can't change after creation.",1)):e.conferenceTiers().length?(a(),l(q,{key:1},[t[33]||(t[33]=n("p",{class:"paper-section-copy"},"Pick the package that fits the number of submissions you expect. One payment hosts every submission, so authors don't pay.",-1)),n("div",q7,[(a(!0),l(q,null,x(e.conferenceTiers(),r=>(a(),l("label",{class:P(["conference-tier",{"is-selected":e.options?.plan?.planID===r.id}]),key:r.id},[n("input",{type:"radio",name:"planPicker",value:r.id,checked:e.options?.plan?.planID===r.id,onChange:d=>e.options.plan.planID=r.id},null,40,_7),n("span",$7,[n("strong",null,c(r.name),1),r.id==="conference"&&e.conferenceTiers().length>1?(a(),l("span",L7,"Most common")):f("v-if",!0)]),n("span",F7,c(e.conferenceAudience(r.id)),1),r.amount!=null?(a(),l("span",U7,[n("strong",null,c(e.conferenceAmount(r)),1),t[32]||(t[32]=g(" once",-1))])):f("v-if",!0),n("span",B7,"Up to "+c(r.repositories)+" papers \xB7 "+c(e.conferenceBytes(r.storage)),1),r.amount!=null&&r.repositories?(a(),l("span",z7,"About "+c(e.conferenceAmount(r,r.amount/r.repositories))+" per paper",1)):f("v-if",!0)],2))),128))]),t[34]||(t[34]=Ee('

Every package includes

  • A review window of up to 180 days
  • Automatic updates for every submission
  • Links stay online until the review window ends
  • A dashboard of every submission for chairs

Nothing renews \xB7 Tax shown at checkout \xB7 Expecting more submissions? Email tdurieux@anonymous.4open.science

Create the conference, then pay from its page. Authors can submit once the payment is confirmed.

',2))],64)):e.plans.length?(a(),l("div",H7,[(a(!0),l(q,null,x(e.plans,r=>(a(),l("label",{class:P(["paper-plan-card",{selected:e.options?.plan?.planID==r?.id}]),key:r.id},[D(n("input",{type:"radio",name:"planPicker",value:r?.id},null,8,j7),[[i,{state:e.viewState,set:d=>{e.options.plan.planID=d},value:e.options?.plan?.planID,form:"conference",options:{}}]]),n("div",{class:"paper-plan-head",textContent:c(r?.name)},null,8,G7),n("div",W7,c(r.pricePerRepo>0?e.fmt?.number(r.pricePerRepo,2)+" \u20AC per repository":"Free"),1),n("div",{class:"paper-plan-desc",innerHTML:e.sanitize(r?.description)},null,8,K7)],2))),128))])):e.plansLoaded?(a(),l("p",Y7,"New conferences are unavailable right now. Please try again later.")):f("v-if",!0)]),e.plan?.pricePerRepo>0?(a(),l("section",X7,[t[43]||(t[43]=n("div",{class:"paper-section-eyebrow"},"Billing",-1)),n("div",J7,[t[36]||(t[36]=n("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.name=r},value:e.options?.billing?.name,form:"conference",options:{}}]])]),n("div",Q7,[t[37]||(t[37]=n("label",{class:"paper-field-label",for:"email"},"Email",-1)),D(n("input",{type:"email",class:P(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.email=r},value:e.options?.billing?.email,form:"conference",options:{}}]])]),n("div",Z7,[t[38]||(t[38]=n("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address=r},value:e.options?.billing?.address,form:"conference",options:{}}]])]),n("div",x7,[D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.address2=r},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),n("div",e9,[n("div",t9,[t[39]||(t[39]=n("label",{class:"paper-field-label",for:"city"},"City",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.city=r},value:e.options?.billing?.city,form:"conference",options:{}}]])]),n("div",n9,[t[40]||(t[40]=n("label",{class:"paper-field-label",for:"country"},"Country",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.country=r},value:e.options?.billing?.country,form:"conference",options:{}}]])]),n("div",s9,[t[41]||(t[41]=n("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.zip=r},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),n("div",o9,[t[42]||(t[42]=n("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),D(n("input",{type:"text",class:P(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[i,{state:e.viewState,set:r=>{e.options.billing.vat=r},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):f("v-if",!0),n("div",i9,[e.error?(a(),l("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,r9)):f("v-if",!0),e.message?(a(),l("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,a9)):f("v-if",!0),n("button",{id:"send",disabled:e.saving,type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=ae(r=>e.submitForm(r,()=>{e.submit(r)}),["prevent"]))},c(e.saving?e.editionMode?"Updating\u2026":"Creating\u2026":e.editionMode?"Update conference":"Create conference"),9,l9)])])),[[o,e.viewState]])])])}var d9={key:0,class:"dir-card","aria-label":"Repository files"},u9=["onClick"],c9={class:"dir-name"},p9=["href"],f9={class:"dir-name"},h9={class:"dir-meta"},m9={class:"file-card-head"},g9={class:"file-card-path"},v9={class:"breadcrumb paths","aria-label":"Path"},y9={class:"breadcrumb-item breadcrumb-root"},b9=["href","title","textContent"],w9=["aria-current"],k9=["aria-label"],C9={class:"mobile-sub ms"},E9=["title"],S9={class:"ms-item"},N9={key:1,class:"ms-item"},R9={key:2,class:"ms-item"},P9=["aria-label","title"],A9={class:"ui-icon","aria-hidden":"true"},D9=["href"],T9={key:0,class:"file-card-meta"},O9=["title"],I9={class:"meta-extra"},M9={key:1,class:"file-card-meta"},V9=["title"],q9={class:"file-card-actions"},_9={key:0,class:"csv-toggle seg-filter",role:"radiogroup","aria-label":"CSV view"},$9=["aria-checked"],L9=["aria-checked"],F9={key:1,class:"symbols"},U9=["aria-expanded"],B9={key:0,class:"symbols-menu",role:"menu"},z9={class:"symbols-head"},H9=["onClick"],j9={class:"symbols-name"},G9={class:"symbols-line"},W9=["title"],K9={key:3,class:"tb-view",role:"group","aria-label":"View tools"},Y9=["title"],X9=["aria-pressed"],J9=["title"],Q9={key:4,class:"tb-file",role:"group","aria-label":"File actions"},Z9=["target","title","href"],x9=["aria-label","title"],eB={class:"ui-icon","aria-hidden":"true"},tB=["href"],nB=["target","href","download"],sB=["aria-label"],oB={class:"ui-icon","aria-hidden":"true"},iB=["href"],rB={key:6,class:"tb-toc-m"},aB=["aria-expanded"],lB=["onClick"],dB={class:"tb-more"},uB=["aria-expanded"],cB={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},pB={key:0,class:"tb-menu-note"},fB={key:1,class:"tb-menu-note tb-menu-meta"},hB={key:2,class:"tb-menu-sep"},mB={key:4,class:"tb-menu-sep"},gB=["aria-checked"],vB={key:0,class:"tb-menu-check"},yB={class:"ui-icon","aria-hidden":"true"},bB=["href"],wB={key:9,class:"tb-menu-sep"},kB=["target","href"],CB=["target","href"],EB=["target","href","download"],SB=["target","href"],NB=["href"],RB=["target","href"],PB=["placeholder","aria-invalid"],AB=["aria-label"],DB={class:"csv-table"},TB=["aria-label"],OB={class:"csv-rownum"},IB=["aria-label"],MB={key:1,class:"file-card-body"},VB={key:2,class:"md-find-bar",role:"search"},qB=["value"],_B={class:"md-find-nav"},$B=["disabled"],LB=["disabled"],FB={class:"md-find-count","aria-live":"polite"},UB=["aria-pressed"],BB={key:3,class:"reading-layout"},zB=["innerHTML"],HB={key:0,class:"readme-toc","aria-label":"On this page"},jB={class:"toc-rail"},GB=["href","onClick"],WB={class:"file-card-head"},KB={class:"file-card-path"},YB={class:"breadcrumb paths","aria-label":"Path"},XB={class:"breadcrumb-item breadcrumb-root"},JB=["href","title","textContent"],QB=["aria-current"],ZB=["aria-label"],xB={class:"mobile-sub ms"},ez=["title"],tz={class:"ms-item"},nz={key:1,class:"ms-item"},sz={key:2,class:"ms-item"},oz=["aria-label","title"],iz={class:"ui-icon","aria-hidden":"true"},rz=["href"],az={class:"file-card-meta"},lz=["title"],dz={class:"file-card-actions"},uz={key:0,class:"file-card-state",title:"Files over the size limit can't be previewed or downloaded from this link"},cz={key:1,class:"tb-file",role:"group","aria-label":"File actions"},pz=["target","title","href"],fz=["target","href","download"],hz={class:"tb-more"},mz=["aria-expanded"],gz={viewBox:"0 0 24 24",class:"ui-icon","aria-hidden":"true",style:{fill:"currentColor",stroke:"none"}},vz={key:0,class:"tb-menu-note"},yz={key:1,class:"tb-menu-sep"},bz=["target","href"],wz=["target","href","download"],kz=["target","href"],Cz={key:0,class:"media-stage"},Ez=["src","alt"],Sz={key:1,class:"media-stage"},Nz=["src"],Rz={key:2,class:"media-stage is-audio"},Pz=["src"],Az={key:4,class:"notebook-body"},Dz={key:5,class:"file-state"},Tz={class:"file-state-msg"},Oz={key:0,class:"file-state-actions"},Iz=["target","href","download"],Mz={key:6,class:"file-state",role:"alert"},Vz={class:"file-state-title"},qz={key:0,class:"file-state-msg"},_z={key:1,class:"file-state-msg"},$z={key:2,class:"file-state-actions"},Lz=["href"],Fz={key:7,class:"file-state"},Uz={key:4,class:"file-error container d-flex h-100"},Bz={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},zz={class:"paper-error-msg"},Hz={key:5,class:"file-error container d-flex h-100"},jz={class:"viewer-error paper-error-card file-error-card m-auto",role:"alert","aria-labelledby":"viewer-error-title"},Gz={id:"viewer-error-title",class:"paper-empty-title"},Wz={class:"paper-error-actions"},Kz={key:0,href:"/",class:"btn btn-sm"},Yz={key:1,href:"/faq",class:"btn btn-sm"},Xz={key:2,class:"btn btn-outline-ink",href:"/dashboard"},Jz={key:6,class:"viewer-loading","aria-busy":"true"},Qz={class:"viewer-loading-status",role:"status","aria-live":"polite"},Zz={class:"viewer-loading-name sr-only"},xz={key:0},eH={class:"viewer-loading-lines","aria-hidden":"true"},tH={key:7,class:"file-error container d-flex h-100"},nH={key:8,class:"file-error container d-flex h-100"};function yp(e,t){let s=Xe("html-doc"),i=Xe("pdfviewer"),o=Xe("notebook"),r=Ae("code-editor");return a(),l(q,null,[e.sidebarHidden&&e.type=="html"&&e.content!=null&&e.paths?.length===1&&/^readme/i.test(e.paths[0]||"")&&e.files?.length?(a(),l("section",d9,[t[46]||(t[46]=n("header",{class:"dir-card-head"},[n("span",{class:"dir-card-title"},"Files"),n("span",{class:"dir-card-sub"},"Snapshot of the repository at review time")],-1)),n("ul",{class:P(["dir-list",{"is-expanded":e.dirExpanded}])},[(a(!0),l(q,null,x(e.rootEntries(),d=>(a(),l("li",{key:d.name},[d.size==null?(a(),l("button",{key:0,type:"button",class:"dir-row",onClick:p=>e.revealFolder(d.name)},[t[43]||(t[43]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M1.5 3.5h4l1.5 1.5h7.5v8h-13z"})],-1)),n("span",c9,c(d.name),1),t[44]||(t[44]=n("span",{class:"dir-meta"},"Folder",-1))],8,u9)):(a(),l("a",{key:1,class:P(["dir-row",{"is-current":d.name===e.paths[0]}]),href:e.safeUrl("/r/"+e.repoId+"/"+encodeURIComponent(d.name))},[t[45]||(t[45]=n("svg",{class:"dir-icon",viewBox:"0 0 16 16","aria-hidden":"true"},[n("path",{d:"M3.5 1.5h6l3 3v10h-9z"})],-1)),n("span",f9,c(d.name),1),n("span",h9,c(e.formatSize(d.size)),1)],10,p9))]))),128))],2),!e.dirExpanded&&e.files.length>8?(a(),l("button",{key:0,type:"button",class:"dir-more",onClick:t[0]||(t[0]=d=>e.dirExpanded=!0)},"Show all "+c(e.files.length)+" items",1)):f("v-if",!0)])):f("v-if",!0),(e.type=="text"||e.type=="code"||e.type=="html"||e.type=="html-doc"&&e.showSource)&&e.content!=null?(a(),l("section",{key:1,class:P(["file-card",{"is-code":e.type!="html","no-wrap":!e.wrapLines}])},[n("header",m9,[n("div",g9,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[1]||(t[1]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[47]||(t[47]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",v9,[n("li",y9,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,b9)]),(a(!0),l(q,null,x(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,k9)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,w9))),256))]),n("span",C9,[e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[48]||(t[48]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,E9)):f("v-if",!0),n("span",S9,c(e.type=="html"?"Markdown":e.languageName||"Text"),1),e.fileSize(e.filePath)!=null?(a(),l("span",N9,c(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0),e.type!="html"&&typeof e.content=="string"?(a(),l("span",R9,c(e.fmt?.number(e.content.split(` +`).length))+" lines",1)):f("v-if",!0)]),D(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",A9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,D9)]))],8,P9),[[Q,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",T9,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,O9),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",I9,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.fmt?.number(e.content.split(` +`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",M9,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,V9),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=g("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(q,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",q9,[e.isCsv()?(a(),l("div",_9,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,$9),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,L9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",F9,[n("button",{type:"button",class:P(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,U9),e.symbolsOpen?(a(),l("div",B9,[n("div",z9,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(q,null,x(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:p=>e.goToSymbol(d.line)},[n("span",{class:P(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",j9,c(d.name),1),n("span",G9,c(d.line),1)],8,H9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:P(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,W9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",K9,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,Y9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,X9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,J9)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",Q9,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,Z9),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=d=>e.copyContent())},[(a(),l("svg",eB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,tB)]))],8,x9)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,nB)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",oB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,iB)]))],8,sB)):f("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(a(),l("div",rB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-toc-btn",{"is-on":e.tocOpen}]),"aria-label":"On this page",title:"On this page","aria-haspopup":"true","aria-expanded":e.tocOpen?"true":"false",onClick:t[13]||(t[13]=ae(d=>{e.tocOpen=!e.tocOpen,e.moreOpen=!1},["stop"]))},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-outline"})],-1)])],10,aB),e.tocOpen?(a(),l("div",{key:0,class:"tb-menu tb-toc-menu",role:"menu",onClick:t[15]||(t[15]=d=>e.tocOpen=!1)},[t[64]||(t[64]=n("div",{class:"tb-menu-label"},"On this page",-1)),n("button",{type:"button",role:"menuitem",class:P(["tb-menu-toc","lvl-2",{"is-active":!e.activeHeading}]),onClick:t[14]||(t[14]=d=>e.scrollToHeading(null))},"Introduction",2),(a(!0),l(q,null,x(e.readmeToc(),d=>(a(),l("button",{type:"button",role:"menuitem",key:"m-"+d.id,class:P(["tb-menu-toc","lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:p=>e.scrollToHeading(d.id)},c(d.text),11,lB))),128))])):f("v-if",!0)])):f("v-if",!0),n("div",dB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[16]||(t[16]=ae(d=>{e.tocOpen=!1,e.moreOpen=!e.moreOpen},["stop"]))},[(a(),l("svg",cB,[...t[65]||(t[65]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,uB),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[23]||(t[23]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",pB,[t[66]||(t[66]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g("Snapshot \xB7 "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),typeof e.content=="string"?(a(),l("div",fB,[g(c(e.type=="html"?"Markdown":e.languageName||"Text")+" \xB7 "+c(e.type=="html"&&e.fileSize(e.filePath)!=null?e.formatSize(e.fileSize(e.filePath)):e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1),e.type!="html"?(a(),l(q,{key:0},[g(" \xB7 "+c(e.fmt?.number(e.content.split(` +`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",hB)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",mB)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),g("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=g("Wrap lines",-1)),e.wrapLines?(a(),l("span",vB,"\u2713")):f("v-if",!0)],8,gB)):f("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=d=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",yB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,bB)])),g(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",wB)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,kB)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,CB)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,EB)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),g("Open website",-1)])],8,SB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g("Edit anonymization",-1)])],8,NB)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,RB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=ae(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),D(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(` +`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=kt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,PB),[[pt,e.gotoValue]]),n("span",{class:P(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",DB,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(q,null,x(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:P({"is-num":e.csvNumCol(p)})},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,TB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(q,null,x(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",OB,c(p+1),1),(a(!0),l(q,null,x(d,(u,y)=>(a(),l("td",{key:y,class:P({"is-num":e.csvNumCol(y)})},[(a(!0),l(q,null,x(e.redactParts(u),(m,b)=>(a(),l(q,{key:b},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,IB)):(a(),l(q,{key:1},[g(c(m.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,AB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?D((a(),l("div",MB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",VB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=kt(ae(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=kt(ae(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,qB),n("span",_B,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,$B),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,LB)]),n("span",FB,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:P(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,UB),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",BB,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,zB),e.readmeToc().length>=3?(a(),l("aside",HB,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",jB,[n("a",{href:"#",class:P(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=ae(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(q,null,x(e.readmeToc(),(d,p)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:P(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:ae(u=>e.scrollToHeading(d.id),["prevent"])},c(d.text),11,GB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Gt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:P(["file-card file-card-media","view-"+e.type])},[n("header",WB,[n("div",KB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",YB,[n("li",XB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,JB)]),(a(!0),l(q,null,x(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,ZB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,QB))),256))]),n("span",xB,[e.type=="IPython"&&e.redactionCount()?(a(),l("b",{key:0,class:"ms-item ms-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[88]||(t[88]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,ez)):f("v-if",!0),n("span",tz,c(e.fileKind()),1),e.imageSize?(a(),l("span",nz,c(e.imageSize),1)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l("span",sz,c(e.formatSize(e.fileSize(e.filePath))),1)):f("v-if",!0)]),D(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[36]||(t[36]=d=>e.copyPath())},[(a(),l("svg",iz,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,rz)]))],8,oz),[[Q,e.filePath]])]),n("span",az,[e.type=="IPython"&&e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[89]||(t[89]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,lz),t[90]||(t[90]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.fileKind()),1),e.imageSize?(a(),l(q,{key:1},[t[91]||(t[91]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.imageSize),1)],64)):f("v-if",!0),e.fileSize(e.filePath)!=null?(a(),l(q,{key:2},[t[92]||(t[92]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)]),e.preview&&e.previewPreserved()?(a(),l("button",{key:0,type:"button",class:"rp-preserved-tag",onClick:t[37]||(t[37]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",dz,[e.type=="error"&&e.content==="file_too_big"?(a(),l("span",uz,[...t[93]||(t[93]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),g("Over the size limit",-1)])])):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("div",cz,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="IPython"?"Open the notebook JSON":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,pz),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[94]||(t[94]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,fz)])):f("v-if",!0),n("div",hz,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost tb-more-btn",{"is-on":e.moreOpen}]),"aria-label":"More actions","aria-haspopup":"true","aria-expanded":e.moreOpen?"true":"false",onClick:t[38]||(t[38]=ae(d=>e.moreOpen=!e.moreOpen,["stop"]))},[(a(),l("svg",gz,[...t[95]||(t[95]=[n("circle",{cx:"5",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"12",cy:"12",r:"1.8"},null,-1),n("circle",{cx:"19",cy:"12",r:"1.8"},null,-1)])]))],10,mz),e.moreOpen?(a(),l("div",{key:0,class:"tb-menu",role:"menu",onClick:t[40]||(t[40]=d=>e.moreOpen=!1)},[e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",vz,[t[96]||(t[96]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g("Snapshot \xB7 "+c(e.fmt?.date(e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate)),1)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",yz)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:2,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[t[97]||(t[97]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1)),g(c(e.type=="IPython"?"View notebook JSON":"View raw"),1)],8,bz)):f("v-if",!0),e.type!="error"&&(!e.preview||e.url)?(a(),l("a",{key:3,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[98]||(t[98]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,wz)):f("v-if",!0),e.options?.download?(a(),l("a",{key:4,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[99]||(t[99]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,kz)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[39]||(t[39]=d=>e.copyPath())},[...t[100]||(t[100]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[101]||(t[101]=n("div",{class:"tb-menu-sep"},null,-1)),t[102]||(t[102]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[103]||(t[103]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])])]),e.type=="image"?(a(),l("div",Cz,[n("img",{class:"image-content",src:e.safeUrl(e.url),alt:e.paths[e.paths.length-1],onLoad:t[41]||(t[41]=d=>e.onImageLoad(d))},null,40,Ez)])):f("v-if",!0),e.type=="media"?(a(),l("div",Sz,[n("video",{class:"video-content",controls:"",preload:"metadata",playsinline:"",src:e.safeUrl(e.url)},null,8,Nz)])):f("v-if",!0),e.type=="audio"?(a(),l("div",Rz,[n("audio",{controls:"",preload:"metadata",src:e.safeUrl(e.url)},null,8,Pz)])):f("v-if",!0),e.type=="pdf"?(a(),Gt(i,{key:3,src:e.safeUrl(e.url)},null,8,["src"])):f("v-if",!0),e.type=="IPython"?(a(),l("div",Az,[Oe(o,{class:"markdown-body",file:e.url,content:e.content},null,8,["file","content"])])):f("v-if",!0),e.type=="binary"?(a(),l("div",Dz,[t[105]||(t[105]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1)),t[106]||(t[106]=n("h2",{class:"file-state-title"},"No preview for this file",-1)),n("p",Tz,c(e.preview?"Reviewers can open this file; it is not previewed here.":"This is a binary file. Download it to open it on your computer."),1),e.preview?f("v-if",!0):(a(),l("div",Oz,[n("a",{target:e.preview?"_blank":"_self",class:"btn btn-primary",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[104]||(t[104]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,Iz)]))])):f("v-if",!0),e.type=="error"?(a(),l("div",Mz,[t[108]||(t[108]=n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("h2",Vz,c(e.content==="file_too_big"?"This file is too large to preview":"This file can't be shown"),1),e.content==="file_too_big"?(a(),l("p",qz,c(e.preview?"Reviewers can open this file; it is not previewed here. Files over 1 MB are only shown on the reviewer page.":"It is over the size limit for anonymized files, so it can't be previewed or downloaded from this link."),1)):(a(),l("p",_z,c(e.fmt.translate("ERRORS."+e.content)),1)),e.preview?f("v-if",!0):(a(),l("div",$z,[n("a",{class:"btn btn-primary",href:e.safeUrl("/r/"+e.repoId+"/")},"Back to the repository",8,Lz),t[107]||(t[107]=n("a",{class:"btn btn-outline-ink",href:"/faq#formats"},"Supported files",-1))]))])):f("v-if",!0),e.content==null&&e.type!="error"?(a(),l("div",Fz,[...t[109]||(t[109]=[n("svg",{class:"ui-icon file-state-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-file"})],-1),n("h2",{class:"file-state-title"},"This file is empty",-1),n("p",{class:"file-state-msg"},"It has no content in this snapshot.",-1)])])):f("v-if",!0)],2)):f("v-if",!0),e.type=="rate_limited"?(a(),l("div",Uz,[n("div",Bz,[t[112]||(t[112]=Ee('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",zz,[t[110]||(t[110]=g("This repository will be available in ",-1)),n("strong",null,c(e.rateLimitCountdown),1),t[111]||(t[111]=g(". The page will reload automatically.",-1))])])])):f("v-if",!0),e.type=="error"&&!e.fileFrame()?(a(),l("div",Hz,[n("section",jz,[n("h1",Gz,c(e.fmt.translate(e.isSourceAccessError()?"VIEWER_ERRORS.access_title":"VIEWER_ERRORS.title")),1),n("p",null,c(e.fmt.translate("ERRORS."+e.content)),1),e.isSourceAccessError()?(a(),l(q,{key:0},[n("p",null,c(e.fmt.translate("VIEWER_ERRORS.reader_help")),1),n("p",null,c(e.fmt.translate("VIEWER_ERRORS.owner_help")),1)],64)):f("v-if",!0),n("div",Wz,[e.isSourceAccessError()?f("v-if",!0):(a(),l("a",Kz,"Back to home")),e.isSourceAccessError()?f("v-if",!0):(a(),l("a",Yz,"Read the FAQ")),n("button",{type:"button",class:"btn btn-primary",onClick:t[42]||(t[42]=d=>e.retryContent())},c(e.fmt.translate("VIEWER_ERRORS.retry")),1),e.isSourceAccessError()?(a(),l("a",Xz,c(e.fmt.translate("VIEWER_ERRORS.dashboard")),1)):f("v-if",!0)])])])):f("v-if",!0),e.type=="loading"&&!e.error?(a(),l("section",Jz,[n("div",Qz,[n("strong",null,c(e.fmt.translate(e.fileReceivedBytes?"VIEWER_LOADING.receiving":"VIEWER_LOADING.loading")),1),n("span",Zz,c(e.filePath),1),e.fileLoadingSlow?(a(),l("p",xz,c(e.fmt.translate("VIEWER_LOADING.slow")),1)):f("v-if",!0)]),n("div",eH,[(a(),l(q,null,x(10,d=>n("span",{key:d})),64))])])):f("v-if",!0),e.type=="empty"?(a(),l("div",tH,[...t[113]||(t[113]=[n("h1",{class:"paper-empty-title m-auto"},[g("Empty "),n("em",null,"repository"),g(".")],-1)])])):f("v-if",!0),e.content==null&&!["empty","loading","error","rate_limited"].includes(e.type)&&!e.fileFrame()?(a(),l("div",nH,[...t[114]||(t[114]=[n("h1",{class:"paper-empty-title m-auto"},[g("Empty "),n("em",null,"file"),g(".")],-1)])])):f("v-if",!0)],64)}var sH={class:"container page dashboard-page paper-page"},oH={class:"row"},iH={class:"w-100"},rH={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},aH={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},lH={class:"flex-grow-1"},dH={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},uH={class:"d-flex flex-wrap",style:{gap:"6px"}},cH={class:"dropdown"},pH={class:"dropdown-menu","aria-labelledby":"dropdownSort"},fH={class:"form-check dropdown-item"},hH={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},mH={class:"form-check dropdown-item"},gH={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},vH={class:"form-check dropdown-item"},yH={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},bH={class:"form-check dropdown-item"},wH={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},kH={class:"form-check dropdown-item"},CH={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},EH={class:"dropdown"},SH={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},NH={class:"form-check dropdown-item"},RH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},PH={class:"form-check dropdown-item"},AH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},DH={class:"form-check dropdown-item"},TH={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},OH={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},IH={class:"filter-chip"},MH=["onClick"],VH={class:"repo-list w-100"},qH={class:"repo-list-item-content"},_H={class:"repo-list-item-main"},$H={class:"repo-list-item-header"},LH=["textContent","href"],FH=["textContent"],UH=["textContent"],BH={class:"repo-source"},zH=["href"],HH={class:"repo-date"},jH={class:"repo-meta"},GH={key:0,title:"Conference"},WH=["title"],KH=["title"],YH=["title"],XH={key:1},JH={class:"repo-list-item-actions"},QH={class:"dropdown"},ZH={class:"dropdown-menu dropdown-menu-right"},xH=["href"],ej=["onClick"],tj=["onClick"],nj=["onClick"],sj=["href"],oj={key:0,class:"repo-list-empty"};function bp(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",sH,[n("div",oH,[n("div",iH,[t[12]||(t[12]=Ee('
My work \xA0/\xA0 Pull requests

Anonymized pull requests

Track PR mirrors you\u2019ve created and their reviewer traffic.

',2)),f(" Search + filters row "),D((a(),l("form",rH,[n("div",aH,[n("div",lH,[D(n("input",dH,null,512),[[s,{state:e.viewState,set:o=>{e.search=o},value:e.search,form:null,options:{}}]])]),n("div",uH,[n("div",cH,[t[6]||(t[6]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),n("div",pH,[t[5]||(t[5]=n("h6",{class:"dropdown-header"},"Select order",-1)),n("div",fH,[D(n("input",hH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=n("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),n("div",mH,[D(n("input",gH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=n("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),n("div",vH,[D(n("input",yH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=n("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),n("div",bH,[D(n("input",wH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=n("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),n("div",kH,[D(n("input",CH,null,512),[[s,{state:e.viewState,set:o=>{e.orderBy=o},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=n("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),n("div",EH,[t[11]||(t[11]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),n("div",SH,[t[10]||(t[10]=n("h6",{class:"dropdown-header"},"Select status",-1)),n("div",NH,[D(n("input",RH,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.ready=o},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=n("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),n("div",PH,[D(n("input",AH,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.expired=o},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=n("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),n("div",DH,[D(n("input",TH,null,512),[[s,{state:e.viewState,set:o=>{e.filters.status.removed=o},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=n("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[i,e.viewState]]),f(" Active filter chips "),D(n("div",OH,[(a(!0),l(q,null,x(e.filters?.status,(o,r,d)=>D((a(),l("span",IH,[g(c(e.fmt?.title(r))+" ",1),n("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:p=>{e.filters.status[r]=!0}}," \xD7 ",8,MH)],512)),[[Q,!o]])),256))],512),[[Q,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),f(" Pull request list "),n("ul",VH,[(a(!0),l(q,null,x(e.filteredPullRequests,(o,r)=>(a(),l("li",{class:P(["repo-list-item",{"repo-inactive":o?.status=="expired"||o?.status=="removed"||o?.status=="error"}])},[n("div",qH,[n("div",_H,[n("div",$H,[n("a",{class:"repo-name",textContent:c(o?.pullRequestId),href:e.safeUrl("/pr/"+o?.pullRequestId)},null,8,LH),n("span",{class:P(["status-badge",{"status-removed":o?.status=="removed"||o?.status=="expired"||o?.status=="removing"||o?.status=="expiring","status-preparing":o?.status=="preparing"||o?.status=="download","status-ready":o?.status=="ready","status-error":o?.status=="error"}])},[n("span",{textContent:c(e.fmt?.title(o?.status))},null,8,FH),o?.status=="error"?(a(),l("span",{key:0,textContent:c(": "+o?.statusMessage)},null,8,UH)):f("v-if",!0)],2)]),n("div",BH,[n("span",null,[t[13]||(t[13]=n("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),n("a",{href:e.safeUrl("https://github.com/"+o?.source?.repositoryFullName+"/pull/"+o?.source?.pullRequestId)},c(o?.source?.repositoryFullName)+"#"+c(o?.source?.pullRequestId),9,zH)]),n("span",{class:P(["status-badge",{"status-ready":o?.merged,"status-removed":o?.state=="open","status-error":o?.state=="closed"&&!o?.merged}]),style:{"font-size":"10px"}},c(e.fmt?.title(o?.merged?"merged":o?.state)),3),n("span",HH,"anonymized "+c(e.fmt?.humanTime(o?.anonymizeDate)),1)])]),n("div",jH,[o?.conference?(a(),l("span",GH,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),g(" "+c(o?.conference),1)])):f("v-if",!0),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+o?.options?.terms?.join(", ")},[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),g(" "+c(e.fmt?.number(o?.options?.terms?.length)),1)],8,WH),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(o?.pageView)},[t[16]||(t[16]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1)),g(" "+c(e.fmt?.number(o?.pageView)),1)],8,KH),n("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(o?.lastView)},[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-calendar"})],-1)),g(" "+c(e.fmt?.humanTime(o?.lastView)),1)],8,YH),o?.options?.expirationMode!="never"&&o?.status=="ready"?(a(),l("span",XH,[t[18]||(t[18]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),g(" Expire: "+c(e.fmt?.humanTime(o?.options?.expirationDate)),1)])):f("v-if",!0)])]),n("div",JH,[n("div",QH,[t[24]||(t[24]=n("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),n("div",ZH,[n("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+o?.pullRequestId)},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit ",-1)])],8,xH),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updatePullRequest(o),["prevent"])},[...t[20]||(t[20]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-refresh"})],-1),g(" Force update ",-1)])],8,ej),[[Q,o?.status=="ready"||o?.status=="error"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.updatePullRequest(o),["prevent"])},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-check-circle"})],-1),g(" Enable ",-1)])],8,tj),[[Q,o?.status=="removed"]]),D(n("a",{class:"dropdown-item",href:"#",onClick:ae(d=>e.removePullRequest(o),["prevent"])},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1),g(" Remove ",-1)])],8,nj),[[Q,o?.status=="ready"]]),n("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+o?.pullRequestId+"/")},[...t[23]||(t[23]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" View PR ",-1)])],8,sj)])])])],2))),256)),e.filteredPullRequests?.length==0?(a(),l("li",oj,[...t[25]||(t[25]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1),n("span",null,"No pull requests to display.",-1)])])):f("v-if",!0)])])])}var ij={class:"container paper-page user-settings"},rj={class:"settings-nav","aria-label":"Settings"},aj=["aria-current","onClick"],lj={class:"settings-row"},dj=["rows"],uj={class:"settings-syntax"},cj={class:"invalid-feedback"},pj={class:"settings-row"},fj={class:"settings-checks"},hj={class:"settings-check"},mj={class:"form-check-input",type:"checkbox",id:"link",name:"link"},gj={class:"settings-check"},vj={class:"form-check-input",type:"checkbox",id:"image",name:"image"},yj={class:"settings-check"},bj={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},wj={class:"settings-check"},kj={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},Cj={class:"settings-check"},Ej={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},Sj={class:"settings-check"},Nj={class:"form-check-input",type:"checkbox",id:"page",name:"page"},Rj={class:"settings-row"},Pj={class:"settings-check"},Aj={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Dj={class:"settings-row"},Tj={class:"form-control",id:"expiration",name:"expiration"},Oj={class:"settings-help"},Ij={class:"settings-save"},Mj={class:"settings-save-status draft-status",role:"status"},Vj={key:0},qj={key:1},_j={key:2},$j=["disabled"],Lj={key:1,class:"settings-save-error",role:"alert"},Fj=["aria-busy"],Uj={key:0,role:"status"},Bj={key:1,class:"settings-notice",role:"alert"},zj=["disabled"],Hj={key:2,class:"settings-notice",role:"status"},jj={key:3,class:"settings-notice",role:"status"},Gj=["disabled"],Wj={class:"billing-summary"},Kj={class:"billing-summary-head"},Yj={class:"billing-plan-name"},Xj={key:0,class:"billing-plan-meta"},Jj={key:1,class:"billing-plan-meta"},Qj={key:0,class:"billing-summary-actions"},Zj=["disabled"],xj={id:"settings-quota"},eG={key:1,role:"status"},tG={key:0,class:"settings-notice"},nG={key:1,class:"settings-notice"},sG={key:2,class:"settings-notice"},oG={key:4,class:"billing-section","aria-labelledby":"settings-plan-comparison"},iG={key:0,class:"billing-offers"},rG={key:0,class:"billing-offer is-recommended"},aG={class:"billing-offer-price"},lG={class:"billing-offer-list"},dG=["disabled"],uG={key:1,class:"billing-offer"},cG={class:"billing-offer-head"},pG={class:"billing-toggle",role:"radiogroup","aria-label":"Billing frequency"},fG=["aria-checked","onClick"],hG={key:0,class:"billing-toggle-save"},mG={class:"billing-offer-price"},gG={class:"billing-offer-list"},vG=["disabled"],yG={key:1,class:"billing-addons"},bG={class:"billing-addon-rows"},wG={class:"billing-addon-price"},kG=["onClick","disabled"],CG={key:2,class:"billing-buy",id:"settings-addons-title",tabindex:"-1"},EG={class:"billing-buy-info"},SG={class:"billing-offer-price"},NG={class:"billing-offer-list"},RG={class:"billing-buy-form"},PG=["value"],AG=["disabled"],DG={key:1,class:"billing-buy-desc"},TG={key:2,class:"billing-footnote"},OG={class:"billing-compare"},IG={class:"billing-compare-card"},MG={class:"settings-comparison"},VG={key:0,scope:"col",class:"is-recommended"},qG={key:1,scope:"col"},_G={key:0,class:"is-recommended"},$G={key:1},LG={key:0,class:"is-recommended"},FG={key:1},UG={key:0,class:"is-recommended"},BG={key:1},zG={key:0,class:"is-recommended"},HG={key:1},jG={key:0,class:"is-recommended"},GG={key:1},WG={key:0,class:"is-recommended"},KG={key:1},YG={key:3,class:"billing-footnote"},XG={key:5,class:"billing-section"},JG={class:"billing-section-head"},QG=["disabled"],ZG={key:0,class:"billing-empty"},xG={key:1,class:"billing-history-head","aria-hidden":"true"},eW={key:2,class:"billing-history"},tW={class:"billing-history-main"},nW=["href"],sW=["href"],oW={class:"billing-history-term"},iW={class:"billing-history-paid"},rW={class:"billing-history-status"},aW={class:"billing-manage"},lW={key:0},dW={key:1},uW=["disabled"],cW={class:"billing-conference"},pW={id:"settings-account",class:"settings-account-panel"},fW={class:"paper-account-card"},hW=["src"],mW={class:"paper-account-identity"},gW={class:"paper-account-name"},vW=["disabled"],yW={key:0,role:"status"},bW={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},wW=["disabled"],kW={key:3,role:"status"},CW={class:"paper-danger-zone"},EW={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},SW=["textContent"],NW=["disabled"],RW={key:1,class:"settings-delete-confirm"},PW={for:"delete-username"},AW={class:"settings-actions"},DW=["disabled"],TW=["disabled"];function wp(e,t){let s=Xe("quota-usage"),i=Ae("field"),o=Ae("form");return a(),l("div",ij,[t[107]||(t[107]=n("header",{class:"settings-title page-head page-head-main"},[n("h1",null,"Settings"),n("p",{class:"paper-page-lede"},"Defaults for new anonymizations, hosting and your account.")],-1)),n("nav",rj,[(a(),l(q,null,x([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:d=>e.settingsTab=r.id},c(r.label),9,aj)),64))]),D(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),D((a(),l("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onInput:t[1]||(t[1]=r=>e.unsavedChanges=!0),onSubmit:t[2]||(t[2]=ae(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",lj,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[D(n("textarea",{class:"form-control",id:"terms",name:"terms",rows:Math.min(14,Math.max(3,String(e.terms||"").split(` `).length+1)),placeholder:`Jane Smith MIT CSAIL -jane.smith@example.org`},null,8,oj),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",sj,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=v("Matches become ",-1)),n("code",null,p(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=v(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=v(" for a custom replacement. Regex is supported.",-1))])]),T(n("div",ij,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",rj,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",aj,[n("label",lj,[T(n("input",dj,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=v("Keep links",-1))]),n("label",uj,[T(n("input",cj,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=v("Display images",-1))]),n("label",pj,[T(n("input",fj,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=v("Display PDFs",-1))]),n("label",hj,[T(n("input",mj,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=v("Display notebooks",-1))]),n("label",gj,[T(n("input",vj,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=v("Show line counts",-1))]),n("label",yj,[T(n("input",bj,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=v("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",wj,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",kj,[T(n("input",Cj,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=v("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",Ej,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[T((a(),l("select",Sj,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",Nj,p(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",Rj,[n("div",Dj,[e.draftRestored?(a(),l("span",Pj,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",Aj,"Unsaved changes"+p(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",Tj,p(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:P(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},p(e.saving?"Saving\u2026":"Save defaults"),11,Oj),e.error?(a(),l("div",Ij,p(e.error),1)):f("v-if",!0)])],32)),[[s,e.viewState]])],512),[[Z,e.settingsTab==="defaults"]]),T(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",_j,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",Vj,[v(p(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,qj)])):f("v-if",!0),e.billingNotice?(a(),l("p",$j,p(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",Lj,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,Fj)])):f("v-if",!0),n("section",Uj,[n("div",Bj,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",zj,p(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",Hj,[v(p(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access until ":"Renews ")+p(e.billingDate(e.profileAuthorGrant().until)),1),e.profileAuthorPurchase()?.amount!=null?(a(),l(F,{key:0},[v(" \xB7 "+p(e.billingPrice(e.profileAuthorPurchase())),1)],64)):f("v-if",!0)])):e.billing?.allowance?(a(),l("p",jj,p(e.billing.allowance.repositories)+" repositories \xB7 "+p(e.billingBytes(e.billing.allowance.storage))+" \xB7 links up to "+p(e.billing.freeExpirationMonths||5)+" months",1)):f("v-if",!0)]),e.profileAuthorGrant()&&e.billing?.portal?(a(),l("div",Gj,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=r=>e.billingPortal()),disabled:e.billingBusy},p(e.profileAuthorGrant().cancelAtPeriodEnd?"Resume renewal":"Change or cancel plan"),9,Wj)])):f("v-if",!0)]),n("div",Kj,[e.quota?(a(),Gt(o,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(a(),l("p",Yj,"Loading usage\u2026"))]),e.quota?.repository&&!e.quota.repository.unlimited&&e.quota.repository.used>=e.quota.repository.total?(a(),l("p",Xj,[v("Your free repositories are used up. Add the next one for "+p(e.profileSlotPlan()?e.billingPrice(e.profileSlotPlan()):"a one-time payment")+" when you create it, or ",1),t[45]||(t[45]=n("a",{href:"/dashboard"},"remove work you no longer need",-1)),t[46]||(t[46]=v(".",-1))])):f("v-if",!0),e.profileAuthorGrant()?.status==="past_due"?(a(),l("p",Qj,"A subscription payment is overdue. Update your payment details in Manage billing and invoices.")):f("v-if",!0),e.profilePastSubscription()?(a(),l("p",Jj,[...t[47]||(t[47]=[v("Your previous subscription has ended. Never-expiring repositories stay online for a 90-day grace period. ",-1),n("a",{href:"/dashboard"},"Review expiration dates",-1),v(".",-1)])])):f("v-if",!0),t[48]||(t[48]=n("p",{class:"billing-footnote"},"Co-authored, paid and conference repositories aren't counted here.",-1))]),e.billing?.enabled&&!e.profileAuthorGrant()&&(e.profilePackPlan()||e.profileAuthorPlans().length)?(a(),l("section",Zj,[t[85]||(t[85]=n("h2",{class:"billing-section-title",id:"settings-plan-comparison",tabindex:"-1"},"Get more",-1)),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?f("v-if",!0):(a(),l("div",xj,[e.profilePackPlan()?(a(),l("article",eG,[t[54]||(t[54]=n("span",{class:"billing-offer-pill"},"Recommended",-1)),t[55]||(t[55]=n("div",{class:"billing-offer-head"},[n("p",{class:"billing-eyebrow"},"For one paper")],-1)),t[56]||(t[56]=n("h3",null,"Paper pack",-1)),n("p",tG,[n("strong",null,p(e.billingAmount(e.profilePackPlan())),1),t[49]||(t[49]=v(" once",-1))]),n("ul",nG,[t[50]||(t[50]=n("li",null,"One more repository, outside your free ones",-1)),n("li",null,"Its own "+p(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" of storage",1),t[51]||(t[51]=n("li",null,"Automatic updates for 180 days",-1)),t[52]||(t[52]=n("li",null,"Online for up to a year",-1)),t[53]||(t[53]=n("li",null,"No subscription",-1))]),n("button",{type:"button",class:"btn btn-ink",onClick:t[6]||(t[6]=r=>e.openProfileAddon("repo_pack")),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy a Paper pack",8,oG)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("article",sG,[n("div",iG,[t[57]||(t[57]=n("p",{class:"billing-eyebrow"},"For many papers",-1)),n("div",rG,[(a(!0),l(F,null,se(e.profileAuthorPlansByValue(),r=>(a(),l("button",{type:"button",role:"radio",key:r.id,"aria-checked":e.profileSelectedPlan()?.id===r.id?"true":"false",class:P({"is-on":e.profileSelectedPlan()?.id===r.id}),onClick:d=>e.profilePlan=r.id},[v(p(r.interval==="year"?"Yearly":"Monthly"),1),r.interval==="year"&&e.profileAnnualSavings()?(a(),l("span",lG,"\u2212"+p(e.profileAnnualSavings())+"%",1)):f("v-if",!0)],10,aG))),128))])]),t[62]||(t[62]=n("h3",null,"Author subscription",-1)),n("p",dG,[n("strong",null,p(e.billingAmount(e.profileSelectedPlan())),1),v(" per "+p(e.profileSelectedPlan()?.interval==="year"?"year":"month"),1)]),n("ul",uG,[n("li",null,p(e.profileSelectedPlan()?.repositories)+" repositories, "+p(e.billingBytes(e.profileSelectedPlan()?.storage)),1),t[58]||(t[58]=n("li",null,"Automatic updates",-1)),t[59]||(t[59]=n("li",null,"Links that never expire",-1)),t[60]||(t[60]=n("li",null,"Coauthors included",-1)),t[61]||(t[61]=n("li",null,"Cancel renewal anytime",-1))]),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.billingBusy||e.billing.checkoutEnabled===!1,onClick:t[7]||(t[7]=r=>e.checkout(e.profileSelectedPlan().id))},p(e.billingBusy?"Please wait\u2026":"Subscribe"),9,cG)])):f("v-if",!0)])),e.profileSingleAddons().length&&!(e.showRepositoryPass&&e.profileAddon()&&!e.billingPending)?(a(),l("div",pG,[t[63]||(t[63]=n("div",{class:"billing-addons-head"},[n("h3",{class:"billing-subtitle"},"Or pay for one thing"),n("span",null,"One-time")],-1)),n("ul",fG,[(a(!0),l(F,null,se(e.profileSingleAddons(),r=>(a(),l("li",{key:r.id},[n("div",null,[n("strong",null,p(r.name),1),n("span",null,p(e.profileAddonBlurb(r.id)),1)]),n("span",hG,p(e.billingAmount(r)),1),n("button",{type:"button",class:"settings-text-button",onClick:d=>e.openProfileAddon(r.id),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy",8,mG)]))),128))])])):f("v-if",!0),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?(a(),l("div",gG,[n("div",vG,[n("button",{type:"button",class:"btn btn-outline-ink billing-back",onClick:t[8]||(t[8]=r=>e.showRepositoryPass=!1)},"\u2190 All options"),n("h3",null,p(e.profileAddon().name),1),n("p",yG,[n("strong",null,p(e.billingAmount(e.profileAddon())),1),t[64]||(t[64]=v(" once",-1))]),n("ul",bG,[(a(!0),l(F,null,se(e.profileAddonFeatures(e.profileAddon().id),r=>(a(),l("li",{key:r},p(r),1))),128))])]),n("div",wG,[e.profileRepositories().length?(a(),l(F,{key:0},[t[66]||(t[66]=n("label",{class:"paper-field-label",for:"billing-repository"},"Which repository?",-1)),T(n("select",{id:"billing-repository",class:"form-control","onUpdate:modelValue":t[9]||(t[9]=r=>e.billingRepository=r)},[t[65]||(t[65]=n("option",{value:"",disabled:""},"Choose a repository",-1)),(a(!0),l(F,null,se(e.profileRepositories(),r=>(a(),l("option",{key:r.repoId,value:r.repoId},p(r.repoId)+" \xB7 "+p(e.profileRepositoryExpiry(r)),9,kG))),128))],512),[[mn,e.billingRepository]]),n("button",{type:"button",class:"btn btn-ink",disabled:e.billingBusy||!e.billingRepository||e.billing.checkoutEnabled===!1,onClick:t[10]||(t[10]=r=>e.checkout(e.profileAddon().id,e.billingRepository))},p(e.billingBusy?"Please wait\u2026":"Continue to checkout"),9,CG),t[67]||(t[67]=n("p",{class:"billing-footnote"},"One-time payment. Tax shown at checkout.",-1))],64)):(a(),l("p",EG,[...t[68]||(t[68]=[v("You have no repositories yet. ",-1),n("a",{href:"/anonymize"},"Create one",-1),v(" first.",-1)])])),["repo_slot","repo_pack"].includes(e.profileAddon().id)?(a(),l("p",SG,[...t[69]||(t[69]=[v("Adding a new repository? ",-1),n("a",{href:"/anonymize"},"Start creating it",-1),v("; the form offers this once your free repositories are in use.",-1)])])):f("v-if",!0)])])):f("v-if",!0),n("details",NG,[t[84]||(t[84]=n("summary",null,"Compare all features",-1)),n("div",RG,[n("table",DG,[t[83]||(t[83]=n("caption",{class:"sr-only"},"Free, Paper pack and Author hosting",-1)),n("thead",null,[n("tr",null,[t[72]||(t[72]=n("th",{scope:"col"},[n("span",{class:"sr-only"},"Feature")],-1)),t[73]||(t[73]=n("th",{scope:"col"},[v("Free"),n("small",null,"\u20AC0")],-1)),e.profilePackPlan()?(a(),l("th",PG,[t[70]||(t[70]=v("Paper pack",-1)),n("small",null,p(e.billingPrice(e.profilePackPlan())),1)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("th",AG,[t[71]||(t[71]=v("Author",-1)),n("small",null,p(e.billingPrice(e.profileSelectedPlan())),1)])):f("v-if",!0)])]),n("tbody",null,[n("tr",null,[t[74]||(t[74]=n("th",{scope:"row"},"Repositories",-1)),n("td",null,p(e.billing.allowance?.repositories),1),e.profilePackPlan()?(a(),l("td",TG,"+1")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",OG,p(e.profileSelectedPlan()?.repositories),1)):f("v-if",!0)]),n("tr",null,[t[75]||(t[75]=n("th",{scope:"row"},"Source storage",-1)),n("td",null,p(e.billingBytes(e.billing.allowance?.storage))+" total",1),e.profilePackPlan()?(a(),l("td",IG,p(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" for it",1)):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",MG,p(e.billingBytes(e.profileSelectedPlan()?.storage))+" total",1)):f("v-if",!0)]),n("tr",null,[t[76]||(t[76]=n("th",{scope:"row"},"Latest expiration",-1)),n("td",null,p(e.billing.freeExpirationMonths||5)+" months ahead",1),e.profilePackPlan()?(a(),l("td",_G,"1 year after purchase")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",VG,"Never")):f("v-if",!0)]),n("tr",null,[t[77]||(t[77]=n("th",{scope:"row"},"Automatic updates",-1)),t[78]||(t[78]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",qG,"180 days")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",$G,"Yes")):f("v-if",!0)]),n("tr",null,[t[79]||(t[79]=n("th",{scope:"row"},"Renews",-1)),t[80]||(t[80]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",LG,"No")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",FG,"Until cancelled")):f("v-if",!0)]),n("tr",null,[t[81]||(t[81]=n("th",{scope:"row"},"Reviewer access",-1)),t[82]||(t[82]=n("td",null,"Free",-1)),e.profilePackPlan()?(a(),l("td",UG,"Free")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",BG,"Free")):f("v-if",!0)])])])])]),e.billing.checkoutEnabled===!1?(a(),l("p",zG,"New purchases are not available right now. Existing billing can still be managed below.")):f("v-if",!0)])):f("v-if",!0),e.billing?.enabled?(a(),l("section",HG,[n("div",jG,[t[86]||(t[86]=n("h2",{class:"billing-section-title"},"Purchases",-1)),e.billingPending?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"settings-text-button",onClick:t[11]||(t[11]=r=>e.refreshBilling()),disabled:e.billingBusy},"Refresh payment status",8,GG))]),(e.billing.purchases||[]).length?f("v-if",!0):(a(),l("p",WG,"No purchases yet.")),(e.billing.purchases||[]).length?(a(),l("div",KG,[...t[87]||(t[87]=[n("span",null,"Purchase",-1),n("span",null,"Period",-1),n("span",null,"Amount",-1),n("span",null,"Status",-1)])])):f("v-if",!0),(e.billing.purchases||[]).length?(a(),l("ul",YG,[(a(!0),l(F,null,se(e.profilePurchases(!0).concat(e.profilePurchases(!1)),r=>(a(),l("li",{class:P(["billing-history-row",{"is-ended":!["active","overdue"].includes(r.status)}]),key:r.id},[n("div",XG,[n("strong",null,[v(p(e.profileGrantName(r)),1),r.repoId?(a(),l(F,{key:0},[t[88]||(t[88]=v(" \xB7 ",-1)),n("a",{href:"/anonymize/"+encodeURIComponent(r.repoId)},p(r.repoId),9,QG)],64)):r.conference?(a(),l(F,{key:1},[t[89]||(t[89]=v(" \xB7 ",-1)),n("a",{href:"/conference/"+encodeURIComponent(r.conference)},p(r.conference),9,JG)],64)):f("v-if",!0)]),n("span",null,p([r.purchasedAt?"Bought "+e.billingDate(r.purchasedAt):"",r.parts.length?e.profilePackSummary(r):["refunded","disputed"].includes(r.status)?"Payment "+r.status+", so what it paid for has ended":r.recurring?"Account subscription":""].filter(Boolean).join(" \xB7 ")),1)]),n("div",ZG,p(e.profilePurchaseTerm(r)),1),n("div",xG,p(r.amount!=null?e.billingPrice(r):""),1),n("div",eW,[n("span",{class:P(["settings-status","is-"+r.status])},p(e.profilePurchaseStatus(r)),3)])],2))),128))])):f("v-if",!0),n("div",tW,[n("div",null,[t[90]||(t[90]=n("strong",null,"Invoices and payment details",-1)),e.billing.portal?(a(),l("p",nW,"Download receipts, update your card or change renewal in Stripe.")):(a(),l("p",oW,"Invoices appear here after your first purchase.")),t[91]||(t[91]=n("p",null,[v("Need a refund? "),n("a",{href:"mailto:tdurieux@anonymous.4open.science"},"Email the maintainer"),v(" with the payment date, or read the "),n("a",{href:"/faq#faq-plans"},"refund policy"),v(".")],-1))]),e.billing.portal?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[12]||(t[12]=r=>e.billingPortal()),disabled:e.billingBusy},"Manage billing and invoices",8,sW)):f("v-if",!0)])])):f("v-if",!0),n("p",iW,[t[92]||(t[92]=v("Organizing a conference? ",-1)),e.profileConferencePlan()?(a(),l(F,{key:0},[v("Review packages start at "+p(e.billingAmount(e.profileConferencePlan()))+" once for up to "+p(e.profileConferencePlan().repositories)+" submissions, and authors pay nothing.",1)],64)):(a(),l(F,{key:1},[v("One payment hosts every submission, and authors pay nothing.")],64)),t[93]||(t[93]=v()),t[94]||(t[94]=n("a",{href:"/conference/new"},"Create a conference",-1))])],8,Mj),[[Z,e.settingsTab==="billing"]]),T(n("section",rW,[t[105]||(t[105]=n("p",{class:"settings-scope"},"Your identity, repository access, and account.",-1)),n("div",aW,[e.user?.photo?(a(),l("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,lW)):f("v-if",!0),n("div",dW,[n("div",uW,"@"+p(e.user?.username),1),t[96]||(t[96]=n("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[97]||(t[97]=n("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),n("form",{class:"paper-account-email",onSubmit:t[16]||(t[16]=le(r=>e.saveAccountEmail(),["prevent"]))},[t[98]||(t[98]=n("label",{class:"paper-field-label",for:"account-email"},"Email address",-1)),t[99]||(t[99]=n("p",{id:"account-email-help",class:"paper-section-copy"},"Used for account alerts. Your address is never shown on anonymous pages.",-1)),T(n("input",{id:"account-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[13]||(t[13]=r=>e.accountEmail=r),"aria-describedby":"account-email-help",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady,onInput:t[14]||(t[14]=r=>e.emailSaved=!1)},null,40,cW),[[pt,e.accountEmail]]),e.emailLoading?(a(),l("p",pW,"Loading your email address\u2026")):f("v-if",!0),e.emailError?(a(),l("p",fW,p(e.emailError),1)):f("v-if",!0),!e.emailCSRFReady&&!e.emailLoading?(a(),l("button",{key:2,class:"btn btn-outline-ink mt-2",type:"button",onClick:t[15]||(t[15]=r=>e.loadAccountEmail())},"Try again")):f("v-if",!0),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady},p(e.emailSaving?"Saving\u2026":"Save email address"),9,hW),e.emailSaved?(a(),l("p",mW,"Email address saved.")):f("v-if",!0)],32),t[106]||(t[106]=n("a",{class:"paper-settings-connection-link",href:"/connections"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",null,[v("GitHub connections"),n("small",null,"Manage repository access and legacy OAuth.")]),n("span",{"aria-hidden":"true"},"\u2192")],-1)),n("div",gW,[t[103]||(t[103]=n("div",{class:"paper-danger-head"},"Delete account",-1)),t[104]||(t[104]=n("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(a(),l("div",vW,[t[100]||(t[100]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),t[101]||(t[101]=v()),n("span",{textContent:p(e.deleteError)},null,8,yW)])):f("v-if",!0),n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[17]||(t[17]=r=>e.confirmDeleteAccount=!0),disabled:e.deletingAccount},[t[102]||(t[102]=n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)),v(p(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,bW),e.confirmDeleteAccount?(a(),l("div",wW,[n("label",kW,"Type "+p(e.user?.username)+" to confirm",1),T(n("input",{id:"delete-username",class:"form-control","onUpdate:modelValue":t[18]||(t[18]=r=>e.deleteUsername=r),autocomplete:"off"},null,512),[[pt,e.deleteUsername]]),n("div",CW,[n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[19]||(t[19]=r=>e.deleteAccount()),disabled:e.deletingAccount||e.deleteUsername!==e.user?.username},p(e.deletingAccount?"Deleting\u2026":"Delete permanently"),9,EW),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[20]||(t[20]=r=>{e.confirmDeleteAccount=!1,e.deleteUsername=""}),disabled:e.deletingAccount},"Cancel",8,SW)])])):f("v-if",!0)])],512),[[Z,e.settingsTab==="account"]])])}var NW={class:"pr-page"},RW={class:"container paper-page pr-page-inner"},DW={class:"pr-header"},PW={class:"pr-title-row"},AW={class:"paper-page-title pr-title"},TW=["textContent"],OW={key:1,class:"text-muted"},IW=["href"],MW={class:"pr-header-meta"},_W={key:0,class:"pr-meta-item"},VW=["textContent"],qW={key:1,class:"pr-meta-item"},$W=["textContent"],LW={key:2,class:"pr-meta-item"},FW=["textContent"],UW={key:0,class:"pr-body-card"},BW={key:1,class:"paper-tabs",role:"tablist"},zW=["aria-selected","tabindex"],HW=["aria-selected","tabindex"],jW=["textContent"],GW={class:"paper-tab-content"},WW={key:0,role:"tabpanel",id:"pr-diff-panel","aria-labelledby":"pr-diff-tab"},KW=["innerHTML"],YW={key:1,role:"tabpanel",id:"pr-comments-panel","aria-labelledby":"pr-comments-tab"},XW={class:"pr-comments"},QW={class:"pr-comment"},JW={class:"pr-comment-head"},ZW={key:0,class:"pr-comment-author"},xW=["textContent"],eK=["textContent"],tK={key:0,class:"pr-comment-body"},nK={key:0,class:"paper-table-empty"};function yp(e,t){let o=Xe("markdown");return a(),l("div",NW,[n("div",RW,[t[17]||(t[17]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"Reviewer"),v(" \xA0/\xA0 "),n("span",{class:"here"},"Pull request")],-1)),n("header",DW,[n("div",PW,[n("h1",AW,[e.details?.title?(a(),l("span",{key:0,textContent:p(e.details?.title)},null,8,TW)):f("v-if",!0),e.details?.title?f("v-if",!0):(a(),l("span",OW,"Untitled pull request"))]),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[4]||(t[4]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,IW)):f("v-if",!0)]),n("div",MW,[n("span",{class:P(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[n("span",{class:P(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),v(" "+p(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(a(),l("span",_W,[t[5]||(t[5]=n("i",{class:"fab fa-github"},null,-1)),t[6]||(t[6]=v()),n("span",{textContent:p(e.details?.baseRepositoryFullName)},null,8,VW)])):f("v-if",!0),e.details?.updatedDate?(a(),l("span",qW,[t[7]||(t[7]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=v()),n("span",{textContent:p(e.fmt?.date(e.details?.updatedDate))},null,8,$W)])):f("v-if",!0),e.details?.anonymizeDate?(a(),l("span",LW,[t[9]||(t[9]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=v(" Anonymized ",-1)),n("span",{textContent:p(e.fmt?.date(e.details?.anonymizeDate))},null,8,FW)])):f("v-if",!0)])]),e.details?.body?(a(),l("section",UW,[t[11]||(t[11]=n("div",{class:"paper-section-eyebrow"},"Description",-1)),Oe(o,{content:e.details?.body},null,8,["content"])])):f("v-if",!0),e.details?.diff||e.details?.comments?(a(),l("nav",BW,[e.details?.diff?(a(),l("button",{key:0,class:P(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",id:"pr-diff-tab","aria-selected":e.tabState?.active==="diff","aria-controls":"pr-diff-panel",tabindex:e.tabState?.active==="diff"?0:-1,onKeydown:t[0]||(t[0]=i=>e.previewTabKeydown(i)),onClick:t[1]||(t[1]=i=>e.tabState.active="diff")},[...t[12]||(t[12]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v(" Diff ",-1)])],42,zW)):f("v-if",!0),e.details?.comments?(a(),l("button",{key:1,class:P(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"pr-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"pr-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=i=>e.previewTabKeydown(i)),onClick:t[3]||(t[3]=i=>e.tabState.active="comments")},[t[13]||(t[13]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:p(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,jW)],42,HW)):f("v-if",!0)])):f("v-if",!0),n("div",GW,[e.details?.diff&&e.tabState?.active=="diff"?(a(),l("div",WW,[n("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,KW)])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(a(),l("div",YW,[n("ul",XW,[(a(!0),l(F,null,se(e.details?.comments,(i,s)=>(a(),l("li",QW,[n("div",JW,[i?.author?(a(),l("span",ZW,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=v(" @",-1)),n("span",{textContent:p(i?.author)},null,8,xW)])):f("v-if",!0),i?.updatedDate?(a(),l("span",{key:1,class:"pr-comment-date",textContent:p(e.fmt?.date(i?.updatedDate))},null,8,eK)):f("v-if",!0)]),i?.body?(a(),l("div",tK,[Oe(o,{content:i?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(a(),l("li",nK,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1),n("span",null,"No comments on this pull request.",-1)])]))])])):f("v-if",!0)])])])}var oK={class:"repository-task status-page"},sK={class:"page-head-main"},iK={class:"task-lede"},rK={class:"task-columns"},aK={class:"task-preparation","aria-label":"Repository preparation"},lK={key:0,class:"text-danger",role:"alert"},dK={key:1,class:"paper-section-copy"},uK={key:2,class:"paper-ratelimit-card",role:"status"},cK={class:"paper-error-msg"},pK=["aria-valuenow"],fK={class:"paper-progress-label"},hK=["textContent"],mK={key:0},gK=["textContent"],vK={class:"paper-progress-pct"},yK={key:4,class:"paper-error-card",role:"alert"},bK={key:0,class:"paper-error-msg"},wK={key:1,class:"paper-error-msg"},kK={key:2},CK=["href"],EK={class:"paper-error-actions"},SK=["href"],NK={key:5,class:"share-link"},RK={class:"share-link-row"},DK={class:"share-link-buttons"},PK={class:"ui-icon","aria-hidden":"true"},AK=["href"],TK=["textContent"],OK=["href"],IK={class:"share-link-note"},MK=["href"],_K={class:"share-link-next"},VK={class:"share-link-next-actions"},qK=["href"],$K={class:"task-summary","aria-label":"Repository summary"},LK=["title"],FK={key:1};function bp(e,t){return a(),l("div",oK,[n("header",{class:P(["page-head",{"task-ready":e.repo?.status==="ready"}])},[t[3]||(t[3]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"My work"),v(" \xA0/\xA0 "),n("span",{class:"here"},"Review link")],-1)),n("div",sK,[n("div",null,[n("h1",null,p(e.repo?.status==="ready"?"Your review link is ready":"Prepare your anonymous review link"),1),n("p",iK,p(e.repo?.status==="ready"?"Share this link with reviewers in your submission.":"Your settings are saved. Track preparation before sharing the link."),1)])]),t[4]||(t[4]=n("ol",{class:"task-trail flow-trail","aria-label":"Repository progress"},[n("li",null,"1. Repository"),n("li",null,"2. Review and hosting"),n("li",{"aria-current":"step"},"3. Review link")],-1))],2),n("div",rK,[n("section",aK,[e.error?(a(),l("p",lK,[t[5]||(t[5]=v("Unable to load repository status. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[0]||(t[0]=o=>e.getStatus())},"Try again")])):f("v-if",!0),e.repo?.status!=="ready"?(a(),l("p",dK,[...t[6]||(t[6]=[v(" The repository will take a few minutes to get ready, depending on its size. Visit the ",-1),n("a",{href:"/faq"},"FAQ",-1),v(" for more information. ",-1)])])):f("v-if",!0),e.rateLimitResetAt?(a(),l("div",uK,[t[9]||(t[9]=Se('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",cK,[t[7]||(t[7]=v("Anonymization will resume automatically in ",-1)),n("strong",null,p(e.rateLimitCountdown),1),t[8]||(t[8]=v(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):f("v-if",!0),e.repo?.status!=="ready"&&e.repo?.status!="error"&&!e.rateLimitResetAt?(a(),l("div",{key:3,class:P(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[n("div",{class:"paper-progress-bar",style:$e("width: "+e.progress+"%;")},null,4),n("div",fK,[n("span",{textContent:p(e.fmt?.title(e.repo?.status))},null,8,hK),e.repo?.statusMessage?(a(),l("span",mK,[t[10]||(t[10]=v("\xA0\xB7\xA0",-1)),n("span",{textContent:p(e.repo?.statusMessage)},null,8,gK)])):f("v-if",!0),n("span",vK,p(e.progress||0)+"%",1)])],10,pK)):f("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(a(),l("div",yK,[t[14]||(t[14]=Se('
Anonymization failed
Something went wrong while preparing this repository.
',1)),e.repo?.statusMessage?(a(),l("p",bK,p(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):f("v-if",!0),e.repo?.statusMessage?f("v-if",!0):(a(),l("p",wK,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),e.repo?.statusMessage==="quota_exceeded"?(a(),l("p",kK,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Review this repository\u2019s hosting",8,CK),t[11]||(t[11]=v(", then retry preparation.",-1))])):f("v-if",!0),t[15]||(t[15]=n("ul",{class:"paper-error-hints"},[n("li",null,"Make sure the source URL points to a repository or pull request you can access."),n("li",null,"Check that the chosen branch and commit still exist on GitHub."),n("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),n("div",EK,[n("a",{class:"btn btn-primary",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[12]||(t[12]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v(" Edit anonymization",-1)])],8,SK),t[13]||(t[13]=Se(' Read the FAQ Report a bug in Anonymous GitHub',2))])])):f("v-if",!0),e.repo?.status=="ready"?(a(),l("div",NK,[t[24]||(t[24]=n("div",{class:"share-link-label",id:"share-url-label"},"Review link",-1)),n("div",RK,[n("code",{id:"share-url",class:"share-link-url",tabindex:"0",role:"textbox","aria-readonly":"true","aria-labelledby":"share-url-label",onFocus:t[1]||(t[1]=o=>e.selectShareUrl(o))},p(e.shareUrl),33),n("div",DK,[n("button",{type:"button",class:"btn btn-primary share-copy",onClick:t[2]||(t[2]=o=>e.copyShareUrl())},[(a(),l("svg",PK,[n("use",{href:e.copied?"#ui-icon-check":"#project-icon-copy"},null,8,AK)])),n("span",{"aria-live":"polite",textContent:p(e.copied?"Copied":"Copy link")},null,8,TK)]),n("a",{class:"btn share-open",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),v(" Open repository ",-1)])],8,OK)])]),n("p",IK,[v(p(e.repo?.options?.expirationMode!=="never"&&e.repo?.options?.expirationDate?"Expires "+e.fmt.date(e.repo.options.expirationDate):"Never expires"),1),t[18]||(t[18]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),t[19]||(t[19]=v("Reviewers don\u2019t need an account",-1)),e.repo?.options?.page?(a(),l(F,{key:0},[t[17]||(t[17]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),n("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"Open GitHub page",8,MK)],64)):f("v-if",!0)]),n("div",_K,[t[22]||(t[22]=n("h2",null,"Need to change something?",-1)),t[23]||(t[23]=n("p",null,"Edit the redacted terms or the expiry at any time. The link stays the same.",-1)),n("p",VK,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Edit anonymization",8,qK),t[20]||(t[20]=n("span",{"aria-hidden":"true"},"\xB7",-1)),t[21]||(t[21]=n("a",{href:"/dashboard"},"Go to My work",-1))])])])):f("v-if",!0)]),n("aside",$K,[n("dl",null,[t[28]||(t[28]=n("dt",null,"Source",-1)),e.repo?.source?.fullName?(a(),l("dd",{key:0,class:"task-source",title:"https://github.com/"+e.repo.source.fullName},[t[25]||(t[25]=v("github.com/",-1)),t[26]||(t[26]=n("wbr",null,null,-1)),v(p(e.repo.source.fullName.split("/")[0])+"/",1),t[27]||(t[27]=n("wbr",null,null,-1)),v(p(e.repo.source.fullName.split("/").slice(1).join("/")),1)],8,LK)):(a(),l("dd",FK,"Loading\u2026")),t[29]||(t[29]=n("dt",null,"Lifetime",-1)),n("dd",null,p(e.repo?.options?.expirationMode==="never"?"Never expire while subscribed":e.repo?.options?.expirationDate?"Until "+e.fmt.date(e.repo.options.expirationDate):"Loading\u2026"),1),t[30]||(t[30]=n("dt",null,"Review access",-1)),t[31]||(t[31]=n("dd",null,"Anonymous and free",-1))])])])])}var UK={class:"paper-footer"},BK={class:"paper-footer-inner"},zK={class:"paper-footer-col"},HK={key:0,href:"/dashboard"},jK={key:1,href:"/conferences"},GK={class:"paper-footer-foot"};function wp(e,t){return a(),l("footer",UK,[n("div",BK,[t[3]||(t[3]=n("div",{class:"paper-footer-brand"},[n("div",{class:"paper-footer-mark"},[v("Anonymous "),n("em",null,"GitHub")]),n("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),n("div",zK,[t[0]||(t[0]=n("div",{class:"paper-footer-head"},"Product",-1)),t[1]||(t[1]=n("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(a(),l("a",HK,"My work")):f("v-if",!0),e.user?(a(),l("a",jK,"Conferences")):f("v-if",!0),t[2]||(t[2]=n("a",{href:"/faq"},"FAQ",-1))]),t[4]||(t[4]=Se('',2))]),t[6]||(t[6]=n("div",{class:"paper-footer-rule"},null,-1)),n("div",GK,[n("span",null,"\xA9 "+p(e.year||new Date().getFullYear())+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[5]||(t[5]=n("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])}var ur={"partials/reviewConsent.htm":Gc,"partials/connections.htm":Wc,"partials/signin.htm":Kc,"partials/404.htm":Yc,"partials/admin/conferences.htm":Xc,"partials/admin/errors.htm":Qc,"partials/admin/overview.htm":Jc,"partials/admin/queues.htm":Zc,"partials/admin/repositories.htm":xc,"partials/admin/user.htm":ep,"partials/admin/users.htm":tp,"partials/anonymize.htm":np,"partials/anonymizePullRequest.htm":op,"partials/claim.htm":sp,"partials/conference.htm":ip,"partials/conferences.htm":rp,"partials/dashboard.htm":ap,"partials/explorer.htm":lp,"partials/faq.htm":dp,"partials/gist.htm":up,"partials/header.htm":cp,"partials/home.htm":pp,"partials/loading.htm":fp,"partials/newConference.htm":hp,"partials/pageView.htm":mp,"partials/pr-dashboard.htm":gp,"partials/profile.htm":vp,"partials/pullRequest.htm":yp,"partials/status.htm":bp,"partials/footer.htm":wp};var WK={class:"ui-icon-definitions","aria-hidden":"true",focusable:"false"};function kp(e,t){return a(),l("svg",WK,[...t[0]||(t[0]=[Se('',1)])])}function Cp(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1,t.sidebarHidden=!1,t.dirExpanded=!1,t.moreOpen=!1,t.tocOpen=!1,t.gotoOpen=!1,t.gotoValue="",t.gotoError="",t.mdFindOpen=!1,t.mdFindQuery="",t.mdFindTotal=0,t.mdFindIndex=0,t.mdFindCase=!1,t.accountOpen=!1,t.helpOpen=!1,t.sidebarWidth=Math.min(520,Math.max(220,Number(localStorage.getItem("sidebarWidth"))||(window.innerWidth>=1280?320:280))),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px"),t.startSidebarResize=s=>{s.preventDefault();let r=s.clientX,d=t.sidebarWidth,c=y=>{t.sidebarWidth=Math.min(520,Math.max(220,d+y.clientX-r)),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px")},u=()=>{window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",u),document.body.classList.remove("is-resizing"),localStorage.setItem("sidebarWidth",String(t.sidebarWidth))};document.body.classList.add("is-resizing"),window.addEventListener("pointermove",c),window.addEventListener("pointerup",u)}),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"},t.watchGroup(["options.diff","options.comments"],()=>{t.options[t.prTabState.active]||(t.prTabState.active=t.options.diff?"diff":t.options.comments?"comments":null)})),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let i={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(i){let s=Nt(()=>t.fmt.orderBy(t.fmt.filter(i[1](),t[i[2]]),t.orderBy));Object.defineProperty(t,i[0],{configurable:!0,get:()=>s.value})}}function Ep(e=(...t)=>fetch(...t)){async function t(i,s,r,d={}){let c=new URL(s,window.location.href);for(let[h,b]of Object.entries(d.params||{}))if(b!=null)for(let g of Array.isArray(b)?b:[b])c.searchParams.append(h,typeof g=="object"?JSON.stringify(g):g);let u=new AbortController,y;d.timeout?.then?d.timeout.then(()=>u.abort()):d.timeout&&(y=setTimeout(()=>u.abort(),d.timeout));try{let h={Accept:"application/json, text/plain, */*",...d.headers},b=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);b&&c.origin===window.location.origin&&(h["X-XSRF-TOKEN"]=decodeURIComponent(b[1]));let g;r!==void 0&&(r instanceof FormData?g=r:(h["Content-Type"]||(h["Content-Type"]="application/json;charset=utf-8"),g=JSON.stringify(r)));let k=await e(c.href,{method:i,headers:h,body:g,credentials:"same-origin",signal:u.signal}),R;if(d.onDownloadProgress&&k.ok&&k.body?.getReader&&typeof TextDecoder<"u"){let m=k.body.getReader(),E=new TextDecoder,M=[],_=0;try{for(;;){let{value:V,done:G}=await m.read();if(G)break;M.push(E.decode(V,{stream:!0})),_+=V.byteLength,d.onDownloadProgress(_)}M.push(E.decode()),R=M.join("")}finally{m.releaseLock()}}else R=await k.text();let S=R;if(d.transformResponse)S=d.transformResponse(R);else if(R&&(/json/i.test(k.headers.get("content-type")||"")||/^[\[{]/.test(R.trim())))try{S=JSON.parse(R)}catch{}let N={data:S,status:k.status,headers:m=>k.headers.get(m)};if(!k.ok)throw N;return N}catch(h){throw h.name==="AbortError"?{status:-1,data:null}:h}finally{clearTimeout(y)}}let o={};for(let i of["get","delete","head"])o[i]=(s,r)=>t(i.toUpperCase(),s,void 0,r);for(let i of["post","put","patch"])o[i]=(s,r,d)=>t(i.toUpperCase(),s,r,d);return o}var Sp={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((i,s)=>{e=i,t=s}),resolve:e,reject:t}}};var Np=function(e){function t(o){return o=o||{used:0,total:0},o.unlimited=!o.total,o.percent=o.unlimited?0:Math.min(100,o.used*100/o.total),o.level=o.unlimited?"unlimited":o.percent>=95?"danger":o.percent>=80?"warn":"ok",o}return{decorate:t,load:function(){return e.get("/api/user/quota").then(o=>{let i=o.data||{};return i.storage=t(i.storage),i.file=t(i.file),i.repository=t(i.repository),i})}}};var Rp={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=Et(null);return fn(()=>{let i=[t.value][0];i.classList.add("html-doc");function s(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let d=document.createElement("iframe");d.className="html-doc-frame",d.setAttribute("title","Rendered HTML document");let c=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&c.push("allow-scripts","allow-forms","allow-modals"),d.setAttribute("sandbox",c.join(" ")),d.setAttribute("referrerpolicy","no-referrer"),i.appendChild(d);let u="";e.baseUrl&&(u=''),d.srcdoc=u+r}dt(()=>e.content,s,{immediate:!0}),dt(()=>e.baseUrl,s,{immediate:!0}),dt(()=>e.allowScripts,s,{immediate:!0})}),()=>Ae("html-doc",{ref:t})}};var Dp={name:"pdfviewer",props:["src"],setup(e){let t=Et(null);return fn(()=>{let o=[t.value],i=400,s=[.5,.75,1,1.25,1.5,2,3],r=1e3,d=o[0];d.classList.add("pdf-viewer");let c=null,u=[],y=!1,h=null,b=1,g=0,k=1,R=0,S=0,N=612/792,m=0,E=null,M=new Map,_=0;function V(A){let L=M.get(A);L&&(L.cancelled=!0,L.task?.cancel?.(),M.delete(A));let Q=A.querySelector("canvas");Q&&(Q.width=0,Q.height=0),A.innerHTML="",delete A.dataset.state}let G=document.createElement("div");G.className="pdf-toolbar";let ee=document.createElement("div");ee.className="pdf-pages",ee.tabIndex=0,ee.setAttribute("aria-label","PDF pages"),d.appendChild(G),d.appendChild(ee);function X(A,L,Q){let H=document.createElement("button");return H.type="button",H.className="pdf-toolbar-btn",H.title=L,H.setAttribute("aria-label",L),H.innerHTML='',H.addEventListener("click",Q),H}let O=X("fa-chevron-up","Previous page",function(){Be(k-1)}),U=X("fa-chevron-down","Next page",function(){Be(k+1)}),C=document.createElement("input");C.type="text",C.className="pdf-toolbar-page",C.setAttribute("aria-label","Page number"),C.title="Page number \u2014 type a page and press Enter",C.addEventListener("keydown",function(A){A.key==="Enter"&&(Be(parseInt(C.value,10)),C.blur())}),C.addEventListener("blur",function(){C.value=String(k)});let q=document.createElement("span");q.className="pdf-toolbar-count";let z=X("fa-search-minus","Zoom out",function(){me(s[Math.max(0,he()-1)])}),K=X("fa-search-plus","Zoom in",function(){me(s[Math.min(s.length-1,he()+1)])}),ie=document.createElement("button");ie.type="button",ie.className="pdf-toolbar-btn pdf-toolbar-zoom",ie.title="Reset zoom to fit the width",ie.setAttribute("aria-label","Reset zoom to fit the width"),ie.addEventListener("click",function(){me(1)}),G.appendChild(O),G.appendChild(U);let ne=document.createElement("span");ne.className="pdf-toolbar-group",ne.appendChild(C),ne.appendChild(q),G.appendChild(ne);let Y=document.createElement("span");Y.className="pdf-toolbar-group pdf-toolbar-right",Y.appendChild(z),Y.appendChild(ie),Y.appendChild(K),G.appendChild(Y);function he(){let A=0;for(let L=0;L=A,ie.textContent=b===1||!g?"Fit":Math.round(Re()/(g*96/72)*100)+"%",z.disabled=he()===0,K.disabled=he()===s.length-1}function Ue(A){let L=u[A-1];L&&(ee.scrollTop+=L.getBoundingClientRect().top-ee.getBoundingClientRect().top)}function Be(A){if(!c||isNaN(A))return;let L=Math.min(Math.max(1,A),c.numPages);u[L-1]&&(Ue(L),k=L,R=L,S=Date.now()+800,Ee(),W())}function Je(){if(!u.length||Date.now(){}),E=null),h&&(clearTimeout(h),h=null),c&&(c.destroy(),c=null),u=[],k=1,ee.innerHTML="",Ee()}function et(){ee.innerHTML="";let A=document.createElement("div");A.className="pdf-viewer-error",A.textContent="This PDF could not be displayed.",ee.appendChild(A)}function Re(){let A=Math.max(120,ee.clientWidth-24);return Math.round(Math.min(A,r)*b)}function Fe(A,L,Q){let H=window.devicePixelRatio||1,J=A.getViewport({scale:1}),ae=parseFloat(L.style.width);if(!ae)return;let te=A.getViewport({scale:ae/J.width*H}),oe=document.createElement("canvas");return oe.width=Math.floor(te.width),oe.height=Math.floor(te.height),oe.style.width=ae+"px",oe.style.height=Math.floor(te.height/H)+"px",L.innerHTML="",L.appendChild(oe),L.style.height=oe.style.height,Q.task=A.render({canvasContext:oe.getContext("2d"),viewport:te}),Q.task.promise}function W(){if(!c)return;let A=m,L=ee.getBoundingClientRect(),Q=L.top-i,H=L.top+ee.clientHeight+i,J=u.map((te,oe)=>({slot:te,i:oe,rect:te.getBoundingClientRect()})).filter(te=>te.rect.top<=H&&te.rect.bottom>=Q).sort((te,oe)=>Math.abs(te.rect.top-L.top)-Math.abs(oe.rect.top-L.top)).slice(0,6),ae=new Set(J.map(te=>te.slot));for(let te of M.keys())ae.has(te)||V(te);for(let{slot:te,i:oe}of J){if(te.dataset.state||_>=2)continue;let x={cancelled:!1,task:null};M.set(te,x),_++,te.dataset.state="rendering";let ke;c.getPage(oe+1).then(pe=>{if(ke=pe,!(x.cancelled||A!==m))return Fe(ke,te,x)}).then(()=>{x.cancelled||A!==m||(te.dataset.state="done",R&&Date.now(){!x.cancelled&&A===m&&(te.dataset.state="failed")}).finally(()=>{_--,ke?.cleanup?.(),c&&W()})}}function fe(){y||(y=!0,window.requestAnimationFrame(function(){y=!1,Je(),W()}))}function de(){let A=!1;function L(){A||(A=!0,W())}window.requestAnimationFrame(L),window.setTimeout(L,50)}function ce(){m++,u.forEach(V);let A=Re();u.forEach(function(L){delete L.dataset.state,L.innerHTML="",L.style.width=A+"px",L.style.height=Math.round(A/N)+"px"}),W()}function me(A){if(!c||!u.length||A===b)return;let L=k;b=A,Ee(),ce(),Be(L)}function Ie(){c&&(h&&clearTimeout(h),h=setTimeout(function(){h=null,c&&u.length&&ce()},250))}function D(A){if(He(),!A)return;let L=m;E=pdfjsLib.getDocument({url:A,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}),E.promise.then(function(Q){if(L!==m){Q.destroy();return}return c=Q,c.getPage(1).then(function(H){if(L!==m)return;let J=H.getViewport({scale:1});J.width&&J.height&&(N=J.width/J.height),g=J.width||0;let ae=Re();for(let te=1;te<=c.numPages;te++){let oe=document.createElement("div");oe.className="pdf-viewer-page",oe.style.width=ae+"px",oe.style.height=Math.round(ae/N)+"px",ee.appendChild(oe),u.push(oe)}Ee(),de()})}).catch(function(){L===m&&et()})}ee.addEventListener("scroll",fe,{passive:!0}),$(window).on("resize",Ie),Ee(),dt(()=>e.src,D,{immediate:!0}),so(function(){ee.removeEventListener("scroll",fe),$(window).off("resize",Ie),He()})}),()=>Ae("pdfviewer",{ref:t})}};var KK={key:0,class:"quota-row quota-usage"},YK={class:"quota-header"},XK={class:"quota-label"},QK={class:"project-type-svg","aria-hidden":"true"},JK=["href"],ZK={key:0,class:"quota-percent"},xK={key:1,class:"quota-unlimited-tag"},eY={class:"quota-value"},tY={key:0},nY=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],oY={key:1,class:"quota-remaining"},sY={key:2,class:"quota-remaining quota-limit"};function Pp(e,t){return e.quota?(a(),l("div",KK,[(a(),l(F,null,se([{key:"repository",label:"Repositories",kind:"count",icon:"project-type-repo"},{key:"storage",label:"Storage",kind:"bytes",icon:"project-icon-storage"},{key:"file",label:"Files",kind:"count",icon:"project-icon-file"}],o=>n("div",{class:P(["quota-item","quota-"+e.quota[o.key].level]),key:o.key},[n("div",YK,[n("span",XK,[(a(),l("svg",QK,[n("use",{href:"#"+o.icon},null,8,JK)])),v(p(o.label),1)]),e.quota[o.key].unlimited?f("v-if",!0):(a(),l("span",ZK,p(e.quota[o.key].percent>0&&e.quota[o.key].percent<1?"<1":e.fmt.number(e.quota[o.key].percent,0))+"% used",1)),e.quota[o.key].unlimited?(a(),l("span",xK,"Unlimited")):f("v-if",!0)]),n("div",eY,[n("strong",null,p(e.formatAmount(e.quota[o.key].used,o.kind)),1),e.quota[o.key].unlimited?f("v-if",!0):(a(),l("span",tY," / "+p(e.formatAmount(e.quota[o.key].total,o.kind)),1))]),e.quota[o.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:P(["quota-track","quota-"+e.quota[o.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":o.label+" quota","aria-valuenow":Math.min(e.quota[o.key].used,e.quota[o.key].total),"aria-valuemax":e.quota[o.key].total,"aria-valuetext":e.fmt.number(e.quota[o.key].percent,0)+"% used"},[e.quota[o?.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:"quota-fill",style:$e({width:e.quota[o.key].percent+"%"})},null,4))],10,nY)),!e.quota[o.key].unlimited&&e.quota[o.key].used=e.quota[o.key].total?(a(),l("p",sY,p(e.quota[o.key].used>e.quota[o.key].total?"Limit exceeded":"Limit reached"),1)):f("v-if",!0)],2)),64))])):f("v-if",!0)}var iY={props:["quota","fmt"],setup(e){return{formatAmount:(t,o)=>o==="bytes"?e.fmt.humanFileSize(e.quota?.storage?.unit==="bytes"?t*8:t).replace(/([a-zA-Z]+)$/," $1"):e.fmt.number(t)}},render:Pp},rY=new Set(ve),Op=e=>e?.querySelectorAll("pre code.language-diff, pre code.lang-diff").forEach(t=>{if(t.querySelector(".md-diff-line"))return;let o=t.innerHTML.replace(/\n$/,"").split(` -`);t.innerHTML=o.map(i=>{let s=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":s==="+"?"add":s==="-"?"remove":"";return`${i||" "}`}).join(` -`)}),Ap=(e,t=0)=>{let o=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+o+4,24)},Ip=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let o=t.querySelectorAll(".md-diff-line");if(o.length){o.forEach(s=>{s.classList.contains("is-hunk")||s.style.setProperty("--hang",Ap(s.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(` -`).map(s=>{let r=i.join("");s.replace(/<\/?span\b[^>]*>/g,c=>(c.startsWith("]+>/g,"");return`${r}${s||" "}${"".repeat(i.length)}`}).join(` -`)})},Mp={props:["content","terms","options"],setup(e){let t=Et(null),o=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Op(t.value),Ip(t.value)};return fn(()=>{o(),dt(()=>[e.content,e.terms,e.options],o,{deep:!0})}),()=>Ae("markdown",{ref:t})}},aY={props:["file","terms","options"],setup(e){let t=Et(null),o=()=>tt(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Op(t.value),Ip(t.value)});return fn(o),dt(()=>[e.file?.content,e.terms,e.options],o,{deep:!0}),()=>{let i=e.file||{},s=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(s)||i.language==="Markdown")return Ae("gist-file",{ref:t},Ae(Mp,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},d=(i.language||s||"none").toLowerCase();return Ae("gist-file",{ref:t},Ae("pre",{class:"line-numbers"},Ae("code",{class:"language-"+(r[d]||d),key:i.content},i.content||"")))}}},lY=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let o=document.createElement("div");o.className="nb-code-scroll",t.replaceWith(o),o.appendChild(t);let i=()=>{let s=t.scrollWidth-t.clientWidth>1;if(o.classList.toggle("is-overflowing",s),o.classList.toggle("is-at-end",s&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!s)return;let r=t.clientWidth-16,d=Math.max(24,r*t.clientWidth/t.scrollWidth);o.style.setProperty("--thumb-w",d+"px"),o.style.setProperty("--thumb-x",(r-d)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),dY={props:["file","content"],setup(e){let t=Et(null),o=0,i,s=async()=>{let r=++o;i?.abort(),i=new AbortController;try{let d=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(c=>{if(!c.ok)throw Error("Notebook request failed");return c.json()});if(await Xn("notebook"),r!==o)return;t.value.innerHTML=qs(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(c=>window.Prism?.highlightElement(c)),lY(t.value)}catch(d){r===o&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return fn(()=>{s(),dt(()=>[e.file,e.content],s)}),so(()=>{o++,i?.abort()}),()=>Ae("notebook",{ref:t})}},uY={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),o=t.reduce((i,[,s])=>i+s.code,0);return Ae("loc",t.map(([i,s])=>Ae("div",{class:"lang",title:`${i}: ${s.code.toLocaleString()} lines`,style:{width:s.code*100/o+"%",background:langColors[i]}})))}}},_p={Markdown:Mp,GistFile:aY,Notebook:dY,Loc:uY,HtmlDoc:Rp,QuotaUsage:iY,Pdfviewer:id(async()=>(await Xn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Dp))},Vp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ni(),e._editorDisposed)return;let o=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(o.content??""),-1),Tp(e,o.options),e._editorCleanup=o.options?.onLoad?.(i)}catch(o){e._editorDisposed||(e.textContent=o.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Tp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Tp(e,t={}){let o=rY.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+o),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var qp={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],o=new Set,i=new IntersectionObserver(s=>{s.forEach(d=>d.isIntersecting?o.add(d.target.id):o.delete(d.target.id));let r=t.find(d=>o.has(d.hash.slice(1)));r&&t.forEach(d=>d.classList.toggle("active",d===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});tt(()=>{t.forEach(s=>{let r=document.getElementById(s.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(s=>s.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function $p(e){let t=[],o=0,i=/\bXXXX-(\d+)\b/g,s;for(;s=i.exec(e);)s.index>o&&t.push(e.slice(o,s.index)),t.push(Ae("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+s[1]},[Ae("i",null,s[1])])),o=s.index+s[0].length;return t.length?(o{o.push(r),d=1024&&ifY(e.file)),c=()=>e.selectedPath??"/"+(Array.isArray(o.params.path)?o.params.path.join("/"):o.params.path||"");dt(()=>[o.params.repoId,o.params.path,e.selectedPath],()=>{let k="";c().split("/").filter(Boolean).forEach(R=>{k+="/"+R,s[k]=!0})},{immediate:!0});let u=Nt(()=>{if(!e.searchQuery||!e.searchResults)return null;let k=new Set,R=new Set;return e.searchResults.forEach(S=>{k.add(S.path?`${S.path}/${S.name}`:S.name);let N="";(S.path||"").split("/").filter(Boolean).forEach(m=>{N=N?N+"/"+m:m,R.add(N)})}),{files:k,folders:R}}),y=()=>[...i.value.querySelectorAll("li > a")],h=k=>{if(i.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),!k)return;if(r=k.dataset.path,k.classList.add("tree-focused"),e.selectedPath===void 0){k.scrollIntoView?.({block:"nearest"}),i.value.focus();return}let R=i.value.scrollHeight>i.value.clientHeight?i.value:i.value.closest(".leftCol-body");if(R){let S=k.getBoundingClientRect(),N=R.getBoundingClientRect();S.topN.bottom&&(R.scrollTop+=S.bottom-N.bottom)}i.value.focus({preventScroll:!0})};function b(k){let R=y(),S=i.value.querySelector(".tree-focused")||R[0],N=R.indexOf(S);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(k.key)||(k.preventDefault(),k.key==="ArrowDown"&&h(R[(N+1)%R.length]),k.key==="ArrowUp"&&h(R[(N-1+R.length)%R.length]),!S))return;let m=S.closest("li");k.key==="ArrowRight"&&m.classList.contains("folder")&&(m.classList.contains("open")?h(m.querySelector(":scope > ul > li > a")):S.click()),k.key==="ArrowLeft"&&(m.classList.contains("folder")&&m.classList.contains("open")?S.click():h(m.parentElement.closest("li.folder")?.querySelector(":scope > a"))),k.key==="Enter"&&S.click()}function g(k,R=""){let S=[...k].sort((N,m)=>+!!m.children-+!!N.children||N.name.localeCompare(m.name));return Ae("ul",S.flatMap(N=>{let m=N,E=m.name,M=(R+"/"+E).slice(1);if(u.value&&!u.value.files.has(M)&&!u.value.folders.has(M))return[];for(;m.children?.length===1&&m.children[0].children&&e.page?.loadedFolders?.[(R+"/"+E).slice(1)];)m=m.children[0],E+="/"+m.name;let _=R+"/"+E,V=!!m.children,G=u.value?s[_]!==!1:!!s[_],ee=V&&e.page?.options?.truncatedFolders?.includes(_.slice(1)),X=Ae("span",{class:V?"tree-icon-folder":"far fa-file tree-icon-file","aria-hidden":"true"},V?Ae("svg",{viewBox:"0 0 14 12",focusable:"false"},Ae("path",{d:"M1.5 10.5v-9h4l1.5 2h5.5v7z"})):null),O=!1,U=E,C="",q="";if(E.length>80){let ne=E.length-12;for(let Y=E.length-18;Y<=E.length-6;Y++)if(Y>0&&"-_. ".includes(E[Y])){ne=Y;break}if(O=!/XXXX-\d+/.test(E.slice(Math.max(0,ne-12))),U=E.slice(0,ne).trimEnd(),C=E.slice(ne).trimStart(),O){let Y=Math.max(8,30-C.length-1);if(U.length>Y&&!/XXXX-\d+/.test(U)){let he=-1;for(let Ue=Math.min(Y,U.length);Ue>=4;Ue--)if(".-_".includes(U[Ue])){he=Ue;break}let Ee=E.slice(0,E.length-C.length);U=(he>0?U.slice(0,he):U.slice(0,Y)).trimEnd(),q=Ee.slice(U.length)}}}let z=Ae("span",{class:{"tree-name":!0,"tree-name-split":O,"tree-name-wrap":!O},title:E.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]")},O?[Ae("span",{class:{"tree-name-head":!0,"is-cut":!!q}},$p(U)),q?Ae("span",{class:"tree-name-middle"},q):null,Ae("span",{class:"tree-name-tail"},C)]:cY(E)),K=ne=>{if(h(ne.currentTarget),!V){e.selectedPath!==void 0&&(ne.preventDefault(),t("select",_));return}ne.preventDefault(),s[_]=!G,s[_]&&!m.children.length&&e.page.getFiles(_.slice(1)),tt(()=>h(y().find(Y=>Y.dataset.path===r)))},ie=Ae("a",{"data-path":_,"aria-expanded":e.selectedPath!==void 0&&V?String(G):void 0,"aria-current":e.selectedPath!==void 0&&!V&&c()===_?"page":void 0,href:V?void 0:`/r/${encodeURIComponent(o.params.repoId)}${encodePathForUrl(_)}`,class:{"tree-focused":r===_},onClick:K},[V?Ae("span",{class:"tree-toggle"}):Ae("span",{class:"tree-spacer"}),X,z,ee?Ae("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},Ae("i",{class:"fas fa-exclamation-triangle"})):null]);return Ae("li",{key:_,class:{file:!0,folder:V,open:G,active:c()===_,truncated:ee},title:V?"":`Size: ${pY(m.size||0)}`},[ie,V&&G?m.children.length||!e.page?.loadedFolders?.[_.slice(1)]?g(m.children,_):Ae("ul",Ae("li",{class:"tree-empty"},"Empty folder")):null])}))}return()=>Ae("tree",{ref:i,tabindex:0,onKeydown:b},e.file?.length?u.value?.files.size===0?Ae("div",{class:"tree-search-empty"},"No files found"):g(d.value):"Empty repository")}};function Up(){return ot({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function Bp(e,t){if(!e[t]){let o=Up();Object.defineProperty(o,"invalid",{get(){return Object.values(o.errors).some(Boolean)||Object.keys(o).some(i=>i!=="invalid"&&o[i]&&typeof o[i]=="object"&&o[i].invalid)}}),e[t]=o}return e[t]}var zp={beforeMount(e,{value:t}){e._formState=Bp(t,e.name),e.addEventListener("submit",o=>o.preventDefault())}};function hY(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function Fp(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?hY(t):t??""),Xa(e)}function Xa(e){let t=e._field.validation;if(!t)return;let o=e.validity;for(let[i,s]of Object.entries({required:o.valueMissing,pattern:o.patternMismatch,min:o.rangeUnderflow,max:o.rangeOverflow,date:o.badInput,email:o.typeMismatch&&e.type==="email",url:o.typeMismatch&&e.type==="url"}))t.setValidity(i,e.disabled||!s)}var Hp={beforeMount(e,{value:t}){var d;let o=t.form&&Bp(t.state,t.form),i=o&&e.name?o[d=e.name]||(o[d]=Up()):null;e._field={binding:t,validation:i,timer:null};let s=()=>{clearTimeout(e._field.timer),e._field.timer=null;let c=e._field.binding,u=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(u=e.value===""?null:Number(e.value)),e.type==="date"&&(u=e.value?new Date(e.value+"T00:00:00"):null),i){i.setDirty();for(let y of Object.keys(i.errors))i.setValidity(y,!0)}c.set(u),Xa(e),c.change?.()}};e._field.commit=s;let r=c=>{let u=e._field.binding.options?.debounce||0,y=typeof u=="number"?u:u[c.type]??u.default??0;clearTimeout(e._field.timer),y?e._field.timer=setTimeout(s,y):s()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",r),e.addEventListener("blur",()=>{i&&(i.touched=!0),e._field.timer&&s()})},mounted:Fp,updated(e,{value:t}){e._field.binding=t,Fp(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:o}=e._field,i=t.form&&t.state[t.form];i&&i[e.name]===o&&delete i[e.name]}};function jp(e,t){let o=e.target.closest("form");if(o?._formState&&(o._formState.submitted=!0),o?.querySelectorAll("input, select, textarea").forEach(i=>{i._field?.timer&&i._field.commit(),i._field&&Xa(i)}),o&&!o.checkValidity()){let i=o.querySelector("input:invalid, select:invalid, textarea:invalid");i?.scrollIntoView?.({block:"center"}),i?.focus(),o.reportValidity();return}return t()}var Gp=Symbol("session"),mY=/^\/(w|api|github)(\/|$)/;function Wp(e,t={}){let o=e?.split(".").reduce((i,s)=>i?.[s],Wn);return o==null&&e?.startsWith("ERRORS.")&&(o=Wn.ERRORS.unknown_error),String(o??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(i,s)=>t[s]??"")}var gY={...wa,translate:Wp};function vY(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function yY(e="#app",t={}){let o=!!document.querySelector('meta[name="review-consent-page"][content="1"]'),i=o&&window.location.pathname==="/review-link"?ol(window):null,s=()=>{let g=i;return i=null,g};!t.history&&window.location.pathname==="/"&&/^#!\/r\/[^/?#]+/.test(window.location.hash)&&window.history.replaceState(window.history.state,"",window.location.hash.slice(2));let r=new Map,d=Ep(t.fetch),c,u;function y(){let g=Rt(),k={url(S){return S===void 0?u.currentRoute.value.fullPath:(u.push(S),k)},replace(S){return u.replace(S)},path(){return u.currentRoute.value.path},search(){return u.currentRoute.value.query}},R=new Proxy({},{get(S,N){let m=u.currentRoute.value.params[N];return Array.isArray(m)?m.join("/"):m}});return{takeReviewHandoff:s,http:d,...g,location:k,params:R,window,promises:Sp,html:{trustAsHtml:S=>S},translate:(S,N)=>Promise.resolve(Wp(S,N)),quotaService:Np(d)}}function h(g){return{name:g.template,setup(){let k=Vs(Mt(Gp),r);g.setup(k,y()),Cp(g.template,k);let R=[];return()=>ur[g.template](k,R)}}}u=Mu({history:t.history||Tu(),routes:jc.map(g=>g.redirect?g:{path:g.path,component:h(g),meta:{title:g.title,preserveExplorer:g.preserveExplorer}})});let b=Jd({setup(){c=Vs(null,r),c.fmt=gY,c.window=window,c.Math=Math,c.sanitize=S=>DOMPurify.sanitize(S??""),c.highlightRedactions=S=>(c.site_options,Ac(S)),c.submitForm=jp,c.safeUrl=vY;let g=y();Tc(c,g.http,g.location,g.timeout),oo(Gp,c),dt(()=>c.title,S=>{document.title=S||"Anonymous GitHub"});let k=[],R=S=>{let N=S.target.closest?.("a[href]");if(S.defaultPrevented||S.button!==0||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||!N||N.hasAttribute("download")||N.target&&N.target!=="_self"||N.dataset.toggle||N.getAttribute("href").startsWith("#"))return;let E=new URL(N.href,window.location.href);o||/^\/review-link\/?$/i.test(E.pathname)||E.origin!==window.location.origin||mY.test(E.pathname)||(S.preventDefault(),u.push(E.pathname+E.search+E.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",R),so(()=>document.removeEventListener("click",R)),()=>[kp(c,[]),o||/^\/(r|repository)\//.test(c.path||"")?null:Ae("header",{class:["app-header",{"is-contained":c.path==="/"||c.path==="/faq","is-signin":c.path==="/signin"}]},ur["partials/header.htm"](c,k)),Ae("main",{class:"app-view align-items-stretch w-100"},Ae(ha,null,{default:({Component:S,route:N})=>S?Ae(S,{key:N.meta.preserveExplorer?N.matched[0]?.path:N.path}):null})),Ae("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},c.toasts.map((S,N)=>Ae("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:N},[Ae("div",{class:"toast-header"},[Ae("strong",{class:"mr-auto"},S.title),Ae("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>c.removeToast(S)},"\xD7")]),Ae("div",{class:"toast-body"},S.body)])))]}});for(let[g,k]of Object.entries(_p))b.component(g,k);return b.component("Tree",Lp),b.component("PartialView",{props:["name","state"],setup(g){let k=[];return()=>ur[g.name](g.state,k)}}),b.directive("field",Hp),b.directive("form",zp),b.directive("code-editor",Vp),b.directive("paper-scrollspy",qp),b.use(u),u.beforeEach(async g=>{if(g.path==="/review-link"&&!o||o&&g.path!=="/review-link")return window.location.assign(g.fullPath),!1;c?.emit("routeLeave"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(g.path)&&await Xn("markdown"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(g.path)&&await Xn("org")}),u.afterEach(g=>{if(!c)return;c.title=g.meta.title,c.emit("routeChange",{title:g.meta.title}),c.emit("routeUpdate",{title:g.meta.title});let k=document.querySelector(".app-view");!g.meta.preserveExplorer&&k&&(k.scrollTop=0)}),b.mount(e),{app:b,router:u,state:c}}document.querySelector("#app")&&(window.anonymousApp=yY());})(); +jane.smith@example.org`},null,8,dj),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",uj,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=g("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=g(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=g(" for a custom replacement. Regex is supported.",-1))])]),D(n("div",cj,"Terms are in an invalid format.",512),[[Q,e.defaultsForm?.terms?.errors?.format]])])]),n("section",pj,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",fj,[n("label",hj,[D(n("input",mj,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=g("Keep links",-1))]),n("label",gj,[D(n("input",vj,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=g("Display images",-1))]),n("label",yj,[D(n("input",bj,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=g("Display PDFs",-1))]),n("label",wj,[D(n("input",kj,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=g("Display notebooks",-1))]),n("label",Cj,[D(n("input",Ej,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=g("Show line counts",-1))]),n("label",Sj,[D(n("input",Nj,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=g("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",Rj,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",Pj,[D(n("input",Aj,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=g("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",Dj,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[D((a(),l("select",Tj,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",Oj,c(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",Ij,[n("div",Mj,[e.draftRestored?(a(),l("span",Vj,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",qj,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",_j,c(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:P(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,$j),e.error?(a(),l("div",Lj,c(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Q,e.settingsTab==="defaults"]]),D(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",Uj,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",Bj,[g(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,zj)])):f("v-if",!0),e.billingNotice?(a(),l("p",Hj,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",jj,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,Gj)])):f("v-if",!0),n("section",Wj,[n("div",Kj,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",Yj,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",Xj,[g(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access until ":"Renews ")+c(e.billingDate(e.profileAuthorGrant().until)),1),e.profileAuthorPurchase()?.amount!=null?(a(),l(q,{key:0},[g(" \xB7 "+c(e.billingPrice(e.profileAuthorPurchase())),1)],64)):f("v-if",!0)])):e.billing?.allowance?(a(),l("p",Jj,c(e.billing.allowance.repositories)+" repositories \xB7 "+c(e.billingBytes(e.billing.allowance.storage))+" \xB7 links up to "+c(e.billing.freeExpirationMonths||5)+" months",1)):f("v-if",!0)]),e.profileAuthorGrant()&&e.billing?.portal?(a(),l("div",Qj,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[5]||(t[5]=r=>e.billingPortal()),disabled:e.billingBusy},c(e.profileAuthorGrant().cancelAtPeriodEnd?"Resume renewal":"Change or cancel plan"),9,Zj)])):f("v-if",!0)]),n("div",xj,[e.quota?(a(),Gt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):(a(),l("p",eG,"Loading usage\u2026"))]),e.quota?.repository&&!e.quota.repository.unlimited&&e.quota.repository.used>=e.quota.repository.total?(a(),l("p",tG,[g("Your free repositories are used up. Add the next one for "+c(e.profileSlotPlan()?e.billingPrice(e.profileSlotPlan()):"a one-time payment")+" when you create it, or ",1),t[45]||(t[45]=n("a",{href:"/dashboard"},"remove work you no longer need",-1)),t[46]||(t[46]=g(".",-1))])):f("v-if",!0),e.profileAuthorGrant()?.status==="past_due"?(a(),l("p",nG,"A subscription payment is overdue. Update your payment details in Manage billing and invoices.")):f("v-if",!0),e.profilePastSubscription()?(a(),l("p",sG,[...t[47]||(t[47]=[g("Your previous subscription has ended. Never-expiring repositories stay online for a 90-day grace period. ",-1),n("a",{href:"/dashboard"},"Review expiration dates",-1),g(".",-1)])])):f("v-if",!0),t[48]||(t[48]=n("p",{class:"billing-footnote"},"Co-authored, paid and conference repositories aren't counted here.",-1))]),e.billing?.enabled&&!e.profileAuthorGrant()&&(e.profilePackPlan()||e.profileAuthorPlans().length)?(a(),l("section",oG,[t[85]||(t[85]=n("h2",{class:"billing-section-title",id:"settings-plan-comparison",tabindex:"-1"},"Get more",-1)),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?f("v-if",!0):(a(),l("div",iG,[e.profilePackPlan()?(a(),l("article",rG,[t[54]||(t[54]=n("span",{class:"billing-offer-pill"},"Recommended",-1)),t[55]||(t[55]=n("div",{class:"billing-offer-head"},[n("p",{class:"billing-eyebrow"},"For one paper")],-1)),t[56]||(t[56]=n("h3",null,"Paper pack",-1)),n("p",aG,[n("strong",null,c(e.billingAmount(e.profilePackPlan())),1),t[49]||(t[49]=g(" once",-1))]),n("ul",lG,[t[50]||(t[50]=n("li",null,"One more repository, outside your free ones",-1)),n("li",null,"Its own "+c(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" of storage",1),t[51]||(t[51]=n("li",null,"Automatic updates for 180 days",-1)),t[52]||(t[52]=n("li",null,"Online for up to a year",-1)),t[53]||(t[53]=n("li",null,"No subscription",-1))]),n("button",{type:"button",class:"btn btn-ink",onClick:t[6]||(t[6]=r=>e.openProfileAddon("repo_pack")),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy a Paper pack",8,dG)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("article",uG,[n("div",cG,[t[57]||(t[57]=n("p",{class:"billing-eyebrow"},"For many papers",-1)),n("div",pG,[(a(!0),l(q,null,x(e.profileAuthorPlansByValue(),r=>(a(),l("button",{type:"button",role:"radio",key:r.id,"aria-checked":e.profileSelectedPlan()?.id===r.id?"true":"false",class:P({"is-on":e.profileSelectedPlan()?.id===r.id}),onClick:d=>e.profilePlan=r.id},[g(c(r.interval==="year"?"Yearly":"Monthly"),1),r.interval==="year"&&e.profileAnnualSavings()?(a(),l("span",hG,"\u2212"+c(e.profileAnnualSavings())+"%",1)):f("v-if",!0)],10,fG))),128))])]),t[62]||(t[62]=n("h3",null,"Author subscription",-1)),n("p",mG,[n("strong",null,c(e.billingAmount(e.profileSelectedPlan())),1),g(" per "+c(e.profileSelectedPlan()?.interval==="year"?"year":"month"),1)]),n("ul",gG,[n("li",null,c(e.profileSelectedPlan()?.repositories)+" repositories, "+c(e.billingBytes(e.profileSelectedPlan()?.storage)),1),t[58]||(t[58]=n("li",null,"Automatic updates",-1)),t[59]||(t[59]=n("li",null,"Links that never expire",-1)),t[60]||(t[60]=n("li",null,"Coauthors included",-1)),t[61]||(t[61]=n("li",null,"Cancel renewal anytime",-1))]),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.billingBusy||e.billing.checkoutEnabled===!1,onClick:t[7]||(t[7]=r=>e.checkout(e.profileSelectedPlan().id))},c(e.billingBusy?"Please wait\u2026":"Subscribe"),9,vG)])):f("v-if",!0)])),e.profileSingleAddons().length&&!(e.showRepositoryPass&&e.profileAddon()&&!e.billingPending)?(a(),l("div",yG,[t[63]||(t[63]=n("div",{class:"billing-addons-head"},[n("h3",{class:"billing-subtitle"},"Or pay for one thing"),n("span",null,"One-time")],-1)),n("ul",bG,[(a(!0),l(q,null,x(e.profileSingleAddons(),r=>(a(),l("li",{key:r.id},[n("div",null,[n("strong",null,c(r.name),1),n("span",null,c(e.profileAddonBlurb(r.id)),1)]),n("span",wG,c(e.billingAmount(r)),1),n("button",{type:"button",class:"settings-text-button",onClick:d=>e.openProfileAddon(r.id),disabled:e.billingPending||e.billing.checkoutEnabled===!1},"Buy",8,kG)]))),128))])])):f("v-if",!0),e.showRepositoryPass&&e.profileAddon()&&!e.billingPending?(a(),l("div",CG,[n("div",EG,[n("button",{type:"button",class:"btn btn-outline-ink billing-back",onClick:t[8]||(t[8]=r=>e.showRepositoryPass=!1)},"\u2190 All options"),n("h3",null,c(e.profileAddon().name),1),n("p",SG,[n("strong",null,c(e.billingAmount(e.profileAddon())),1),t[64]||(t[64]=g(" once",-1))]),n("ul",NG,[(a(!0),l(q,null,x(e.profileAddonFeatures(e.profileAddon().id),r=>(a(),l("li",{key:r},c(r),1))),128))])]),n("div",RG,[e.profileRepositories().length?(a(),l(q,{key:0},[t[66]||(t[66]=n("label",{class:"paper-field-label",for:"billing-repository"},"Which repository?",-1)),D(n("select",{id:"billing-repository",class:"form-control","onUpdate:modelValue":t[9]||(t[9]=r=>e.billingRepository=r)},[t[65]||(t[65]=n("option",{value:"",disabled:""},"Choose a repository",-1)),(a(!0),l(q,null,x(e.profileRepositories(),r=>(a(),l("option",{key:r.repoId,value:r.repoId},c(r.repoId)+" \xB7 "+c(e.profileRepositoryExpiry(r)),9,PG))),128))],512),[[mn,e.billingRepository]]),n("button",{type:"button",class:"btn btn-ink",disabled:e.billingBusy||!e.billingRepository||e.billing.checkoutEnabled===!1,onClick:t[10]||(t[10]=r=>e.checkout(e.profileAddon().id,e.billingRepository))},c(e.billingBusy?"Please wait\u2026":"Continue to checkout"),9,AG),t[67]||(t[67]=n("p",{class:"billing-footnote"},"One-time payment. Tax shown at checkout.",-1))],64)):(a(),l("p",DG,[...t[68]||(t[68]=[g("You have no repositories yet. ",-1),n("a",{href:"/anonymize"},"Create one",-1),g(" first.",-1)])])),["repo_slot","repo_pack"].includes(e.profileAddon().id)?(a(),l("p",TG,[...t[69]||(t[69]=[g("Adding a new repository? ",-1),n("a",{href:"/anonymize"},"Start creating it",-1),g("; the form offers this once your free repositories are in use.",-1)])])):f("v-if",!0)])])):f("v-if",!0),n("details",OG,[t[84]||(t[84]=n("summary",null,"Compare all features",-1)),n("div",IG,[n("table",MG,[t[83]||(t[83]=n("caption",{class:"sr-only"},"Free, Paper pack and Author hosting",-1)),n("thead",null,[n("tr",null,[t[72]||(t[72]=n("th",{scope:"col"},[n("span",{class:"sr-only"},"Feature")],-1)),t[73]||(t[73]=n("th",{scope:"col"},[g("Free"),n("small",null,"\u20AC0")],-1)),e.profilePackPlan()?(a(),l("th",VG,[t[70]||(t[70]=g("Paper pack",-1)),n("small",null,c(e.billingPrice(e.profilePackPlan())),1)])):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("th",qG,[t[71]||(t[71]=g("Author",-1)),n("small",null,c(e.billingPrice(e.profileSelectedPlan())),1)])):f("v-if",!0)])]),n("tbody",null,[n("tr",null,[t[74]||(t[74]=n("th",{scope:"row"},"Repositories",-1)),n("td",null,c(e.billing.allowance?.repositories),1),e.profilePackPlan()?(a(),l("td",_G,"+1")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",$G,c(e.profileSelectedPlan()?.repositories),1)):f("v-if",!0)]),n("tr",null,[t[75]||(t[75]=n("th",{scope:"row"},"Source storage",-1)),n("td",null,c(e.billingBytes(e.billing.allowance?.storage))+" total",1),e.profilePackPlan()?(a(),l("td",LG,c(e.billingBytes(e.profileSlotPlan()?.storage||e.profilePassPlan()?.storage))+" for it",1)):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",FG,c(e.billingBytes(e.profileSelectedPlan()?.storage))+" total",1)):f("v-if",!0)]),n("tr",null,[t[76]||(t[76]=n("th",{scope:"row"},"Latest expiration",-1)),n("td",null,c(e.billing.freeExpirationMonths||5)+" months ahead",1),e.profilePackPlan()?(a(),l("td",UG,"1 year after purchase")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",BG,"Never")):f("v-if",!0)]),n("tr",null,[t[77]||(t[77]=n("th",{scope:"row"},"Automatic updates",-1)),t[78]||(t[78]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",zG,"180 days")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",HG,"Yes")):f("v-if",!0)]),n("tr",null,[t[79]||(t[79]=n("th",{scope:"row"},"Renews",-1)),t[80]||(t[80]=n("td",null,"No",-1)),e.profilePackPlan()?(a(),l("td",jG,"No")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",GG,"Until cancelled")):f("v-if",!0)]),n("tr",null,[t[81]||(t[81]=n("th",{scope:"row"},"Reviewer access",-1)),t[82]||(t[82]=n("td",null,"Free",-1)),e.profilePackPlan()?(a(),l("td",WG,"Free")):f("v-if",!0),e.profileAuthorPlans().length?(a(),l("td",KG,"Free")):f("v-if",!0)])])])])]),e.billing.checkoutEnabled===!1?(a(),l("p",YG,"New purchases are not available right now. Existing billing can still be managed below.")):f("v-if",!0)])):f("v-if",!0),e.billing?.enabled?(a(),l("section",XG,[n("div",JG,[t[86]||(t[86]=n("h2",{class:"billing-section-title"},"Purchases",-1)),e.billingPending?f("v-if",!0):(a(),l("button",{key:0,type:"button",class:"settings-text-button",onClick:t[11]||(t[11]=r=>e.refreshBilling()),disabled:e.billingBusy},"Refresh payment status",8,QG))]),(e.billing.purchases||[]).length?f("v-if",!0):(a(),l("p",ZG,"No purchases yet.")),(e.billing.purchases||[]).length?(a(),l("div",xG,[...t[87]||(t[87]=[n("span",null,"Purchase",-1),n("span",null,"Period",-1),n("span",null,"Amount",-1),n("span",null,"Status",-1)])])):f("v-if",!0),(e.billing.purchases||[]).length?(a(),l("ul",eW,[(a(!0),l(q,null,x(e.profilePurchases(!0).concat(e.profilePurchases(!1)),r=>(a(),l("li",{class:P(["billing-history-row",{"is-ended":!["active","overdue"].includes(r.status)}]),key:r.id},[n("div",tW,[n("strong",null,[g(c(e.profileGrantName(r)),1),r.repoId?(a(),l(q,{key:0},[t[88]||(t[88]=g(" \xB7 ",-1)),n("a",{href:"/anonymize/"+encodeURIComponent(r.repoId)},c(r.repoId),9,nW)],64)):r.conference?(a(),l(q,{key:1},[t[89]||(t[89]=g(" \xB7 ",-1)),n("a",{href:"/conference/"+encodeURIComponent(r.conference)},c(r.conference),9,sW)],64)):f("v-if",!0)]),n("span",null,c([r.purchasedAt?"Bought "+e.billingDate(r.purchasedAt):"",r.parts.length?e.profilePackSummary(r):["refunded","disputed"].includes(r.status)?"Payment "+r.status+", so what it paid for has ended":r.recurring?"Account subscription":""].filter(Boolean).join(" \xB7 ")),1)]),n("div",oW,c(e.profilePurchaseTerm(r)),1),n("div",iW,c(r.amount!=null?e.billingPrice(r):""),1),n("div",rW,[n("span",{class:P(["settings-status","is-"+r.status])},c(e.profilePurchaseStatus(r)),3)])],2))),128))])):f("v-if",!0),n("div",aW,[n("div",null,[t[90]||(t[90]=n("strong",null,"Invoices and payment details",-1)),e.billing.portal?(a(),l("p",lW,"Download receipts, update your card or change renewal in Stripe.")):(a(),l("p",dW,"Invoices appear here after your first purchase.")),t[91]||(t[91]=n("p",null,[g("Need a refund? "),n("a",{href:"mailto:tdurieux@anonymous.4open.science"},"Email the maintainer"),g(" with the payment date, or read the "),n("a",{href:"/faq#faq-plans"},"refund policy"),g(".")],-1))]),e.billing.portal?(a(),l("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[12]||(t[12]=r=>e.billingPortal()),disabled:e.billingBusy},"Manage billing and invoices",8,uW)):f("v-if",!0)])])):f("v-if",!0),n("p",cW,[t[92]||(t[92]=g("Organizing a conference? ",-1)),e.profileConferencePlan()?(a(),l(q,{key:0},[g("Review packages start at "+c(e.billingAmount(e.profileConferencePlan()))+" once for up to "+c(e.profileConferencePlan().repositories)+" submissions, and authors pay nothing.",1)],64)):(a(),l(q,{key:1},[g("One payment hosts every submission, and authors pay nothing.")],64)),t[93]||(t[93]=g()),t[94]||(t[94]=n("a",{href:"/conference/new"},"Create a conference",-1))])],8,Fj),[[Q,e.settingsTab==="billing"]]),D(n("section",pW,[t[105]||(t[105]=n("p",{class:"settings-scope"},"Your identity, repository access, and account.",-1)),n("div",fW,[e.user?.photo?(a(),l("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,hW)):f("v-if",!0),n("div",mW,[n("div",gW,"@"+c(e.user?.username),1),t[96]||(t[96]=n("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[97]||(t[97]=n("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),n("form",{class:"paper-account-email",onSubmit:t[16]||(t[16]=ae(r=>e.saveAccountEmail(),["prevent"]))},[t[98]||(t[98]=n("label",{class:"paper-field-label",for:"account-email"},"Email address",-1)),t[99]||(t[99]=n("p",{id:"account-email-help",class:"paper-section-copy"},"Used for account alerts. Your address is never shown on anonymous pages.",-1)),D(n("input",{id:"account-email",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[13]||(t[13]=r=>e.accountEmail=r),"aria-describedby":"account-email-help",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady,onInput:t[14]||(t[14]=r=>e.emailSaved=!1)},null,40,vW),[[pt,e.accountEmail]]),e.emailLoading?(a(),l("p",yW,"Loading your email address\u2026")):f("v-if",!0),e.emailError?(a(),l("p",bW,c(e.emailError),1)):f("v-if",!0),!e.emailCSRFReady&&!e.emailLoading?(a(),l("button",{key:2,class:"btn btn-outline-ink mt-2",type:"button",onClick:t[15]||(t[15]=r=>e.loadAccountEmail())},"Try again")):f("v-if",!0),n("button",{class:"btn btn-ink mt-2",type:"submit",disabled:e.emailLoading||e.emailSaving||!e.emailCSRFReady},c(e.emailSaving?"Saving\u2026":"Save email address"),9,wW),e.emailSaved?(a(),l("p",kW,"Email address saved.")):f("v-if",!0)],32),t[106]||(t[106]=n("a",{class:"paper-settings-connection-link",href:"/connections"},[n("i",{class:"fab fa-github","aria-hidden":"true"}),n("span",null,[g("GitHub connections"),n("small",null,"Manage repository access and legacy OAuth.")]),n("span",{"aria-hidden":"true"},"\u2192")],-1)),n("div",CW,[t[103]||(t[103]=n("div",{class:"paper-danger-head"},"Delete account",-1)),t[104]||(t[104]=n("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(a(),l("div",EW,[t[100]||(t[100]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1)),t[101]||(t[101]=g()),n("span",{textContent:c(e.deleteError)},null,8,SW)])):f("v-if",!0),n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[17]||(t[17]=r=>e.confirmDeleteAccount=!0),disabled:e.deletingAccount},[t[102]||(t[102]=n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-trash"})],-1)),g(c(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,NW),e.confirmDeleteAccount?(a(),l("div",RW,[n("label",PW,"Type "+c(e.user?.username)+" to confirm",1),D(n("input",{id:"delete-username",class:"form-control","onUpdate:modelValue":t[18]||(t[18]=r=>e.deleteUsername=r),autocomplete:"off"},null,512),[[pt,e.deleteUsername]]),n("div",AW,[n("button",{type:"button",class:"btn btn-outline-danger",onClick:t[19]||(t[19]=r=>e.deleteAccount()),disabled:e.deletingAccount||e.deleteUsername!==e.user?.username},c(e.deletingAccount?"Deleting\u2026":"Delete permanently"),9,DW),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[20]||(t[20]=r=>{e.confirmDeleteAccount=!1,e.deleteUsername=""}),disabled:e.deletingAccount},"Cancel",8,TW)])])):f("v-if",!0)])],512),[[Q,e.settingsTab==="account"]])])}var OW={class:"pr-page"},IW={class:"container paper-page pr-page-inner"},MW={class:"pr-header"},VW={class:"pr-title-row"},qW={class:"paper-page-title pr-title"},_W=["textContent"],$W={key:1,class:"text-muted"},LW=["href"],FW={class:"pr-header-meta"},UW={key:0,class:"pr-meta-item"},BW=["textContent"],zW={key:1,class:"pr-meta-item"},HW=["textContent"],jW={key:2,class:"pr-meta-item"},GW=["textContent"],WW={key:0,class:"pr-body-card"},KW={key:1,class:"paper-tabs",role:"tablist"},YW=["aria-selected","tabindex"],XW=["aria-selected","tabindex"],JW=["textContent"],QW={class:"paper-tab-content"},ZW={key:0,role:"tabpanel",id:"pr-diff-panel","aria-labelledby":"pr-diff-tab"},xW=["innerHTML"],eK={key:1,role:"tabpanel",id:"pr-comments-panel","aria-labelledby":"pr-comments-tab"},tK={class:"pr-comments"},nK={class:"pr-comment"},sK={class:"pr-comment-head"},oK={key:0,class:"pr-comment-author"},iK=["textContent"],rK=["textContent"],aK={key:0,class:"pr-comment-body"},lK={key:0,class:"paper-table-empty"};function kp(e,t){let s=Xe("markdown");return a(),l("div",OW,[n("div",IW,[t[17]||(t[17]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"Reviewer"),g(" \xA0/\xA0 "),n("span",{class:"here"},"Pull request")],-1)),n("header",MW,[n("div",VW,[n("h1",qW,[e.details?.title?(a(),l("span",{key:0,textContent:c(e.details?.title)},null,8,_W)):f("v-if",!0),e.details?.title?f("v-if",!0):(a(),l("span",$W,"Untitled pull request"))]),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[4]||(t[4]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),n("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,LW)):f("v-if",!0)]),n("div",FW,[n("span",{class:P(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[n("span",{class:P(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),g(" "+c(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(a(),l("span",UW,[t[5]||(t[5]=n("i",{class:"fab fa-github"},null,-1)),t[6]||(t[6]=g()),n("span",{textContent:c(e.details?.baseRepositoryFullName)},null,8,BW)])):f("v-if",!0),e.details?.updatedDate?(a(),l("span",zW,[t[7]||(t[7]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-clock"})],-1)),t[8]||(t[8]=g()),n("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,HW)])):f("v-if",!0),e.details?.anonymizeDate?(a(),l("span",jW,[t[9]||(t[9]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})],-1)),t[10]||(t[10]=g(" Anonymized ",-1)),n("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,GW)])):f("v-if",!0)])]),e.details?.body?(a(),l("section",WW,[t[11]||(t[11]=n("div",{class:"paper-section-eyebrow"},"Description",-1)),Oe(s,{content:e.details?.body},null,8,["content"])])):f("v-if",!0),e.details?.diff||e.details?.comments?(a(),l("nav",KW,[e.details?.diff?(a(),l("button",{key:0,class:P(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",id:"pr-diff-tab","aria-selected":e.tabState?.active==="diff","aria-controls":"pr-diff-panel",tabindex:e.tabState?.active==="diff"?0:-1,onKeydown:t[0]||(t[0]=i=>e.previewTabKeydown(i)),onClick:t[1]||(t[1]=i=>e.tabState.active="diff")},[...t[12]||(t[12]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g(" Diff ",-1)])],42,YW)):f("v-if",!0),e.details?.comments?(a(),l("button",{key:1,class:P(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",id:"pr-comments-tab","aria-selected":e.tabState?.active==="comments","aria-controls":"pr-comments-panel",tabindex:e.tabState?.active==="comments"?0:-1,onKeydown:t[2]||(t[2]=i=>e.previewTabKeydown(i)),onClick:t[3]||(t[3]=i=>e.tabState.active="comments")},[t[13]||(t[13]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1)),n("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,JW)],42,XW)):f("v-if",!0)])):f("v-if",!0),n("div",QW,[e.details?.diff&&e.tabState?.active=="diff"?(a(),l("div",ZW,[n("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,xW)])):f("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(a(),l("div",eK,[n("ul",tK,[(a(!0),l(q,null,x(e.details?.comments,(i,o)=>(a(),l("li",nK,[n("div",sK,[i?.author?(a(),l("span",oK,[t[14]||(t[14]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-user"})],-1)),t[15]||(t[15]=g(" @",-1)),n("span",{textContent:c(i?.author)},null,8,iK)])):f("v-if",!0),i?.updatedDate?(a(),l("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(i?.updatedDate))},null,8,rK)):f("v-if",!0)]),i?.body?(a(),l("div",aK,[Oe(s,{content:i?.body},null,8,["content"])])):f("v-if",!0)]))),256)),e.details?.comments?.length?f("v-if",!0):(a(),l("li",lK,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-comment"})],-1),n("span",null,"No comments on this pull request.",-1)])]))])])):f("v-if",!0)])])])}var dK={class:"repository-task status-page"},uK={class:"page-head-main"},cK={class:"task-lede"},pK={class:"task-columns"},fK={class:"task-preparation","aria-label":"Repository preparation"},hK={key:0,class:"text-danger",role:"alert"},mK={key:1,class:"paper-section-copy"},gK={key:2,class:"paper-ratelimit-card",role:"status"},vK={class:"paper-error-msg"},yK=["aria-valuenow"],bK={class:"paper-progress-label"},wK=["textContent"],kK={key:0},CK=["textContent"],EK={class:"paper-progress-pct"},SK={key:4,class:"paper-error-card",role:"alert"},NK={key:0,class:"paper-error-msg"},RK={key:1,class:"paper-error-msg"},PK={key:2},AK=["href"],DK={class:"paper-error-actions"},TK=["href"],OK={key:5,class:"share-link"},IK={class:"share-link-row"},MK={class:"share-link-buttons"},VK={class:"ui-icon","aria-hidden":"true"},qK=["href"],_K=["textContent"],$K=["href"],LK={class:"share-link-note"},FK=["href"],UK={class:"share-link-next"},BK={class:"share-link-next-actions"},zK=["href"],HK={class:"task-summary","aria-label":"Repository summary"},jK=["title"],GK={key:1};function Cp(e,t){return a(),l("div",dK,[n("header",{class:P(["page-head",{"task-ready":e.repo?.status==="ready"}])},[t[3]||(t[3]=n("div",{class:"paper-crumbs"},[n("a",{href:"/dashboard"},"My work"),g(" \xA0/\xA0 "),n("span",{class:"here"},"Review link")],-1)),n("div",uK,[n("div",null,[n("h1",null,c(e.repo?.status==="ready"?"Your review link is ready":"Prepare your anonymous review link"),1),n("p",cK,c(e.repo?.status==="ready"?"Share this link with reviewers in your submission.":"Your settings are saved. Track preparation before sharing the link."),1)])]),t[4]||(t[4]=n("ol",{class:"task-trail flow-trail","aria-label":"Repository progress"},[n("li",null,"1. Repository"),n("li",null,"2. Review and hosting"),n("li",{"aria-current":"step"},"3. Review link")],-1))],2),n("div",pK,[n("section",fK,[e.error?(a(),l("p",hK,[t[5]||(t[5]=g("Unable to load repository status. ",-1)),n("button",{type:"button",class:"task-text-button",onClick:t[0]||(t[0]=s=>e.getStatus())},"Try again")])):f("v-if",!0),e.repo?.status!=="ready"?(a(),l("p",mK,[...t[6]||(t[6]=[g(" The repository will take a few minutes to get ready, depending on its size. Visit the ",-1),n("a",{href:"/faq"},"FAQ",-1),g(" for more information. ",-1)])])):f("v-if",!0),e.rateLimitResetAt?(a(),l("div",gK,[t[9]||(t[9]=Ee('
Temporarily paused
GitHub API rate limit reached
',1)),n("p",vK,[t[7]||(t[7]=g("Anonymization will resume automatically in ",-1)),n("strong",null,c(e.rateLimitCountdown),1),t[8]||(t[8]=g(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):f("v-if",!0),e.repo?.status!=="ready"&&e.repo?.status!="error"&&!e.rateLimitResetAt?(a(),l("div",{key:3,class:P(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[n("div",{class:"paper-progress-bar",style:Ie("width: "+e.progress+"%;")},null,4),n("div",bK,[n("span",{textContent:c(e.fmt?.title(e.repo?.status))},null,8,wK),e.repo?.statusMessage?(a(),l("span",kK,[t[10]||(t[10]=g("\xA0\xB7\xA0",-1)),n("span",{textContent:c(e.repo?.statusMessage)},null,8,CK)])):f("v-if",!0),n("span",EK,c(e.progress||0)+"%",1)])],10,yK)):f("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(a(),l("div",SK,[t[14]||(t[14]=Ee('
Anonymization failed
Something went wrong while preparing this repository.
',1)),e.repo?.statusMessage?(a(),l("p",NK,c(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):f("v-if",!0),e.repo?.statusMessage?f("v-if",!0):(a(),l("p",RK,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),e.repo?.statusMessage==="quota_exceeded"?(a(),l("p",PK,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Review this repository\u2019s hosting",8,AK),t[11]||(t[11]=g(", then retry preparation.",-1))])):f("v-if",!0),t[15]||(t[15]=n("ul",{class:"paper-error-hints"},[n("li",null,"Make sure the source URL points to a repository or pull request you can access."),n("li",null,"Check that the chosen branch and commit still exist on GitHub."),n("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),n("div",DK,[n("a",{class:"btn btn-primary",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[12]||(t[12]=[n("svg",{class:"ui-icon mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g(" Edit anonymization",-1)])],8,TK),t[13]||(t[13]=Ee(' Read the FAQ Report a bug in Anonymous GitHub',2))])])):f("v-if",!0),e.repo?.status=="ready"?(a(),l("div",OK,[t[24]||(t[24]=n("div",{class:"share-link-label",id:"share-url-label"},"Review link",-1)),n("div",IK,[n("code",{id:"share-url",class:"share-link-url",tabindex:"0",role:"textbox","aria-readonly":"true","aria-labelledby":"share-url-label",onFocus:t[1]||(t[1]=s=>e.selectShareUrl(s))},c(e.shareUrl),33),n("div",MK,[n("button",{type:"button",class:"btn btn-primary share-copy",onClick:t[2]||(t[2]=s=>e.copyShareUrl())},[(a(),l("svg",VK,[n("use",{href:e.copied?"#ui-icon-check":"#project-icon-copy"},null,8,qK)])),n("span",{"aria-live":"polite",textContent:c(e.copied?"Copied":"Copy link")},null,8,_K)]),n("a",{class:"btn share-open",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-eye"})],-1),g(" Open repository ",-1)])],8,$K)])]),n("p",LK,[g(c(e.repo?.options?.expirationMode!=="never"&&e.repo?.options?.expirationDate?"Expires "+e.fmt.date(e.repo.options.expirationDate):"Never expires"),1),t[18]||(t[18]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),t[19]||(t[19]=g("Reviewers don\u2019t need an account",-1)),e.repo?.options?.page?(a(),l(q,{key:0},[t[17]||(t[17]=n("span",{"aria-hidden":"true"}," \xB7 ",-1)),n("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"Open GitHub page",8,FK)],64)):f("v-if",!0)]),n("div",UK,[t[22]||(t[22]=n("h2",null,"Need to change something?",-1)),t[23]||(t[23]=n("p",null,"Edit the redacted terms or the expiry at any time. The link stays the same.",-1)),n("p",BK,[n("a",{href:e.safeUrl("/anonymize/"+e.repoId)},"Edit anonymization",8,zK),t[20]||(t[20]=n("span",{"aria-hidden":"true"},"\xB7",-1)),t[21]||(t[21]=n("a",{href:"/dashboard"},"Go to My work",-1))])])])):f("v-if",!0)]),n("aside",HK,[n("dl",null,[t[28]||(t[28]=n("dt",null,"Source",-1)),e.repo?.source?.fullName?(a(),l("dd",{key:0,class:"task-source",title:"https://github.com/"+e.repo.source.fullName},[t[25]||(t[25]=g("github.com/",-1)),t[26]||(t[26]=n("wbr",null,null,-1)),g(c(e.repo.source.fullName.split("/")[0])+"/",1),t[27]||(t[27]=n("wbr",null,null,-1)),g(c(e.repo.source.fullName.split("/").slice(1).join("/")),1)],8,jK)):(a(),l("dd",GK,"Loading\u2026")),t[29]||(t[29]=n("dt",null,"Lifetime",-1)),n("dd",null,c(e.repo?.options?.expirationMode==="never"?"Never expire while subscribed":e.repo?.options?.expirationDate?"Until "+e.fmt.date(e.repo.options.expirationDate):"Loading\u2026"),1),t[30]||(t[30]=n("dt",null,"Review access",-1)),t[31]||(t[31]=n("dd",null,"Anonymous and free",-1))])])])])}var WK={class:"container paper-page admin-page overview-page billing-page"},KK={class:"bl-toolbar"},YK={class:"seg-filter",role:"radiogroup","aria-label":"Period"},XK=["aria-checked","onClick"],JK={key:0,class:"bl-basis"},QK={key:0,class:"ov-performance-message ov-performance-warning bl-message",role:"alert"},ZK={key:1,class:"ov-performance-message bl-message",role:"status"},xK={key:2,class:"ov-performance-message ov-performance-warning bl-message",role:"status"},eY=["aria-busy"],tY={class:"ov-kpi-card"},nY={class:"ov-kpi-value"},sY={class:"ov-kpi-sub"},oY={class:"ov-kpi-card"},iY={key:0,class:"ov-kpi-sub"},rY={key:1,class:"ov-kpi-sub"},aY={class:"ov-kpi-card"},lY={class:"ov-kpi-label"},dY={class:"ov-kpi-value"},uY={class:"ov-kpi-sub"},cY={class:"ov-kpi-card"},pY={class:"ov-kpi-value"},fY={class:"ov-kpi-sub"},hY={class:"ov-kpi-card"},mY={class:"ov-kpi-value"},gY={class:"ov-kpi-sub"},vY={class:"ov-kpi-card"},yY={class:"ov-kpi-sub"},bY={key:3,class:"bl-health","aria-label":"Webhook health"},wY={class:"bl-health-title"},kY={class:"bl-health-item"},CY=["title"],EY={key:1,class:"bl-health-item"},SY={key:4,class:"ov-chart-card bl-chart-card"},NY={class:"ov-chart-head"},RY={class:"ov-chart-title"},PY={key:0,class:"ov-chart-legends"},AY=["aria-label"],DY={class:"ov-yaxis","aria-hidden":"true"},TY=["data-tip"],OY={class:"ov-spark-x bl-x"},IY={key:1,class:"ov-performance-empty bl-empty",role:"status"},MY={key:5,class:"ov-panel-card bl-plans","aria-labelledby":"bl-plans-heading"},VY={class:"ov-panel-head"},qY={class:"ov-panel-meta"},_Y={class:"ov-metrics-scroll",tabindex:"0",role:"region","aria-label":"Sales by plan, scroll for more columns"},$Y={class:"ov-metrics-table"},LY={key:0,scope:"colgroup",colspan:"2",class:"bl-group"},FY={scope:"row",class:"bl-plan-name"},UY=["title","onClick"],BY={class:"num"},zY={class:"num"},HY={class:"num"},jY={class:"num"},GY={class:"num"},WY={class:"num"},KY={class:"num"},YY={class:"num"},XY={class:"num"},JY={class:"num"},QY={class:"bl-grants",id:"bl-grants","aria-labelledby":"bl-grants-heading"},ZY={class:"seg-bar"},xY={class:"seg-filter",role:"radiogroup","aria-label":"Filter by state"},eX=["aria-checked"],tX={class:"count"},nX=["aria-checked"],sX={class:"count"},oX=["aria-checked"],iX={class:"count"},rX=["aria-checked"],aX={class:"count"},lX={class:"seg-countline",role:"status"},dX={key:0,class:"alert alert-danger bl-alert"},uX=["aria-expanded"],cX={class:"search-wrap"},pX={type:"search",class:"form-control","aria-label":"Search by user",placeholder:"Search by user\u2026",autocomplete:"off"},fX={class:"admin-filter-inline"},hX={id:"bl-plan",class:"form-control form-control-sm"},mX=["label"],gX=["value"],vX={class:"admin-filter-inline"},yX={id:"bl-status",class:"form-control form-control-sm"},bX=["value"],wX={key:0,class:"admin-filter-inline","aria-label":"Pagination"},kX=["disabled"],CX={class:"bl-page"},EX=["disabled"],SX={key:0,class:"admin-filter-row"},NX={class:"admin-active-chips"},RX={class:"key"},PX=["onClick"],AX={key:1,class:"ov-metrics-scroll bl-grant-scroll",tabindex:"0",role:"region","aria-label":"Subscriptions and purchases, scroll for more columns"},DX={class:"ov-metrics-table bl-grant-table"},TX={scope:"col"},OX={scope:"col"},IX={scope:"row",class:"bl-user"},MX=["title","href"],VX={key:1,class:"ov-muted"},qX={class:"bl-plan-cell"},_X={key:0},$X={class:"bl-state"},LX={key:0},FX={key:3},UX={key:0,class:"bl-flag"},BX={key:1,class:"ov-muted"},zX={class:"bl-flag is-bad"},HX={key:0},jX={key:1,class:"ov-muted"},GX={class:"bl-scope"},WX=["href"],KX={class:"ui-icon","aria-hidden":"true"},YX=["href"],XX={key:1,class:"ov-muted"},JX={key:2,class:"paper-table-empty"},QX={key:3,class:"admin-empty"},ZX={key:4,class:"admin-toolbar bl-pager"},xX={key:0,class:"pagination-compact"},eJ=["disabled"],tJ=["max"],nJ=["disabled"],sJ={class:"admin-filter-inline"},oJ={id:"bl-limit",class:"form-control form-control-sm"};function Ep(e,t){let s=Ae("field"),i=Ae("form");return a(),l("div",WK,[t[79]||(t[79]=Ee('
Admin \xA0/\xA0 Billing

Billing

',2)),n("div",KK,[n("div",YK,[(a(!0),l(q,null,x(e.periods,o=>(a(),l("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.period===o.id}]),key:o.id,"aria-checked":e.period===o.id,onClick:r=>e.setPeriod(o.id)},c(o.label),11,XK))),128))]),e.summary?(a(),l("p",JK,"Sales are new checkouts and subscriptions. Revenue uses Stripe list prices; renewals count toward MRR.")):f("v-if",!0)]),e.summaryError?(a(),l("div",QK,[t[15]||(t[15]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,c(e.summaryError),1),n("button",{type:"button",class:"btn btn-sm",onClick:t[0]||(t[0]=o=>e.loadSummary())},"Retry")])):f("v-if",!0),e.summary&&!e.summary.revenue?.available?(a(),l("div",ZK,[...t[16]||(t[16]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-info"})],-1),n("span",null,[n("b",null,"Revenue unavailable."),g(" Stripe is not configured on this server, so amounts can't be looked up. Counts are complete.")],-1)])])):f("v-if",!0),e.summary?.revenue?.missingSales||e.summary?.revenue?.missingAllTimeSales||e.summary?.revenue?.missingSubscriptions?(a(),l("div",xK,[t[17]||(t[17]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),n("span",null,"Some Stripe prices are unavailable. Affected totals are marked incomplete: "+c(e.fmt?.number(e.summary.revenue.missingSales||0))+" period sales, "+c(e.fmt?.number(e.summary.revenue.missingAllTimeSales||0))+" historical sales, "+c(e.fmt?.number(e.summary.revenue.missingSubscriptions||0))+" active subscriptions.",1)])):f("v-if",!0),f(" \u2500\u2500 Summary tiles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",{class:P(["ov-kpi-row bl-kpi-row",{"is-loading":e.summaryLoading}]),"aria-busy":e.summaryLoading?"true":"false","aria-label":"Billing summary"},[!e.summary&&e.summaryLoading?(a(),l(q,{key:0},x(6,o=>n("div",{class:"ov-kpi-card",key:o,"aria-hidden":"true"},[...t[18]||(t[18]=[n("span",{class:"skeleton skeleton-line-sm",style:{width:"60%"}},null,-1),n("span",{class:"skeleton bl-skeleton-value"},null,-1),n("span",{class:"skeleton skeleton-line-sm",style:{width:"80%"}},null,-1)])])),64)):f("v-if",!0),e.summary?(a(),l(q,{key:1},[n("div",tY,[t[19]||(t[19]=n("div",{class:"ov-kpi-label"},"Active subscriptions",-1)),n("div",nY,c(e.fmt?.number(e.summary.subscriptions.active)),1),n("div",sY,c(e.fmt?.number(e.summary.subscriptions.monthly))+" monthly \xB7 "+c(e.fmt?.number(e.summary.subscriptions.annual))+" annual",1)]),n("div",oY,[t[20]||(t[20]=n("div",{class:"ov-kpi-label"},"MRR",-1)),n("div",{class:P(["ov-kpi-value",{"bl-muted-value":!e.revenueOn()}])},c(e.revenueOn()?e.summary.subscriptions.complete===!1?"Incomplete":e.money(e.summary.subscriptions.mrr)[0]||e.fmt?.money(0):"Unavailable"),3),e.revenueOn()&&e.money(e.summary.subscriptions.mrr).length>1?(a(),l("div",iY,"+ "+c(e.money(e.summary.subscriptions.mrr).slice(1).join(" \xB7 ")),1)):(a(),l("div",rY,c(e.revenueOn()?"Annual plans \xF7 12":"Needs Stripe prices"),1))]),n("div",aY,[n("div",lY,"Sales \xB7 "+c(e.periodPhrase()),1),n("div",dY,c(e.fmt?.number(e.summary.sales.count)),1),n("div",uY,c(e.revenueOn()?e.summary.sales.complete===!1?"Revenue incomplete":e.moneyText(e.summary.sales.revenue,e.fmt?.money(0)):"Revenue unavailable"),1)]),n("div",cY,[t[21]||(t[21]=n("div",{class:"ov-kpi-label"},"All-time sales",-1)),n("div",pY,c(e.fmt?.number(e.summary.allTime.count)),1),n("div",fY,c(e.revenueOn()?e.summary.allTime.complete===!1?"Revenue incomplete":e.moneyText(e.summary.allTime.revenue,e.fmt?.money(0)):"Revenue unavailable"),1)]),n("div",hY,[t[22]||(t[22]=n("div",{class:"ov-kpi-label"},"Cancelling",-1)),n("div",mY,c(e.fmt?.number(e.summary.subscriptions.cancelling)),1),n("div",gY,"at period end, of "+c(e.fmt?.number(e.summary.subscriptions.active))+" active",1)]),n("div",vY,[t[23]||(t[23]=n("div",{class:"ov-kpi-label"},"Refunds & disputes",-1)),n("div",{class:P(["ov-kpi-value",{"ov-val-warn":e.summary.reversals.disputes>0}])},c(e.fmt?.number(e.summary.reversals.refunds+e.summary.reversals.disputes)),3),n("div",yY,c(e.fmt?.number(e.summary.reversals.refunds))+" "+c(e.summary.reversals.refunds===1?"refund":"refunds")+" \xB7 "+c(e.fmt?.number(e.summary.reversals.disputes))+" "+c(e.summary.reversals.disputes===1?"dispute":"disputes"),1)])],64)):f("v-if",!0)],10,eY),f(" \u2500\u2500 Webhook health \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?.webhooks?(a(),l("section",bY,[n("span",wY,[n("span",{class:P(["ov-svc-dot",{"ov-dot-ok":e.webhookState()==="ok","ov-dot-warn":e.webhookState()==="warn","bl-dot-bad":e.webhookState()==="bad"}]),"aria-hidden":"true"},null,2),t[24]||(t[24]=g("Stripe webhooks",-1))]),n("span",kY,[t[25]||(t[25]=n("span",{class:"k"},"Pending",-1)),g(" "+c(e.fmt?.number(e.summary.webhooks.pending)),1),e.summary.webhooks.pending?(a(),l(q,{key:0},[g(" \xB7 oldest "+c(e.age(e.summary.webhooks.oldestPendingSeconds)),1)],64)):f("v-if",!0)]),n("span",{class:P(["bl-health-item",{"is-bad":e.summary.webhooks.failed}])},[t[26]||(t[26]=n("span",{class:"k"},"Failed",-1)),g(" "+c(e.fmt?.number(e.summary.webhooks.failed)),1)],2),e.summary.webhooks.lastError?(a(),l("span",{key:0,class:"bl-health-item bl-health-error",title:e.summary.webhooks.lastError.type+": "+e.summary.webhooks.lastError.error},[t[27]||(t[27]=n("span",{class:"k"},"Last error",-1)),t[28]||(t[28]=g()),n("code",null,c(e.summary.webhooks.lastError.error),1),g(" on "+c(e.summary.webhooks.lastError.type)+" \xB7 "+c(e.fmt?.humanTime(e.summary.webhooks.lastError.receivedAt)),1)],8,CY)):(a(),l("span",EY,[...t[29]||(t[29]=[n("span",{class:"k"},"Last error",-1),g(" none",-1)])])),n("span",{class:P(["bl-health-item",{"is-warn":e.summary.webhooks.unreviewedRevocations}])},[t[30]||(t[30]=n("span",{class:"k"},"Unreviewed reversals",-1)),g(" "+c(e.fmt?.number(e.summary.webhooks.unreviewedRevocations)),1)],2)])):f("v-if",!0),f(" \u2500\u2500 Sales over time \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?(a(),l("section",SY,[n("div",NY,[n("span",RY,"Sales per "+c(e.bucketName())+" \xB7 "+c(e.periodPhrase()),1),e.seriesSales()?(a(),l("span",PY,[(a(!0),l(q,null,x(e.families,o=>(a(),l("span",{class:"ov-chart-legend",key:o.id},[n("span",{class:P(["bl-swatch","bl-"+o.id]),"aria-hidden":"true"},null,2),g(c(o.label)+" \xB7 "+c(e.fmt?.number(e.familyTotal(o.id))),1)]))),128))])):f("v-if",!0)]),e.seriesSales()?(a(),l(q,{key:0},[n("div",{class:P(["ov-spark-bars ov-has-axis bl-bars",{"is-dense":e.summary.series.length>45}]),role:"img","aria-label":e.fmt?.number(e.seriesSales())+" sales, "+e.periodPhrase()+", by plan family"},[n("div",DY,[n("span",null,c(e.fmt?.number(e.chartMax())),1),n("span",null,c(e.fmt?.number(e.chartMax()/2)),1),t[31]||(t[31]=n("span",null,"0",-1))]),(a(!0),l(q,null,x(e.summary.series,(o,r)=>(a(),l("div",{class:P(["ov-spark-col has-tip bl-col",{"is-zero":!e.bucketTotal(o)}]),key:r,"data-tip":e.bucketTip(o)},[n("span",{class:"bl-stack",style:Ie({height:e.bucketTotal(o)/e.chartMax()*100+"%"})},[(a(!0),l(q,null,x(e.families,d=>D((a(),l("i",{key:d.id,class:P("bl-"+d.id),style:Ie({flexGrow:o[d.id]})},null,6)),[[Q,o[d.id]]])),128))],4)],10,TY))),128))],10,AY),n("div",OY,[n("span",null,c(e.bucketLabel(e.summary.series[0])),1),n("span",null,c(e.bucketLabel(e.summary.series[Math.floor(e.summary.series.length/2)])),1),n("span",null,c(e.bucketLabel(e.summary.series[e.summary.series.length-1])),1)])],64)):(a(),l("p",IY,"No sales "+c(e.period==="all"?"yet":"in the "+e.periodPhrase())+".",1))])):f("v-if",!0),f(" \u2500\u2500 By plan \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),e.summary?(a(),l("section",MY,[n("div",VY,[t[32]||(t[32]=n("h2",{class:"ov-panel-title",id:"bl-plans-heading"},"By plan",-1)),n("span",qY,c(e.fmt?.number(e.plansWithActivity().length))+" of "+c(e.fmt?.number(e.summary.plans.length))+" plans sold",1)]),n("div",_Y,[n("table",$Y,[t[41]||(t[41]=n("caption",{class:"sr-only"},"Active grants, sales and revenue per plan",-1)),n("thead",null,[n("tr",null,[t[33]||(t[33]=n("th",{scope:"col",rowspan:"2"},"Plan",-1)),t[34]||(t[34]=n("th",{scope:"col",rowspan:"2",class:"num"},"Active",-1)),e.period!=="all"?(a(),l("th",LY,c(e.periodPhrase().replace(/^./,o=>o.toUpperCase())),1)):f("v-if",!0),t[35]||(t[35]=n("th",{scope:"colgroup",colspan:"2",class:"bl-group"},"All time",-1))]),n("tr",null,[e.period!=="all"?(a(),l(q,{key:0},[t[36]||(t[36]=n("th",{scope:"col",class:"num"},"Sales",-1)),t[37]||(t[37]=n("th",{scope:"col",class:"num"},"Revenue",-1))],64)):f("v-if",!0),t[38]||(t[38]=n("th",{scope:"col",class:"num"},"Sales",-1)),t[39]||(t[39]=n("th",{scope:"col",class:"num"},"Revenue",-1))])]),n("tbody",null,[(a(!0),l(q,null,x(e.summary.plans,o=>(a(),l("tr",{key:o.planId,class:P({"bl-idle":!o.active&&!o.sales&&!o.allTimeSales})},[n("th",FY,[n("span",{class:P(["bl-swatch","bl-"+o.family]),"aria-hidden":"true"},null,2),n("button",{type:"button",class:"bl-link",title:"Show "+o.name+" grants",onClick:r=>e.filterPlan(o.planId)},c(o.name),9,UY)]),n("td",BY,c(e.fmt?.number(o.active)),1),e.period!=="all"?(a(),l(q,{key:0},[n("td",zY,c(e.fmt?.number(o.sales)),1),n("td",HY,c(e.revenueOn()?o.revenueComplete===!1?"Incomplete":e.moneyText(o.revenue):"\u2014"),1)],64)):f("v-if",!0),n("td",jY,c(e.fmt?.number(o.allTimeSales)),1),n("td",GY,c(e.revenueOn()?o.allTimeRevenueComplete===!1?"Incomplete":e.moneyText(o.allTimeRevenue):"\u2014"),1)],2))),128))]),n("tfoot",null,[n("tr",null,[t[40]||(t[40]=n("th",{scope:"row"},"Total",-1)),n("td",WY,c(e.fmt?.number(e.planTotals().active)),1),e.period!=="all"?(a(),l(q,{key:0},[n("td",KY,c(e.fmt?.number(e.planTotals().sales)),1),n("td",YY,c(e.revenueOn()?e.summary.sales.complete===!1?"Incomplete":e.moneyText(e.summary.sales.revenue):"\u2014"),1)],64)):f("v-if",!0),n("td",XY,c(e.fmt?.number(e.planTotals().allTimeSales)),1),n("td",JY,c(e.revenueOn()?e.summary.allTime.complete===!1?"Incomplete":e.moneyText(e.summary.allTime.revenue):"\u2014"),1)])])])]),t[42]||(t[42]=n("p",{class:"ov-performance-note bl-note"},"A paper pack counts once, under Paper pack. Active means paid time remains and the payment wasn't reversed.",-1))])):f("v-if",!0),f(" \u2500\u2500 Subscriptions and purchases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),n("section",QY,[t[78]||(t[78]=n("div",{class:"bl-section-head"},[n("h2",{class:"ov-panel-title",id:"bl-grants-heading"},"Subscriptions and purchases")],-1)),n("div",ZY,[n("div",xY,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.stateView()==="all"}]),"aria-checked":e.stateView()==="all",onClick:t[1]||(t[1]=o=>e.setStateView("all"))},[t[43]||(t[43]=g("All ",-1)),n("span",tX,c(e.fmt?.number(e.stateCount("all"))),1)],10,eX),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.stateView()==="active","is-empty":!e.stateCount("active")}]),"aria-checked":e.stateView()==="active",onClick:t[2]||(t[2]=o=>e.setStateView("active"))},[t[44]||(t[44]=n("span",{class:"seg-dot ok","aria-hidden":"true"},null,-1)),t[45]||(t[45]=g("Active ",-1)),n("span",sX,c(e.fmt?.number(e.stateCount("active"))),1)],10,nX),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.stateView()==="expired","is-empty":!e.stateCount("expired")}]),"aria-checked":e.stateView()==="expired",onClick:t[3]||(t[3]=o=>e.setStateView("expired"))},[t[46]||(t[46]=n("span",{class:"seg-dot off","aria-hidden":"true"},null,-1)),t[47]||(t[47]=g("Expired ",-1)),n("span",iX,c(e.fmt?.number(e.stateCount("expired"))),1)],10,oX),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.stateView()==="revoked","is-empty":!e.stateCount("revoked")}]),"aria-checked":e.stateView()==="revoked",onClick:t[4]||(t[4]=o=>e.setStateView("revoked"))},[t[48]||(t[48]=n("span",{class:"seg-dot bad","aria-hidden":"true"},null,-1)),t[49]||(t[49]=g("Revoked ",-1)),n("span",aX,c(e.fmt?.number(e.stateCount("revoked"))),1)],10,rX)]),n("p",lX,[n("strong",null,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),t[50]||(t[50]=g(" shown",-1))])]),e.grantsError?(a(),l("div",dX,[t[51]||(t[51]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})],-1)),g(" "+c(e.grantsError)+" ",1),n("button",{type:"button",class:"btn btn-sm",onClick:t[5]||(t[5]=o=>e.reloadGrants())},"Retry")])):f("v-if",!0),D((a(),l("form",{class:"w-100 admin-filter-toolbar","aria-label":"Subscriptions and purchases","accept-charset":"UTF-8",onSubmit:t[9]||(t[9]=ae(()=>{},["prevent"]))},[n("button",{type:"button",class:"btn btn-sm admin-filters-toggle",onClick:t[6]||(t[6]=o=>e.filtersOpen=!e.filtersOpen),"aria-expanded":e.filtersOpen?"true":"false"},[t[52]||(t[52]=g("Filters",-1)),e.query.plan||e.query.status?(a(),l(q,{key:0},[g(" ("+c((e.query.plan?1:0)+(e.query.status?1:0))+")",1)],64)):f("v-if",!0)],8,uX),n("div",{class:P(["admin-filter-row",{"is-open":e.filtersOpen}])},[n("div",cX,[D(n("input",pX,null,512),[[s,{state:e.viewState,set:o=>{e.query.search=o},value:e.query?.search,form:null,options:{}}]])]),n("span",fX,[t[54]||(t[54]=n("label",{for:"bl-plan"},"Plan",-1)),D((a(),l("select",hX,[t[53]||(t[53]=n("option",{value:""},"Any",-1)),(a(!0),l(q,null,x(e.families,o=>(a(),l("optgroup",{key:o.id,label:o.label},[(a(!0),l(q,null,x((e.summary?.plans||[]).filter(r=>r.family===o.id),r=>(a(),l("option",{key:r.planId,value:r.planId},c(r.name),9,gX))),128))],8,mX))),128))])),[[s,{state:e.viewState,set:o=>{e.query.plan=o},value:e.query?.plan,form:null,options:{}}]])]),n("span",vX,[t[56]||(t[56]=n("label",{for:"bl-status"},"Stripe status",-1)),D((a(),l("select",yX,[t[55]||(t[55]=n("option",{value:""},"Any",-1)),(a(!0),l(q,null,x(e.statuses,o=>(a(),l("option",{key:o,value:o},c(o.replace(/_/g," ")),9,bX))),128))])),[[s,{state:e.viewState,set:o=>{e.query.status=o},value:e.query?.status,form:null,options:{}}]])]),t[59]||(t[59]=n("span",{class:"admin-filter-spacer"},null,-1)),e.totalPage>1?(a(),l("span",wX,[n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[7]||(t[7]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1,"aria-label":"Previous page"},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,kX),n("span",CX,c(e.query?.page)+"/"+c(e.totalPage||1),1),n("button",{class:"btn btn-sm btn-icon",type:"button",onClick:t[8]||(t[8]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage,"aria-label":"Next page"},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,EX)])):f("v-if",!0)],2),e.chips?.length?(a(),l("div",SX,[n("div",NX,[(a(!0),l(q,null,x(e.chips,o=>(a(),l("span",{class:"admin-active-chip",key:o?.key},[n("span",RX,c(o?.label),1),n("span",null,c(o?.value),1),n("button",{type:"button",onClick:r=>e.clearFilter(o.key),"aria-label":"Clear filter"},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-close"})],-1)])],8,PX)]))),128))])])):f("v-if",!0)],32)),[[i,e.viewState]]),e.grants?.length?(a(),l("div",AX,[n("table",DX,[t[71]||(t[71]=n("caption",{class:"sr-only"},"Subscriptions and purchases",-1)),n("thead",null,[n("tr",null,[t[65]||(t[65]=n("th",{scope:"col"},"User",-1)),t[66]||(t[66]=n("th",{scope:"col"},"Plan",-1)),t[67]||(t[67]=n("th",{scope:"col"},"Status",-1)),n("th",TX,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="purchasedAt"}]),onClick:t[10]||(t[10]=o=>e.sortBy("purchasedAt"))},[t[62]||(t[62]=g("Started ",-1)),e.sortIcon("purchasedAt")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("purchasedAt")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[61]||(t[61]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),n("th",OX,[n("button",{type:"button",class:P(["sortable",{active:e.query?.sort=="until"}]),onClick:t[11]||(t[11]=o=>e.sortBy("until"))},[t[64]||(t[64]=g("Renews / ends ",-1)),e.sortIcon("until")?(a(),l("svg",{key:0,class:P(["ui-icon sort-direction",{ascending:e.sortIcon("until")==="fa-arrow-up"}]),"aria-hidden":"true"},[...t[63]||(t[63]=[n("use",{href:"#project-icon-arrow"},null,-1)])],2)):f("v-if",!0)],2)]),t[68]||(t[68]=n("th",{scope:"col"},"Cancelling",-1)),t[69]||(t[69]=n("th",{scope:"col"},"Revoked",-1)),t[70]||(t[70]=n("th",{scope:"col"},"Applies to",-1))])]),n("tbody",null,[(a(!0),l(q,null,x(e.grants,o=>(a(),l("tr",{key:o.id},[n("th",IX,[o.user?(a(),l("a",{key:0,title:o.user,href:e.safeUrl("/admin/users/"+o.user)},c(o.user),9,MX)):(a(),l("span",VX,"Deleted user"))]),n("td",null,[n("span",qX,[n("span",{class:P(["bl-swatch","bl-"+o.family]),"aria-hidden":"true"},null,2),g(c(e.planName(o.planId)),1)]),o.pack?(a(),l("small",_X,"Part of a paper pack")):f("v-if",!0)]),n("td",null,[n("span",$X,[n("span",{class:P(["status-dot",o.state==="active"?"st-ready":o.state==="revoked"?"st-error":"st-expired"])},null,2),g(c(o.state==="active"?"Active":o.state==="revoked"?"Revoked":"Expired"),1)]),["active","paid"].includes(o.status)?f("v-if",!0):(a(),l("small",LX,"Stripe: "+c(e.statusText(o)),1))]),n("td",null,c(o.purchasedAt?e.fmt?.date(o.purchasedAt):"\u2014"),1),n("td",null,[o.never?(a(),l(q,{key:0},[g("Never ends")],64)):o.until?(a(),l(q,{key:1},[g(c(e.fmt?.date(o.until)),1)],64)):(a(),l(q,{key:2},[g("\u2014")],64)),o.subscription&&o.state==="active"?(a(),l("small",FX,c(o.cancelAtPeriodEnd?"Ends":"Renews"),1)):f("v-if",!0)]),n("td",null,[o.cancelAtPeriodEnd?(a(),l("span",UX,"Cancelling")):(a(),l("span",BX,"\u2014"))]),n("td",null,[o.revoked?(a(),l(q,{key:0},[n("span",zX,c(e.revocationText(o.revocationReason)),1),o.revokedAt?(a(),l("small",HX,c(e.fmt?.date(o.revokedAt)),1)):f("v-if",!0)],64)):(a(),l("span",jX,"\u2014"))]),n("td",GX,[e.scopeHref(o.scope)?(a(),l("a",{key:0,href:e.safeUrl(e.scopeHref(o.scope))},[(a(),l("svg",KX,[n("use",{href:o.scope.kind==="conference"?"#project-icon-conference":"#project-type-repo"},null,8,YX)])),n("span",null,c(o.scope.id),1)],8,WX)):(a(),l("span",XX,"Account"))])]))),128))])])])):f("v-if",!0),e.total===0?(a(),l("div",JX,[t[72]||(t[72]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#project-icon-inbox"})],-1)),n("span",null,c(e.hasFilters()?"No subscriptions or purchases match these filters.":"No subscriptions or purchases yet."),1),e.hasFilters()?(a(),l("button",{key:0,type:"button",class:"btn btn-sm",onClick:t[12]||(t[12]=o=>e.clearFilters())},"Clear filters")):f("v-if",!0)])):f("v-if",!0),e.total<0&&!e.grantsError?(a(),l("div",QX,"Loading subscriptions and purchases\u2026")):f("v-if",!0),e.total>0?(a(),l("div",ZX,[t[77]||(t[77]=n("span",{"aria-hidden":"true"},null,-1)),e.totalPage>1?(a(),l("div",xX,[n("button",{class:"btn btn-sm",onClick:t[13]||(t[13]=o=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1),g(" Previous",-1)])],8,eJ),D(n("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,tJ),[[s,{state:e.viewState,set:o=>{e.query.page=o},value:e.query?.page,form:null,options:{}}]]),n("span",null,"of "+c(e.totalPage),1),n("button",{class:"btn btn-sm",onClick:t[14]||(t[14]=o=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[74]||(t[74]=[g("Next ",-1),n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,nJ)])):f("v-if",!0),n("span",sJ,[t[76]||(t[76]=n("label",{for:"bl-limit"},"Per page",-1)),D((a(),l("select",oJ,[...t[75]||(t[75]=[n("option",{value:"10"},"10",-1),n("option",{value:"25"},"25",-1),n("option",{value:"50"},"50",-1),n("option",{value:"100"},"100",-1)])])),[[s,{state:e.viewState,set:o=>{e.query.limit=o},value:e.query?.limit,form:null,options:{}}]])])])):f("v-if",!0)])])}var iJ={class:"paper-footer"},rJ={class:"paper-footer-inner"},aJ={class:"paper-footer-col"},lJ={key:0,href:"/dashboard"},dJ={key:1,href:"/conferences"},uJ={class:"paper-footer-foot"};function Sp(e,t){return a(),l("footer",iJ,[n("div",rJ,[t[3]||(t[3]=n("div",{class:"paper-footer-brand"},[n("div",{class:"paper-footer-mark"},[g("Anonymous "),n("em",null,"GitHub")]),n("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),n("div",aJ,[t[0]||(t[0]=n("div",{class:"paper-footer-head"},"Product",-1)),t[1]||(t[1]=n("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(a(),l("a",lJ,"My work")):f("v-if",!0),e.user?(a(),l("a",dJ,"Conferences")):f("v-if",!0),t[2]||(t[2]=n("a",{href:"/faq"},"FAQ",-1))]),t[4]||(t[4]=Ee('',2))]),t[6]||(t[6]=n("div",{class:"paper-footer-rule"},null,-1)),n("div",uJ,[n("span",null,"\xA9 "+c(e.year||new Date().getFullYear())+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[5]||(t[5]=n("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])}var ur={"partials/reviewConsent.htm":Yc,"partials/connections.htm":Xc,"partials/signin.htm":Jc,"partials/404.htm":Qc,"partials/admin/billing.htm":Ep,"partials/admin/conferences.htm":Zc,"partials/admin/errors.htm":xc,"partials/admin/overview.htm":ep,"partials/admin/queues.htm":tp,"partials/admin/repositories.htm":np,"partials/admin/user.htm":sp,"partials/admin/users.htm":op,"partials/anonymize.htm":ip,"partials/anonymizePullRequest.htm":rp,"partials/claim.htm":ap,"partials/conference.htm":lp,"partials/conferences.htm":dp,"partials/dashboard.htm":up,"partials/explorer.htm":cp,"partials/faq.htm":pp,"partials/gist.htm":fp,"partials/header.htm":hp,"partials/home.htm":mp,"partials/loading.htm":gp,"partials/newConference.htm":vp,"partials/pageView.htm":yp,"partials/pr-dashboard.htm":bp,"partials/profile.htm":wp,"partials/pullRequest.htm":kp,"partials/status.htm":Cp,"partials/footer.htm":Sp};var cJ={class:"ui-icon-definitions","aria-hidden":"true",focusable:"false"};function Np(e,t){return a(),l("svg",cJ,[...t[0]||(t[0]=[Ee('',1)])])}function Rp(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1,t.sidebarHidden=!1,t.dirExpanded=!1,t.moreOpen=!1,t.tocOpen=!1,t.gotoOpen=!1,t.gotoValue="",t.gotoError="",t.mdFindOpen=!1,t.mdFindQuery="",t.mdFindTotal=0,t.mdFindIndex=0,t.mdFindCase=!1,t.accountOpen=!1,t.helpOpen=!1,t.sidebarWidth=Math.min(520,Math.max(220,Number(localStorage.getItem("sidebarWidth"))||(window.innerWidth>=1280?320:280))),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px"),t.startSidebarResize=o=>{o.preventDefault();let r=o.clientX,d=t.sidebarWidth,p=y=>{t.sidebarWidth=Math.min(520,Math.max(220,d+y.clientX-r)),document.documentElement.style.setProperty("--sidebar-w",t.sidebarWidth+"px")},u=()=>{window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",u),document.body.classList.remove("is-resizing"),localStorage.setItem("sidebarWidth",String(t.sidebarWidth))};document.body.classList.add("is-resizing"),window.addEventListener("pointermove",p),window.addEventListener("pointerup",u)}),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"},t.watchGroup(["options.diff","options.comments"],()=>{t.options[t.prTabState.active]||(t.prTabState.active=t.options.diff?"diff":t.options.comments?"comments":null)})),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let i={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(i){let o=Rt(()=>t.fmt.orderBy(t.fmt.filter(i[1](),t[i[2]]),t.orderBy));Object.defineProperty(t,i[0],{configurable:!0,get:()=>o.value})}}function Pp(e=(...t)=>fetch(...t)){async function t(i,o,r,d={}){let p=new URL(o,window.location.href);for(let[m,b]of Object.entries(d.params||{}))if(b!=null)for(let h of Array.isArray(b)?b:[b])p.searchParams.append(m,typeof h=="object"?JSON.stringify(h):h);let u=new AbortController,y;d.timeout?.then?d.timeout.then(()=>u.abort()):d.timeout&&(y=setTimeout(()=>u.abort(),d.timeout));try{let m={Accept:"application/json, text/plain, */*",...d.headers},b=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);b&&p.origin===window.location.origin&&(m["X-XSRF-TOKEN"]=decodeURIComponent(b[1]));let h;r!==void 0&&(r instanceof FormData?h=r:(m["Content-Type"]||(m["Content-Type"]="application/json;charset=utf-8"),h=JSON.stringify(r)));let w=await e(p.href,{method:i,headers:m,body:h,credentials:"same-origin",signal:u.signal}),R;if(d.onDownloadProgress&&w.ok&&w.body?.getReader&&typeof TextDecoder<"u"){let v=w.body.getReader(),E=new TextDecoder,M=[],V=0;try{for(;;){let{value:_,done:G}=await v.read();if(G)break;M.push(E.decode(_,{stream:!0})),V+=_.byteLength,d.onDownloadProgress(V)}M.push(E.decode()),R=M.join("")}finally{v.releaseLock()}}else R=await w.text();let S=R;if(d.transformResponse)S=d.transformResponse(R);else if(R&&(/json/i.test(w.headers.get("content-type")||"")||/^[\[{]/.test(R.trim())))try{S=JSON.parse(R)}catch{}let N={data:S,status:w.status,headers:v=>w.headers.get(v)};if(!w.ok)throw N;return N}catch(m){throw m.name==="AbortError"?{status:-1,data:null}:m}finally{clearTimeout(y)}}let s={};for(let i of["get","delete","head"])s[i]=(o,r)=>t(i.toUpperCase(),o,void 0,r);for(let i of["post","put","patch"])s[i]=(o,r,d)=>t(i.toUpperCase(),o,r,d);return s}var Ap={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((i,o)=>{e=i,t=o}),resolve:e,reject:t}}};var Dp=function(e){function t(s){return s=s||{used:0,total:0},s.unlimited=!s.total,s.percent=s.unlimited?0:Math.min(100,s.used*100/s.total),s.level=s.unlimited?"unlimited":s.percent>=95?"danger":s.percent>=80?"warn":"ok",s}return{decorate:t,load:function(){return e.get("/api/user/quota").then(s=>{let i=s.data||{};return i.storage=t(i.storage),i.file=t(i.file),i.repository=t(i.repository),i})}}};var Tp={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=St(null);return fn(()=>{let i=[t.value][0];i.classList.add("html-doc");function o(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let d=document.createElement("iframe");d.className="html-doc-frame",d.setAttribute("title","Rendered HTML document");let p=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&p.push("allow-scripts","allow-forms","allow-modals"),d.setAttribute("sandbox",p.join(" ")),d.setAttribute("referrerpolicy","no-referrer"),i.appendChild(d);let u="";e.baseUrl&&(u=''),d.srcdoc=u+r}dt(()=>e.content,o,{immediate:!0}),dt(()=>e.baseUrl,o,{immediate:!0}),dt(()=>e.allowScripts,o,{immediate:!0})}),()=>De("html-doc",{ref:t})}};var Op={name:"pdfviewer",props:["src"],setup(e){let t=St(null);return fn(()=>{let s=[t.value],i=400,o=[.5,.75,1,1.25,1.5,2,3],r=1e3,d=s[0];d.classList.add("pdf-viewer");let p=null,u=[],y=!1,m=null,b=1,h=0,w=1,R=0,S=0,N=612/792,v=0,E=null,M=new Map,V=0;function _(T){let F=M.get(T);F&&(F.cancelled=!0,F.task?.cancel?.(),M.delete(T));let J=T.querySelector("canvas");J&&(J.width=0,J.height=0),T.innerHTML="",delete T.dataset.state}let G=document.createElement("div");G.className="pdf-toolbar";let te=document.createElement("div");te.className="pdf-pages",te.tabIndex=0,te.setAttribute("aria-label","PDF pages"),d.appendChild(G),d.appendChild(te);function X(T,F,J){let H=document.createElement("button");return H.type="button",H.className="pdf-toolbar-btn",H.title=F,H.setAttribute("aria-label",F),H.innerHTML='',H.addEventListener("click",J),H}let O=X("fa-chevron-up","Previous page",function(){Be(w-1)}),U=X("fa-chevron-down","Next page",function(){Be(w+1)}),C=document.createElement("input");C.type="text",C.className="pdf-toolbar-page",C.setAttribute("aria-label","Page number"),C.title="Page number \u2014 type a page and press Enter",C.addEventListener("keydown",function(T){T.key==="Enter"&&(Be(parseInt(C.value,10)),C.blur())}),C.addEventListener("blur",function(){C.value=String(w)});let L=document.createElement("span");L.className="pdf-toolbar-count";let z=X("fa-search-minus","Zoom out",function(){me(o[Math.max(0,he()-1)])}),K=X("fa-search-plus","Zoom in",function(){me(o[Math.min(o.length-1,he()+1)])}),ie=document.createElement("button");ie.type="button",ie.className="pdf-toolbar-btn pdf-toolbar-zoom",ie.title="Reset zoom to fit the width",ie.setAttribute("aria-label","Reset zoom to fit the width"),ie.addEventListener("click",function(){me(1)}),G.appendChild(O),G.appendChild(U);let se=document.createElement("span");se.className="pdf-toolbar-group",se.appendChild(C),se.appendChild(L),G.appendChild(se);let Y=document.createElement("span");Y.className="pdf-toolbar-group pdf-toolbar-right",Y.appendChild(z),Y.appendChild(ie),Y.appendChild(K),G.appendChild(Y);function he(){let T=0;for(let F=0;F=T,ie.textContent=b===1||!h?"Fit":Math.round(Re()/(h*96/72)*100)+"%",z.disabled=he()===0,K.disabled=he()===o.length-1}function Ue(T){let F=u[T-1];F&&(te.scrollTop+=F.getBoundingClientRect().top-te.getBoundingClientRect().top)}function Be(T){if(!p||isNaN(T))return;let F=Math.min(Math.max(1,T),p.numPages);u[F-1]&&(Ue(F),w=F,R=F,S=Date.now()+800,Se(),W())}function Qe(){if(!u.length||Date.now(){}),E=null),m&&(clearTimeout(m),m=null),p&&(p.destroy(),p=null),u=[],w=1,te.innerHTML="",Se()}function et(){te.innerHTML="";let T=document.createElement("div");T.className="pdf-viewer-error",T.textContent="This PDF could not be displayed.",te.appendChild(T)}function Re(){let T=Math.max(120,te.clientWidth-24);return Math.round(Math.min(T,r)*b)}function Fe(T,F,J){let H=window.devicePixelRatio||1,Z=T.getViewport({scale:1}),le=parseFloat(F.style.width);if(!le)return;let ne=T.getViewport({scale:le/Z.width*H}),oe=document.createElement("canvas");return oe.width=Math.floor(ne.width),oe.height=Math.floor(ne.height),oe.style.width=le+"px",oe.style.height=Math.floor(ne.height/H)+"px",F.innerHTML="",F.appendChild(oe),F.style.height=oe.style.height,J.task=T.render({canvasContext:oe.getContext("2d"),viewport:ne}),J.task.promise}function W(){if(!p)return;let T=v,F=te.getBoundingClientRect(),J=F.top-i,H=F.top+te.clientHeight+i,Z=u.map((ne,oe)=>({slot:ne,i:oe,rect:ne.getBoundingClientRect()})).filter(ne=>ne.rect.top<=H&&ne.rect.bottom>=J).sort((ne,oe)=>Math.abs(ne.rect.top-F.top)-Math.abs(oe.rect.top-F.top)).slice(0,6),le=new Set(Z.map(ne=>ne.slot));for(let ne of M.keys())le.has(ne)||_(ne);for(let{slot:ne,i:oe}of Z){if(ne.dataset.state||V>=2)continue;let ee={cancelled:!1,task:null};M.set(ne,ee),V++,ne.dataset.state="rendering";let ke;p.getPage(oe+1).then(pe=>{if(ke=pe,!(ee.cancelled||T!==v))return Fe(ke,ne,ee)}).then(()=>{ee.cancelled||T!==v||(ne.dataset.state="done",R&&Date.now(){!ee.cancelled&&T===v&&(ne.dataset.state="failed")}).finally(()=>{V--,ke?.cleanup?.(),p&&W()})}}function fe(){y||(y=!0,window.requestAnimationFrame(function(){y=!1,Qe(),W()}))}function de(){let T=!1;function F(){T||(T=!0,W())}window.requestAnimationFrame(F),window.setTimeout(F,50)}function ce(){v++,u.forEach(_);let T=Re();u.forEach(function(F){delete F.dataset.state,F.innerHTML="",F.style.width=T+"px",F.style.height=Math.round(T/N)+"px"}),W()}function me(T){if(!p||!u.length||T===b)return;let F=w;b=T,Se(),ce(),Be(F)}function Me(){p&&(m&&clearTimeout(m),m=setTimeout(function(){m=null,p&&u.length&&ce()},250))}function A(T){if(He(),!T)return;let F=v;E=pdfjsLib.getDocument({url:T,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}),E.promise.then(function(J){if(F!==v){J.destroy();return}return p=J,p.getPage(1).then(function(H){if(F!==v)return;let Z=H.getViewport({scale:1});Z.width&&Z.height&&(N=Z.width/Z.height),h=Z.width||0;let le=Re();for(let ne=1;ne<=p.numPages;ne++){let oe=document.createElement("div");oe.className="pdf-viewer-page",oe.style.width=le+"px",oe.style.height=Math.round(le/N)+"px",te.appendChild(oe),u.push(oe)}Se(),de()})}).catch(function(){F===v&&et()})}te.addEventListener("scroll",fe,{passive:!0}),$(window).on("resize",Me),Se(),dt(()=>e.src,A,{immediate:!0}),is(function(){te.removeEventListener("scroll",fe),$(window).off("resize",Me),He()})}),()=>De("pdfviewer",{ref:t})}};var pJ={key:0,class:"quota-row quota-usage"},fJ={class:"quota-header"},hJ={class:"quota-label"},mJ={class:"project-type-svg","aria-hidden":"true"},gJ=["href"],vJ={key:0,class:"quota-percent"},yJ={key:1,class:"quota-unlimited-tag"},bJ={class:"quota-value"},wJ={key:0},kJ=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],CJ={key:1,class:"quota-remaining"},EJ={key:2,class:"quota-remaining quota-limit"};function Ip(e,t){return e.quota?(a(),l("div",pJ,[(a(),l(q,null,x([{key:"repository",label:"Repositories",kind:"count",icon:"project-type-repo"},{key:"storage",label:"Storage",kind:"bytes",icon:"project-icon-storage"},{key:"file",label:"Files",kind:"count",icon:"project-icon-file"}],s=>n("div",{class:P(["quota-item","quota-"+e.quota[s.key].level]),key:s.key},[n("div",fJ,[n("span",hJ,[(a(),l("svg",mJ,[n("use",{href:"#"+s.icon},null,8,gJ)])),g(c(s.label),1)]),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("span",vJ,c(e.quota[s.key].percent>0&&e.quota[s.key].percent<1?"<1":e.fmt.number(e.quota[s.key].percent,0))+"% used",1)),e.quota[s.key].unlimited?(a(),l("span",yJ,"Unlimited")):f("v-if",!0)]),n("div",bJ,[n("strong",null,c(e.formatAmount(e.quota[s.key].used,s.kind)),1),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("span",wJ," / "+c(e.formatAmount(e.quota[s.key].total,s.kind)),1))]),e.quota[s.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:P(["quota-track","quota-"+e.quota[s.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":s.label+" quota","aria-valuenow":Math.min(e.quota[s.key].used,e.quota[s.key].total),"aria-valuemax":e.quota[s.key].total,"aria-valuetext":e.fmt.number(e.quota[s.key].percent,0)+"% used"},[e.quota[s?.key].unlimited?f("v-if",!0):(a(),l("div",{key:0,class:"quota-fill",style:Ie({width:e.quota[s.key].percent+"%"})},null,4))],10,kJ)),!e.quota[s.key].unlimited&&e.quota[s.key].used=e.quota[s.key].total?(a(),l("p",EJ,c(e.quota[s.key].used>e.quota[s.key].total?"Limit exceeded":"Limit reached"),1)):f("v-if",!0)],2)),64))])):f("v-if",!0)}var SJ={props:["quota","fmt"],setup(e){return{formatAmount:(t,s)=>s==="bytes"?e.fmt.humanFileSize(e.quota?.storage?.unit==="bytes"?t*8:t).replace(/([a-zA-Z]+)$/," $1"):e.fmt.number(t)}},render:Ip},NJ=new Set(ge),qp=e=>e?.querySelectorAll("pre code.language-diff, pre code.lang-diff").forEach(t=>{if(t.querySelector(".md-diff-line"))return;let s=t.innerHTML.replace(/\n$/,"").split(` +`);t.innerHTML=s.map(i=>{let o=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":o==="+"?"add":o==="-"?"remove":"";return`${i||" "}`}).join(` +`)}),Mp=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},_p=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(o=>{o.classList.contains("is-hunk")||o.style.setProperty("--hang",Mp(o.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(` +`).map(o=>{let r=i.join("");o.replace(/<\/?span\b[^>]*>/g,p=>(p.startsWith("]+>/g,"");return`${r}${o||" "}${"".repeat(i.length)}`}).join(` +`)})},$p={props:["content","terms","options"],setup(e){let t=St(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),qp(t.value),_p(t.value)};return fn(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},RJ={props:["file","terms","options"],setup(e){let t=St(null),s=()=>tt(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),qp(t.value),_p(t.value)});return fn(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},o=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(o)||i.language==="Markdown")return De("gist-file",{ref:t},De($p,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},d=(i.language||o||"none").toLowerCase();return De("gist-file",{ref:t},De("pre",{class:"line-numbers"},De("code",{class:"language-"+(r[d]||d),key:i.content},i.content||"")))}}},PJ=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let s=document.createElement("div");s.className="nb-code-scroll",t.replaceWith(s),s.appendChild(t);let i=()=>{let o=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",o),s.classList.toggle("is-at-end",o&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!o)return;let r=t.clientWidth-16,d=Math.max(24,r*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",d+"px"),s.style.setProperty("--thumb-x",(r-d)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),AJ={props:["file","content"],setup(e){let t=St(null),s=0,i,o=async()=>{let r=++s;i?.abort(),i=new AbortController;try{let d=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(p=>{if(!p.ok)throw Error("Notebook request failed");return p.json()});if(await Jn("notebook"),r!==s)return;t.value.innerHTML=_o(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),PJ(t.value)}catch(d){r===s&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return fn(()=>{o(),dt(()=>[e.file,e.content],o)}),is(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},DJ={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),s=t.reduce((i,[,o])=>i+o.code,0);return De("loc",t.map(([i,o])=>De("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},Lp={Markdown:$p,GistFile:RJ,Notebook:AJ,Loc:DJ,HtmlDoc:Tp,QuotaUsage:SJ,Pdfviewer:id(async()=>(await Jn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Op))},Fp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ni(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),Vp(e,s.options),e._editorCleanup=s.options?.onLoad?.(i)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Vp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Vp(e,t={}){let s=NJ.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Up={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,i=new IntersectionObserver(o=>{o.forEach(d=>d.isIntersecting?s.add(d.target.id):s.delete(d.target.id));let r=t.find(d=>s.has(d.hash.slice(1)));r&&t.forEach(d=>d.classList.toggle("active",d===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});tt(()=>{t.forEach(o=>{let r=document.getElementById(o.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(o=>o.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function Bp(e){let t=[],s=0,i=/\bXXXX-(\d+)\b/g,o;for(;o=i.exec(e);)o.index>s&&t.push(e.slice(s,o.index)),t.push(De("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[De("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s{s.push(r),d=1024&&iIJ(e.file)),p=()=>e.selectedPath??"/"+(Array.isArray(s.params.path)?s.params.path.join("/"):s.params.path||"");dt(()=>[s.params.repoId,s.params.path,e.selectedPath],()=>{let w="";p().split("/").filter(Boolean).forEach(R=>{w+="/"+R,o[w]=!0})},{immediate:!0});let u=Rt(()=>{if(!e.searchQuery||!e.searchResults)return null;let w=new Set,R=new Set;return e.searchResults.forEach(S=>{w.add(S.path?`${S.path}/${S.name}`:S.name);let N="";(S.path||"").split("/").filter(Boolean).forEach(v=>{N=N?N+"/"+v:v,R.add(N)})}),{files:w,folders:R}}),y=()=>[...i.value.querySelectorAll("li > a")],m=w=>{if(i.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),!w)return;if(r=w.dataset.path,w.classList.add("tree-focused"),e.selectedPath===void 0){w.scrollIntoView?.({block:"nearest"}),i.value.focus();return}let R=i.value.scrollHeight>i.value.clientHeight?i.value:i.value.closest(".leftCol-body");if(R){let S=w.getBoundingClientRect(),N=R.getBoundingClientRect();S.topN.bottom&&(R.scrollTop+=S.bottom-N.bottom)}i.value.focus({preventScroll:!0})};function b(w){let R=y(),S=i.value.querySelector(".tree-focused")||R[0],N=R.indexOf(S);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(w.key)||(w.preventDefault(),w.key==="ArrowDown"&&m(R[(N+1)%R.length]),w.key==="ArrowUp"&&m(R[(N-1+R.length)%R.length]),!S))return;let v=S.closest("li");w.key==="ArrowRight"&&v.classList.contains("folder")&&(v.classList.contains("open")?m(v.querySelector(":scope > ul > li > a")):S.click()),w.key==="ArrowLeft"&&(v.classList.contains("folder")&&v.classList.contains("open")?S.click():m(v.parentElement.closest("li.folder")?.querySelector(":scope > a"))),w.key==="Enter"&&S.click()}function h(w,R=""){let S=[...w].sort((N,v)=>+!!v.children-+!!N.children||N.name.localeCompare(v.name));return De("ul",S.flatMap(N=>{let v=N,E=v.name,M=(R+"/"+E).slice(1);if(u.value&&!u.value.files.has(M)&&!u.value.folders.has(M))return[];for(;v.children?.length===1&&v.children[0].children&&e.page?.loadedFolders?.[(R+"/"+E).slice(1)];)v=v.children[0],E+="/"+v.name;let V=R+"/"+E,_=!!v.children,G=u.value?o[V]!==!1:!!o[V],te=_&&e.page?.options?.truncatedFolders?.includes(V.slice(1)),X=De("span",{class:_?"tree-icon-folder":"far fa-file tree-icon-file","aria-hidden":"true"},_?De("svg",{viewBox:"0 0 14 12",focusable:"false"},De("path",{d:"M1.5 10.5v-9h4l1.5 2h5.5v7z"})):null),O=!1,U=E,C="",L="";if(E.length>80){let se=E.length-12;for(let Y=E.length-18;Y<=E.length-6;Y++)if(Y>0&&"-_. ".includes(E[Y])){se=Y;break}if(O=!/XXXX-\d+/.test(E.slice(Math.max(0,se-12))),U=E.slice(0,se).trimEnd(),C=E.slice(se).trimStart(),O){let Y=Math.max(8,30-C.length-1);if(U.length>Y&&!/XXXX-\d+/.test(U)){let he=-1;for(let Ue=Math.min(Y,U.length);Ue>=4;Ue--)if(".-_".includes(U[Ue])){he=Ue;break}let Se=E.slice(0,E.length-C.length);U=(he>0?U.slice(0,he):U.slice(0,Y)).trimEnd(),L=Se.slice(U.length)}}}let z=De("span",{class:{"tree-name":!0,"tree-name-split":O,"tree-name-wrap":!O},title:E.replace(/\bXXXX-(\d+)\b/g,"[redacted term $1]")},O?[De("span",{class:{"tree-name-head":!0,"is-cut":!!L}},Bp(U)),L?De("span",{class:"tree-name-middle"},L):null,De("span",{class:"tree-name-tail"},C)]:TJ(E)),K=se=>{if(m(se.currentTarget),!_){e.selectedPath!==void 0&&(se.preventDefault(),t("select",V));return}se.preventDefault(),o[V]=!G,o[V]&&!v.children.length&&e.page.getFiles(V.slice(1)),tt(()=>m(y().find(Y=>Y.dataset.path===r)))},ie=De("a",{"data-path":V,"aria-expanded":e.selectedPath!==void 0&&_?String(G):void 0,"aria-current":e.selectedPath!==void 0&&!_&&p()===V?"page":void 0,href:_?void 0:`/r/${encodeURIComponent(s.params.repoId)}${encodePathForUrl(V)}`,class:{"tree-focused":r===V},onClick:K},[_?De("span",{class:"tree-toggle"}):De("span",{class:"tree-spacer"}),X,z,te?De("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},De("i",{class:"fas fa-exclamation-triangle"})):null]);return De("li",{key:V,class:{file:!0,folder:_,open:G,active:p()===V,truncated:te},title:_?"":`Size: ${OJ(v.size||0)}`},[ie,_&&G?v.children.length||!e.page?.loadedFolders?.[V.slice(1)]?h(v.children,V):De("ul",De("li",{class:"tree-empty"},"Empty folder")):null])}))}return()=>De("tree",{ref:i,tabindex:0,onKeydown:b},e.file?.length?u.value?.files.size===0?De("div",{class:"tree-search-empty"},"No files found"):h(d.value):"Empty repository")}};function jp(){return st({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function Gp(e,t){if(!e[t]){let s=jp();Object.defineProperty(s,"invalid",{get(){return Object.values(s.errors).some(Boolean)||Object.keys(s).some(i=>i!=="invalid"&&s[i]&&typeof s[i]=="object"&&s[i].invalid)}}),e[t]=s}return e[t]}var Wp={beforeMount(e,{value:t}){e._formState=Gp(t,e.name),e.addEventListener("submit",s=>s.preventDefault())}};function MJ(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function Hp(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?MJ(t):t??""),Xa(e)}function Xa(e){let t=e._field.validation;if(!t)return;let s=e.validity;for(let[i,o]of Object.entries({required:s.valueMissing,pattern:s.patternMismatch,min:s.rangeUnderflow,max:s.rangeOverflow,date:s.badInput,email:s.typeMismatch&&e.type==="email",url:s.typeMismatch&&e.type==="url"}))t.setValidity(i,e.disabled||!o)}var Kp={beforeMount(e,{value:t}){var d;let s=t.form&&Gp(t.state,t.form),i=s&&e.name?s[d=e.name]||(s[d]=jp()):null;e._field={binding:t,validation:i,timer:null};let o=()=>{clearTimeout(e._field.timer),e._field.timer=null;let p=e._field.binding,u=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(u=e.value===""?null:Number(e.value)),e.type==="date"&&(u=e.value?new Date(e.value+"T00:00:00"):null),i){i.setDirty();for(let y of Object.keys(i.errors))i.setValidity(y,!0)}p.set(u),Xa(e),p.change?.()}};e._field.commit=o;let r=p=>{let u=e._field.binding.options?.debounce||0,y=typeof u=="number"?u:u[p.type]??u.default??0;clearTimeout(e._field.timer),y?e._field.timer=setTimeout(o,y):o()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",r),e.addEventListener("blur",()=>{i&&(i.touched=!0),e._field.timer&&o()})},mounted:Hp,updated(e,{value:t}){e._field.binding=t,Hp(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:s}=e._field,i=t.form&&t.state[t.form];i&&i[e.name]===s&&delete i[e.name]}};function Yp(e,t){let s=e.target.closest("form");if(s?._formState&&(s._formState.submitted=!0),s?.querySelectorAll("input, select, textarea").forEach(i=>{i._field?.timer&&i._field.commit(),i._field&&Xa(i)}),s&&!s.checkValidity()){let i=s.querySelector("input:invalid, select:invalid, textarea:invalid");i?.scrollIntoView?.({block:"center"}),i?.focus(),s.reportValidity();return}return t()}var Xp=Symbol("session"),VJ=/^\/(w|api|github)(\/|$)/;function Jp(e,t={}){let s=e?.split(".").reduce((i,o)=>i?.[o],Kn);return s==null&&e?.startsWith("ERRORS.")&&(s=Kn.ERRORS.unknown_error),String(s??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(i,o)=>t[o]??"")}var qJ={...wa,translate:Jp};function _J(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function $J(e="#app",t={}){let s=!!document.querySelector('meta[name="review-consent-page"][content="1"]'),i=s&&window.location.pathname==="/review-link"?sl(window):null,o=()=>{let h=i;return i=null,h};!t.history&&window.location.pathname==="/"&&/^#!\/r\/[^/?#]+/.test(window.location.hash)&&window.history.replaceState(window.history.state,"",window.location.hash.slice(2));let r=new Map,d=Pp(t.fetch),p,u;function y(){let h=Ct(),w={url(S){return S===void 0?u.currentRoute.value.fullPath:(u.push(S),w)},replace(S){return u.replace(S)},path(){return u.currentRoute.value.path},search(){return u.currentRoute.value.query}},R=new Proxy({},{get(S,N){let v=u.currentRoute.value.params[N];return Array.isArray(v)?v.join("/"):v}});return{takeReviewHandoff:o,http:d,...h,location:w,params:R,window,promises:Ap,html:{trustAsHtml:S=>S},translate:(S,N)=>Promise.resolve(Jp(S,N)),quotaService:Dp(d)}}function m(h){return{name:h.template,setup(){let w=qo(Mt(Xp),r);h.setup(w,y()),Rp(h.template,w);let R=[];return()=>ur[h.template](w,R)}}}u=Mu({history:t.history||Tu(),routes:Kc.map(h=>h.redirect?h:{path:h.path,component:m(h),meta:{title:h.title,preserveExplorer:h.preserveExplorer}})});let b=Qd({setup(){p=qo(null,r),p.fmt=qJ,p.window=window,p.Math=Math,p.sanitize=S=>DOMPurify.sanitize(S??""),p.highlightRedactions=S=>(p.site_options,Ic(S)),p.submitForm=Yp,p.safeUrl=_J;let h=y();Mc(p,h.http,h.location,h.timeout),os(Xp,p),dt(()=>p.title,S=>{document.title=S||"Anonymous GitHub"});let w=[],R=S=>{let N=S.target.closest?.("a[href]");if(S.defaultPrevented||S.button!==0||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||!N||N.hasAttribute("download")||N.target&&N.target!=="_self"||N.dataset.toggle||N.getAttribute("href").startsWith("#"))return;let E=new URL(N.href,window.location.href);s||/^\/review-link\/?$/i.test(E.pathname)||E.origin!==window.location.origin||VJ.test(E.pathname)||(S.preventDefault(),u.push(E.pathname+E.search+E.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",R),is(()=>document.removeEventListener("click",R)),()=>[Np(p,[]),s||/^\/(r|repository)\//.test(p.path||"")?null:De("header",{class:["app-header",{"is-contained":p.path==="/"||p.path==="/faq","is-signin":p.path==="/signin"}]},ur["partials/header.htm"](p,w)),De("main",{class:"app-view align-items-stretch w-100"},De(ha,null,{default:({Component:S,route:N})=>S?De(S,{key:N.meta.preserveExplorer?N.matched[0]?.path:N.path}):null})),De("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},p.toasts.map((S,N)=>De("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:N},[De("div",{class:"toast-header"},[De("strong",{class:"mr-auto"},S.title),De("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>p.removeToast(S)},"\xD7")]),De("div",{class:"toast-body"},S.body)])))]}});for(let[h,w]of Object.entries(Lp))b.component(h,w);return b.component("Tree",zp),b.component("PartialView",{props:["name","state"],setup(h){let w=[];return()=>ur[h.name](h.state,w)}}),b.directive("field",Kp),b.directive("form",Wp),b.directive("code-editor",Fp),b.directive("paper-scrollspy",Up),b.use(u),u.beforeEach(async h=>{if(h.path==="/review-link"&&!s||s&&h.path!=="/review-link")return window.location.assign(h.fullPath),!1;p?.emit("routeLeave"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(h.path)&&await Jn("markdown"),/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(h.path)&&await Jn("org")}),u.afterEach(h=>{if(!p)return;p.title=h.meta.title,p.emit("routeChange",{title:h.meta.title}),p.emit("routeUpdate",{title:h.meta.title});let w=document.querySelector(".app-view");!h.meta.preserveExplorer&&w&&(w.scrollTop=0)}),b.mount(e),{app:b,router:u,state:p}}document.querySelector("#app")&&(window.anonymousApp=$J());})(); /*! Bundled license information: @vue/shared/dist/shared.esm-bundler.js: diff --git a/scripts/dev-mock.js b/scripts/dev-mock.js index d1cc0bb..266e662 100644 --- a/scripts/dev-mock.js +++ b/scripts/dev-mock.js @@ -1003,6 +1003,146 @@ app.get("/api/admin/errors", (req, res) => { app.get("/api/admin/errors/stats", (req, res) => res.json(errorStats)); app.delete("/api/admin/errors", (req, res) => res.json({ ok: true, cleared: errorEntries.length, hourlyCleared: 48 })); +// ---- Admin billing (/api/admin/billing/*) -------------------------------- +// Grants as stored in Mongo (BillingGrant), summarized the way +// src/core/billing/report.ts does: a paper pack's three grants are one sale, +// revenue is the Stripe list price per currency (minor units). +// Cookies: mock_billing_empty=1 (no sales), mock_billing_norevenue=1 (Stripe +// not configured), mock_billing_slow=1 (summary never answers: loading state). +const BILLING_PLANS = [ + ["author_monthly", "Author monthly", "subscription"], ["author_annual", "Author annual", "subscription"], + ["author_pass", "Live updates", "repository"], ["repo_extend", "Extended expiration", "repository"], ["repo_never", "Never expire", "repository"], + ["repo_slot", "Extra repository", "repository"], ["repo_pack", "Paper pack", "repository"], + ["conference_workshop", "Workshop", "conference"], ["conference", "Conference", "conference"], ["conference_large", "Large conference", "conference"], +]; +const BILLING_PRICES = { + author_monthly: { eur: 500, interval: "month" }, author_annual: { eur: 4800, interval: "year" }, author_pass: { eur: 400 }, + repo_extend: { eur: 300 }, repo_never: { eur: 1500 }, repo_slot: { eur: 300 }, repo_pack: { eur: 800 }, + conference_workshop: { eur: 9900 }, conference: { eur: 29900 }, conference_large: { usd: 64900 }, // a price in another currency stays apart +}; +const NEVER = "9999-12-31T00:00:00.000Z"; +const billingGrants = (() => { + // Deterministic pseudo-random sales over 14 months, denser recently. + let seed = 7; + const rand = () => { seed = (seed * 16807) % 2147483647; return seed / 2147483647; }; + const owners = adminUsers.filter((u) => u.status === "active"); + const repos = ["anonymous_github-C72C", "icse24-artifact-7B1D", "JarSift", "runtime-repair-experiments-very-long-identifier-2ff4", "replication-package-5E1A"]; + const out = []; + const weights = [["author_monthly", 14], ["author_annual", 6], ["author_pass", 10], ["repo_extend", 8], ["repo_never", 6], ["repo_slot", 7], ["repo_pack", 9], ["conference_workshop", 2], ["conference", 2], ["conference_large", 1]]; + const total = weights.reduce((n, [, w]) => n + w, 0); + const pick = () => { let r = rand() * total; for (const [id, w] of weights) { if ((r -= w) < 0) return id; } return "repo_slot"; }; + for (let i = 0; i < 150; i++) { + const days = Math.floor(Math.pow(rand(), 1.6) * 420); + const plan = pick(), owner = owners[Math.floor(rand() * owners.length)]; + const purchasedAt = ago(days + rand()); + const base = { owner: owner._id, purchasedAt, status: "paid", revoked: false, cancelAtPeriodEnd: false }; + const id = (rand().toString(36).slice(2, 10)); + if (plan.startsWith("author_") && plan !== "author_pass") { + const period = plan === "author_annual" ? 365 : 30; + const ended = rand() < 0.25 && days > 40; + const until = ended ? ago(Math.max(1, days - period * 2)) : ahead(period - (days % period) || 1); + out.push({ ...base, _id: "sub_" + id, scope: "user:" + owner._id, planId: plan, subscription: true, status: ended ? "canceled" : rand() < 0.06 ? "past_due" : "active", until, cancelAtPeriodEnd: !ended && rand() < 0.18 }); + } else if (plan === "repo_pack") { + const repo = repos[Math.floor(rand() * repos.length)]; + for (const part of ["repo_slot", "author_pass", "repo_extend"]) out.push({ ...base, _id: "cs_" + id + ":" + part, scope: "repo:" + repo, planId: part, pack: true, until: part === "repo_slot" ? NEVER : ago(days - (part === "author_pass" ? 180 : 365)) }); + } else if (plan.startsWith("conference")) { + out.push({ ...base, _id: "cs_" + id, scope: "conference:" + ["FSE25", "ICSE26-AE", "FSE23"][Math.floor(rand() * 3)], planId: plan, until: ago(days - 160) }); + } else { + const length = { author_pass: 180, repo_extend: 365 }[plan]; + out.push({ ...base, _id: "cs_" + id, scope: "repo:" + repos[Math.floor(rand() * repos.length)], planId: plan, until: length ? ago(days - length) : NEVER }); + } + } + // Reversals: a recent refund, an older dispute. + const oneOffs = out.filter((g) => g._id.startsWith("cs_") && !g.pack); + Object.assign(oneOffs[2], { revoked: true, revocationReason: "full_refund", revokedAt: ago(3) }); + Object.assign(oneOffs[9], { revoked: true, revocationReason: "dispute", revokedAt: ago(40) }); + Object.assign(oneOffs[14], { revoked: true, revocationReason: "full_refund", revokedAt: ago(12) }); + return out.sort((a, b) => b.purchasedAt.localeCompare(a.purchasedAt)); +})(); +const billingUsable = (g, now) => !g.revoked && g.until > now && ["active", "paid", "past_due"].includes(g.status); +const billingFamily = (planId) => (BILLING_PLANS.find((p) => p[0] === planId) || [])[2] || "repository"; +function billingSales(grants) { + const sales = new Map(); + for (const g of grants) { + const key = g.pack ? g._id.split(":")[0] : g._id; + const sale = sales.get(key) || { plan: g.pack ? "repo_pack" : g.planId, purchasedAt: g.purchasedAt, revoked: false, active: false, cancel: false }; + const now = new Date().toISOString(); + sale.revoked = sale.revoked || g.revoked; sale.reason = sale.reason || g.revocationReason; sale.revokedAt = sale.revokedAt || g.revokedAt; + sale.active = sale.active || billingUsable(g, now); sale.cancel = sale.cancel || g.cancelAtPeriodEnd; + sales.set(key, sale); + } + return [...sales.values()]; +} +function billingSummary(req) { + const cookie = req.headers.cookie || ""; + const empty = /mock_billing_empty=1/.test(cookie), revenue = !/mock_billing_norevenue=1/.test(cookie); + const period = ["7d", "30d", "90d", "12m", "all"].includes(req.query.period) ? req.query.period : "30d"; + const days = { "7d": 7, "30d": 30, "90d": 90, "12m": 365 }[period]; + const now = new Date(), since = days ? new Date(now - days * DAY) : null; + const sales = empty ? [] : billingSales(billingGrants); + const inPeriod = (date) => date && (!since || new Date(date) >= since); + const money = (list, fn = () => 1) => { if (!revenue) return {}; const m = {}; for (const s of list) { const [currency, amount] = Object.entries(BILLING_PRICES[s.plan]).find(([k]) => k !== "interval"); m[currency] = Math.round((m[currency] || 0) + amount * fn(s)); } return m; }; + const subs = sales.filter((s) => s.active && billingFamily(s.plan) === "subscription"); + const reversals = sales.filter((s) => s.revoked && inPeriod(s.revokedAt)); + const unit = period === "12m" ? "week" : period === "all" ? "month" : "day"; + const trunc = (d) => { const x = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), unit === "month" ? 1 : d.getUTCDate())); if (unit === "week") x.setUTCDate(x.getUTCDate() - ((x.getUTCDay() + 6) % 7)); return x; }; + const next = (d) => { const x = new Date(d); if (unit === "month") x.setUTCMonth(x.getUTCMonth() + 1); else x.setUTCDate(x.getUTCDate() + (unit === "week" ? 7 : 1)); return x; }; + const first = since || (sales.length ? new Date(sales.reduce((m, s) => s.purchasedAt < m ? s.purchasedAt : m, sales[0].purchasedAt)) : null); + const series = []; + if (first) { + const buckets = new Map(); + for (let d = trunc(first); d <= now; d = next(d)) { const b = { date: d.toISOString(), subscription: 0, repository: 0, conference: 0 }; buckets.set(d.getTime(), b); series.push(b); } + for (const s of sales) if (inPeriod(s.purchasedAt)) { const b = buckets.get(trunc(new Date(s.purchasedAt)).getTime()); if (b) b[billingFamily(s.plan)]++; } + } + const periodSales = sales.filter((s) => inPeriod(s.purchasedAt)); + return { + period, since, now, bucket: unit, + subscriptions: { active: subs.length, monthly: subs.filter((s) => s.plan === "author_monthly").length, annual: subs.filter((s) => s.plan === "author_annual").length, + cancelling: subs.filter((s) => s.cancel).length, mrr: money(subs, (s) => s.plan === "author_annual" ? 1 / 12 : 1) }, + sales: { count: periodSales.length, revenue: money(periodSales) }, + allTime: { count: sales.length, revenue: money(sales) }, + reversals: { refunds: reversals.filter((s) => s.reason !== "dispute").length, disputes: reversals.filter((s) => s.reason === "dispute").length, amount: money(reversals) }, + plans: BILLING_PLANS.map(([planId, name, family]) => { + const of = (list) => list.filter((s) => s.plan === planId); + return { planId, name, family, active: of(sales.filter((s) => s.active)).length, sales: of(periodSales).length, revenue: money(of(periodSales)), allTimeSales: of(sales).length, allTimeRevenue: money(of(sales)) }; + }), + series, + revenue: { available: revenue, reason: revenue ? null : "stripe_not_configured", missingSales: 0, basis: "list_price" }, + webhooks: empty + ? { pending: 0, failed: 0, oldestPendingSeconds: 0, unresolved: 0, reconciliationFailed: 0, lastError: null, unreviewedRevocations: 0, latestRevocation: null } + : { pending: 2, failed: 1, oldestPendingSeconds: 140, unresolved: 0, reconciliationFailed: 0, unreviewedRevocations: 1, latestRevocation: { reason: "full_refund", createdAt: ago(3) }, + lastError: { type: "invoice.paid", state: "failed", error: "api_error:rate_limit", attempts: 12, receivedAt: ago(0.2) } }, + }; +} +app.get("/api/admin/billing/summary", (req, res) => { + if (/mock_billing_slow=1/.test(req.headers.cookie || "")) return; // never answers + res.json(billingSummary(req)); +}); +app.get("/api/admin/billing/grants", (req, res) => { + const now = new Date().toISOString(); + const word = (v) => typeof v === "string" && /^[a-z_]{1,40}$/.test(v) ? v : ""; + const plan = word(req.query.plan), status = word(req.query.status), state = word(req.query.state); + const search = String(req.query.search || "").toLowerCase(); + const name = (g) => (adminUsers.find((u) => u._id === g.owner) || {}).username; + const stateOf = (g) => g.revoked ? "revoked" : billingUsable(g, now) ? "active" : "expired"; + let rows = /mock_billing_empty=1/.test(req.headers.cookie || "") ? [] : billingGrants; + rows = rows.filter((g) => (!plan || (plan === "repo_pack" ? g.pack : g.planId === plan)) && (!status || g.status === status) && (!search || (name(g) || "").toLowerCase().includes(search))); + const stateCounts = { active: 0, expired: 0, revoked: 0 }; + for (const g of rows) stateCounts[stateOf(g)]++; + if (state) rows = rows.filter((g) => stateOf(g) === state); + const field = req.query.sort === "until" ? "until" : "purchasedAt", dir = req.query.direction === "asc" ? 1 : -1; + rows = [...rows].sort((a, b) => dir * a[field].localeCompare(b[field])); + const pageNo = Math.max(1, parseInt(req.query.page, 10) || 1), limit = Math.min(100, parseInt(req.query.limit, 10) || 25); + const results = rows.slice((pageNo - 1) * limit, pageNo * limit).map((g) => { + const [kind, id] = g.scope.split(/:(.*)/s); + return { id: g._id.replace(/[^a-z0-9]/gi, "").slice(-12), user: name(g) || null, planId: g.planId, pack: !!g.pack, family: billingFamily(g.planId), subscription: !!g.subscription, + status: g.status, state: stateOf(g), purchasedAt: g.purchasedAt, until: g.until === NEVER ? null : g.until, never: g.until === NEVER, + cancelAtPeriodEnd: g.cancelAtPeriodEnd, revoked: g.revoked, revocationReason: g.revocationReason || null, revokedAt: g.revokedAt || null, + scope: kind === "repo" || kind === "conference" ? { kind, id } : { kind: "account", id: null } }; + }); + res.json({ page: pageNo, limit, total: rows.length, results, stateCounts, statuses: [...new Set(billingGrants.map((g) => g.status))].sort() }); +}); + app.all("/api/{*rest}", (req, res) => res.status(404).json({ error: "not mocked: " + req.path })); app.use((req, res, next) => { diff --git a/src/core/billing/models.ts b/src/core/billing/models.ts index ba67925..0cf1d58 100644 --- a/src/core/billing/models.ts +++ b/src/core/billing/models.ts @@ -7,14 +7,17 @@ export const BillingAccount = model("billingAccount", new Schema({ reconciledAt: Date, reconcileAfter: { type: Date, default: () => new Date(0), index: true }, reconcileError: String, checkout: { id: String, key: String, planId: String, target: String, expiresAt: Date, createdAt: Date, params: Schema.Types.Mixed }, })); -export const BillingGrant = model("billingGrant", new Schema({ +const grantSchema = new Schema({ _id: String, owner: { type: String, index: true }, scope: { type: String, index: true }, planId: String, customerId: String, subscriptionId: String, paymentIntentId: { type: String, index: true }, status: String, until: Date, cancelAtPeriodEnd: Boolean, purchasedAt: Date, - priceId: String, + priceId: String, salePriceId: String, salePlanId: String, revision: { type: Number, default: 0 }, revoked: { type: Boolean, default: false }, revocationReason: String, revokedAt: Date, -})); +}); +// The admin billing list sorts grants by purchase date. +grantSchema.index({ purchasedAt: -1, _id: -1 }); +export const BillingGrant = model("billingGrant", grantSchema); export const BillingQuota = model("billingQuota", new Schema({ _id: String, allocations: [{ _id: false, repoId: String, reservationId: String, bytes: Number, baseBytes: Number, diff --git a/src/core/billing/report.ts b/src/core/billing/report.ts new file mode 100644 index 0000000..2315907 --- /dev/null +++ b/src/core/billing/report.ts @@ -0,0 +1,272 @@ +import { createHash } from "crypto"; +import { InferSchemaType } from "mongoose"; +import config from "../../config"; +import UserModel from "../model/users/users.model"; +import { BillingEvent, BillingGrant, BillingRevocation } from "./models"; +import { billingHealth } from "./events"; +import { stripeClient } from "./stripe"; +import { billingPlans, CONFERENCE_PLANS, REPO_NEVER_UNTIL } from "./config"; + +// Admin billing report. A sale is one checkout or one subscription: the three +// grants of a paper pack count once, under "repo_pack". Grants hold no amounts, +// so revenue is the Stripe list price of each sale's price, resolved once per +// price and kept in memory (a Stripe price's amount never changes). + +export const BILLING_PERIODS: Record = { "7d": 7, "30d": 30, "90d": 90, "12m": 365, all: null }; +export const SUBSCRIPTION_PLANS = ["author_monthly", "author_annual"]; +export const USABLE_STATUSES = ["active", "paid", "past_due"]; +export type Family = "subscription" | "repository" | "conference"; +export type Money = Record; +type Bucket = "day" | "week" | "month"; + +export function planFamily(planId?: string | null): Family { + if (planId === "subscription_unknown" || SUBSCRIPTION_PLANS.includes(planId || "")) return "subscription"; + if ((CONFERENCE_PLANS as string[]).includes(planId || "")) return "conference"; + return "repository"; +} +export function bucketFor(period: string): Bucket { + return period === "12m" ? "week" : period === "all" ? "month" : "day"; +} +// The UTC start of the bucket holding `date`, matching Mongo's $dateTrunc (weeks start on Monday). +export function truncate(date: Date, unit: Bucket) { + const d = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), unit === "month" ? 1 : date.getUTCDate())); + if (unit === "week") d.setUTCDate(d.getUTCDate() - ((d.getUTCDay() + 6) % 7)); + return d; +} +function nextBucket(date: Date, unit: Bucket) { + const d = new Date(date); + if (unit === "month") d.setUTCMonth(d.getUTCMonth() + 1); + else d.setUTCDate(d.getUTCDate() + (unit === "week" ? 7 : 1)); + return d; +} + +type Price = { amount: number; currency: string; interval: string | null; intervalCount: number }; +type PriceLookup = (id: string) => Promise<{ unit_amount: number | null; currency: string; recurring?: { interval: string; interval_count: number } | null }>; +const priceCache = new Map(); +const priceFailures = new Map(); +export function clearPriceCache() { priceCache.clear(); priceFailures.clear(); } +export function revenueAvailable() { return config.BILLING_ENABLED && !!config.STRIPE_SECRET_KEY; } +// Resolves each distinct price once. A failed lookup is retried after a minute, +// and its sales are reported as missing rather than counted as zero. +export async function resolvePrices(ids: string[], lookup: PriceLookup = id => stripeClient().prices.retrieve(id)) { + await Promise.all([...new Set(ids)].filter(id => id && !priceCache.has(id) && !((priceFailures.get(id) || 0) > Date.now())).map(async id => { + try { + const p = await lookup(id); + if (p.unit_amount == null) throw new Error("price_without_amount"); + priceCache.set(id, { amount: p.unit_amount, currency: p.currency, interval: p.recurring?.interval || null, intervalCount: p.recurring?.interval_count || 1 }); + priceFailures.delete(id); + } catch { priceFailures.set(id, Date.now() + 60_000); } + })); + return priceCache; +} +const add = (money: Money, currency: string, amount: number) => { money[currency] = (money[currency] || 0) + amount; }; +const roundMoney = (money: Money) => Object.fromEntries(Object.entries(money).map(([c, v]) => [c, Math.round(v)])); +// The monthly value of one period of a recurring price. +export function monthlyAmount(price: Price, planId?: string | null) { + const interval = price.interval || (planId === "author_annual" ? "year" : "month"); + const perMonth = { day: 365 / 12, week: 52 / 12, month: 1, year: 1 / 12 }[interval] ?? 1; + return price.amount * perMonth / (price.intervalCount || 1); +} + +const PACK_PART = "^cs_[^:]+:(repo_slot|author_pass|repo_extend)$"; +type Row = { _id: { plan: string; priceId?: string | null; reason?: string }; count: number; cancelling?: number }; + +export async function billingSummary(period: string, now = new Date(), lookup?: PriceLookup) { + const days = BILLING_PERIODS[period]; + const since = days == null ? null : new Date(now.getTime() - days * 86400_000); + const unit = bucketFor(period); + const isPack = { $regexMatch: { input: { $toString: "$_id" }, regex: PACK_PART } }; + const subscription = { $ne: [{ $ifNull: ["$subscriptionId", null] }, null] }; + const group = { _id: { plan: "$plan", priceId: "$priceId" }, count: { $sum: 1 } }; + const [facets] = await BillingGrant.aggregate([ + { $project: { + sale: { $cond: [isPack, { $arrayElemAt: [{ $split: ["$_id", ":"] }, 0] }, "$_id"] }, + plan: { $cond: [isPack, "repo_pack", { $cond: [subscription, { $ifNull: ["$salePlanId", "subscription_unknown"] }, { $ifNull: ["$planId", "unknown"] }] }] }, + priceId: { $cond: [subscription, { $ifNull: ["$salePriceId", null] }, "$priceId"] }, + currentPriceId: "$priceId", currentPlan: { $cond: [isPack, "repo_pack", { $ifNull: ["$planId", "unknown"] }] }, + // syncSubscription only advances until from a paid invoice and retains it + // after cancellation. Epoch means no payment has ever granted service. + purchasedAt: { $cond: [ + { $and: [{ $ne: [{ $ifNull: ["$subscriptionId", null] }, null] }, { $not: [{ $gt: ["$until", new Date(0)] }] }] }, + null, "$purchasedAt", + ] }, + cancel: { $eq: ["$cancelAtPeriodEnd", true] }, + usable: { $and: [{ $ne: ["$revoked", true] }, { $gt: ["$until", now] }, { $in: ["$status", USABLE_STATUSES] }] }, + } }, + { $group: { _id: "$sale", plan: { $first: "$plan" }, priceId: { $first: "$priceId" }, purchasedAt: { $min: "$purchasedAt" }, + currentPriceId: { $first: "$currentPriceId" }, currentPlan: { $first: "$currentPlan" }, active: { $max: "$usable" }, cancel: { $max: "$cancel" } } }, + { $facet: { + allTime: [{ $match: { purchasedAt: { $ne: null } } }, { $group: group }], + period: [{ $match: { purchasedAt: since ? { $gte: since } : { $ne: null } } }, { $group: group }], + active: [{ $match: { active: true } }, { $group: { ...group, _id: { plan: "$currentPlan", priceId: "$currentPriceId" }, cancelling: { $sum: { $cond: ["$cancel", 1, 0] } } } }], + series: [{ $match: { purchasedAt: since ? { $gte: since } : { $ne: null } } }, + { $group: { _id: { bucket: { $dateTrunc: { date: "$purchasedAt", unit, startOfWeek: "monday" } }, plan: "$plan" }, count: { $sum: 1 } } }], + } }, + ]); + const rows = (name: string) => (facets?.[name] || []) as Row[]; + + const available = revenueAvailable(); + const priceIds = [...rows("allTime"), ...rows("active")].map(r => r._id.priceId).filter((id): id is string => !!id); + const prices = available ? await resolvePrices(priceIds, lookup) : new Map(); + // Sums the list price of `rows` per currency. Sales without a known price are left out and reported as missing. + const money = (list: Row[], value = (p: Price, r: Row) => p.amount * r.count) => { + const total: Money = {}; + for (const r of list) { + const price = r._id.priceId ? prices.get(r._id.priceId) : undefined; + if (price) add(total, price.currency, value(price, r)); + } + return roundMoney(total); + }; + const count = (list: Row[]) => list.reduce((n, r) => n + r.count, 0); + + const activeSubs = rows("active").filter(r => SUBSCRIPTION_PLANS.includes(r._id.plan)); + const mrr = available ? money(activeSubs, (p, r) => monthlyAmount(p, r._id.plan) * r.count) : {}; + const missingSales = count(rows("period").filter(r => !r._id.priceId || !prices.has(r._id.priceId))); + // Count payment decisions, not mutable access grants. Operator reinstatement + // leaves these records intact; distinct refunded renewals stay distinct. + const reversals = await BillingRevocation.aggregate([ + ...(since ? [{ $match: { createdAt: { $gte: since } } }] : []), + { $lookup: { from: BillingGrant.collection.name, localField: "_id", foreignField: "paymentIntentId", + pipeline: [{ $match: { owner: { $type: "string" } } }, { $limit: 1 }], as: "checkout" } }, + { $lookup: { from: BillingGrant.collection.name, localField: "subscriptionId", foreignField: "_id", + pipeline: [{ $match: { owner: { $type: "string" } } }, { $limit: 1 }], as: "subscription" } }, + { $match: { $or: [{ "checkout.0": { $exists: true } }, { "subscription.0": { $exists: true } }] } }, + { $group: { _id: "$reason", count: { $sum: 1 } } }, + ]); + const missing = (list: Row[]) => count(list.filter(r => !r._id.priceId || !prices.has(r._id.priceId))); + const inPeriod = rows("period"), allTime = rows("allTime"); + const result = { + period, since, now, bucket: unit, + subscriptions: { + active: count(activeSubs), + monthly: count(activeSubs.filter(r => r._id.plan === "author_monthly")), + annual: count(activeSubs.filter(r => r._id.plan === "author_annual")), + cancelling: activeSubs.reduce((n, r) => n + (r.cancelling || 0), 0), + mrr, complete: available && missing(activeSubs) === 0, + }, + sales: { count: count(inPeriod), revenue: available ? money(inPeriod) : {}, complete: available && missing(inPeriod) === 0 }, + allTime: { count: count(allTime), revenue: available ? money(allTime) : {}, complete: available && missing(allTime) === 0 }, + reversals: { + refunds: count(reversals.filter(r => r._id === "full_refund")), + disputes: count(reversals.filter(r => r._id === "dispute")), + }, + plans: planRows(rows, available ? (list: Row[]) => money(list) : () => ({}), list => available && missing(list) === 0), + series: fillSeries(rows("series") as unknown as { _id: { bucket: Date; plan: string }; count: number }[], since, now, unit), + revenue: { available, reason: available ? null : "stripe_not_configured", missingSales: available ? missingSales : 0, missingAllTimeSales: available ? missing(allTime) : 0, missingSubscriptions: available ? missing(activeSubs) : 0, basis: "list_price" }, + }; + return result; +} + +function planRows(rows: (name: string) => Row[], money: (list: Row[]) => Money, complete: (list: Row[]) => boolean) { + const names = new Map(billingPlans().map(p => [p.id as string, p.name])); + const ids = [...names.keys()]; + for (const name of ["allTime", "active", "period"]) for (const r of rows(name)) if (!ids.includes(r._id.plan)) ids.push(r._id.plan); + return ids.map(planId => { + const of = (name: string) => rows(name).filter(r => r._id.plan === planId); + const sum = (list: Row[]) => list.reduce((n, r) => n + r.count, 0); + return { planId, name: names.get(planId) || planId, family: planFamily(planId), + revenueComplete: complete(of("period")), allTimeRevenueComplete: complete(of("allTime")), + active: sum(of("active")), sales: sum(of("period")), revenue: money(of("period")), + allTimeSales: sum(of("allTime")), allTimeRevenue: money(of("allTime")) }; + }); +} + +function fillSeries(rows: { _id: { bucket: Date; plan: string }; count: number }[], since: Date | null, now: Date, unit: Bucket) { + const first = since || rows.reduce((min, r) => !min || r._id.bucket < min ? r._id.bucket : min, null); + if (!first) return []; + const buckets = new Map(); + for (let d = truncate(first, unit); d <= now; d = nextBucket(d, unit)) buckets.set(d.getTime(), { date: d, subscription: 0, repository: 0, conference: 0 }); + for (const r of rows) { + const bucket = buckets.get(new Date(r._id.bucket).getTime()); + if (bucket) bucket[planFamily(r._id.plan)] += r.count; + } + return [...buckets.values()]; +} + +// Webhook inbox state and payment reversals waiting for an operator. +export async function billingWebhookHealth() { + const [health, lastError, unreviewed, latest] = await Promise.all([ + billingHealth(), + BillingEvent.findOne({ state: { $in: ["pending", "processing", "failed"] }, lastError: { $exists: true } }) + .sort({ nextAttemptAt: -1 }).select("type state lastError attempts receivedAt").lean(), + BillingRevocation.countDocuments({ reviewed: false }), + BillingRevocation.findOne({ reviewed: false }).sort({ createdAt: -1 }).select("reason createdAt").lean(), + ]); + return { ...health, + lastError: lastError ? { type: lastError.type, state: lastError.state, error: lastError.lastError, attempts: lastError.attempts, receivedAt: lastError.receivedAt } : null, + unreviewedRevocations: unreviewed, latestRevocation: latest ? { reason: latest.reason, createdAt: latest.createdAt } : null }; +} + +export type GrantQuery = { search?: unknown; page?: unknown; limit?: unknown; plan?: unknown; status?: unknown; state?: unknown; owners?: string[] | null; sort?: unknown; direction?: unknown }; +const STATE_FILTERS = (now: Date): Record> => ({ + active: { revoked: { $ne: true }, until: { $gt: now }, status: { $in: USABLE_STATUSES } }, + expired: { revoked: { $ne: true }, $or: [{ until: { $not: { $gt: now } } }, { status: { $nin: USABLE_STATUSES } }] }, + revoked: { revoked: true }, +}); +const word = (v: unknown) => typeof v === "string" && /^[a-z_]{1,40}$/.test(v) ? v : ""; +// The filtered grant list. Only plain words reach the query, never operators. +export function grantFilter(query: GrantQuery, now = new Date()) { + const filter: Record = {}; + const plan = word(query.plan), status = word(query.status), state = word(query.state); + if (plan === "repo_pack") filter._id = { $regex: PACK_PART }; + else if (plan) filter.planId = plan; + if (status) filter.status = status; + if (query.owners) filter.owner = { $in: query.owners }; + return { filter, state: STATE_FILTERS(now)[state] || null }; +} +export async function billingGrants(query: GrantQuery, usernames: (ids: string[]) => Promise>, now = new Date()) { + const page = Math.max(1, parseInt(String(query.page)) || 1); + const limit = Math.min(Math.max(1, parseInt(String(query.limit)) || 25), 100); + const sortField = ["purchasedAt", "until"].includes(String(query.sort)) ? String(query.sort) : "purchasedAt"; + const { filter, state } = grantFilter(query, now); + const states = STATE_FILTERS(now); + const listed = state ? { $and: [filter, state] } : filter; + const search = typeof query.search === "string" ? query.search.trim() : ""; + const selection = "owner scope planId status until cancelAtPeriodEnd purchasedAt revoked revocationReason revokedAt subscriptionId"; + const statuses = await BillingGrant.distinct("status"); + let total: number, grants: InferSchemaType[], stateCounts: [string, number][]; + if (search) { + const escaped = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + const [result] = await BillingGrant.aggregate([ + { $match: filter }, + { $set: { userId: { $convert: { input: "$owner", to: "objectId", onError: null, onNull: null } } } }, + { $lookup: { from: UserModel.collection.name, localField: "userId", foreignField: "_id", + pipeline: [{ $match: { username: { $regex: escaped, $options: "i" } } }, { $project: { _id: 1 } }], as: "user" } }, + { $match: { "user.0": { $exists: true } } }, + { $facet: { + total: [...(state ? [{ $match: state }] : []), { $count: "count" }], + grants: [...(state ? [{ $match: state }] : []), + { $sort: { [sortField]: query.direction === "asc" ? 1 : -1, _id: -1 } }, + { $skip: (page - 1) * limit }, { $limit: limit }, + { $project: Object.fromEntries(selection.split(" ").map(key => [key, 1])) }], + ...Object.fromEntries(Object.entries(states).map(([key, f]) => [key, [{ $match: f }, { $count: "count" }]])), + } }, + ]); + total = result.total[0]?.count || 0; grants = result.grants; + stateCounts = Object.keys(states).map(key => [key, result[key][0]?.count || 0]); + } else { + [total, grants, stateCounts] = await Promise.all([ + BillingGrant.countDocuments(listed), + BillingGrant.find(listed).sort({ [sortField]: query.direction === "asc" ? 1 : -1, _id: -1 }).skip((page - 1) * limit).limit(limit) + .select(selection).lean(), + Promise.all(Object.entries(states).map(async ([key, f]) => [key, await BillingGrant.countDocuments({ $and: [filter, f] })] as [string, number])), + ]); + } + const names = await usernames([...new Set(grants.map(g => g.owner).filter((o): o is string => !!o))]); + const usable = (g: { revoked?: boolean | null; until?: Date | null; status?: string | null }) => !g.revoked && !!g.until && g.until > now && USABLE_STATUSES.includes(g.status || ""); + const results = grants.map(g => { + const [kind, target] = String(g.scope || "").split(/:(.*)/s); + const never = !!g.until && g.until.getTime() >= REPO_NEVER_UNTIL.getTime(); + const pack = new RegExp(PACK_PART).test(String(g._id)); + return { + id: createHash("sha256").update(String(g._id)).digest("hex").slice(0, 12), + user: (g.owner && names.get(g.owner)) || null, + planId: g.planId || "unknown", pack, family: planFamily(g.planId), subscription: !!g.subscriptionId, + status: g.status || null, state: g.revoked ? "revoked" : usable(g) ? "active" : "expired", + purchasedAt: g.purchasedAt || null, until: never ? null : g.until || null, never, + cancelAtPeriodEnd: !!g.cancelAtPeriodEnd, revoked: !!g.revoked, revocationReason: g.revocationReason || null, revokedAt: g.revokedAt || null, + scope: kind === "repo" || kind === "conference" ? { kind, id: target } : { kind: "account", id: null }, + }; + }); + return { page, limit, total, results, stateCounts: Object.fromEntries(stateCounts), statuses: statuses.filter(Boolean).sort() }; +} diff --git a/src/core/billing/stripe.ts b/src/core/billing/stripe.ts index 8bca1eb..c877df2 100644 --- a/src/core/billing/stripe.ts +++ b/src/core/billing/stripe.ts @@ -63,7 +63,23 @@ export async function syncSubscription(id: string, stripe = stripeClient()) { } } } - const values = { owner, scope: `user:${owner}`, planId: plan?.id || "unknown", customerId: account.customerId, priceId, + // Snapshot the original invoice price, never the mutable current price. + // Legacy grants without this evidence remain incomplete in historical reports. + let initialSale: { salePriceId: string; salePlanId: string } | undefined; + if (!previous?.salePriceId && invoice?.status === "paid" && invoice.billing_reason === "subscription_create") { + const lines = stripe.invoices?.listLineItems + ? stripe.invoices.listLineItems(invoice.id, { limit: 100 }) : invoice.lines?.data || []; + for await (const line of lines) { + const item = line.parent?.subscription_item_details; + const originalPrice = objectId(line.pricing?.price_details?.price || null); + if (!item?.proration && item?.subscription_item === sub.items.data[0]?.id && originalPrice) { + const originalPlan = await planForPrice(originalPrice, true); + if (originalPlan) initialSale = { salePriceId: originalPrice, salePlanId: originalPlan.id }; + break; + } + } + } + const values = { ...initialSale, owner, scope: `user:${owner}`, planId: plan?.id || "unknown", customerId: account.customerId, priceId, subscriptionId: id, status: sub.status, cancelAtPeriodEnd: sub.cancel_at_period_end || !!sub.cancel_at, until: paidThrough, ...(sub.start_date ? { purchasedAt: new Date(sub.start_date * 1000) } : {}), }; diff --git a/src/server/routes/admin-billing.ts b/src/server/routes/admin-billing.ts new file mode 100644 index 0000000..1fe213a --- /dev/null +++ b/src/server/routes/admin-billing.ts @@ -0,0 +1,30 @@ +import * as express from "express"; +import { AsyncCache } from "../../core/async-cache"; +import { BILLING_PERIODS, billingGrants, billingSummary, billingWebhookHealth } from "../../core/billing/report"; +import UserModel from "../../core/model/users/users.model"; +import { handleError } from "./route-utils"; + +// Mounted under the admin router, after its administrator check. +const router = express.Router(); +const summaryCache = new AsyncCache>>(30_000, 8); + +async function usernames(ids: string[]) { + const users = await UserModel.find({ _id: { $in: ids.filter(id => /^[a-f0-9]{24}$/.test(id)) } }).select("username").lean(); + return new Map(users.map(u => [String(u._id), u.username as string])); +} + +router.get("/summary", async (req, res) => { + try { + const period = typeof req.query.period === "string" && req.query.period in BILLING_PERIODS ? req.query.period : "30d"; + const [summary, webhooks] = await Promise.all([summaryCache.get(period, () => billingSummary(period)), billingWebhookHealth()]); + res.set("Cache-Control", "no-store").json({ ...summary, webhooks }); + } catch (error) { handleError(error, res, req); } +}); + +router.get("/grants", async (req, res) => { + try { + res.set("Cache-Control", "no-store").json(await billingGrants({ ...req.query, owners: null }, usernames)); + } catch (error) { handleError(error, res, req); } +}); + +export default router; diff --git a/src/server/routes/admin.ts b/src/server/routes/admin.ts index 8e754d9..23367a6 100644 --- a/src/server/routes/admin.ts +++ b/src/server/routes/admin.ts @@ -21,6 +21,7 @@ import User from "../../core/User"; import { ensureAuthenticated } from "./connection"; import { handleError, getUser, isOwnerOrAdmin, getRepo } from "./route-utils"; import adminTokensRouter from "./admin-tokens"; +import adminBillingRouter from "./admin-billing"; import { octokit, getToken } from "../../core/GitHubUtils"; import { createLogger, @@ -83,6 +84,7 @@ router.use( ); router.use("/tokens", adminTokensRouter); +router.use("/billing", adminBillingRouter); router.get("/performance", async (req, res) => { res.set("Cache-Control", "no-store"); diff --git a/test/admin-billing.test.js b/test/admin-billing.test.js new file mode 100644 index 0000000..8ed29ea --- /dev/null +++ b/test/admin-billing.test.js @@ -0,0 +1,250 @@ +const { URL } = require("node:url"); +const { expect } = require("chai"); +require("ts-node/register/transpile-only"); +const mongoose = require("mongoose"); +const config = require("../src/config").default; +const { BillingGrant, BillingEvent, BillingRevocation } = require("../src/core/billing/models"); +const User = require("../src/core/model/users/users.model").default; +const report = require("../src/core/billing/report"); + +const DAY = 86400000; + +describe("admin billing report helpers", () => { + it("groups plans into families and buckets by period", () => { + expect(report.planFamily("author_annual")).to.equal("subscription"); + expect(report.planFamily("conference_large")).to.equal("conference"); + expect(report.planFamily("repo_pack")).to.equal("repository"); + expect(["7d", "30d", "90d", "12m", "all"].map(report.bucketFor)).to.deep.equal(["day", "day", "day", "week", "month"]); + // Weeks start on Monday in UTC, like Mongo's $dateTrunc with startOfWeek: "monday". + expect(report.truncate(new Date("2026-11-15T23:00:00Z"), "week").toISOString()).to.equal("2026-11-09T00:00:00.000Z"); + expect(report.truncate(new Date("2026-11-15T23:00:00Z"), "month").toISOString()).to.equal("2026-11-01T00:00:00.000Z"); + }); + it("normalizes recurring prices to a monthly amount", () => { + expect(report.monthlyAmount({ amount: 1200, interval: "year", intervalCount: 1 })).to.equal(100); + expect(report.monthlyAmount({ amount: 500, interval: "month", intervalCount: 1 })).to.equal(500); + expect(report.monthlyAmount({ amount: 1200, interval: null, intervalCount: 1 }, "author_annual")).to.equal(100); + }); + it("passes only plain words from the query string into the grant filter", () => { + const { filter, state } = report.grantFilter({ plan: { $ne: "x" }, status: "active", state: "revoked" }); + expect(filter).to.deep.equal({ status: "active" }); + expect(state).to.deep.equal({ revoked: true }); + expect(report.grantFilter({ plan: "repo_pack", status: "$where" }).filter).to.deep.equal({ _id: { $regex: "^cs_[^:]+:(repo_slot|author_pass|repo_extend)$" } }); + }); + it("mounts the billing routes behind the administrator check", () => { + const admin = require("../src/server/routes/admin").default; + const billingRouter = require("../src/server/routes/admin-billing").default; + const billing = admin.stack.findIndex(l => l.handle === billingRouter); + // ensureAuthenticated and the isOwnerOrAdmin middleware come first. + expect(billing).to.be.greaterThan(1); + expect(admin.stack.slice(0, billing).filter(l => !l.route && l.handle.length >= 3).length).to.be.at.least(2); + }); +}); + +const uri = process.env.BILLING_TEST_MONGODB_URI; +(uri ? describe : describe.skip)("admin billing report with MongoDB", function () { + this.timeout(20000); + const original = { ...config }; + const now = new Date(); + const ago = days => new Date(now.getTime() - days * DAY); + const later = days => new Date(now.getTime() + days * DAY); + const prices = { + price_monthly: { unit_amount: 500, currency: "eur", recurring: { interval: "month", interval_count: 1 } }, + price_annual: { unit_amount: 4800, currency: "eur", recurring: { interval: "year", interval_count: 1 } }, + price_pack: { unit_amount: 1500, currency: "eur" }, + price_never: { unit_amount: 2000, currency: "usd" }, + price_conf: { unit_amount: 30000, currency: "eur" }, + }; + let lookups; + const lookup = async id => { lookups.push(id); if (!prices[id]) throw new Error("no such price"); return prices[id]; }; + let alice, bob; + before(async () => { + if (!/^billing_test_/.test(new URL(uri).pathname.slice(1))) throw new Error("Use a disposable billing_test_ database"); + await mongoose.connect(uri); + await Promise.all([BillingGrant, BillingEvent, BillingRevocation, User].map(m => m.init())); + }); + beforeEach(async () => { + lookups = []; + report.clearPriceCache(); + Object.assign(config, { BILLING_ENABLED: true, STRIPE_SECRET_KEY: "sk_test_x", STRIPE_WEBHOOK_SECRET: "whsec_x" }); + await Promise.all([BillingGrant, BillingEvent, BillingRevocation, User].map(m => m.deleteMany({}))); + [alice, bob] = await User.create([{ username: "alice-lab", accessTokens: {} }, { username: "bob" }]); + const a = String(alice._id), b = String(bob._id); + await BillingGrant.create([ + { _id: "sub_m", owner: a, scope: `user:${a}`, planId: "author_monthly", subscriptionId: "sub_m", priceId: "price_monthly", salePriceId: "price_monthly", salePlanId: "author_monthly", status: "active", until: later(20), purchasedAt: ago(3) }, + { _id: "sub_y", owner: b, scope: `user:${b}`, planId: "author_annual", subscriptionId: "sub_y", priceId: "price_annual", salePriceId: "price_annual", salePlanId: "author_annual", status: "active", until: later(200), purchasedAt: ago(100), cancelAtPeriodEnd: true }, + { _id: "sub_old", owner: b, scope: `user:${b}`, planId: "author_monthly", subscriptionId: "sub_old", priceId: "price_monthly", salePriceId: "price_monthly", salePlanId: "author_monthly", status: "canceled", until: ago(40), purchasedAt: ago(400) }, + ...["repo_slot", "author_pass", "repo_extend"].map(part => ({ _id: `cs_pack:${part}`, owner: a, scope: "repo:paper-1", planId: part, paymentIntentId: "pi_pack", priceId: "price_pack", status: "paid", until: later(100), purchasedAt: ago(2) })), + { _id: "cs_never", owner: b, scope: "repo:other", planId: "repo_never", paymentIntentId: "pi_never", priceId: "price_never", status: "paid", until: new Date("9999-12-31T00:00:00Z"), purchasedAt: ago(5), revoked: true, revocationReason: "full_refund", revokedAt: ago(1) }, + { _id: "cs_conf", owner: a, scope: "conference:FSE26", planId: "conference", paymentIntentId: "pi_conf", priceId: "price_conf", status: "paid", until: later(60), purchasedAt: ago(10) }, + { _id: "cs_gone", owner: a, scope: "repo:paper-2", planId: "repo_extend", paymentIntentId: "pi_gone", priceId: "price_retired", status: "paid", until: later(10), purchasedAt: ago(1) }, + ]); + await BillingRevocation.create({ _id: "pi_never", reason: "full_refund", createdAt: ago(1) }); + }); + after(async () => { Object.assign(config, original); await mongoose.disconnect(); }); + + it("counts sales once per checkout, normalizes MRR and keeps currencies apart", async () => { + const s = await report.billingSummary("30d", now, lookup); + expect(s.subscriptions).to.deep.include({ active: 2, monthly: 1, annual: 1, cancelling: 1 }); + expect(s.subscriptions.mrr).to.deep.equal({ eur: 500 + 400 }); + // Monthly sub, pack (once), never, conference and the retired price: 5 sales in 30 days. + expect(s.sales.count).to.equal(5); + expect(s.sales.revenue).to.deep.equal({ eur: 500 + 1500 + 30000, usd: 2000 }); + expect(s.allTime.count).to.equal(7); + expect(s.reversals).to.deep.equal({ refunds: 1, disputes: 0 }); + expect(s.revenue).to.include({ available: true, missingSales: 1 }); + const pack = s.plans.find(p => p.planId === "repo_pack"); + expect(pack).to.include({ active: 1, sales: 1, allTimeSales: 1 }); + expect(pack.revenue).to.deep.equal({ eur: 1500 }); + expect(s.plans.find(p => p.planId === "repo_slot").sales).to.equal(0); + expect(s.series).to.have.length(31); + const total = s.series.reduce((n, d) => n + d.subscription + d.repository + d.conference, 0); + expect(total).to.equal(5); + expect(s.series.reduce((n, d) => n + d.conference, 0)).to.equal(1); + // One Stripe call per distinct price, then the cache. + expect(lookups.sort()).to.deep.equal(["price_annual", "price_conf", "price_monthly", "price_never", "price_pack", "price_retired"]); + lookups = []; + await report.billingSummary("all", now, lookup); + expect(lookups).to.deep.equal([]); + }); + + it("excludes never-paid subscriptions while retaining canceled paid sales", async () => { + await BillingGrant.create(["incomplete", "incomplete_expired", "canceled"].map(status => ({ + _id: "sub_unpaid_" + status, planId: "author_monthly", subscriptionId: "sub_unpaid_" + status, + priceId: "price_monthly", status, until: new Date(0), purchasedAt: ago(1), + }))); + const s = await report.billingSummary("all", now, lookup); + expect(s.sales.count).to.equal(7); + expect(s.plans.find(p => p.planId === "author_monthly").allTimeSales).to.equal(2); + expect(s.series.reduce((n, d) => n + d.subscription, 0)).to.equal(3); + }); + + it("retains reinstated refunds and counts separate renewal reversals", async () => { + await BillingGrant.updateOne({ _id: "cs_never" }, { $set: { revoked: false }, $unset: { revocationReason: 1, revokedAt: 1 } }); + await BillingRevocation.updateOne({ _id: "pi_never" }, { $set: { reviewed: true } }); + await BillingRevocation.create([ + { _id: "pi_renewal1", subscriptionId: "sub_m", reason: "full_refund", createdAt: ago(60), reviewed: true }, + { _id: "pi_renewal2", subscriptionId: "sub_m", reason: "full_refund", createdAt: ago(2) }, + { _id: "pi_dispute", subscriptionId: "sub_m", reason: "dispute", createdAt: ago(1) }, + ]); + expect((await report.billingSummary("30d", now, lookup)).reversals).to.deep.equal({ refunds: 2, disputes: 1 }); + expect((await report.billingSummary("all", now, lookup)).reversals).to.deep.equal({ refunds: 3, disputes: 1 }); + }); + + it("marks missing historical and active prices independently of period sales", async () => { + await BillingGrant.deleteOne({ _id: "cs_gone" }); + await BillingGrant.updateOne({ _id: "sub_y" }, { $set: { priceId: "price_missing", salePriceId: "price_missing" } }); + const s = await report.billingSummary("30d", now, lookup); + expect(s.revenue).to.include({ missingSales: 0, missingAllTimeSales: 1, missingSubscriptions: 1 }); + expect(s.sales.complete).to.equal(true); + expect(s.allTime.complete).to.equal(false); + expect(s.subscriptions.complete).to.equal(false); + expect(s.plans.find(p => p.planId === "author_annual")).to.include({ revenueComplete: true, allTimeRevenueComplete: false }); + }); + + it("excludes unrelated Stripe reversals and unresolved subscription stubs", async () => { + await BillingRevocation.create([ + { _id: "pi_external", reason: "full_refund", createdAt: ago(1) }, + { _id: "pi_stub", subscriptionId: "sub_stub", reason: "dispute", createdAt: ago(1) }, + ]); + await BillingGrant.create({ _id: "sub_stub", revoked: true }); + expect((await report.billingSummary("all", now, lookup)).reversals).to.deep.equal({ refunds: 1, disputes: 0 }); + }); + + it("keeps historical sales prices and plans separate from current MRR", async () => { + await BillingGrant.updateOne({ _id: "sub_m" }, { $set: { priceId: "price_annual", planId: "author_annual" } }); + const s = await report.billingSummary("30d", now, lookup); + expect(s.subscriptions.mrr).to.deep.equal({ eur: 800 }); + expect(s.sales.revenue.eur).to.equal(32000); + expect(s.plans.find(p => p.planId === "author_monthly")).to.include({ active: 0, sales: 1 }); + expect(s.plans.find(p => p.planId === "author_annual")).to.include({ active: 2, sales: 0 }); + await BillingGrant.updateOne({ _id: "sub_m" }, { $unset: { salePriceId: 1, salePlanId: 1 } }); + const legacy = await report.billingSummary("30d", now, lookup); + expect(legacy.sales.complete).to.equal(false); + expect(legacy.subscriptions.complete).to.equal(true); + }); + + it("searches all matching users before grant pagination, including after 1000 nonbuyers", async () => { + await User.insertMany(Array.from({ length: 1001 }, (_, i) => ({ username: "matching-" + i }))); + const buyer = await User.create({ username: "matching-buyer" }); + await BillingGrant.create({ _id: "cs_search", owner: String(buyer._id), planId: "repo_slot", status: "paid", until: later(1), purchasedAt: ago(1) }); + const names = async ids => new Map(ids.map(id => [id, "matching-buyer"])); + const s = await report.billingGrants({ search: "MATCHING", limit: 1 }, names, now); + expect(s.total).to.equal(1); + expect(s.results).to.have.length(1); + expect(s.results[0].user).to.equal("matching-buyer"); + expect(s.stateCounts).to.deep.equal({ active: 1, expired: 0, revoked: 0 }); + expect((await report.billingGrants({ search: "matching.*" }, names, now)).total).to.equal(0); + }); + + it("reports counts without revenue when Stripe is not configured", async () => { + config.STRIPE_SECRET_KEY = ""; + const s = await report.billingSummary("7d", now, lookup); + expect(lookups).to.deep.equal([]); + expect(s.revenue).to.include({ available: false, reason: "stripe_not_configured" }); + expect(s.sales).to.deep.equal({ count: 4, revenue: {}, complete: false }); + expect(s.subscriptions.mrr).to.deep.equal({}); + }); + + it("returns an empty report for a period without sales", async () => { + await BillingGrant.deleteMany({}); + const s = await report.billingSummary("all", now, lookup); + expect(s.sales.count).to.equal(0); + expect(s.series).to.deep.equal([]); + expect(s.plans.every(p => p.sales === 0 && p.active === 0)).to.equal(true); + }); + + it("filters, searches and paginates grants without exposing Stripe identifiers", async () => { + const usernames = async ids => new Map((await User.find({ _id: { $in: ids } }).lean()).map(u => [String(u._id), u.username])); + const all = await report.billingGrants({ limit: 4 }, usernames, now); + expect(all.total).to.equal(9); + expect(all.results).to.have.length(4); + expect(all.stateCounts).to.deep.equal({ active: 7, expired: 1, revoked: 1 }); + expect(JSON.stringify(all)).not.to.match(/sub_m|pi_|cus_|price_/); + expect(all.results[0]).to.include({ user: "alice-lab", planId: "repo_extend" }); + const page3 = await report.billingGrants({ limit: 4, page: 3 }, usernames, now); + expect(page3.results).to.have.length(1); + + const revoked = await report.billingGrants({ state: "revoked" }, usernames, now); + expect(revoked.results).to.have.length(1); + expect(revoked.results[0]).to.include({ planId: "repo_never", never: true, until: null, revocationReason: "full_refund", user: "bob" }); + expect(revoked.results[0].scope).to.deep.equal({ kind: "repo", id: "other" }); + + const pack = await report.billingGrants({ plan: "repo_pack" }, usernames, now); + expect(pack.results.map(r => r.pack)).to.deep.equal([true, true, true]); + const expired = await report.billingGrants({ state: "expired", status: "canceled" }, usernames, now); + expect(expired.results.map(r => r.planId)).to.deep.equal(["author_monthly"]); + const bobs = await report.billingGrants({ owners: [String(bob._id)], sort: "until", direction: "asc" }, usernames, now); + expect(bobs.results.map(r => r.user)).to.deep.equal(["bob", "bob", "bob"]); + expect(bobs.results[0].scope.kind).to.equal("account"); + }); + + it("serves the summary and the grant list through the admin router", async () => { + await BillingEvent.create([{ _id: "test:platform:evt_1", eventId: "evt_1", type: "invoice.paid", state: "failed", attempts: 12, lastError: "api_error:rate_limit", receivedAt: ago(1) }, + { _id: "test:platform:evt_2", eventId: "evt_2", type: "checkout.session.completed", state: "pending", receivedAt: new Date(now.getTime() - 120000) }]); + + const router = require("../src/server/routes/admin-billing").default; + const call = async (path, query) => { + const handler = router.stack.find(l => l.route?.path === path).route.stack.at(-1).handle; + let body, status = 200; + const res = { set() { return res; }, status(code) { status = code; return res; }, json(data) { body = data; return res; } }; + await handler({ query }, res); + return { body, status }; + }; + const summary = await call("/summary", { period: { $gt: "" } }); + expect(summary.body.period).to.equal("30d"); + expect(summary.body.webhooks).to.include({ pending: 1, failed: 1, unreviewedRevocations: 1 }); + expect(summary.body.webhooks.oldestPendingSeconds).to.be.at.least(119); + expect(summary.body.webhooks.lastError).to.include({ type: "invoice.paid", error: "api_error:rate_limit", state: "failed" }); + const grants = await call("/grants", { search: "ALICE", limit: "100" }); + expect(grants.body.total).to.equal(6); + expect(grants.body.results.every(r => r.user === "alice-lab")).to.equal(true); + const none = await call("/grants", { search: "nobody" }); + expect(none.body.total).to.equal(0); + }); + + it("uses the purchase date index to list grants", async () => { + await BillingGrant.createIndexes(); + const plan = await BillingGrant.find({}).sort({ purchasedAt: -1, _id: -1 }).limit(25).explain("queryPlanner"); + expect(JSON.stringify(plan.queryPlanner.winningPlan)).to.include("purchasedAt_-1"); + }); +}); diff --git a/test/billing-integration.test.js b/test/billing-integration.test.js index fc42675..5f0f64d 100644 --- a/test/billing-integration.test.js +++ b/test/billing-integration.test.js @@ -405,6 +405,21 @@ async function rejects(promise, message) { return { id: "sub_owner", metadata: { application: "anonymous-github", owner }, customer: "cus_owner", status: "active", latest_invoice: { status: "paid" }, items: { data: [{ price: { id: "price_monthly" }, current_period_end: Math.floor(future().getTime() / 1000) }] }, cancel_at_period_end: false, ...overrides }; } + it("snapshots the original paid invoice price once across plan changes", async () => { + let value = subscription({ start_date: 1700000000, + latest_invoice: { id: "in_initial", status: "paid", billing_reason: "subscription_create", + lines: { data: [{ parent: { subscription_item_details: { subscription_item: "si_original", proration: false } }, + pricing: { price_details: { price: "price_monthly" } } }] } }, + items: { data: [{ id: "si_original", price: { id: "price_monthly" }, current_period_end: Math.floor(future().getTime() / 1000) }] }, + }); + const stripe = { subscriptions: { retrieve: async () => value } }; + await syncSubscription("sub_owner", stripe); + expect(await BillingGrant.findById("sub_owner").lean()).to.include({ salePriceId: "price_monthly", salePlanId: "author_monthly" }); + value = subscription({ latest_invoice: { status: "paid", billing_reason: "subscription_cycle" }, + items: { data: [{ id: "si_original", price: { id: "price_annual" }, current_period_end: Math.floor(future().getTime() / 1000) }] } }); + await syncSubscription("sub_owner", stripe); + expect(await BillingGrant.findById("sub_owner").lean()).to.include({ priceId: "price_annual", planId: "author_annual", salePriceId: "price_monthly", salePlanId: "author_monthly" }); + }); it("recognizes portal cancellations scheduled with cancel_at", async () => { await syncSubscription("sub_owner", { subscriptions: { retrieve: async () => subscription({ cancel_at_period_end: false, cancel_at: Math.floor(future().getTime() / 1000), diff --git a/test/vue-ui.test.js b/test/vue-ui.test.js index 3abad1f..afe4485 100644 --- a/test/vue-ui.test.js +++ b/test/vue-ui.test.js @@ -1161,13 +1161,65 @@ describe("Vue 3 UI", function () { expect(ui.window.document.querySelector(".app-view").textContent, route + JSON.stringify(ui.errors)).not.to.equal(""); } ui.app.state.user = { username: "tester", status: "ready", isAdmin: true }; - for (const route of ["/dashboard", "/claim", "/profile", "/conferences", "/conference/new", "/conference/test", "/conference/test/edit", "/admin/", "/admin/users", "/admin/users/test", "/admin/repositories", "/admin/conferences", "/admin/queues", "/admin/errors"]) { + for (const route of ["/dashboard", "/claim", "/profile", "/conferences", "/conference/new", "/conference/test", "/conference/test/edit", "/admin/", "/admin/users", "/admin/users/test", "/admin/repositories", "/admin/conferences", "/admin/billing", "/admin/queues", "/admin/errors"]) { await ui.go(route); expect(ui.window.document.querySelector(".app-view").textContent, route + JSON.stringify(ui.errors)).not.to.equal(""); } expect(ui.errors).to.deep.equal([]); }); + it("renders the admin billing tab with per-currency revenue, a stacked chart and linked grants", async function () { + const plans = [["author_monthly", "Author monthly", "subscription"], ["repo_pack", "Paper pack", "repository"], ["conference", "Conference", "conference"]] + .map(([planId, name, family]) => ({ planId, name, family, active: 1, sales: 1, revenue: { eur: 500 }, allTimeSales: 2, allTimeRevenue: { eur: 1000 } })); + const summary = (available) => ({ period: "30d", bucket: "day", subscriptions: { active: 3, monthly: 2, annual: 1, cancelling: 1, mrr: available ? { eur: 1400 } : {} }, + sales: { count: 4, revenue: available ? { eur: 31300, usd: 2000 } : {} }, allTime: { count: 9, revenue: available ? { eur: 50000 } : {} }, + reversals: { refunds: 1, disputes: 1, amount: {} }, plans, + series: [{ date: "2026-11-12T00:00:00.000Z", subscription: 1, repository: 2, conference: 0 }, { date: "2026-11-13T00:00:00.000Z", subscription: 0, repository: 0, conference: 1 }], + revenue: { available, reason: available ? null : "stripe_not_configured", missingSales: 0 }, + webhooks: { pending: 1, failed: 2, oldestPendingSeconds: 90, lastError: { type: "invoice.paid", error: "api_error", receivedAt: new Date().toISOString() }, unreviewedRevocations: 1 } }); + const grants = { total: 1, stateCounts: { active: 0, expired: 0, revoked: 1 }, statuses: ["paid"], results: [{ id: "a", user: "alice", planId: "repo_never", family: "repository", + status: "paid", state: "revoked", purchasedAt: "2026-11-01", until: null, never: true, revoked: true, revocationReason: "dispute", scope: { kind: "conference", id: "FSE26" } }] }; + let available = true, incomplete = false; + const response = () => { + const value = summary(available); + if (incomplete) { + value.subscriptions.complete = false; + value.allTime.complete = false; + value.revenue.missingAllTimeSales = 1; + value.revenue.missingSubscriptions = 1; + } + return value; + }; + ui = await browser("/", { "/api/user": { username: "admin", isAdmin: true, status: "ready" }, "/api/admin/billing/summary": response, "/api/admin/billing/grants": grants }); + await ui.go("/admin/billing"); + await delay(50); + const doc = ui.window.document; + const tiles = [...doc.querySelectorAll(".bl-kpi-row .ov-kpi-card")].map(t => t.textContent.replace(/\s+/g, " ")); + expect(tiles).to.have.length(6); + expect(tiles[2]).to.match(/313/).and.to.match(/\$20/); + expect(doc.querySelectorAll(".bl-col")).to.have.length(2); + expect(doc.querySelectorAll(".bl-col")[0].querySelectorAll(".bl-stack > i:not([style*='display: none'])")).to.have.length(2); + expect(doc.querySelector(".bl-health").textContent).to.include("api_error"); + const row = doc.querySelector(".bl-grant-table tbody tr"); + expect(row.querySelector("a[href='/admin/users/alice']")).to.not.equal(null); + expect(row.querySelector("a[href='/conference/FSE26']")).to.not.equal(null); + expect(row.textContent).to.include("Disputed").and.to.include("Never ends"); + expect(ui.requests.some(r => r.url.pathname === "/api/admin/billing/summary" && r.url.searchParams.get("period") === "30d")).to.equal(true); + incomplete = true; + [...doc.querySelectorAll(".bl-toolbar .seg-chip")].find(b => b.textContent.includes("90 days")).click(); + await delay(50); + expect(doc.querySelectorAll(".bl-kpi-row .ov-kpi-card")[1].textContent).to.include("Incomplete"); + expect(doc.querySelectorAll(".bl-kpi-row .ov-kpi-card")[3].textContent).to.include("Revenue incomplete"); + expect(doc.querySelector(".billing-page").textContent).to.include("1 historical sales"); + available = false; + [...doc.querySelectorAll(".bl-toolbar .seg-chip")].find(b => b.textContent.includes("7 days")).click(); + await delay(50); + expect(ui.requests.some(r => r.url.searchParams.get("period") === "7d")).to.equal(true); + expect(doc.querySelector(".billing-page").textContent).to.include("Revenue unavailable"); + expect(doc.querySelectorAll(".bl-kpi-row .ov-kpi-card")[1].textContent).to.include("Unavailable"); + expect(ui.errors).to.deep.equal([]); + }); + it("renders admin users with missing email entries and links to their repositories", async function () { const users = [ { username: "no-emails" }, { username: "empty-emails", emails: [] },