fix(admin): streamline error history and preserve safe raw records

This commit is contained in:
Thomas Durieux committed 2026-11-14 19:15:45 +00:00
1 parent b39f3b6878
commit 40ffe7ce72
8 files changed
+330 -202

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
{
"core.min.js": "core.d23af1c652.min.js",
"vendor.min.js": "vendor.e97357963c.min.js",
"vendor.min.js": "vendor.1ad1faa735.min.js",
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
"all.min.css": "all.e70efc34f0.min.css",
"all.min.css": "all.630e15eca9.min.css",
"markdown.min.js": "markdown.6c8dfb7b1d.min.js",
"pdf.min.js": "pdf.4d9cc6ff49.min.js",
"notebook.min.js": "notebook.c3144c18ae.min.js",
+1 -1
View File
@@ -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}}.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 tboLine truncated
.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 tboLine truncated
+97 -16
View File
@@ -14330,9 +14330,10 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.markdown-body :is(p, li, td, th, blockquote, dd) mark.redact-chip, .dark-mode .markdown-body :is(p, li, td, th, blockquote, dd) mark.redact-chip { vertical-align: .04em !important; }
/* Errors uses the admin paper shell, controls, and semantic status colors. */
.errors-page .error-health-strip { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 16px; margin:20px 0 8px; border:1px solid var(--border-color); border-radius:8px; background:var(--paper-card); }
.errors-page .log-state { flex:1; margin:0; font-size:13px; color:var(--ink-soft); }
.errors-page .error-source-switch { display:flex; gap:24px; margin:12px 0 16px; padding:0; border:0; border-bottom:1px solid var(--border-color); background:none; border-radius:0; }
.errors-page .error-source-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px 24px; margin:16px 0; border-bottom:1px solid var(--border-color); }
.errors-page .error-health-strip { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-left:auto; padding:4px 0 8px; max-width:560px; }
.errors-page .log-state { flex:1; margin:0; font-size:12px; color:var(--ink-soft); }
.errors-page .error-source-switch { display:flex; gap:24px; margin:0; padding:0; border:0; background:none; border-radius:0; }
.errors-page .error-source-switch .seg-chip { border:0; border-bottom:2px solid transparent; border-radius:0; padding:10px 0; font-size:14px; font-weight:500; background:none; color:var(--ink-soft); }
.errors-page .error-source-switch .seg-chip.active { border-bottom-color:var(--accent); color:var(--color); background:none; }
.errors-page .log-investigation { margin:0; }
@@ -14349,19 +14350,22 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.errors-page .log-workspace { display:flex; align-items:start; gap:20px; }
.errors-page .log-results { flex:1; min-width:0; }
.errors-page .log-table-scroll { border:1px solid var(--border-color); border-radius:8px; overflow:hidden; background:var(--paper-card); }
.errors-page .log-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
.errors-page .log-table th, .errors-page .log-table td { padding:14px 16px; text-align:left; vertical-align:middle; overflow-wrap:anywhere; }
.errors-page .log-table th { background:var(--paper-bg-alt); color:var(--ink-muted); font-size:11px; font-weight:500; }
.errors-page .log-table th:first-child { width:29%; }
.errors-page .log-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:13px; }
.errors-page .log-table th, .errors-page .log-table td { padding:10px 16px; text-align:left; vertical-align:middle; overflow-wrap:anywhere; }
.errors-page .log-table th { background:var(--paper-bg-alt); color:var(--ink-muted); font-size:12px; font-weight:500; }
.errors-page .log-table th:first-child { width:32%; }
.errors-page .log-table th:nth-child(2) { width:15%; }
.errors-page .log-table th:nth-child(4) { width:13%; }
.errors-page .log-table th:nth-child(3) { width:8%; text-align:right; }
.errors-page .log-table td.log-count { text-align:right; font:500 14px var(--font-mono); background:transparent !important; box-shadow:none; }
.errors-page .log-table th:last-child { width:35%; }
.errors-page .log-table th:last-child { width:32%; }
.errors-page .log-table tbody tr + tr { border-top:1px solid var(--border-color); }
.errors-page .log-table tbody tr:hover { background:var(--paper-bg-alt); }
.errors-page .log-table tbody tr.log-selected { background:var(--accent-soft); }
.errors-page .log-event-button { display:block; width:100%; min-height:44px; border:0; background:none; color:var(--color); padding:0; text-align:left; font:inherit; cursor:pointer; overflow-wrap:anywhere; }
.errors-page .log-event-title { display:flex; align-items:center; gap:10px; }
.errors-page .log-event-title .ui-icon { width:14px; height:14px; color:var(--ink-muted); flex-shrink:0; }
.errors-page .log-event-button:hover .ui-icon { color:var(--link-color); }
.errors-page .log-event-button strong { font-size:14px; font-weight:600; line-height:1.5; }
.errors-page .log-event-button:hover strong, .errors-page .log-selected .log-event-button strong { color:var(--link-color); }
.errors-page .log-event-button:hover strong { text-decoration:underline; text-underline-offset:3px; }
@@ -14372,8 +14376,11 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.errors-page .log-severity-error { color:var(--status-error); }
.errors-page .log-severity-warn { color:var(--status-progress); }
.errors-page .log-severity-info { color:var(--ink-muted); }
.errors-page .log-trace-button { display:inline-flex; align-items:center; gap:6px; margin:3px 4px 3px 0; max-width:100%; white-space:normal; text-align:left; }
.errors-page .log-short-id { font:11px var(--font-mono); color:var(--ink-soft); }
.errors-page .log-trace-button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:4px 0; margin:0 14px 0 0; border:0; background:none; color:var(--link-color); font:500 12px var(--font-sans); cursor:pointer; max-width:100%; white-space:normal; text-align:left; }
.errors-page .log-trace-button:hover { text-decoration:underline; text-underline-offset:3px; }
.errors-page .log-trace-button:last-child { margin-right:0; }
.errors-page .log-http { display:block; margin-top:4px; font:12px var(--font-mono); color:var(--ink-muted); }
.errors-page .log-short-id { font:12px var(--font-mono); color:var(--ink-soft); }
.errors-page .log-detail { min-width:0; padding:8px 4px; overflow-wrap:anywhere; }
.errors-page .log-table .log-detail-row > td { background:var(--paper-bg-alt); }
.errors-page .log-table tbody tr { scroll-margin-top:80px; }
@@ -14424,7 +14431,7 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.errors-page .log-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.errors-page .log-table tbody tr { display:grid; grid-template-columns:1fr auto; gap:8px 12px; padding:14px; }
.errors-page .log-table td { display:block; padding:0; min-width:0; }
.errors-page .log-table td:first-child { grid-column:1/-1; }
.errors-page .log-table td:first-child { grid-column:1; grid-row:1; }
.errors-page .log-table td:nth-child(4) { color:var(--ink-muted); }
.errors-page .log-table td:last-child { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px; }
.errors-page .log-table tbody tr.log-detail-row { display:block; padding:14px; }
@@ -14436,12 +14443,15 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.errors-page .log-detail #log-detail-title { font-size:16px !important; }
.errors-page .log-detail { padding:0; }
.errors-page .log-count::before { content:'×'; font-size:12px; color:var(--ink-muted); margin-right:3px; }
.errors-page .error-health-strip { padding:12px; }
.errors-page .error-source-toolbar { gap:4px; }
.errors-page .error-health-strip { padding:0 0 8px; margin:0; width:100%; max-width:none; }
.errors-page .log-state { flex:1 1 175px; }
.errors-page .log-table td.log-count { align-self:start; }
.errors-page .log-table td:nth-child(4) { grid-column:2; grid-row:2; align-self:end; margin-top:28px; font-size:11px; text-align:right; }
.errors-page .log-table td.log-count { grid-column:2; grid-row:2; }
.errors-page .log-table td:nth-child(2) { grid-column:1; grid-row:2; }
.errors-page .log-table td.log-count { align-self:start; padding-top:3px; }
.errors-page .log-table td:nth-child(4) { grid-column:2; grid-row:2; align-self:center; margin-top:0; font-size:12px; text-align:right; }
.errors-page .log-table td.log-count { grid-column:2; grid-row:1; }
.errors-page .log-table td:nth-child(2) { grid-column:1; grid-row:2; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.errors-page .log-http { display:inline; margin:0; }
.errors-page .log-trace-button { min-height:44px; margin:0 8px 0 0; }
.errors-page .log-timeline { padding:14px; }
.errors-page .errors-toolbar > :first-child { min-width:0; }
.errors-page .errors-toolbar .seg-filter { flex-wrap:wrap; }
@@ -14462,6 +14472,77 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.errors-page .log-filters > label { min-width:0 !important; }
@media(max-width:767px) { .errors-page .log-filters > label { width:auto !important; flex:1 1 40%; } }
/* History starts with its filters and records; diagnostics stay below the list. */
.errors-page .history-source .errors-toolbar { display:grid !important; grid-template-columns:auto minmax(180px,1fr) auto; gap:10px !important; align-items:center; }
.errors-page .history-source .errors-toolbar > :first-child { min-width:0 !important; }
.errors-page .history-source .errors-toolbar .seg-filter { display:flex; flex-wrap:nowrap; width:auto; gap:2px; }
.errors-page .history-source .errors-toolbar .seg-chip { white-space:nowrap; padding:6px 8px; }
.errors-page .history-source .errors-toolbar .autoref { grid-column:1/-1; justify-self:end; }
.errors-page .history-management { margin:20px 0; font-size:12px; color:var(--ink-soft); }
.errors-page .history-management > summary { width:fit-content; }
.errors-page .history-management .volume-head { margin-top:12px; }
.errors-page .history-warning { color:var(--status-progress); font-size:12px; }
.errors-page .history-fields { margin:0; display:grid; gap:12px; }
.errors-page .history-fields > div { display:grid; grid-template-columns:100px minmax(0,1fr); gap:12px; align-items:baseline; }
.errors-page .history-fields dt { margin:0; font:400 12px var(--font-sans); color:var(--ink-muted); }
.errors-page .history-fields dd { margin:0; font:12px/1.6 var(--font-mono); overflow-wrap:anywhere; }
.errors-page .history-source .errors-row-detail { padding:16px !important; }
.errors-page .history-source .detail-body { gap:20px; }
.errors-page .history-source .detail-main pre { margin:0; padding:12px; border:1px solid var(--border-color); border-radius:4px; box-shadow:none !important; background:var(--paper-card) !important; font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.errors-page .history-source .detail-tabs { margin-bottom:16px; }
.errors-page .log-value-reveal { min-width:0; }
.errors-page .log-value-reveal summary { padding:0; font:inherit; color:var(--ink-soft); }
.errors-page .log-value-reveal > span { display:block; margin-top:6px; overflow-wrap:anywhere; }
.errors-page .log-copy-value { display:inline-block; border:0; background:none; color:var(--link-color); padding:4px 0; font:12px var(--font-sans); cursor:pointer; }
.errors-page .log-copy-value:hover { text-decoration:underline; }
.errors-page .log-copy-status { font-size:12px; color:var(--ink-soft); }
@media(max-width:767px) {
.errors-page .history-source .errors-toolbar { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.errors-page .history-source .errors-toolbar .seg-filter, .errors-page .history-source .errors-toolbar .search-wrap { grid-column:1/-1; width:100%; }
.errors-page .history-source .errors-toolbar .seg-chip { flex:1; min-width:0; min-height:44px; padding:6px 4px; justify-content:center; }
.errors-page .history-source .errors-toolbar .select-wrap { display:grid; gap:4px; }
.errors-page .history-source .errors-toolbar .select-wrap select { min-width:0; width:100%; }
.errors-page .history-source .errors-toolbar .autoref { justify-self:start; }
.errors-page .history-fields > div { grid-template-columns:70px minmax(0,1fr); }
.errors-page .log-copy-value { min-height:44px; }
.errors-page .history-source .detail-main { min-width:0; }
}
.errors-page .history-view-options { font-size:12px; color:var(--ink-soft); }
.errors-page .history-view-controls { display:flex; flex-wrap:wrap; gap:12px; padding:8px 0; }
.errors-page .history-source .errors-toolbar:has(.history-view-options[open]) { grid-template-columns:auto minmax(180px,1fr); }
.errors-page .history-source .history-view-options[open] { grid-column:1/-1; }
@media(max-width:767px) {
.errors-page .history-source .errors-toolbar:has(.history-view-options[open]) { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.errors-page .history-source .history-view-options { grid-column:1/-1; }
.errors-page .history-source .errors-group-note { display:none; }
.errors-page .history-source .errors-group-head { padding:10px 12px; }
.errors-page .history-source .errors-row-main .col-status { grid-row:2; }
.errors-page .history-source .errors-row-main .col-count { grid-row:1; }
.errors-page .history-source .errors-row-main .col-msg { grid-column:1; }
}
.errors-page .history-source .errors-toolbar { grid-template-areas:"severity search options"; }
.errors-page .history-source .errors-toolbar > .seg-filter { grid-area:severity; width:auto !important; }
.errors-page .history-source .errors-toolbar > .search-wrap { grid-area:search; width:100% !important; min-width:0 !important; }
.errors-page .history-source .errors-toolbar > .history-view-options { grid-area:options; }
.errors-page .history-source .errors-toolbar:has(.history-view-options[open]) { grid-template-areas:"severity search" "options options"; }
@media(max-width:767px) {
.errors-page .history-source .errors-toolbar, .errors-page .history-source .errors-toolbar:has(.history-view-options[open]) { grid-template-columns:minmax(0,1fr); grid-template-areas:"severity" "search" "options"; }
.errors-page .history-source .errors-toolbar > .seg-filter { width:100% !important; }
}
.errors-page .history-source .detail-aside { background:none !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; padding:12px 0 0 !important; border-top:1px solid var(--border-color) !important; }
.errors-page .history-source .aside-label { font:400 11px var(--font-sans) !important; text-transform:none !important; letter-spacing:0 !important; color:var(--ink-muted); }
.errors-page .history-source .aside-value { font:400 12px/1.5 var(--font-sans) !important; }
.errors-page .history-source .detail-actions { display:flex; flex-wrap:wrap; gap:8px; }
.errors-page .history-source .detail-actions .btn { flex:0 0 auto !important; width:auto !important; }
@media(max-width:767px) {
.errors-page .history-source .detail-aside { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.errors-page .history-source .aside-block { margin:0 !important; min-width:0; }
.errors-page .history-source .aside-block:nth-child(n+4) { grid-column:1/-1; }
}
/* Email operations: shared admin surfaces, compact history, progressive details. */
.emails-page .email-overview-toolbar, .emails-page .email-section-head, .emails-page .email-refresh { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.email-overview-toolbar { margin:20px 0 10px; }
+158 -145
View File
@@ -11,14 +11,16 @@
<a href="/admin/errors" class="active" aria-current="page"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg> Errors</a>
</nav>
<div class="error-source-toolbar">
<div class="error-source-switch seg-filter" role="group" aria-label="Log source">
<button id="error-source-central" type="button" class="seg-chip" :class="{active:errorSource==='central'}" :aria-pressed="errorSource==='central'" @click="errorSource='central'">Central logs</button>
<button id="error-source-history" type="button" class="seg-chip" :class="{active:errorSource==='history'}" :aria-pressed="errorSource==='history'" @click="errorSource='history'">Application history</button>
</div>
<div class="error-health-strip">
<p class="log-state" role="status" aria-live="polite">{{ errorSource === 'history' ? (redisLoading ? 'Loading application history…' : available === null ? 'Checking Redis…' : available ? 'Redis history is reachable.' : 'Redis history is unavailable. Previously loaded rows may be stale.') : logFailure || (logLoading ? 'Loading central logs…' : logSnapshotStale ? 'This snapshot is stale. Refresh before assessing current health.' : logStateText(logData?.state)) }}</p>
<button type="button" class="btn btn-sm" :disabled="errorSource === 'central' ? logLoading : redisLoading" @click="errorSource === 'central' ? refreshLogs() : refreshNow()">{{ (errorSource === 'central' ? logLoading : redisLoading) ? 'Refreshing…' : 'Refresh' }}<span class="sr-only">{{ errorSource === 'central' ? ' central logs' : ' history' }}</span></button>
<button v-if="errorSource === 'central' &amp;&amp; (logFailure || ['disabled','misconfigured','unreachable','busy'].includes(logData?.state))" type="button" class="btn btn-sm" @click="errorSource = 'history'">Open application history</button>
</div>
<div class="error-source-switch seg-filter" role="group" aria-label="Log source">
<button id="error-source-central" type="button" class="seg-chip" :class="{active:errorSource==='central'}" :aria-pressed="errorSource==='central'" @click="errorSource='central'">Central logs</button>
<button id="error-source-history" type="button" class="seg-chip" :class="{active:errorSource==='history'}" :aria-pressed="errorSource==='history'" @click="errorSource='history'">Application history</button>
</div>
<section v-show="errorSource==='central'" class="log-investigation" aria-labelledby="central-logs-title" :aria-busy="logLoading">
<div class="volume-head"><h2 class="sr-only" id="central-logs-title">Central logs</h2><a v-if="logData?.grafanaUrl" :href="safeUrl(logData.grafanaUrl)" target="_blank" rel="noopener noreferrer">Open in Grafana</a></div>
@@ -51,20 +53,20 @@
<div class="log-results">
<div class="log-table-scroll" v-if="filteredLogGroups().length"><table class="log-table" role="table">
<caption class="sr-only">Returned events grouped by service, module, code, severity and status. Select an event for sample details.</caption>
<thead><tr><th scope="col">Event / service</th><th scope="col">Severity</th><th scope="col">Count</th><th scope="col">Last seen</th><th scope="col">Sample</th></tr></thead>
<thead><tr><th scope="col">Event</th><th scope="col">Severity</th><th scope="col">Count</th><th scope="col">Last seen</th><th scope="col">Correlate sample</th></tr></thead>
<tbody><template v-for="group in filteredLogGroups()" :key="group.fingerprint"><tr :class="{'log-selected':selectedLog?.fingerprint===group.fingerprint}">
<td><button class="log-event-button" type="button" :aria-label="'Inspect ' + (group.sample.errorCode || group.sample.event)" @click="selectLog(group, $event.currentTarget)" :aria-expanded="selectedLog?.fingerprint===group.fingerprint" aria-controls="log-detail"><strong>{{ group.sample.errorCode || group.sample.event }}</strong><span class="log-meta"><span class="log-service">{{ group.sample.service }}</span><span class="log-module"> / {{ group.sample.module }}</span></span></button></td>
<td><span class="log-severity" :class="'log-severity-'+logSeverity(group.sample)">{{ logSeverity(group.sample)==='error' ? 'Failure' : logSeverity(group.sample)==='warn' ? 'Warning' : 'Info' }}</span><span class="log-meta" v-if="group.sample.status || group.sample.httpStatus">HTTP {{ group.sample.status || group.sample.httpStatus }}</span></td>
<td><button class="log-event-button" type="button" :aria-label="'Inspect ' + (group.sample.errorCode || group.sample.event)" @click="selectLog(group, $event.currentTarget)" :aria-expanded="selectedLog?.fingerprint===group.fingerprint" aria-controls="log-detail"><span class="log-event-title"><strong>{{ group.sample.errorCode || group.sample.event }}</strong><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-arrow-right"></use></svg></span><span class="log-meta"><span class="log-service">{{ group.sample.service }}</span><span class="log-module"> / {{ group.sample.module }}</span></span></button></td>
<td class="log-level"><span class="log-severity" :class="'log-severity-'+logSeverity(group.sample)">{{ logSeverity(group.sample)==='error' ? 'Failure' : logSeverity(group.sample)==='warn' ? 'Warning' : 'Info' }}</span><span class="log-http" v-if="group.sample.status || group.sample.httpStatus">HTTP {{ group.sample.status || group.sample.httpStatus }}</span></td>
<td class="log-count"><span class="sr-only">Count </span>{{ group.count }}</td>
<td><time :datetime="group.last" :title="absTime(group.last)">{{ relTime(group.last) }}</time></td>
<td><button type="button" class="btn btn-sm log-trace-button" v-if="logTraceId(group,'requestId')" @click="lookupTrace('requestId',group.sample.requestId,$event.currentTarget,group.sample)">Request <span class="log-short-id">{{ shortLogId(group.sample.requestId) }}</span></button><button type="button" class="btn btn-sm log-trace-button" v-if="logTraceId(group,'jobId')" @click="lookupTrace('jobId',group.sample.jobId,$event.currentTarget,group.sample)">Job <span class="log-short-id">{{ shortLogId(group.sample.jobId) }}</span></button><span class="log-meta" v-if="!logTraceId(group,'requestId') &amp;&amp; !logTraceId(group,'jobId')">No correlation ID</span></td>
<td><button type="button" class="log-trace-button" v-if="logTraceId(group,'requestId')" @click="lookupTrace('requestId',group.sample.requestId,$event.currentTarget,group.sample)">Request <span class="log-short-id">{{ shortLogId(group.sample.requestId) }}</span></button><button type="button" class="log-trace-button" v-if="logTraceId(group,'jobId')" @click="lookupTrace('jobId',group.sample.jobId,$event.currentTarget,group.sample)">Job <span class="log-short-id">{{ shortLogId(group.sample.jobId) }}</span></button><span class="log-meta" v-if="!logTraceId(group,'requestId') &amp;&amp; !logTraceId(group,'jobId')">No correlation ID</span></td>
</tr>
<tr class="log-detail-row" v-if="selectedLog?.fingerprint===group.fingerprint"><td colspan="5"> <aside class="log-detail" id="log-detail" v-if="selectedLog" aria-labelledby="log-detail-title">
<div class="volume-head log-detail-heading"><div><h3 id="log-detail-title" tabindex="-1">{{ selectedLog.sample.errorCode || selectedLog.sample.event }}</h3><span class="log-meta">Event sample</span></div><button class="btn btn-sm" @click="closeLogDetail()">Close details</button></div>
<p class="log-coverage">One sample from {{ selectedLog.count }} returned occurrences. IDs and release may differ across the group.</p>
<section class="log-detail-section"><h4>Returned occurrences</h4><dl class="log-detail-dates"><div><dt>First returned</dt><dd>{{ absTime(selectedLog.first) }}</dd></div><div><dt>Last returned</dt><dd>{{ absTime(selectedLog.last) }}</dd></div></dl></section>
<section class="log-detail-section"><h4>Event context</h4><dl><template v-for="(value,key) in selectedLog.sample" :key="key"><div v-if="['service','module','event','errorCode','severity','status','httpStatus'].includes(key)"><dt>{{ key }}</dt><dd>{{ value }}</dd></div></template></dl></section>
<section class="log-detail-section" v-if="Object.keys(selectedLog.sample).some(key => !['service','module','event','errorCode','severity','status','httpStatus'].includes(key))"><h4>Identifiers and metadata</h4><dl class="log-detail-identifiers"><template v-for="(value,key) in selectedLog.sample" :key="key"><div v-if="!['service','module','event','errorCode','severity','status','httpStatus'].includes(key)"><dt>{{ key }}</dt><dd>{{ value }}</dd></div></template></dl></section>
<section class="log-detail-section"><h4>Event context</h4><dl><template v-for="(value,key) in selectedLog.sample" :key="key"><div v-if="['service','module','event','errorCode','severity','status','httpStatus'].includes(key)"><dt>{{ key }}</dt><dd><template v-if="isLogIdentifier(key,value)"><details class="log-value-reveal"><summary>{{ compactLogValue(value) }}</summary><span>{{ value }}</span></details><button type="button" class="log-copy-value" @click="copyLogValue(value)">Copy full {{ key }}</button></template><template v-else>{{ value }}</template></dd></div></template></dl></section>
<section class="log-detail-section" v-if="Object.keys(selectedLog.sample).some(key => !['service','module','event','errorCode','severity','status','httpStatus'].includes(key))"><h4>Identifiers and metadata</h4><dl class="log-detail-identifiers"><template v-for="(value,key) in selectedLog.sample" :key="key"><div v-if="!['service','module','event','errorCode','severity','status','httpStatus'].includes(key)"><dt>{{ key }}</dt><dd><template v-if="isLogIdentifier(key,value)"><details class="log-value-reveal"><summary>{{ compactLogValue(value) }}</summary><span>{{ value }}</span></details><button type="button" class="log-copy-value" @click="copyLogValue(value)">Copy full {{ key }}</button></template><template v-else>{{ value }}</template></dd></div></template></dl></section>
</aside></td></tr>
</template></tbody>
</table></div>
@@ -85,8 +87,151 @@
</details>
</details>
</section>
<p class="log-copy-status" role="status" v-if="logCopyStatus">{{ logCopyStatus }}</p>
<section v-show="errorSource==='history'" class="history-source" :aria-busy="redisLoading">
<div class="volume-head"><h2 class="redis-history-title">Application history</h2><div class="errors-actions"><button class="btn btn-sm" type="button" @click="exportCsv()">Export Redis CSV</button><button class="btn btn-sm btn-outline-danger" type="button" @click="clearAll()">Clear Redis history</button></div></div>
<h2 class="sr-only">Application history</h2>
<p class="history-warning" role="status" v-if="redisCollecting !== true">{{ redisCollecting === false ? 'Collection is off; retained history is not receiving new events.' : 'Collection status is unknown.' }}</p>
<form class="errors-toolbar" aria-label="Error filters" v-form="viewState">
<div class="seg-filter" role="group" aria-label="Filter by severity">
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === '' }" :aria-pressed="(query?.bucket || '') === ''" @click="setBucket('')">All </button>
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === 'error', 'is-empty': !(stats?.severity?.error) }" :aria-pressed="(query?.bucket || '') === 'error'" @click="setBucket('error')"><span class="seg-dot bad" aria-hidden="true"></span>Error </button>
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === 'warn', 'is-empty': !(stats?.severity?.warn) }" :aria-pressed="(query?.bucket || '') === 'warn'" @click="setBucket('warn')"><span class="seg-dot warn" aria-hidden="true"></span>Warning </button>
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === 'info', 'is-empty': !(stats?.severity?.info) }" :aria-pressed="(query?.bucket || '') === 'info'" @click="setBucket('info')"><span class="seg-dot off" aria-hidden="true"></span>Info </button>
</div>
<div class="search-wrap">
<svg class="ui-icon search-icon" aria-hidden="true"><use href="#ui-icon-search"></use></svg>
<input type="search" class="form-control" aria-label="Search application history" placeholder="Search history…" title="Search messages, or filter with code:repo_not_found module:route status:&gt;=400" autocomplete="off" v-field="{ state: viewState, set: value =&gt; { query.search = value }, value: query?.search, form: null, options: {} }">
<span class="filter-count" v-if="parsedFilterCount">{{ parsedFilterCount }} filter{{ parsedFilterCount > 1 ? 's' : '' }}</span>
</div>
<details class="history-view-options"><summary>View options</summary><div class="history-view-controls">
<div class="select-wrap">
<label for="history-sort">Sort</label>
<select id="history-sort" class="form-control form-control-sm" v-field="{ state: viewState, set: value =&gt; { query.sort = value }, value: query?.sort, form: null, options: {} }">
<option value="recent">Most recent</option>
<option value="count">Most frequent</option>
</select>
</div>
<div class="select-wrap">
<label for="history-merge" title="Rows are always sectioned by severity. This merges repeated events inside each section.">Merge</label>
<select id="history-merge" class="form-control form-control-sm" v-field="{ state: viewState, set: value =&gt; { query.group = value }, value: query?.group, form: null, options: {} }">
<option value="">Don't merge</option>
<option value="code">Same error</option>
<option value="module">Same module</option>
</select>
</div>
<label class="autoref">
<input type="checkbox" v-field="{ state: viewState, set: value =&gt; { query.autoRefresh = value }, value: query?.autoRefresh, form: null, options: {} }">
<span class="auto-refresh-label">Auto-refresh</span>
</label>
</div></details>
</form>
<p role="status" v-if="redisLoading">Loading application history…</p>
<div class="admin-empty" v-if="!redisLoading &amp;&amp; !visible?.length &amp;&amp; available === true">No matching entries in the loaded Redis history.</div>
<p v-if="redisRedacted">{{ redisRedacted }} invalid legacy records were omitted. Older valid records may still be available.</p>
<div class="errors-pager" v-if="entries?.length || canLoadMore()">
<span>{{ query?.group &amp;&amp; visible?.length !== entries?.length ? fmt?.number(visible?.length) + (visible?.length === 1 ? ' group' : ' groups') + ' from ' : '' }}{{ fmt?.number(entries?.length) }} safe entries loaded · {{ fmt?.number(redisNextOffset || entries?.length) }} of {{ fmt?.number(total) }} stored records scanned</span>
<button class="btn btn-sm" type="button" v-if="canLoadMore()" @click="loadMore()" :disabled="redisLoading">Load 250 older</button>
</div>
<div class="errors-list" v-if="visible?.length">
<div class="errors-list-head">
<span class="col-when">When</span>
<span class="col-sev">Severity</span>
<span class="col-mod">Module</span>
<span class="col-msg">Message</span>
<span class="col-count" title="Total occurrences since first seen">Total</span>
<span class="col-status">Status</span>
</div>
<template v-for="(row, index) in visible" :key="row?._key">
<div class="errors-group-head" v-if="index === 0 || visible[index - 1]?._bucket !== row?._bucket"><span class="sev-dot" :class="'sev-' + row?._bucket"></span>{{ row?._bucket === 'error' ? 'Error' : row?._bucket === 'warn' ? 'Warning' : 'Info' }}<span class="errors-group-count">{{ fmt?.number(visible.filter(r =&gt; r?._bucket === row?._bucket).length) }}</span><span class="errors-group-note" v-if="index === 0">By severity · {{ query?.group === 'code' ? 'repeats merged by error · ' : query?.group === 'module' ? 'repeats merged by module · ' : '' }}{{ query?.sort === 'count' ? 'most frequent first' : 'most recent first' }}</span></div>
<div class="errors-row" :class="{open: expanded[row?._key]}">
<button type="button" class="errors-row-main" :aria-expanded="!!expanded[row?._key]" :aria-controls="'history-detail-' + index" @click="toggle(row)">
<span class="col-when">
<span class="when-rel">{{ relTime(row?.ts) }}</span>
<span class="when-abs">{{ absTimeShort(row?.ts) }}</span>
</span>
<span class="col-sev">
<span class="sev-dot" :class="&#x27;sev-&#x27; + row?._bucket"></span>
<span class="sev-label">{{ row?._bucket === 'error' ? 'Error' : row?._bucket === 'warn' ? 'Warning' : 'Info' }}</span>
</span>
<span class="col-mod"><span class="pill pill-module">{{ row?.module }}</span></span>
<span class="col-msg">
<strong class="msg-code">{{ row?.displayMessage }}</strong>
<span class="msg-context" v-if="row?.displayContext &amp;&amp; row?.displayContext !== row?.displayMessage">{{ row?.displayContext }}</span>
<span class="msg-detail" v-if="row?._detail">{{ row?._detail }}</span>
<span class="msg-url" v-if="row?._url" :title="row?._url">{{ row?._url }}</span>
</span>
<span class="col-count">
<span class="count-pill" v-if="row?.count &gt; 1">×{{ row?.count }}</span>
<span class="count-pill count-pill-muted" v-if="row?.count === 1">×1</span>
</span>
<span class="col-status">
<span class="status-pill" v-if="row?._status" :class="String(row?._status).match(/^[23]/) ? 'status-neutral' : (&#x27;status-&#x27; + row?._bucket)" :title="String(row?._status).match(/^2/) &amp;&amp; row?._bucket === 'warn' ? 'Client closed the connection' : null">{{ String(row?._status).match(/^2/) &amp;&amp; row?._bucket === 'warn' ? '—' : row?._status }}</span>
<span class="status-empty" v-if="!row?._status" title="No HTTP status for this event">—</span>
</span>
</button>
<div class="errors-row-detail" :id="'history-detail-' + index" v-if="expanded[row?._key]">
<div class="detail-tabs">
<button type="button" :class="{active: !detailTab[row?._key] || detailTab[row?._key] === 'summary'}" @click="detailTab[row._key] = 'summary'">Details</button>
<button type="button" :class="{active: detailTab[row?._key] === &#x27;raw&#x27;}" @click="detailTab[row._key] = &#x27;raw&#x27;">Raw</button>
<button type="button" v-if="row?._stack" :class="{active: detailTab[row?._key] === &#x27;stack&#x27;}" @click="detailTab[row._key] = &#x27;stack&#x27;">Stack</button>
<button type="button" v-if="row?.count &gt; 1" :class="{active: detailTab[row?._key] === &#x27;related&#x27;}" @click="detailTab[row._key] = &#x27;related&#x27;">Related ({{ row?.count }})</button>
</div>
<div class="detail-body">
<div class="detail-main">
<dl class="history-fields" v-if="!detailTab[row?._key] || detailTab[row?._key] === 'summary'"><div v-for="[key,value] in historyDetailFields(row)" :key="key"><dt>{{ key }}</dt><dd><template v-if="isLogIdentifier(key,value)"><details class="log-value-reveal"><summary>{{ compactLogValue(value) }}</summary><span>{{ value }}</span></details><button type="button" class="log-copy-value" @click="copyLogValue(value)">Copy full {{ key }}</button></template><template v-else>{{ logFieldText(value) }}</template></dd></div></dl>
<pre v-if="detailTab[row?._key] === &#x27;raw&#x27;">{{ row?._rawJson }}</pre>
<pre class="stack-pre" v-if="detailTab[row?._key] === &#x27;stack&#x27;">{{ row?._stack }}</pre>
<div class="related-list" v-if="detailTab[row?._key] === &#x27;related&#x27;">
<div class="related-row" v-for="(r, index) in row?._related" :key="index">
<span class="when-abs">{{ absTimeShort(r?.ts) }}</span>
<span class="msg-url">{{ r?._url }}</span>
<span class="status-pill" v-if="r?._status" :class="&#x27;status-&#x27; + r?._bucket">{{ r?._status }}</span>
</div>
</div>
<div class="detail-actions">
<button class="btn btn-sm" type="button" v-if="logTraceId(row, 'requestId')" @click="lookupTrace('requestId', logTraceId(row, 'requestId'), $event.currentTarget, row)">Request {{ shortLogId(logTraceId(row, 'requestId')) }}</button>
<button class="btn btn-sm" type="button" v-if="logTraceId(row, 'jobId')" @click="lookupTrace('jobId', logTraceId(row, 'jobId'), $event.currentTarget, row)">Job {{ shortLogId(logTraceId(row, 'jobId')) }}</button>
<button class="btn btn-sm" type="button" v-if="row?._url" title="Copy a curl that reproduces the request" @click="copyCurl(row)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-code"></use></svg> Copy curl</button>
<button class="btn btn-sm" type="button" @click="copyJson(row)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-clipboard"></use></svg> Copy JSON</button>
<span class="copy-hint" v-if="copyHint">{{ copyHint }}</span>
</div>
</div>
<aside class="detail-aside">
<div class="aside-block">
<div class="aside-label">First seen</div>
<div class="aside-value" :title="(absTime(row?._firstSeen))">{{ relTime(row?._firstSeen) }}</div>
</div>
<div class="aside-block">
<div class="aside-label">Last seen</div>
<div class="aside-value" :title="(absTime(row?.ts))">{{ relTime(row?.ts) }}</div>
</div>
<div class="aside-block">
<div class="aside-label">Occurrences</div>
<div class="aside-value">{{ row?.count }}<span class="aside-sub" v-if="row?._lastHourCount"> · {{ row?._lastHourCount }} this hour</span></div>
</div>
<div class="aside-block" v-if="row?._repoId">
<div class="aside-label">Repository</div>
<a class="aside-value" :href="safeUrl(&quot;/r/&quot; + (row?._repoId))">{{ isLogIdentifier('repoId',row?._repoId) ? compactLogValue(row?._repoId) : row?._repoId }}</a><details class="log-value-reveal" v-if="isLogIdentifier('repoId',row?._repoId)"><summary>Full repository ID</summary>{{ row?._repoId }}</details><button type="button" class="log-copy-value" @click="copyLogValue(row?._repoId)">Copy full repository ID</button>
</div>
<div class="aside-block" v-if="row?._url">
<div class="aside-label">URL</div>
<div class="aside-value mono">{{ row?._url }}</div>
</div>
</aside>
</div>
</div>
</div>
</template>
</div>
<details class="history-management"><summary>History settings, export and diagnostics</summary>
<div class="volume-head"><div class="errors-actions"><button class="btn btn-sm" type="button" @click="exportCsv()">Export Redis CSV</button><button class="btn btn-sm btn-outline-danger" type="button" @click="clearAll()">Clear Redis history</button></div></div>
<p role="status">{{ redisCollecting === false ? 'Collection is OFF (LOG_REDIS_MIRROR=off); retained history is not receiving new events.' : redisCollecting === true ? 'The application is configured to mirror warnings and errors.' : 'Collection status is unknown.' }}</p>
<p class="log-coverage">Redis mirror: hourly counters cover 24 hours; stored rows are a rotating snapshot and may cover a shorter or longer period. Counts are not combined with central logs.</p>
<p v-if="redisStatsState !== 'ready' || available !== true">Redis counters are {{ redisStatsState === 'loading' ? 'loading' : 'unavailable' }}.</p>
@@ -145,150 +290,18 @@
</section>
</details>
<form class="errors-toolbar" aria-label="Error filters" v-form="viewState">
<div class="seg-filter" role="group" aria-label="Filter by severity">
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === '' }" :aria-pressed="(query?.bucket || '') === ''" @click="setBucket('')">All </button>
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === 'error', 'is-empty': !(stats?.severity?.error) }" :aria-pressed="(query?.bucket || '') === 'error'" @click="setBucket('error')"><span class="seg-dot bad" aria-hidden="true"></span>Error </button>
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === 'warn', 'is-empty': !(stats?.severity?.warn) }" :aria-pressed="(query?.bucket || '') === 'warn'" @click="setBucket('warn')"><span class="seg-dot warn" aria-hidden="true"></span>Warning </button>
<button type="button" class="seg-chip" :class="{ active: (query?.bucket || '') === 'info', 'is-empty': !(stats?.severity?.info) }" :aria-pressed="(query?.bucket || '') === 'info'" @click="setBucket('info')"><span class="seg-dot off" aria-hidden="true"></span>Info </button>
</div>
<div class="search-wrap">
<svg class="ui-icon search-icon" aria-hidden="true"><use href="#ui-icon-search"></use></svg>
<input type="search" class="form-control" aria-label="Search application history" placeholder="Search history…" title="Search messages, or filter with code:repo_not_found module:route status:&gt;=400" autocomplete="off" v-field="{ state: viewState, set: value =&gt; { query.search = value }, value: query?.search, form: null, options: {} }">
<span class="filter-count" v-if="parsedFilterCount">{{ parsedFilterCount }} filter{{ parsedFilterCount > 1 ? 's' : '' }}</span>
</div>
<div class="select-wrap">
<label for="history-sort">Sort</label>
<select id="history-sort" class="form-control form-control-sm" v-field="{ state: viewState, set: value =&gt; { query.sort = value }, value: query?.sort, form: null, options: {} }">
<option value="recent">Most recent</option>
<option value="count">Most frequent</option>
</select>
</div>
<div class="select-wrap">
<label for="history-merge" title="Rows are always sectioned by severity. This merges repeated events inside each section.">Merge</label>
<select id="history-merge" class="form-control form-control-sm" v-field="{ state: viewState, set: value =&gt; { query.group = value }, value: query?.group, form: null, options: {} }">
<option value="">Don't merge</option>
<option value="code">Same error</option>
<option value="module">Same module</option>
</select>
</div>
<label class="autoref">
<input type="checkbox" v-field="{ state: viewState, set: value =&gt; { query.autoRefresh = value }, value: query?.autoRefresh, form: null, options: {} }">
<span class="auto-refresh-label">Auto-refresh</span>
</label>
<button class="btn btn-sm btn-icon" type="button" title="Refresh now" @click="refreshNow()" aria-label="Refresh" :disabled="redisLoading"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-refresh"></use></svg></button>
</form>
<p role="status" v-if="redisLoading">Loading application history…</p>
<div class="admin-empty" v-if="!redisLoading &amp;&amp; !visible?.length &amp;&amp; available === true">No matching entries in the loaded Redis history.</div>
<p v-if="redisRedacted">{{ redisRedacted }} invalid legacy records were omitted. Older valid records may still be available.</p>
<div class="errors-pager" v-if="entries?.length || canLoadMore()">
<span>{{ query?.group &amp;&amp; visible?.length !== entries?.length ? fmt?.number(visible?.length) + (visible?.length === 1 ? ' group' : ' groups') + ' from ' : '' }}{{ fmt?.number(entries?.length) }} safe entries loaded · {{ fmt?.number(redisNextOffset || entries?.length) }} of {{ fmt?.number(total) }} stored records scanned</span>
<button class="btn btn-sm" type="button" v-if="canLoadMore()" @click="loadMore()" :disabled="redisLoading">Load 250 older</button>
</div>
<div class="errors-list" v-if="visible?.length">
<div class="errors-list-head">
<span class="col-when">When</span>
<span class="col-sev">Severity</span>
<span class="col-mod">Module</span>
<span class="col-msg">Message</span>
<span class="col-count" title="Total occurrences since first seen">Total</span>
<span class="col-status">Status</span>
</div>
<template v-for="(row, index) in visible" :key="row?._key">
<div class="errors-group-head" v-if="index === 0 || visible[index - 1]?._bucket !== row?._bucket"><span class="sev-dot" :class="'sev-' + row?._bucket"></span>{{ row?._bucket === 'error' ? 'Error' : row?._bucket === 'warn' ? 'Warning' : 'Info' }}<span class="errors-group-count">{{ fmt?.number(visible.filter(r =&gt; r?._bucket === row?._bucket).length) }}</span><span class="errors-group-note" v-if="index === 0">By severity · {{ query?.group === 'code' ? 'repeats merged by error · ' : query?.group === 'module' ? 'repeats merged by module · ' : '' }}{{ query?.sort === 'count' ? 'most frequent first' : 'most recent first' }}</span></div>
<div class="errors-row" :class="{open: expanded[row?._key]}">
<button type="button" class="errors-row-main" :aria-expanded="!!expanded[row?._key]" :aria-controls="'history-detail-' + index" @click="toggle(row)">
<span class="col-when">
<span class="when-rel">{{ relTime(row?.ts) }}</span>
<span class="when-abs">{{ absTimeShort(row?.ts) }}</span>
</span>
<span class="col-sev">
<span class="sev-dot" :class="&#x27;sev-&#x27; + row?._bucket"></span>
<span class="sev-label">{{ row?._bucket === 'error' ? 'Error' : row?._bucket === 'warn' ? 'Warning' : 'Info' }}</span>
</span>
<span class="col-mod"><span class="pill pill-module">{{ row?.module }}</span></span>
<span class="col-msg">
<strong class="msg-code">{{ row?.displayMessage }}</strong>
<span class="msg-context" v-if="row?.displayContext &amp;&amp; row?.displayContext !== row?.displayMessage">{{ row?.displayContext }}</span>
<span class="msg-detail" v-if="row?._detail">{{ row?._detail }}</span>
<span class="msg-url" v-if="row?._url" :title="row?._url">{{ row?._url }}</span>
</span>
<span class="col-count">
<span class="count-pill" v-if="row?.count &gt; 1">×{{ row?.count }}</span>
<span class="count-pill count-pill-muted" v-if="row?.count === 1">×1</span>
</span>
<span class="col-status">
<span class="status-pill" v-if="row?._status" :class="String(row?._status).match(/^[23]/) ? 'status-neutral' : (&#x27;status-&#x27; + row?._bucket)" :title="String(row?._status).match(/^2/) &amp;&amp; row?._bucket === 'warn' ? 'Client closed the connection' : null">{{ String(row?._status).match(/^2/) &amp;&amp; row?._bucket === 'warn' ? '—' : row?._status }}</span>
<span class="status-empty" v-if="!row?._status" title="No HTTP status for this event">—</span>
</span>
</button>
<div class="errors-row-detail" :id="'history-detail-' + index" v-if="expanded[row?._key]">
<div class="detail-tabs">
<button type="button" :class="{active: detailTab[row?._key] === &#x27;raw&#x27; || !detailTab[row?._key]}" @click="detailTab[row._key] = &#x27;raw&#x27;">Raw</button>
<button type="button" v-if="row?._stack" :class="{active: detailTab[row?._key] === &#x27;stack&#x27;}" @click="detailTab[row._key] = &#x27;stack&#x27;">Stack</button>
<button type="button" v-if="row?.count &gt; 1" :class="{active: detailTab[row?._key] === &#x27;related&#x27;}" @click="detailTab[row._key] = &#x27;related&#x27;">Related ({{ row?.count }})</button>
</div>
<div class="detail-body">
<div class="detail-main">
<pre v-if="(detailTab[row?._key] || &#x27;raw&#x27;) === &#x27;raw&#x27;">{{ row?._detailJson }}</pre>
<pre class="stack-pre" v-if="detailTab[row?._key] === &#x27;stack&#x27;">{{ row?._stack }}</pre>
<div class="related-list" v-if="detailTab[row?._key] === &#x27;related&#x27;">
<div class="related-row" v-for="(r, index) in row?._related" :key="index">
<span class="when-abs">{{ absTimeShort(r?.ts) }}</span>
<span class="msg-url">{{ r?._url }}</span>
<span class="status-pill" v-if="r?._status" :class="&#x27;status-&#x27; + r?._bucket">{{ r?._status }}</span>
</div>
</div>
<div class="detail-actions">
<button class="btn btn-sm" type="button" v-if="logTraceId(row, 'requestId')" @click="lookupTrace('requestId', logTraceId(row, 'requestId'), $event.currentTarget, row)">Request {{ shortLogId(logTraceId(row, 'requestId')) }}</button>
<button class="btn btn-sm" type="button" v-if="logTraceId(row, 'jobId')" @click="lookupTrace('jobId', logTraceId(row, 'jobId'), $event.currentTarget, row)">Job {{ shortLogId(logTraceId(row, 'jobId')) }}</button>
<button class="btn btn-sm" type="button" v-if="row?._url" title="Copy a curl that reproduces the request" @click="copyCurl(row)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-code"></use></svg> Copy curl</button>
<button class="btn btn-sm" type="button" @click="copyJson(row)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-clipboard"></use></svg> Copy JSON</button>
<span class="copy-hint" v-if="copyHint">{{ copyHint }}</span>
</div>
</div>
<aside class="detail-aside">
<div class="aside-block">
<div class="aside-label">First seen</div>
<div class="aside-value" :title="(absTime(row?._firstSeen))">{{ relTime(row?._firstSeen) }}</div>
</div>
<div class="aside-block">
<div class="aside-label">Last seen</div>
<div class="aside-value" :title="(absTime(row?.ts))">{{ relTime(row?.ts) }}</div>
</div>
<div class="aside-block">
<div class="aside-label">Occurrences</div>
<div class="aside-value">{{ row?.count }}<span class="aside-sub" v-if="row?._lastHourCount"> · {{ row?._lastHourCount }} this hour</span></div>
</div>
<div class="aside-block" v-if="row?._repoId">
<div class="aside-label">Repository</div>
<a class="aside-value" :href="safeUrl(&quot;/r/&quot; + (row?._repoId))">{{ row?._repoId }}</a>
</div>
<div class="aside-block" v-if="row?._url">
<div class="aside-label">URL</div>
<div class="aside-value mono">{{ row?._url }}</div>
</div>
</aside>
</div>
</div>
</div>
</template>
</div>
</details>
</section>
<section class="log-timeline" v-if="traceSelection" aria-labelledby="log-timeline-title" :aria-busy="traceLoading">
<div class="volume-head"><h3 id="log-timeline-title" tabindex="-1">Correlated timeline</h3><button type="button" class="btn btn-sm" @click="closeTrace()">Close timeline</button></div>
<p class="log-origin" v-if="traceSelection.context"><span>Sample from </span><strong>{{ traceSelection.context.event }}</strong><span v-if="traceSelection.context.service"> · {{ traceSelection.context.service }}</span></p>
<p class="log-id">{{ traceSelection.kind }} · {{ traceSelection.id }}</p>
<div class="log-id"><details class="log-value-reveal"><summary>{{ traceSelection.kind }} · {{ compactLogValue(traceSelection.id) }}</summary><span>{{ traceSelection.id }}</span></details><button type="button" class="log-copy-value" @click="copyLogValue(traceSelection.id)">Copy full ID</button></div>
<p role="status">{{ traceLoading ? 'Looking up correlated events…' : trace?.state === 'empty' ? 'No correlated events found in this window.' : logStateText(trace?.state) }}</p>
<p v-if="trace && !traceLoading">{{ absTime(trace.start) }} – {{ absTime(trace.end) }} · at most 200 earliest matching events across services. Service and release filters do not narrow this timeline.</p>
<a v-if="trace?.grafanaUrl" :href="safeUrl(trace.grafanaUrl)" target="_blank" rel="noopener noreferrer">Open this correlation in Grafana</a>
<ol class="log-events" v-if="trace?.events?.length">
<li v-for="(event, index) in trace.events" :key="index"><time :datetime="event.timestamp" :title="event.timestamp">{{ absTimeShort(event.timestamp) }}</time> · <strong>{{ event.service }}</strong> · {{ event.event }}<span v-if="event.errorCode"> · {{ event.errorCode }}</span><span v-if="event.status"> · HTTP {{ event.status }}</span><span v-if="event.ms !== undefined"> · {{ event.ms }} ms</span><span v-if="event.attempt"> · attempt {{ event.attempt }}</span><br><code v-if="event.requestId">request {{ event.requestId }} </code><code v-if="event.jobId">job {{ event.jobId }}</code></li>
<li v-for="(event, index) in trace.events" :key="index"><time :datetime="event.timestamp" :title="event.timestamp">{{ absTimeShort(event.timestamp) }}</time> · <strong>{{ event.service }}</strong> · {{ event.event }}<span v-if="event.errorCode"> · {{ event.errorCode }}</span><span v-if="event.status"> · HTTP {{ event.status }}</span><span v-if="event.ms !== undefined"> · {{ event.ms }} ms</span><span v-if="event.attempt"> · attempt {{ event.attempt }}</span><br><div v-for="kind in ['requestId','jobId']" :key="kind"><template v-if="event[kind]"><details class="log-value-reveal"><summary>{{ kind }} · {{ compactLogValue(event[kind]) }}</summary><code>{{ event[kind] }}</code></details><button type="button" class="log-copy-value" @click="copyLogValue(event[kind])">Copy full {{ kind }}</button></template></div></li>
</ol>
</section>
+12
View File
@@ -14,6 +14,18 @@ export function installLogInvestigation(state, http) {
).slice().sort((a, b) => state.logView.sort === "count" ? b.count - a.count : Date.parse(b.last) - Date.parse(a.last));
};
state.shortLogId = id => id ? id.slice(0, 8) : "";
state.isLogIdentifier = (key, value) => typeof value === "string" && value.length > 16 && /(?:id|sha|release)$/i.test(key);
state.compactLogValue = value => String(value).slice(0, 8) + "…" + String(value).slice(-4);
state.logCopyStatus = "";
state.copyLogValue = async value => {
try { await navigator.clipboard.writeText(String(value)); state.logCopyStatus = "Full value copied"; }
catch { state.logCopyStatus = "Copy unavailable. Expand the value to select it."; }
};
state.historyDetailFields = row => {
try { const value = JSON.parse(row?._detailJson || "{}"); return value && typeof value === "object" ? Object.entries(value) : [["value", value]]; }
catch { return [["record", row?._detailJson || ""]]; }
};
state.logFieldText = value => typeof value === "object" ? JSON.stringify(value) : String(value ?? "");
let traceOrigin = null, detailOrigin = null, traceSource = null;
state.selectLog = async (group, origin) => {
detailOrigin = origin || document.activeElement;
+6 -2
View File
@@ -1481,6 +1481,9 @@ export const errorsAdminController = function (state, http, location, interval)
return "info";
}
function decorate(e) {
// Preserve the API's safe record before adding UI-only fields. Raw and
// Copy JSON must not silently omit fields through the summary projection.
e._rawJson = JSON.stringify(e, null, 2);
const detail = (e.raw || []).find(
(a) => a && typeof a === "object" && !Array.isArray(a)
);
@@ -1532,7 +1535,7 @@ export const errorsAdminController = function (state, http, location, interval)
return e;
}
// Build a curated, column-aligned JSON payload for the Raw tab. Mirrors
// Build a curated, column-aligned payload for the readable Details tab. Mirrors
// the reference admin design: name / code / kind / httpStatus / module /
// detail / url / ts on aligned colons. We can't just JSON.stringify the
// raw entry because it includes the human "anonymous error" wrapper
@@ -1543,6 +1546,7 @@ export const errorsAdminController = function (state, http, location, interval)
if (v === undefined || v === null || v === "") return;
fields.push([k, v]);
};
for (const key of ["service", "event", "severity", "requestId", "jobId"]) push(key, detail && detail[key]);
push("name", detail && detail.name);
push("code", entry.displayMessage || (detail && detail.message));
if (entry._bucket) push("kind", entry._bucket);
@@ -1840,7 +1844,7 @@ export const errorsAdminController = function (state, http, location, interval)
timers.timeout(() => { state.copyHint = ""; }, 1500);
}
state.copyJson = (row) => {
navigator.clipboard.writeText(row._detailJson).then(() => flashCopy("JSON"));
navigator.clipboard.writeText(row._rawJson).then(() => flashCopy("JSON"));
};
state.copyCurl = (row) => {
if (!row._url) return;
+34 -34
View File
@@ -1,52 +1,52 @@
"use strict";(()=>{var el=Object.defineProperty;var tl=e=>{throw TypeError(e)};var rf=(e,t,s)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var af=(e,t)=>{for(var s in t)el(e,s,{get:t[s],enumerable:!0})};var et=(e,t,s)=>rf(e,typeof t!="symbol"?t+"":t,s),hr=(e,t,s)=>t.has(e)||tl("Cannot "+s);var re=(e,t,s)=>(hr(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),Fe=(e,t,s,i)=>(hr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Le=(e,t,s)=>(hr(e,t,"access private method"),s);var nl=(e,t,s,i)=>({set _(o){Fe(e,t,o,s)},get _(){return re(e,t,i)}});var he=["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 ge={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 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,v,h,y,m=!0,w,S=i.defer(),E=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(T=>T.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=()=>m&&e.user?.username===y;function b(){m=!1,r=p=u=void 0,S.resolve(),o.clearTimeout(w)}e.on("dispose",b),e.on("routeLeave",b),e.watch(()=>e.user?.username,T=>{!y&&T?y=T:y&&T!==y&&(b(),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 P=()=>({timeout:S.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":u}}),M=T=>T?.status===404?"Artifact linking is not available on this server.":T?.status===401?"Sign in, then open a new artifact link from your submission.":T?.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(!m||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let T=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(T)){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),h||(h=E());try{let V=(await s.get("/api/review-consent/csrf",{timeout:S.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 z=(await s.post("/api/review-consent/preview",{repositoryId:T,intent:{...r,requestId:h}},P())).data;if(!N())return;if(!z||typeof z.ticket!="string"||!z.ticket||z.ticket.length>8192||typeof z.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
`))),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",uh),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)?As(e.value):e.value,u=t??"";if(p===u)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.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 v=[...i];v.splice(p,1),d(v)}}else if(Xt(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(Xt(t))o=t.has(i.props.value);else{if(t===s)return;o=Jt(t,Jd(e,!0))}e.checked!==o&&(e.checked=o)}var Rt={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?As(Mo(u)):Mo(u)),r=e.multiple,d=r?Xt(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Ne(d)?o.slice():o:d];try{e[hn](d)}finally{Xe(()=>{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||!ch(t,s[1],s[0]))&&Wd(e,t)}};function ch(e,t,s){if(!s)return Jt(e,t);if(Ne(e))return Jt(e,t);if(Xt(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&&!Xt(t))){for(let o=0,r=e.options.length;o<r;o++){let d=e.options[o],p=Mo(d);if(s)if(i){let u=typeof p;u==="string"||u==="number"?d.selected=t.some(v=>String(v)===String(p)):d.selected=li(t,p)>-1}else d.selected=t.has(p);else if(Jt(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 ph=["ctrl","shift","alt","meta"],fh={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)=>ph.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<t.length;d++){let p=fh[t[d]];if(p&&p(o,t))return}return e(o,...r)}))},mh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Vt=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=on(o.key);if(t.some(d=>d===r||mh[d]===r))return e(o)}))},hh=pt({patchProp:ah},Gm),Kd;function gh(){return Kd||(Kd=Rd(hh))}var Qd=((...e)=>{let t=gh().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=yh(i);if(!o)return;let r=t._component;!Ie(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let d=s(o,!1,vh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),d},t});function vh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yh(e){return rt(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 bh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xd(e.default)}var Qe=Object.assign;function Li(e,t){let s={};for(let i in t){let o=t[i];s[i]=Kt(o)?o.map(e):e(o)}return s}var Fs=()=>{},Kt=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,wh=/&/g,kh=/\//g,Ch=/=/g,Eh=/\?/g,tu=/\+/g,Sh=/%5B/g,Nh=/%5D/g,nu=/%5E/g,Rh=/%60/g,su=/%7B/g,Th=/%7C/g,ou=/%7D/g,Ph=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(Th,"|").replace(Sh,"[").replace(Nh,"]")}function iu(e){return aa(e).replace(su,"{").replace(ou,"}").replace(nu,"^")}function oa(e){return aa(e).replace(tu,"%2B").replace(Ph,"+").replace(eu,"%23").replace(wh,"%26").replace(Rh,"`").replace(su,"{").replace(ou,"}").replace(nu,"^")}function Dh(e){return oa(e).replace(Ch,"%3D")}function Ah(e){return aLine truncated
"use strict";(()=>{var el=Object.defineProperty;var tl=e=>{throw TypeError(e)};var rf=(e,t,s)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var af=(e,t)=>{for(var s in t)el(e,s,{get:t[s],enumerable:!0})};var et=(e,t,s)=>rf(e,typeof t!="symbol"?t+"":t,s),hr=(e,t,s)=>t.has(e)||tl("Cannot "+s);var re=(e,t,s)=>(hr(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),Fe=(e,t,s,i)=>(hr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Le=(e,t,s)=>(hr(e,t,"access private method"),s);var nl=(e,t,s,i)=>({set _(o){Fe(e,t,o,s)},get _(){return re(e,t,i)}});var he=["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 ge={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 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,v,h,y,m=!0,w,S=i.defer(),E=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(T=>T.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=()=>m&&e.user?.username===y;function b(){m=!1,r=p=u=void 0,S.resolve(),o.clearTimeout(w)}e.on("dispose",b),e.on("routeLeave",b),e.watch(()=>e.user?.username,T=>{!y&&T?y=T:y&&T!==y&&(b(),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 D=()=>({timeout:S.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":u}}),M=T=>T?.status===404?"Artifact linking is not available on this server.":T?.status===401?"Sign in, then open a new artifact link from your submission.":T?.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(!m||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let T=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(T)){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),h||(h=E());try{let V=(await s.get("/api/review-consent/csrf",{timeout:S.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 z=(await s.post("/api/review-consent/preview",{repositoryId:T,intent:{...r,requestId:h}},D())).data;if(!N())return;if(!z||typeof z.ticket!="string"||!z.ticket||z.ticket.length>8192||typeof z.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
`))),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",uh),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)?As(e.value):e.value,u=t??"";if(p===u)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.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 v=[...i];v.splice(p,1),d(v)}}else if(Jt(i)){let p=new Set(i);r?p.add(o):p.delete(o),d(p)}else d(Xd(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(Jt(t))o=t.has(i.props.value);else{if(t===s)return;o=Xt(t,Xd(e,!0))}e.checked!==o&&(e.checked=o)}var Rt={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?As(Mo(u)):Mo(u)),r=e.multiple,d=r?Jt(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Ne(d)?o.slice():o:d];try{e[hn](d)}finally{Je(()=>{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||!ch(t,s[1],s[0]))&&Wd(e,t)}};function ch(e,t,s){if(!s)return Xt(e,t);if(Ne(e))return Xt(e,t);if(Jt(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&&!Jt(t))){for(let o=0,r=e.options.length;o<r;o++){let d=e.options[o],p=Mo(d);if(s)if(i){let u=typeof p;u==="string"||u==="number"?d.selected=t.some(v=>String(v)===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 Xd(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var ph=["ctrl","shift","alt","meta"],fh={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)=>ph.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<t.length;d++){let p=fh[t[d]];if(p&&p(o,t))return}return e(o,...r)}))},mh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Vt=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=on(o.key);if(t.some(d=>d===r||mh[d]===r))return e(o)}))},hh=pt({patchProp:ah},Gm),Kd;function gh(){return Kd||(Kd=Rd(hh))}var Qd=((...e)=>{let t=gh().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=yh(i);if(!o)return;let r=t._component;!Ie(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let d=s(o,!1,vh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),d},t});function vh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yh(e){return rt(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 bh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xd(e.default)}var Qe=Object.assign;function Li(e,t){let s={};for(let i in t){let o=t[i];s[i]=Kt(o)?o.map(e):e(o)}return s}var Fs=()=>{},Kt=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,wh=/&/g,kh=/\//g,Ch=/=/g,Eh=/\?/g,tu=/\+/g,Sh=/%5B/g,Nh=/%5D/g,nu=/%5E/g,Rh=/%60/g,su=/%7B/g,Th=/%7C/g,ou=/%7D/g,Dh=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(Th,"|").replace(Sh,"[").replace(Nh,"]")}function iu(e){return aa(e).replace(su,"{").replace(ou,"}").replace(nu,"^")}function oa(e){return aa(e).replace(tu,"%2B").replace(Dh,"+").replace(eu,"%23").replace(wh,"%26").replace(Rh,"`").replace(su,"{").replace(ou,"}").replace(nu,"^")}function Ph(e){return oa(e).replace(Ch,"%3D")}function Ah(e){return aLine truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[ct.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Fh(t)}" via a navigation guard.`},[ct.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ct.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ct.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function as(e,t){return Qe(new Error,{type:e,[mu]:!0},t)}function gn(e,t){return e instanceof Error&&mu in e&&(t==null||!!(e.type&t))}var $h=["params","query","hash"];function Fh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of $h)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function hu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){let o=s[i].replace(tu," "),r=o.indexOf("="),d=$s(r<0?o:o.slice(0,r)),p=r<0?null:$s(o.slice(r+1));if(d in t){let u=t[d];Kt(u)||(u=t[d]=[u]),u.push(p)}else t[d]=p}return t}function pa(e){let t="";for(let s in e){let i=e[s];if(s=Dh(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(Kt(i)?i.map(o=>o&&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]=Kt(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 v=m=>{m===!1?u(as(ct.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?u(m):_h(m)?u(as(ct.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(d&&i.enterCallbacks[o]===d&&typeof m=="function"&&d.push(m),p())},h=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(h);e.length<3&&(y=y.then(v)),y.catch(m=>u(m))})}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 v=(u.__vccOpts||u)[t];v&&r.push(Nn(v,s,i,d,p,o))}else{let v=u();r.push(()=>v.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${p}" at "${d.path}"`);let y=bh(h)?h.default:h;d.mods[p]=h,d.components[p]=y;let m=(y.__vccOpts||y)[t];return m&&Nn(m,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;d<r;d++){let p=t.matched[d];p&&(e.matched.find(v=>rs(v,p))?i.push(p):s.push(p));let u=e.matched[d];u&&(t.matched.find(v=>rs(v,u))||o.push(u))}return[s,i,o]}var Uh=()=>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 Bh(e,t,s,i){let o=[],r=[],d=null,p=({state:m})=>{let w=Du(e,location),S=s.value,E=t.value,N=0;if(m){if(s.value=w,t.value=m,d&&d===S){d=null;return}N=E?m.position-E.position:0}else i(w);o.forEach(b=>{b(s.value,S,{delta:N,type:$i.pop,direction:N?N>0?Fi.forward:Fi.back:Fi.unknown})})};function u(){d=s.value}function v(m){o.push(m);let w=()=>{let S=o.indexOf(m);S>-1&&o.splice(S,1)};return r.push(w),w}function h(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Qe({},m.state,{scroll:Vo()}),"")}}function y(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:u,listen:v,destroy:y}}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 zh(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,v,h){let y=e.indexOf("#"),m=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+u:Uh()+e+u;try{t[h?"replaceState":"pushState"](v,"",m),o.value=v}catch(w){console.error(w),s[h?"replace":"assign"](m)}}function d(u,v){r(u,Qe({},t.state,bu(o.value.back,u,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=u}function p(u,v){let h=Qe({},o.value,t.state,{forward:u,scroll:Vo()});r(h.current,h,!0),r(u,Qe({},bu(i.value,u,null),{position:h.position+1},v),!1),i.value=u}return{location:i,state:o,push:p,replace:d}}function Au(e){e=du(e);let t=zh(e),s=Bh(e,t.state,t.location,t.replace);function i(r,d=!0){d||s.pauseListeners(),history.go(r)}let o=Qe({locatLine truncated
`).forEach((U,k)=>{for(let[L,K]of w){let H=L.exec(U);if(H&&!/^(if|for|while|switch|return|catch)$/.test(H[1])){O.push({name:H[1],kind:K,line:k+1});break}}}),S={content:e.content,list:O.slice(0,300)},S.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||""),k=O.session.getLength();if(!U||+U[1]<1||+U[1]>k){e.gotoError="Enter a line from 1 to "+k;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 k=O.size==null,L=U.size==null;return k!==L?k?-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,k=L=>L.toFixed(1).replace(/\.0$/,"");return U<1024?k(U)+" KB":U<1024*1024?k(U/1024)+" MB":k(U/1024/1024)+" GB"},e.fileSize=function(O){if(!O)return null;let U=O.replace(/^\/+/,""),k=(e.files||[]).find(L=>(L.path?L.path+"/":"")+L.name===U);return k&&k.size!=null?k.size:null},e.revealFolder=function(O){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Xe(()=>{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 E={content:null,n:0},N=O=>{if(E.content===O)return E.n;let U=O;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let k=[],L=H=>{Array.isArray(H)?k.push(H.join("")):typeof H=="string"&&k.push(H)};(U&&(U.cells||(U.worksheets||[]).flatMap(H=>H.cells||[]))||[]).forEach(H=>{L(H?.source??H?.input),(H?.outputs||[]).forEach(se=>{L(se?.text),se?.data&&(L(se.data["text/plain"]),L(se.data["text/markdown"]),L(se.data["text/html"])),L(se?.traceback)})});let K=k.reduce((H,se)=>H+(se.match(s)||[]).length,0);return E={content:O,n:K},K};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=Lo;let b=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 k=new window.DOMParser().parseFromString("<div>"+U+"</div>","text/html"),L={};return k.querySelectorAll("h1, h2, h3").forEach(K=>{let H=K.id||b(K.textContent);L[H]?H+="-"+ ++L[H]:L[H]=1,K.id=H}),k.body.firstChild.innerHTML};let P={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(P.content===e.content)return P.list;let U=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(k=>({id:k.id,text:k.textContent.trim(),level:k.tagName==="H3"?3:2})).slice(0,40);return P={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,k="",L="";for(let K of O){let H=window.document.getElementById(K.id);if(!H)continue;let se=H.getBoundingClientRect().top;se<U?k=K.id:!L&&se<window.innerHeight-80&&(L=K.id)}L&&(k=L),e.activeHeading!==k&&(e.activeHeading=k)},{capture:!0,passive:!0}),e.scrollToHeading=function(O){if(!O){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let U=window.document.getElementById(O);U&&U.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=O},e.csvView="table";let M={content:null,rows:[]},T=(O,U)=>{let k=[],L=[],K="",H=!1;for(let se=0;se<O.length;se++){let Z=O[se];H?Z==='"'?O[se+1]==='"'?(K+='"',se++):H=!1:K+=Z:Z==='"'&&K===""?H=!0:Z===U?(L.push(K),K=""):Z===`
`+JSON.stringify(t):""}`},[ct.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Fh(t)}" via a navigation guard.`},[ct.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ct.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ct.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function as(e,t){return Qe(new Error,{type:e,[mu]:!0},t)}function gn(e,t){return e instanceof Error&&mu in e&&(t==null||!!(e.type&t))}var $h=["params","query","hash"];function Fh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of $h)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function hu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){let o=s[i].replace(tu," "),r=o.indexOf("="),d=$s(r<0?o:o.slice(0,r)),p=r<0?null:$s(o.slice(r+1));if(d in t){let u=t[d];Kt(u)||(u=t[d]=[u]),u.push(p)}else t[d]=p}return t}function pa(e){let t="";for(let s in e){let i=e[s];if(s=Ph(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(Kt(i)?i.map(o=>o&&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]=Kt(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 v=m=>{m===!1?u(as(ct.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?u(m):_h(m)?u(as(ct.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(d&&i.enterCallbacks[o]===d&&typeof m=="function"&&d.push(m),p())},h=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(h);e.length<3&&(y=y.then(v)),y.catch(m=>u(m))})}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 v=(u.__vccOpts||u)[t];v&&r.push(Nn(v,s,i,d,p,o))}else{let v=u();r.push(()=>v.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${p}" at "${d.path}"`);let y=bh(h)?h.default:h;d.mods[p]=h,d.components[p]=y;let m=(y.__vccOpts||y)[t];return m&&Nn(m,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;d<r;d++){let p=t.matched[d];p&&(e.matched.find(v=>rs(v,p))?i.push(p):s.push(p));let u=e.matched[d];u&&(t.matched.find(v=>rs(v,u))||o.push(u))}return[s,i,o]}var Uh=()=>location.protocol+"//"+location.host;function Pu(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 Bh(e,t,s,i){let o=[],r=[],d=null,p=({state:m})=>{let w=Pu(e,location),S=s.value,E=t.value,N=0;if(m){if(s.value=w,t.value=m,d&&d===S){d=null;return}N=E?m.position-E.position:0}else i(w);o.forEach(b=>{b(s.value,S,{delta:N,type:$i.pop,direction:N?N>0?Fi.forward:Fi.back:Fi.unknown})})};function u(){d=s.value}function v(m){o.push(m);let w=()=>{let S=o.indexOf(m);S>-1&&o.splice(S,1)};return r.push(w),w}function h(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Qe({},m.state,{scroll:Vo()}),"")}}function y(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:u,listen:v,destroy:y}}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 zh(e){let{history:t,location:s}=window,i={value:Pu(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,v,h){let y=e.indexOf("#"),m=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+u:Uh()+e+u;try{t[h?"replaceState":"pushState"](v,"",m),o.value=v}catch(w){console.error(w),s[h?"replace":"assign"](m)}}function d(u,v){r(u,Qe({},t.state,bu(o.value.back,u,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=u}function p(u,v){let h=Qe({},o.value,t.state,{forward:u,scroll:Vo()});r(h.current,h,!0),r(u,Qe({},bu(i.value,u,null),{position:h.position+1},v),!1),i.value=u}return{location:i,state:o,push:p,replace:d}}function Au(e){e=du(e);let t=zh(e),s=Bh(e,t.state,t.location,t.replace);function i(r,d=!0){d||s.pauseListeners(),history.go(r)}let o=Qe({locatLine truncated
`).forEach((U,k)=>{for(let[_,K]of w){let H=_.exec(U);if(H&&!/^(if|for|while|switch|return|catch)$/.test(H[1])){O.push({name:H[1],kind:K,line:k+1});break}}}),S={content:e.content,list:O.slice(0,300)},S.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||""),k=O.session.getLength();if(!U||+U[1]<1||+U[1]>k){e.gotoError="Enter a line from 1 to "+k;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 k=O.size==null,_=U.size==null;return k!==_?k?-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,k=_=>_.toFixed(1).replace(/\.0$/,"");return U<1024?k(U)+" KB":U<1024*1024?k(U/1024)+" MB":k(U/1024/1024)+" GB"},e.fileSize=function(O){if(!O)return null;let U=O.replace(/^\/+/,""),k=(e.files||[]).find(_=>(_.path?_.path+"/":"")+_.name===U);return k&&k.size!=null?k.size:null},e.revealFolder=function(O){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Je(()=>{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 E={content:null,n:0},N=O=>{if(E.content===O)return E.n;let U=O;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let k=[],_=H=>{Array.isArray(H)?k.push(H.join("")):typeof H=="string"&&k.push(H)};(U&&(U.cells||(U.worksheets||[]).flatMap(H=>H.cells||[]))||[]).forEach(H=>{_(H?.source??H?.input),(H?.outputs||[]).forEach(se=>{_(se?.text),se?.data&&(_(se.data["text/plain"]),_(se.data["text/markdown"]),_(se.data["text/html"])),_(se?.traceback)})});let K=k.reduce((H,se)=>H+(se.match(s)||[]).length,0);return E={content:O,n:K},K};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=Lo;let b=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 k=new window.DOMParser().parseFromString("<div>"+U+"</div>","text/html"),_={};return k.querySelectorAll("h1, h2, h3").forEach(K=>{let H=K.id||b(K.textContent);_[H]?H+="-"+ ++_[H]:_[H]=1,K.id=H}),k.body.firstChild.innerHTML};let D={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(D.content===e.content)return D.list;let U=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(k=>({id:k.id,text:k.textContent.trim(),level:k.tagName==="H3"?3:2})).slice(0,40);return D={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,k="",_="";for(let K of O){let H=window.document.getElementById(K.id);if(!H)continue;let se=H.getBoundingClientRect().top;se<U?k=K.id:!_&&se<window.innerHeight-80&&(_=K.id)}_&&(k=_),e.activeHeading!==k&&(e.activeHeading=k)},{capture:!0,passive:!0}),e.scrollToHeading=function(O){if(!O){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let U=window.document.getElementById(O);U&&U.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=O},e.csvView="table";let M={content:null,rows:[]},T=(O,U)=>{let k=[],_=[],K="",H=!1;for(let se=0;se<O.length;se++){let Z=O[se];H?Z==='"'?O[se+1]==='"'?(K+='"',se++):H=!1:K+=Z:Z==='"'&&K===""?H=!0:Z===U?(_.push(K),K=""):Z===`
`||Z==="\r"?(Z==="\r"&&O[se+1]===`
`&&se++,L.push(K),k.push(L),L=[],K=""):K+=Z}return(K!==""||L.length)&&(L.push(K),k.push(L)),k.filter(se=>se.length>1||se[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:T(e.content,O)}}return M.rows},e.csvNumCol=O=>{let U=e.csvRows().slice(1).map(k=>k[O]).filter(k=>k!=null&&String(k).trim()!=="");return U.length>0&&U.every(k=>e.csvNumeric(k))},e.csvNumeric=O=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(O)&&/\d/.test(O),e.redactParts=function(O){let U=[],k=0,L,K=/\bXXXX-(\d+)\b/g;for(O=String(O||"");L=K.exec(O);)L.index>k&&U.push({t:O.slice(k,L.index)}),U.push({n:L[1]}),k=L.index+L[0].length;return k<O.length&&U.push({t:O.slice(k)}),U},e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{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 z(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":v.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(),k=U.lastIndexOf(".");k>-1&&(U=U.substring(k+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:""},K=V(U);e.languageName=L[K]??(K?K.charAt(0).toUpperCase()+K.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(H){e.codeEditor=un(H);{let Re=H.session,Ue=Re.getTokens.bind(Re),Y=/\bXXXX-\d+\b/g;if(Re.getTokens=function(fe){let de=Ue(fe);if(!de.some(ve=>ve.value.indexOf("XXXX-")!==-1))return de;let ce=[];for(let ve of de){if(ve.value.indexOf("XXXX-")===-1){ce.push(ve);continue}let Me=0;Y.lastIndex=0;let A;for(;A=Y.exec(ve.value);)A.index>Me&&ce.push({type:ve.type,value:ve.value.slice(Me,A.index)}),ce.push({type:"redacted.n"+A[0].slice(5),value:A[0]}),Me=A.index+A[0].length;Me<ve.value.length&&ce.push({type:ve.type,value:ve.value.slice(Me)})}return ce},!window.document.getElementById("redact-index-rules")){let fe=window.document.createElement("style");fe.id="redact-index-rules",fe.textContent=Array.from({length:99},(de,ce)=>`.ace_redacted.ace_n${ce+1}::after{content:"${ce+1}"}`).join(""),window.document.head.appendChild(fe)}H.renderer.updateFull(!0)}H.session.setUseWrapMode(e.wrapLines!==!1);let se=H.container.closest?.(".file-card"),Z=()=>{if(!se)return;let Re=H.renderer,Ue=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);se.classList.toggle("at-right-edge",Ue<=2||Re.getScrollLeft()>=Ue-2)};H.session.on("changeScrollLeft",Z),H.renderer.on("afterRender",Z),window.matchMedia?.("(max-width: 767px)").matches&&H.setOption("hScrollBarAlwaysVisible",!0);let J=ace.require("ace/range").Range,me=null;function Ee(Re,Ue){me!==null&&(H.session.removeMarker(me),me=null),Re!=null&&(me=H.session.addMarker(new J(Re,0,Ue,1),"highlighted-line","fullLine"))}function $e(Re){let Ue=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Ue){Ee(null);return}let Y=parseInt(Ue[1])-1,fe=Ue[2]?parseInt(Ue[2])-1:Y;Ee(Y,fe),Re&&i.timeout(()=>{H.scrollToLine(Y,!0,!0,function(){})},100)}$e(!0);let Be=null;H.on("guttermousedown",function(Re){let Ue=Re.getDocumentPosition().row,Y=Re.domEvent&&Re.domEvent.shiftKey,fe=Ue,de=Ue;Y&&Be!==null?(fe=Math.min(Be,Ue),de=Math.max(Be,Ue)):Be=Ue;let ce=fe===de?`#L${fe+1}`:`#L${fe+1}-L${de+1}`,ve=window.location.pathname+window.location.search+ce;e.preview||window.history.replaceState(null,"",ve),Ee(fe,de),Re.stop()});let Ze=o(window,"hashc Line truncated
`);for(let y=0;y<h.length;y++){let m=h[y];if(m.startsWith("diff --git")){v(),u();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),u().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){u().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let w=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(d=parseInt(w[1],10),p=parseInt(w[2],10)),u().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:p,text:m.slice(1)}),p++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:d,newNo:"",text:m.slice(1)}),d++):(r.lines.push({kind:"ctx",oldNo:d,newNo:p,text:m.startsWith(" ")?m.slice(1):m}),d++,p++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function mg(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function hg(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 gg(e){return String(e??"").toUpperCase()}function vg(e,t,s=0){return(e||[]).slice(s,s+t)}function yg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function bg(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((v,h)=>v?.[h],i),u=r.split(".").reduce((v,h)=>v?.[h],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof u=="string"&&(u=u.toLowerCase()),p!==u)return(p==null?-1:u==null?1:p<u?-1:1)*d}return 0})}function wg(e,t){if(!e)return"";let s=new Date(e);if(isNaN(s))return String(e);if(!t||t==="mediumDate")return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:s.getFullYear(),MMM:s.toLocaleDateString(void 0,{month:"short"}),MM:String(s.getMonth()+1).padStart(2,"0"),dd:String(s.getDate()).padStart(2,"0"),d:s.getDate(),HH:String(s.getHours()).padStart(2,"0"),mm:String(s.getMinutes()).padStart(2,"0"),ss:String(s.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,o=>i[o])}function kg(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),v=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:u<18?[u,"month"]:[Math.round(p/365.25),"year"],h=v[0]+" "+v[1]+(v[0]===1?"":"s");d=r>0?"in "+h:h+" 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 Fu=function(e,t,s){let i=kt(),o=Bt();Wu(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=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.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=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let d=()=>{let E=[];e.query.owner&&E.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&E.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=E};e.showSta Line truncated
`&&se++,_.push(K),k.push(_),_=[],K=""):K+=Z}return(K!==""||_.length)&&(_.push(K),k.push(_)),k.filter(se=>se.length>1||se[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:T(e.content,O)}}return M.rows},e.csvNumCol=O=>{let U=e.csvRows().slice(1).map(k=>k[O]).filter(k=>k!=null&&String(k).trim()!=="");return U.length>0&&U.every(k=>e.csvNumeric(k))},e.csvNumeric=O=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(O)&&/\d/.test(O),e.redactParts=function(O){let U=[],k=0,_,K=/\bXXXX-(\d+)\b/g;for(O=String(O||"");_=K.exec(O);)_.index>k&&U.push({t:O.slice(k,_.index)}),U.push({n:_[1]}),k=_.index+_[0].length;return k<O.length&&U.push({t:O.slice(k)}),U},e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{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 z(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":v.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(),k=U.lastIndexOf(".");k>-1&&(U=U.substring(k+1));let _={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:""},K=V(U);e.languageName=_[K]??(K?K.charAt(0).toUpperCase()+K.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(H){e.codeEditor=un(H);{let Re=H.session,Ue=Re.getTokens.bind(Re),Y=/\bXXXX-\d+\b/g;if(Re.getTokens=function(fe){let de=Ue(fe);if(!de.some(ve=>ve.value.indexOf("XXXX-")!==-1))return de;let ce=[];for(let ve of de){if(ve.value.indexOf("XXXX-")===-1){ce.push(ve);continue}let Me=0;Y.lastIndex=0;let A;for(;A=Y.exec(ve.value);)A.index>Me&&ce.push({type:ve.type,value:ve.value.slice(Me,A.index)}),ce.push({type:"redacted.n"+A[0].slice(5),value:A[0]}),Me=A.index+A[0].length;Me<ve.value.length&&ce.push({type:ve.type,value:ve.value.slice(Me)})}return ce},!window.document.getElementById("redact-index-rules")){let fe=window.document.createElement("style");fe.id="redact-index-rules",fe.textContent=Array.from({length:99},(de,ce)=>`.ace_redacted.ace_n${ce+1}::after{content:"${ce+1}"}`).join(""),window.document.head.appendChild(fe)}H.renderer.updateFull(!0)}H.session.setUseWrapMode(e.wrapLines!==!1);let se=H.container.closest?.(".file-card"),Z=()=>{if(!se)return;let Re=H.renderer,Ue=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);se.classList.toggle("at-right-edge",Ue<=2||Re.getScrollLeft()>=Ue-2)};H.session.on("changeScrollLeft",Z),H.renderer.on("afterRender",Z),window.matchMedia?.("(max-width: 767px)").matches&&H.setOption("hScrollBarAlwaysVisible",!0);let X=ace.require("ace/range").Range,me=null;function Ee(Re,Ue){me!==null&&(H.session.removeMarker(me),me=null),Re!=null&&(me=H.session.addMarker(new X(Re,0,Ue,1),"highlighted-line","fullLine"))}function $e(Re){let Ue=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Ue){Ee(null);return}let Y=parseInt(Ue[1])-1,fe=Ue[2]?parseInt(Ue[2])-1:Y;Ee(Y,fe),Re&&i.timeout(()=>{H.scrollToLine(Y,!0,!0,function(){})},100)}$e(!0);let Be=null;H.on("guttermousedown",function(Re){let Ue=Re.getDocumentPosition().row,Y=Re.domEvent&&Re.domEvent.shiftKey,fe=Ue,de=Ue;Y&&Be!==null?(fe=Math.min(Be,Ue),de=Math.max(Be,Ue)):Be=Ue;let ce=fe===de?`#L${fe+1}`:`#L${fe+1}-L${de+1}`,ve=window.location.pathname+window.location.search+ce;e.preview||window.history.replaceState(null,"",ve),Ee(fe,de),Re.stop()});let Ze=o(window,"hashc Line truncated
`);for(let y=0;y<h.length;y++){let m=h[y];if(m.startsWith("diff --git")){v(),u();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),u().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){u().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let w=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(d=parseInt(w[1],10),p=parseInt(w[2],10)),u().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:p,text:m.slice(1)}),p++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:d,newNo:"",text:m.slice(1)}),d++):(r.lines.push({kind:"ctx",oldNo:d,newNo:p,text:m.startsWith(" ")?m.slice(1):m}),d++,p++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function mg(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function hg(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 gg(e){return String(e??"").toUpperCase()}function vg(e,t,s=0){return(e||[]).slice(s,s+t)}function yg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function bg(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((v,h)=>v?.[h],i),u=r.split(".").reduce((v,h)=>v?.[h],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof u=="string"&&(u=u.toLowerCase()),p!==u)return(p==null?-1:u==null?1:p<u?-1:1)*d}return 0})}function wg(e,t){if(!e)return"";let s=new Date(e);if(isNaN(s))return String(e);if(!t||t==="mediumDate")return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:s.getFullYear(),MMM:s.toLocaleDateString(void 0,{month:"short"}),MM:String(s.getMonth()+1).padStart(2,"0"),dd:String(s.getDate()).padStart(2,"0"),d:s.getDate(),HH:String(s.getHours()).padStart(2,"0"),mm:String(s.getMinutes()).padStart(2,"0"),ss:String(s.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,o=>i[o])}function kg(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),v=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:u<18?[u,"month"]:[Math.round(p/365.25),"year"],h=v[0]+" "+v[1]+(v[0]===1?"":"s");d=r>0?"in "+h:h+" 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 Ji=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Xi(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 Fu=function(e,t,s){let i=kt(),o=Bt();Wu(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=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.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=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let d=()=>{let E=[];e.query.owner&&E.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&E.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=E};e.showSta Line truncated
`+E.join(`
`)],{type:"text/csv"}),b=document.createElement("a");b.href=URL.createObjectURL(N),b.download=i.username+"-repositories.csv",b.click()},e.showStatusMessage=m=>{let w=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,w)},e.fetchGithubInfo=m=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(S=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(S.data,null,2).replace(/[<>]/g,E=>E==="<"?"&lt;":"&gt;")+"</pre>"),w.document.close())},S=>{let E=S&&S.data?JSON.stringify(S.data,null,2):String(S);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+E+"</pre>")})};function u(m){t.get("/api/admin/users/"+m+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function v(m){t.get("/api/admin/users/"+m,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}v(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),w=>console.error(w))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>u(i.username),w=>console.error(w))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>u(i.username),w=>console.error(w))},e.updateRepository=m=>{let w=ot({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${m.repoId}/refresh`).then(S=>{S.data.status=="ready"?w.title=`${m.repoId} is refreshed.`:w.title=`Refreshing of ${m.repoId}.`},S=>{w.title=`Error during the refresh of ${m.repoId}.`,w.body=S.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{u(i.username)},500)},!0)},zu=function(e,t,s){let i=kt(),o=Bt();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=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let E=document.querySelector('.admin-filter-toolbar input[type="search"]');E&&E.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.dateFrom||e.query.dateTo)&&S.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=S};e.statusCountFor=S=>{let E=(e.statusCounts||[]).find(N=>N._id===S);return E?E.count:0},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.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(p)||{};e.query=Object.assign({},u,v,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let E=Object.assign({},e.query);delete E.page,e.presets=(e.presets||[]).filter(N=>N.name!==S),e.presets.push({name:S,query:E}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(E=>E.name!==S.name),localStorage.setItem(y,JS Line truncated
`)],{type:"text/csv"}),b=document.createElement("a");b.href=URL.createObjectURL(N),b.download=i.username+"-repositories.csv",b.click()},e.showStatusMessage=m=>{let w=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,w)},e.fetchGithubInfo=m=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(S=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(S.data,null,2).replace(/[<>]/g,E=>E==="<"?"&lt;":"&gt;")+"</pre>"),w.document.close())},S=>{let E=S&&S.data?JSON.stringify(S.data,null,2):String(S);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+E+"</pre>")})};function u(m){t.get("/api/admin/users/"+m+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function v(m){t.get("/api/admin/users/"+m,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}v(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),w=>console.error(w))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>u(i.username),w=>console.error(w))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>u(i.username),w=>console.error(w))},e.updateRepository=m=>{let w=ot({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${m.repoId}/refresh`).then(S=>{S.data.status=="ready"?w.title=`${m.repoId} is refreshed.`:w.title=`Refreshing of ${m.repoId}.`},S=>{w.title=`Error during the refresh of ${m.repoId}.`,w.body=S.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{u(i.username)},500)},!0)},zu=function(e,t,s){let i=kt(),o=Bt();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=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let E=document.querySelector('.admin-filter-toolbar input[type="search"]');E&&E.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.dateFrom||e.query.dateTo)&&S.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=S};e.statusCountFor=S=>{let E=(e.statusCounts||[]).find(N=>N._id===S);return E?E.count:0},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.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(p)||{};e.query=Object.assign({},u,v,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let S=window.prompt("Preset name:");if(!S)return;let E=Object.assign({},e.query);delete E.page,e.presets=(e.presets||[]).filter(N=>N.name!==S),e.presets.push({name:S,query:E}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=S=>{Object.assign(e.query,S.query,{page:1})},e.deletePreset=S=>{e.presets=(e.presets||[]).filter(E=>E.name!==S.name),localStorage.setItem(y,JS Line truncated
`).map((Ee,$e)=>$e===0?Ee:me+Ee).join(`
`)}else typeof L=="number"||typeof L=="boolean"?J=String(L):J=JSON.stringify(L);U.push(`${se}${J}${Z}`)}),U.push("}"),U.join(`
`)}function m(T){let V=[],z="",j=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,X=0,O;for(;O=j.exec(T);)z+=T.slice(X,O.index),X=j.lastIndex,V.push({key:O[1],op:O[2]||"=",val:O[3]});return z+=T.slice(X),{filters:V,free:z.trim().toLowerCase()}}function w(T,V){for(let z of V.filters){let j=(O,U,k)=>{let L=parseFloat(O),K=parseFloat(U);return k==="="?String(O)===String(U):k==="!="?String(O)!==String(U):k===">="?L>=K:k==="<="?L<=K:k===">"?L>K:k==="<"?L<K:!0},X;if(z.key==="code")X=T.displayMessage;else if(z.key==="module")X=T.module;else if(z.key==="status")X=T._status;else if(z.key==="url")X=T._url;else if(z.key==="repo")X=T._repoId;else if(z.key==="level")X=T.level;else continue;if(X==null||!j(X,z.val,z.op))return!1}return!(V.free&&((T.displayMessage||"")+" "+(T.module||"")+" "+(T._url||"")+" "+JSON.stringify(T.raw||[])).toLowerCase().indexOf(V.free)===-1)}function S(){let T=m(e.query.search||"");e.parsedFilterCount=T.filters.length;let V=e.query.bucket,z=e.entries.filter(k=>V&&k._bucket!==V?!1:w(k,T)),j=e.query.group;if(j){let k=H=>JSON.stringify(j==="module"?[H.module,H._bucket]:[H.raw?.[0]?.service||"unknown",H.module,H.displayMessage||H.message||"_",H._bucket,H._status]),L=new Map;for(let H of z){let se=k(H);if(L.has(se)){let Z=L.get(se);Z.count++,Z._related.push(H),new Date(H.ts)>new Date(Z.ts)&&(Z.ts=H.ts,Z._url=H._url,Z._status=H._status),new Date(H.ts)<new Date(Z._firstSeen)&&(Z._firstSeen=H.ts)}else{let Z=Object.assign({},H);Z._key=`${j}:${se}`,Z._related=[H],Z._firstSeen=H.ts,Z._lastHourCount=0,Z.count=1,L.set(se,Z)}}let K=Date.now()-3600*1e3;for(let H of L.values())H._lastHourCount=H._related.filter(se=>new Date(se.ts).getTime()>=K).length;z=Array.from(L.values())}else z=z.map((k,L)=>(k._key="row:"+L+":"+k.ts,k._related=[k],k._firstSeen=k.ts,k._lastHourCount=0,k.count=1,k));let X=k=>({error:0,warn:1,info:2})[k._bucket]??1;e.query.sort==="count"?z.sort((k,L)=>X(k)-X(L)||L.count-k.count||new Date(L.ts)-new Date(k.ts)):z.sort((k,L)=>X(k)-X(L)||new Date(L.ts)-new Date(k.ts)),e.visible=z;let O=!!(e.query.bucket||(e.query.search||"").trim()),U=!O&&(e.stats?.severity?.error||0)>0&&!z.some(k=>k._bucket==="error")&&e.entries.length<1500;(O&&!z.length||U)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,E(!0))}function E(T){if(T&&e.redisLoading)return;let V=++o;e.redisLoading=!0;let z=T?e.redisNextOffset||e.entries.length:0,j=T?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:z,limit:j}}).then(X=>{if(d||V!==o)return;e.redisLoading=!1;let O=(X.data.entries||[]).map(h);e.entries=T?e.entries.concat(O):O,e.redisRedacted=(T&&e.redisRedacted||0)+(X.data.redactedEntries||0),e.redisNextOffset=X.data.nextOffset??z+(X.data.entries||[]).length,e.available=!!X.data.available,e.redisCollecting=X.data.redisCollecting!==!1,e.cap=X.data.max||e.cap,e.total=X.data.total||e.entries.length,e._autoLoading=!1,S()},()=>{d||V!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>E(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function N(){let T=++r;t.get("/api/admin/errors/stats").then(V=>{if(d||T!==r)return;let z=V.data||{};e.redisStatsState=z.available===!1?"unavailable":"ready";let j=z.prev24h?Math.round((z.last24h-z.prev24h)/z.prev24h*100):0;e.stats={last24h:z.last24h||0,prev24h:z.prev24h||0,delta:j,severity:z.severity||{error:0,warn:0,info:0},unique:z.unique||{error:0,warn:0,info:0},buckets:z.buckets||[],dropped:z.dropped||0},S()},()=>{!d&&T===r&&(e.redisStatsState="unavailable")})}function b(){E(),N()}e.barPx=(T,V)=>{let z=e.stats.buckets||[],j=0,X=0;for(let L of z)j=Math.max(j,(L.error||0)+(L.warn||0)),X=Math.max(X,L.info||0);let O=T[V]||0;if(!O)return 0;if(V==="info")return X?Math.max(2,Math.round(O/X*(j?16:60))):0;let U=(T.error||0)+(T.warn||0),k=Math.round(U/j*44);return Math.max(4,Math.round(O/U*k))},e.bucketTitle=T=>`${new Date(T.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${T.error||0} err \xB7 ${T.warn||0} warn \xB7 ${T.info||0} info`,e.toggle=T=>{e.expanded[T._key]=!e.expanded[T._key]},e.setBucket=T=>{e.query.bucket=T},e.refreshNow=b,e.clearAll=()=>{confirm("Clear Redis error history? Central logs are unaffected.")&&t.delete("/api/admin/errors").then(b,T=>console.error(T))},e.exportCsv=()=>{let T=["ts","level","module","displayMessage","_status","_url","_repoId"],V=[T.join(",")];for(let O of e.visible)V.push(T.map(U=>{let k=O[U]==null?"":String(O[U]);return/[",\n]/.test(k)?`"${k.replace(/"/g,'""')}"`:k}).join(","));let z=new Blob([V.join(`
`)],{type:"text/csv;charset=utf-8"}),j=URL.createObjectURL(z),X=document.createElement("a");X.href=j,X.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL(j)};function P(T){e.copyHint=`${T} copied`,p.timeout(()=>{e.copyHint=""},1500)}e.copyJson=T=>{navigator.clipboard.writeText(T._detailJson).then(()=>P("JSON"))},e.copyCurl=T=>{if(!T._url)return;let z=`curl -X ${T._method||"GET"} '${window.location.origin}${T._url}'`;navigator.clipboard.writeText(z).then(()=>P("curl"))},b();let M=i(()=>{e.query.autoRefresh&&b()},15e3);e.on("dispose",()=>{d=!0,o++,r++,i.cancel(M)}),e.watch("query.search",S),e.watch("query.bucket",S),e.watch("query.sort",S),e.watch("query.group",S)},Gu=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(b){e.ovView=b;try{window.history.replaceState(null,"",b==="summary"?window.location.pathname:"#"+b)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var b=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:b}}).then(function(P){b===e.cacheMinutes&&(e.cacheReport=P.data,e.cacheError=P.data.available?null:P.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,b!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(b){return e.cacheTraffic==="all"||b.traffic===e.cacheTraffic})},e.cacheRate=function(b,P){var M=e.cacheRows(),T=function(j){return M.filter(function(X){return X.name===j}).reduce(function(X,O){return X+O[P]},0)},V=T(b+"_hit"),z=T(b+"_miss");return V+z?(100*V/(V+z)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(b){return b.replaceAll("_"," ")},e.cacheP95=function(b){var P=0,M=e.cacheReport?.latencyBucketsMs||[];if(!b.count)return"No samples";if(!b.ms)return"Not timed";for(var T=0;T<=M.length;T++)if(P+=b["b"+T]||0,P>=Math.ceil(b.count*.95))return T<M.length?"\u2264 "+qn(M[T]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let b=e.data&&e.data.system||{},P=[["Memory",b.memPercent],["Disk",b.diskPercent]].filter(([,T])=>T>90);return P.length?P.map(([T,V])=>T+" is at "+V+"%").join(" and ")+". New anonymizations may fail until "+(P.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(b){return b==null?"":qn(b)},e.latencyBound=function(b,P){return b.count?b[P]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(b[P]):"No samples"},e.firstByteBound=function(b){return e.latencyBound({count:b.firstByteCount,p95UpperMs:b.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(b){return Math.max(0,Math.round((Date.now()-b.sampledAt)/1e3))},e.peakRss=function(b){return(e.performance.runtimeSeries||[]).filter(function(P){return P.instance===b.instance}).reduce(function(P,M){return Math.max(P,M.rss)},b.memory.rss)},e.performanceWarning=function(b){return e.sampleAge(b)>45||b.droppedBatches||b.droppedMetrics||b.sockets?.closeWait>0||b.eventLoop?.p95Ms>100||b.memoryLimitBytes&&b.memory.rss>b.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(P){b===e.performanceMinutes&&(e.performance=P.data,e.performanceError=P.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){b===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function d(b){if(b==null)return"\u2014";for(var P=["B","KB","MB","GB","TB"],M=0,T=b;T>=1024&&M<P.length-1;)T/=1024,M++;return T.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+P[M]}e.humanBytes=d;function p(b){if(!b)return"\u2014";var P=Math.floor(b/86400),M=Math.floor(b%86400/3600),T=Math.floor(b%3600/60);return P>0?P+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(T<10?"0":"")+T+"m":T+"m"}e.humanDuration=p;function u(b){return b==null?"\u2014":b>=1e6?(b/1e6).toFixed(1)+"M":b>=1e3?(b/1e3).toFixed(1)+"K":String(b)}e.humanNum=u,e.queueTotal=function(b){return b?(b.waiting||0)+(b.active||0)+(b.delayed||0)+(b.failed||0):0},e.statusCount=function(b){if(!e.data||!e.data.repos)return 0;for(var P=e.data.repos.statusBreakdown||[],M=0;M<P.length;M++)if(P[M]._id===b)return P[M].count;return 0},e.barPct=function(b){var P=e.data&&e.data.repos?e.data.repos.total:0;if(!P)return 0;var M=[b];b==="expired"&&M.push("expiring"),b==="removed"& Line truncated
`)},Pa=class{constructor(t){et(this,"gen");et(this,"threads",[]);et(this,"match",!1);et(this,"runs",[]);et(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},dc=(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&&dc(i.state,s.state))),nc=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),cs,Bn,Da,Aa,Uo=class{constructor(t,s,i){qe(this,Bn);et(this,"dots");et(this,"dotStart");qe(this,cs);this.dots=t,this.dotStart=s,Fe(this,cs,i)}state(){return new Pa(++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(Ta.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!Le(this,Bn,Da).call(this,t,s))return;for(let d of s.out)this.add(t,d,i,o);return;case"neg":if(!Le(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;Le(this,Bn,Aa).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:Le(this,Bn,Aa).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&dc(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)},Aa=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 uc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${uc(i.state)})`);return`${t}|${s.sort().join("|")}`},nv=1<<18,Bs,zs,Ln,ps,_n,$n,Fn,sn,Oa,xi,cc,Ia=class{constructor(t,s){qe(this,sn);qe(this,Bs);qe(this,zs,new Map);qe(this,Ln,0);qe(this,ps);qe(this,_n);qe(this,$n);qe(this,Fn);Fe(this,Bs,t),Fe(this,$n,new Uo(!1,!1,s)),Fe(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),Fe(this,_n,Le(this,sn,Oa).call(this,re(this,Fn).done(i)))}if(re(this,ps))return re(this,ps);let s=re(this,$n).state();return re(this,$n).add(s,re(this,Bs),0,!0),Fe(this,ps,Le(this,sn,xi).call(this,re(this,$n).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)?Le(this,sn,xi).call(this,re(this,Fn).step(t.state,s,0,!0)):Le(this,sn,xi).call(this,re(this,$n).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Fe(this,Ln,re(this,Ln)+128)),t.ascii[i]=r):t.next.set(s,r),nl(this,Ln)._++,r}};Bs=new WeakMap,zs=new WeakMap,Ln=new WeakMap,ps=new WeakMap,_n=new WeakMap,$n=new WeakMap,Fn=new WeakMap,sn=new WeakSet,Oa=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},xi=function(t){let s=uc(t),i=re(this,zs).get(s);if(i)return i;re(this,Ln)>nv&&Le(this,sn,cc).call(this);let o=Le(this,sn,Oa).call(this,t);return re(this,zs).set(s,o),Fe(this,Ln,re(this,Ln)+(s.length+1)),o},cc=function(){re(this,zs).clear(),Fe(this,Ln,0),Fe(this,ps,void 0),Fe(this,_n,void 0)};var sv=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},ov=(e,t,s,i)=>{let o=0,r=s,d=-1,p=0;for(;r<i;){let u=e[o];if(u?.t==="star"){d=o++,p=r;continue}let v=t[r];if(u&&(u.t==="any"||u.t==="lit"&&Ma(u,v)||u.t==="class"&&u.re.test(v))){o++,r++;continue}if(d===-1)return!1;o=d+1,r=++p}for(;e[o]?.t==="star";)o++;return o===e.length},pc=e=>{let t=0,s=0;for(let i of e){let[o,r]=iv(i);t+=o,s+=r}return[t,s]},iv=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(pc),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]},sc=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Ma(e[i],t[s+i]))return!1;return!0},rv=/[/\ud800-\udfff]/,av=/[\ud800-\udfff]/,Zi=e=>av.test(e)?[...e]:e,oc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Un,Hs,fs,er,ms,zo,tr,hs,Ho,jo,Go,Tn,vn,js,Gs,Wo,nr,nn,gs,Fo,Bo=class{constructor(t,s={}){qe(this,gs);et(this,"pattern");et(this,"options");qe(this,Un);qe(this,Hs);qe(this,fs);qe(this,er);qe(this,ms);qe(this,zo,!1);qe(this,tr);qe(this,hs);qe(this,Ho,!1);qe(this,jo,0);qe(this,Go,1/0);qe(this,Tn,[]);qe(this,vn,[]);qe(this,js);qe(this,Gs);qe(this,Wo,!1);qe(this,nr);qe(this,nn);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:o}=Ga(s.trim());if(!o)return;let r=[];for(let d=0;d<o.length;d++){if(o[d]==="\\"){d++;continue}Dc.has(o[d])&&!r.includes(o[d])&&r.push(o[d])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function Ic(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:o}=Ga(i.trim());if(!o)return e;let r="";for(let p=0;p<o.length;p++){if(o[p]==="\\"){r+=o.slice(p,p+2),p++;continue}r+=Dc.has(o[p])||o[p]==="."?"\\"+o[p]:o[p]}let d=i.indexOf(o);return s[t]=i.slice(0,d)+r+i.slice(d+o.length),s.join(`
`)}var Kn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t Line truncated
`)}else typeof _=="number"||typeof _=="boolean"?X=String(_):X=JSON.stringify(_);U.push(`${se}${X}${Z}`)}),U.push("}"),U.join(`
`)}function m(T){let V=[],z="",j=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,J=0,O;for(;O=j.exec(T);)z+=T.slice(J,O.index),J=j.lastIndex,V.push({key:O[1],op:O[2]||"=",val:O[3]});return z+=T.slice(J),{filters:V,free:z.trim().toLowerCase()}}function w(T,V){for(let z of V.filters){let j=(O,U,k)=>{let _=parseFloat(O),K=parseFloat(U);return k==="="?String(O)===String(U):k==="!="?String(O)!==String(U):k===">="?_>=K:k==="<="?_<=K:k===">"?_>K:k==="<"?_<K:!0},J;if(z.key==="code")J=T.displayMessage;else if(z.key==="module")J=T.module;else if(z.key==="status")J=T._status;else if(z.key==="url")J=T._url;else if(z.key==="repo")J=T._repoId;else if(z.key==="level")J=T.level;else continue;if(J==null||!j(J,z.val,z.op))return!1}return!(V.free&&((T.displayMessage||"")+" "+(T.module||"")+" "+(T._url||"")+" "+JSON.stringify(T.raw||[])).toLowerCase().indexOf(V.free)===-1)}function S(){let T=m(e.query.search||"");e.parsedFilterCount=T.filters.length;let V=e.query.bucket,z=e.entries.filter(k=>V&&k._bucket!==V?!1:w(k,T)),j=e.query.group;if(j){let k=H=>JSON.stringify(j==="module"?[H.module,H._bucket]:[H.raw?.[0]?.service||"unknown",H.module,H.displayMessage||H.message||"_",H._bucket,H._status]),_=new Map;for(let H of z){let se=k(H);if(_.has(se)){let Z=_.get(se);Z.count++,Z._related.push(H),new Date(H.ts)>new Date(Z.ts)&&(Z.ts=H.ts,Z._url=H._url,Z._status=H._status),new Date(H.ts)<new Date(Z._firstSeen)&&(Z._firstSeen=H.ts)}else{let Z=Object.assign({},H);Z._key=`${j}:${se}`,Z._related=[H],Z._firstSeen=H.ts,Z._lastHourCount=0,Z.count=1,_.set(se,Z)}}let K=Date.now()-3600*1e3;for(let H of _.values())H._lastHourCount=H._related.filter(se=>new Date(se.ts).getTime()>=K).length;z=Array.from(_.values())}else z=z.map((k,_)=>(k._key="row:"+_+":"+k.ts,k._related=[k],k._firstSeen=k.ts,k._lastHourCount=0,k.count=1,k));let J=k=>({error:0,warn:1,info:2})[k._bucket]??1;e.query.sort==="count"?z.sort((k,_)=>J(k)-J(_)||_.count-k.count||new Date(_.ts)-new Date(k.ts)):z.sort((k,_)=>J(k)-J(_)||new Date(_.ts)-new Date(k.ts)),e.visible=z;let O=!!(e.query.bucket||(e.query.search||"").trim()),U=!O&&(e.stats?.severity?.error||0)>0&&!z.some(k=>k._bucket==="error")&&e.entries.length<1500;(O&&!z.length||U)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,E(!0))}function E(T){if(T&&e.redisLoading)return;let V=++o;e.redisLoading=!0;let z=T?e.redisNextOffset||e.entries.length:0,j=T?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:z,limit:j}}).then(J=>{if(d||V!==o)return;e.redisLoading=!1;let O=(J.data.entries||[]).map(h);e.entries=T?e.entries.concat(O):O,e.redisRedacted=(T&&e.redisRedacted||0)+(J.data.redactedEntries||0),e.redisNextOffset=J.data.nextOffset??z+(J.data.entries||[]).length,e.available=!!J.data.available,e.redisCollecting=J.data.redisCollecting!==!1,e.cap=J.data.max||e.cap,e.total=J.data.total||e.entries.length,e._autoLoading=!1,S()},()=>{d||V!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>E(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function N(){let T=++r;t.get("/api/admin/errors/stats").then(V=>{if(d||T!==r)return;let z=V.data||{};e.redisStatsState=z.available===!1?"unavailable":"ready";let j=z.prev24h?Math.round((z.last24h-z.prev24h)/z.prev24h*100):0;e.stats={last24h:z.last24h||0,prev24h:z.prev24h||0,delta:j,severity:z.severity||{error:0,warn:0,info:0},unique:z.unique||{error:0,warn:0,info:0},buckets:z.buckets||[],dropped:z.dropped||0},S()},()=>{!d&&T===r&&(e.redisStatsState="unavailable")})}function b(){E(),N()}e.barPx=(T,V)=>{let z=e.stats.buckets||[],j=0,J=0;for(let _ of z)j=Math.max(j,(_.error||0)+(_.warn||0)),J=Math.max(J,_.info||0);let O=T[V]||0;if(!O)return 0;if(V==="info")return J?Math.max(2,Math.round(O/J*(j?16:60))):0;let U=(T.error||0)+(T.warn||0),k=Math.round(U/j*44);return Math.max(4,Math.round(O/U*k))},e.bucketTitle=T=>`${new Date(T.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${T.error||0} err \xB7 ${T.warn||0} warn \xB7 ${T.info||0} info`,e.toggle=T=>{e.expanded[T._key]=!e.expanded[T._key]},e.setBucket=T=>{e.query.bucket=T},e.refreshNow=b,e.clearAll=()=>{confirm("Clear Redis error history? Central logs are unaffected.")&&t.delete("/api/admin/errors").then(b,T=>console.error(T))},e.exportCsv=()=>{let T=["ts","level","module","displayMessage","_status","_url","_repoId"],V=[T.join(",")];for(let O of e.visible)V.push(T.map(U=>{let k=O[U]==null?"":String(O[U]);return/[",\n]/.test(k)?`"${k.replace(/"/g,'""')}"`:k}).join(","));let z=new Blob([V.join(`
`)],{type:"text/csv;charset=utf-8"}),j=URL.createObjectURL(z),J=document.createElement("a");J.href=j,J.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(J),J.click(),document.body.removeChild(J),URL.revokeObjectURL(j)};function D(T){e.copyHint=`${T} copied`,p.timeout(()=>{e.copyHint=""},1500)}e.copyJson=T=>{navigator.clipboard.writeText(T._rawJson).then(()=>D("JSON"))},e.copyCurl=T=>{if(!T._url)return;let z=`curl -X ${T._method||"GET"} '${window.location.origin}${T._url}'`;navigator.clipboard.writeText(z).then(()=>D("curl"))},b();let M=i(()=>{e.query.autoRefresh&&b()},15e3);e.on("dispose",()=>{d=!0,o++,r++,i.cancel(M)}),e.watch("query.search",S),e.watch("query.bucket",S),e.watch("query.sort",S),e.watch("query.group",S)},Gu=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(b){e.ovView=b;try{window.history.replaceState(null,"",b==="summary"?window.location.pathname:"#"+b)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var b=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:b}}).then(function(D){b===e.cacheMinutes&&(e.cacheReport=D.data,e.cacheError=D.data.available?null:D.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,b!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(b){return e.cacheTraffic==="all"||b.traffic===e.cacheTraffic})},e.cacheRate=function(b,D){var M=e.cacheRows(),T=function(j){return M.filter(function(J){return J.name===j}).reduce(function(J,O){return J+O[D]},0)},V=T(b+"_hit"),z=T(b+"_miss");return V+z?(100*V/(V+z)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(b){return b.replaceAll("_"," ")},e.cacheP95=function(b){var D=0,M=e.cacheReport?.latencyBucketsMs||[];if(!b.count)return"No samples";if(!b.ms)return"Not timed";for(var T=0;T<=M.length;T++)if(D+=b["b"+T]||0,D>=Math.ceil(b.count*.95))return T<M.length?"\u2264 "+qn(M[T]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let b=e.data&&e.data.system||{},D=[["Memory",b.memPercent],["Disk",b.diskPercent]].filter(([,T])=>T>90);return D.length?D.map(([T,V])=>T+" is at "+V+"%").join(" and ")+". New anonymizations may fail until "+(D.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(b){return b==null?"":qn(b)},e.latencyBound=function(b,D){return b.count?b[D]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(b[D]):"No samples"},e.firstByteBound=function(b){return e.latencyBound({count:b.firstByteCount,p95UpperMs:b.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(b){return Math.max(0,Math.round((Date.now()-b.sampledAt)/1e3))},e.peakRss=function(b){return(e.performance.runtimeSeries||[]).filter(function(D){return D.instance===b.instance}).reduce(function(D,M){return Math.max(D,M.rss)},b.memory.rss)},e.performanceWarning=function(b){return e.sampleAge(b)>45||b.droppedBatches||b.droppedMetrics||b.sockets?.closeWait>0||b.eventLoop?.p95Ms>100||b.memoryLimitBytes&&b.memory.rss>b.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(D){b===e.performanceMinutes&&(e.performance=D.data,e.performanceError=D.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){b===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function d(b){if(b==null)return"\u2014";for(var D=["B","KB","MB","GB","TB"],M=0,T=b;T>=1024&&M<D.length-1;)T/=1024,M++;return T.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+D[M]}e.humanBytes=d;function p(b){if(!b)return"\u2014";var D=Math.floor(b/86400),M=Math.floor(b%86400/3600),T=Math.floor(b%3600/60);return D>0?D+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(T<10?"0":"")+T+"m":T+"m"}e.humanDuration=p;function u(b){return b==null?"\u2014":b>=1e6?(b/1e6).toFixed(1)+"M":b>=1e3?(b/1e3).toFixed(1)+"K":String(b)}e.humanNum=u,e.queueTotal=function(b){return b?(b.waiting||0)+(b.active||0)+(b.delayed||0)+(b.failed||0):0},e.statusCount=function(b){if(!e.data||!e.data.repos)return 0;for(var D=e.data.repos.statusBreakdown||[],M=0;M<D.length;M++)if(D[M]._id===b)return D[M].count;return 0},e.barPct=function(b){var D=e.data&&e.data.repos?e.data.repos.total:0;if(!D)return 0;var M=[b];b==="expired"&&M.push("expiring"),b==="removed"&&M. Line truncated
`)},Da=class{constructor(t){et(this,"gen");et(this,"threads",[]);et(this,"match",!1);et(this,"runs",[]);et(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},dc=(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&&dc(i.state,s.state))),nc=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),cs,Bn,Pa,Aa,Uo=class{constructor(t,s,i){qe(this,Bn);et(this,"dots");et(this,"dotStart");qe(this,cs);this.dots=t,this.dotStart=s,Fe(this,cs,i)}state(){return new Da(++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(Ta.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!Le(this,Bn,Pa).call(this,t,s))return;for(let d of s.out)this.add(t,d,i,o);return;case"neg":if(!Le(this,Bn,Pa).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;Le(this,Bn,Aa).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:Le(this,Bn,Aa).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&dc(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,Pa=function(t,s){let{seen:i}=re(this,cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Aa=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 uc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${uc(i.state)})`);return`${t}|${s.sort().join("|")}`},nv=1<<18,Bs,zs,Ln,ps,_n,$n,Fn,sn,Oa,xi,cc,Ia=class{constructor(t,s){qe(this,sn);qe(this,Bs);qe(this,zs,new Map);qe(this,Ln,0);qe(this,ps);qe(this,_n);qe(this,$n);qe(this,Fn);Fe(this,Bs,t),Fe(this,$n,new Uo(!1,!1,s)),Fe(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),Fe(this,_n,Le(this,sn,Oa).call(this,re(this,Fn).done(i)))}if(re(this,ps))return re(this,ps);let s=re(this,$n).state();return re(this,$n).add(s,re(this,Bs),0,!0),Fe(this,ps,Le(this,sn,xi).call(this,re(this,$n).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)?Le(this,sn,xi).call(this,re(this,Fn).step(t.state,s,0,!0)):Le(this,sn,xi).call(this,re(this,$n).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Fe(this,Ln,re(this,Ln)+128)),t.ascii[i]=r):t.next.set(s,r),nl(this,Ln)._++,r}};Bs=new WeakMap,zs=new WeakMap,Ln=new WeakMap,ps=new WeakMap,_n=new WeakMap,$n=new WeakMap,Fn=new WeakMap,sn=new WeakSet,Oa=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},xi=function(t){let s=uc(t),i=re(this,zs).get(s);if(i)return i;re(this,Ln)>nv&&Le(this,sn,cc).call(this);let o=Le(this,sn,Oa).call(this,t);return re(this,zs).set(s,o),Fe(this,Ln,re(this,Ln)+(s.length+1)),o},cc=function(){re(this,zs).clear(),Fe(this,Ln,0),Fe(this,ps,void 0),Fe(this,_n,void 0)};var sv=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},ov=(e,t,s,i)=>{let o=0,r=s,d=-1,p=0;for(;r<i;){let u=e[o];if(u?.t==="star"){d=o++,p=r;continue}let v=t[r];if(u&&(u.t==="any"||u.t==="lit"&&Ma(u,v)||u.t==="class"&&u.re.test(v))){o++,r++;continue}if(d===-1)return!1;o=d+1,r=++p}for(;e[o]?.t==="star";)o++;return o===e.length},pc=e=>{let t=0,s=0;for(let i of e){let[o,r]=iv(i);t+=o,s+=r}return[t,s]},iv=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(pc),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]},sc=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Ma(e[i],t[s+i]))return!1;return!0},rv=/[/\ud800-\udfff]/,av=/[\ud800-\udfff]/,Zi=e=>av.test(e)?[...e]:e,oc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Un,Hs,fs,er,ms,zo,tr,hs,Ho,jo,Go,Tn,vn,js,Gs,Wo,nr,nn,gs,Fo,Bo=class{constructor(t,s={}){qe(this,gs);et(this,"pattern");et(this,"options");qe(this,Un);qe(this,Hs);qe(this,fs);qe(this,er);qe(this,ms);qe(this,zo,!1);qe(this,tr);qe(this,hs);qe(this,Ho,!1);qe(this,jo,0);qe(this,Go,1/0);qe(this,Tn,[]);qe(this,vn,[]);qe(this,js);qe(this,Gs);qe(this,Wo,!1);qe(this,nr);qe(this,nn);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:o}=Ga(s.trim());if(!o)return;let r=[];for(let d=0;d<o.length;d++){if(o[d]==="\\"){d++;continue}Pc.has(o[d])&&!r.includes(o[d])&&r.push(o[d])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function Ic(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:o}=Ga(i.trim());if(!o)return e;let r="";for(let p=0;p<o.length;p++){if(o[p]==="\\"){r+=o.slice(p,p+2),p++;continue}r+=Pc.has(o[p])||o[p]==="."?"\\"+o[p]:o[p]}let d=i.indexOf(o);return s[t]=i.slice(0,d)+r+i.slice(d+o.length),s.join(`
`)}var Kn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t Line truncated
`)),e.options=Object.assign({},e.options,y.options),p.restore()})}u();let v=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let y=p.checkpoint(),m={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",m).then(()=>{p.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",v&&i.cancel(v),v=i(()=>{e.message=null},2500)},w=>{e.saving=!1;let S=w&&w.data&&w.data.error,E="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+S),s("ERRORS.unknown_error")]).then(([N,b])=>{e.error=S&&N!==b?N:E},()=>{e.error=E})})},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)})}},Fc=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 v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(v===void 0)return;p.preventDefault();let h=e.features.length,y=v==="first"?0:v==="last"?h-1:(u+v+h)%h;e.feature=e.features[y].key,o(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.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 p=(e.demoTerms||"").split(/[,\n]/).map(m=>m.trim()).filter(Boolean).sort((m,w)=>w.length-m.length),u=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let v=new RegExp("("+p.map(u).join("|")+")","gi"),h={},y=0;return(e.demoText||"").split(v).filter(m=>m!=="").map(m=>{let w=p.find(S=>S.toLowerCase()===m.toLowerCase());return w?(h[w.toLowerCase()]||(h[w.toLowerCase()]=++y),{text:String(h[w.toLowerCase()]),redacted:!0,original:m}):{text:m}})},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 v=new Array(p.length-1);for(let E=1;E<p.length;E++)v[E-1]=p[E]-p[E-1];let h=v.length,y=Math.max.apply(null,v),m=Math.min.apply(null,v),w=Math.min(0,m),S=y-w||1;u.viewW=h*2,u.bars=new Array(h);for(let E=0;E<h;E++){let N=(v[E]-w)/S,b=Math.max(1.5,N*34);u.bars[E]={x:(E*2+.25).toFixed(2),y:(36-b).toFixed(2),w:"1.5",h:b.toFixed(2)}}if(u.deltaToday=v[h-1],h>=2){let E=v[h-2];E&&(u.pctChange=(u.deltaToday-E)/E*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(v=>v.nbRepositories||0)),users:d(u.map(v=>v.nbUsers||0)),pageViews:d(u.map(v=>v.nbPageViews||0)),pullRequests:d(u.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Uc=function(e,t,s,i,o,r){let d=kt();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,Xe(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Bt()(document,"click",k=>{e.quotaExpanded&&!k.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=k=>k.status==="error"||k._broken||u(k.status)==="progress"&&k._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=k=>{e.projectView=k,k==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=k=>{let L=va(k?.anonymizeDate||k?.lastView)||"";return/ ago$/.test(L)?"No activity for "+L.replace(/ ago$/,""):"No activity since "+L.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=k=>"project-details-"+encodeURIComponent(k._type+":"+(k._id||k._source||"unknown")),e.showProjectDetails=async k=>{e.selectedProject=k,e.projectName=k.projectName||"",e.nameError="",e.nameMessage="",await Xe();let L=document.getElementById(e.projectDetailsId(k));L?.focus(),L?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=k=>{e.selectedProject=null,Xe(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(k._type+":"+k._id)}"]`)?.focus())},e.saveProjectName=async k=>{if(e.nameSaving||!k._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 K=await t.post("/api/user/project-name",{type:k._type,id:k._id,name:L});k.projectName=K.data.name,k._label=k.projectName||k._fallbackLabel,e.selectedProject===k&&(e.nameMessage=L?"Project name saved.":"Default project name restored."),P||(e.dashboardCursor=null,await T(),e.selectedProject===k&&(e.selectedProject=e.items.find(H=>H._type===k._type&&H._id===k._id)||null))}catch{e.selectedProject===k&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async k=>{if(!k._viewUrl||e.copyingId)return;let L=new URL(k._viewUrl,o.location.origin).href;e.copyingId=k._type+":"+k._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 Line truncated
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):j(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function J(C,q,B){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(q,B)}function me(C){try{let q=parseGithubUrl(C);if(q&&q.owner&&q.repo)return q.owner+"/"+q.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"||me(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let C=m();try{let q=await t.get("/github/connections");if(e.githubConnections=q.data,!q.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":q.data.csrf}});if(!y(C))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{y(C)&&(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(C)}},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 Ze()}catch{}}};function Ee(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:me(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function $e(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Be(){let C=new URLSearchParams(window.location.search).get("billingDraft");if(C){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(C))).data;if(B.path!==o.path())throw new Error("Wrong task");b=B.values.conference||null;for(let W of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,W)&&(e[W]=B.values[W]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),P=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await $e(),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 q;try{q=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!q||q.path!==o.path()||Date.now()-q.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await $e(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(q.draft,B)&&(e[B]=q.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await $e(),sessionStorage.removeItem("github-access-draft"),!0}Z(()=>{!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 C=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(C.data.status),e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.fullName,e._originalFullName=C.data.source.fullName,e.terms=C.data.options.terms.filter(q=>q).join(`
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(m=>m.trim()).filter(Boolean).sort((m,w)=>w.length-m.length),u=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let v=new RegExp("("+p.map(u).join("|")+")","gi"),h={},y=0;return(e.demoText||"").split(v).filter(m=>m!=="").map(m=>{let w=p.find(S=>S.toLowerCase()===m.toLowerCase());return w?(h[w.toLowerCase()]||(h[w.toLowerCase()]=++y),{text:String(h[w.toLowerCase()]),redacted:!0,original:m}):{text:m}})},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 v=new Array(p.length-1);for(let E=1;E<p.length;E++)v[E-1]=p[E]-p[E-1];let h=v.length,y=Math.max.apply(null,v),m=Math.min.apply(null,v),w=Math.min(0,m),S=y-w||1;u.viewW=h*2,u.bars=new Array(h);for(let E=0;E<h;E++){let N=(v[E]-w)/S,b=Math.max(1.5,N*34);u.bars[E]={x:(E*2+.25).toFixed(2),y:(36-b).toFixed(2),w:"1.5",h:b.toFixed(2)}}if(u.deltaToday=v[h-1],h>=2){let E=v[h-2];E&&(u.pctChange=(u.deltaToday-E)/E*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(v=>v.nbRepositories||0)),users:d(u.map(v=>v.nbUsers||0)),pageViews:d(u.map(v=>v.nbPageViews||0)),pullRequests:d(u.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Uc=function(e,t,s,i,o,r){let d=kt();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,Je(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Bt()(document,"click",k=>{e.quotaExpanded&&!k.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=k=>k.status==="error"||k._broken||u(k.status)==="progress"&&k._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=k=>{e.projectView=k,k==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=k=>{let _=va(k?.anonymizeDate||k?.lastView)||"";return/ ago$/.test(_)?"No activity for "+_.replace(/ ago$/,""):"No activity since "+_.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=k=>"project-details-"+encodeURIComponent(k._type+":"+(k._id||k._source||"unknown")),e.showProjectDetails=async k=>{e.selectedProject=k,e.projectName=k.projectName||"",e.nameError="",e.nameMessage="",await Je();let _=document.getElementById(e.projectDetailsId(k));_?.focus(),_?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=k=>{e.selectedProject=null,Je(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(k._type+":"+k._id)}"]`)?.focus())},e.saveProjectName=async k=>{if(e.nameSaving||!k._id)return;let _=e.projectName.trim();if(_.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let K=await t.post("/api/user/project-name",{type:k._type,id:k._id,name:_});k.projectName=K.data.name,k._label=k.projectName||k._fallbackLabel,e.selectedProject===k&&(e.nameMessage=_?"Project name saved.":"Default project name restored."),D||(e.dashboardCursor=null,await T(),e.selectedProject===k&&(e.selectedProject=e.items.find(H=>H._type===k._type&&H._id===k._id)||null))}catch{e.selectedProject===k&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async k=>{if(!k._viewUrl||e.copyingId)return;let _=new URL(k._viewUrl,o.location.origin).href;e.copyingId=k._type+":"+k._id;try{await Wa(_),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:_})}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 Line truncated
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):j(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function X(C,q,B){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(q,B)}function me(C){try{let q=parseGithubUrl(C);if(q&&q.owner&&q.repo)return q.owner+"/"+q.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"||me(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let C=m();try{let q=await t.get("/github/connections");if(e.githubConnections=q.data,!q.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":q.data.csrf}});if(!y(C))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{y(C)&&(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(C)}},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 Ze()}catch{}}};function Ee(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:me(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function $e(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Be(){let C=new URLSearchParams(window.location.search).get("billingDraft");if(C){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(C))).data;if(B.path!==o.path())throw new Error("Wrong task");b=B.values.conference||null;for(let W of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,W)&&(e[W]=B.values[W]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),D=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await $e(),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 q;try{q=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!q||q.path!==o.path()||Date.now()-q.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await $e(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(q.draft,B)&&(e[B]=q.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await $e(),sessionStorage.removeItem("github-access-draft"),!0}Z(()=>{!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 C=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(C.data.status),e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.fullName,e._originalFullName=C.data.source.fullName,e.terms=C.data.options.terms.filter(q=>q).join(`
`),e.source=C.data.source,e.role=C.data.role||"owner",e._existingNever=C.data.options.expirationMode==="never",e._savedExpirationDate=C.data.options.expirationDate?new Date(C.data.options.expirationDate):null,e.coauthors=C.data.coauthors||[],e._originalBranch=C.data.source.branch,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,e.repositoryID=C.data.source.repositoryID,e._originalRepositoryID=C.data.source.repositoryID,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),S=E(parseGithubUrl(e.sourceUrl)),!await Be()&&(await Promise.all([Ze(),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 C=>{if(e.githubConnection=C.data.connection||"oauth",e.sourceUrl="https://github.com/"+C.data.source.repositoryFullName+"/pull/"+C.data.source.pullRequestId,e.terms=C.data.options.terms.filter(q=>q).join(`
`),e.source=C.data.source,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),S=E(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 C=>{e.sourceUrl="https://gist.github.com/"+C.data.source.gistId,e.terms=C.data.options.terms.filter(q=>q).join(`
`),e.source=C.data.source,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),S=E(parseGithubUrl(e.sourceUrl)),!await Be()&&await Za()},()=>{o.url("/404")}))}),t.get("/github/connections").then(C=>{e.githubConnections=C.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&C.data.appEnabled&&C.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&$e())}).catch(()=>{}),e.urlSelected=async(C=!1)=>{let q=++u;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Yt.cancel(),An.cancel(),In.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",J("sourceUrl","github",!1);return}let W=E(B),ue=C||S===W;S=W,e.sourceUrlError="",J("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:""}),Yt.cancel(),An.cancel(),In.cancel(),ks.clear(),Cs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",dt(),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([Ze(),He()]),ws())}catch{}finally{q===u&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let C=e.branches.filter(B=>B.name==e.source.branch)[0];if(!C)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=C.commit),e.readme=C.readme,await He(),ws()}),e.getBranches=async C=>{let q=parseGithubUrl(e.sourceUrl),B=m();try{let W=await t.get(`/api/repo/${q.owner}/${q.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0||e.reconnectingSource?"1":"0",repositoryID:Ee()}});if(!y(B))return;e.branches=W.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&&!C&&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(C))}catch(W){if(!y(B))return;e.branches=[],e.sourceUnreachable=W&&(W.status===404||W.data&&W.data.error==="repo_not_found");let ue=W&&W.data&&W.data.error||(W&&W.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 J=="function"&&J("sourceUrl","missing",!1)}finally{w(B)}};async function Ze(){let C=parseGithubUrl(e.sourceUrl),q=m();try{Es();let B=await t.get(`/api/repo/${C.owner}/${C.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ee(),force:"1"}});if(!y(q))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(!y(q))return;throw B.data&&(r("ERRORS."+B.data.error).then(W=>{e.addToast({title:"Error",date:new Date,body:W}),e.error=W},console.error),Ss(B.data.error)),J("sourceUrl","missing",!1),B}finally{w(q)}}async function He(C){if(e.readme&&!C)return e.readme;let q=parseGithubUrl(e.sourceUrl),B=m();try{let W=await t.get(`/api/repo/${q.owner}/${q.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0?"1":"0",branch:e.source.branch,repositoryID:Ee()}});y(B,!0)&&(e.readme=W.data)}catch{y(B,!0)&&(e.readme="")}finally{w(B)}}let tt={magicalBraces:!0},Re=C=>C.startsWith("/")&&!C.endsWith("/")&&zn(vs(C.slice(1),tt),tt)===C.slice(1),Ue=()=>Object.keys(e.preserve.picked).filter(C=>e.preserve.pick Line truncated
`),e.source=C.data.source,e.options=Object.assign({},e.options,C.data.options),e.conference=C.data.conference,e._originalConference=C.data.conference,C.data.options.expirationDate&&(e.options.expirationDate=new Date(C.data.options.expirationDate)),S=E(parseGithubUrl(e.sourceUrl)),!await Be()&&await Za()},()=>{o.url("/404")}))}),t.get("/github/connections").then(C=>{e.githubConnections=C.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&C.data.appEnabled&&C.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&$e())}).catch(()=>{}),e.urlSelected=async(C=!1)=>{let q=++u;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Yt.cancel(),An.cancel(),In.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",X("sourceUrl","github",!1);return}let W=E(B),ue=C||S===W;S=W,e.sourceUrlError="",X("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:""}),Yt.cancel(),An.cancel(),In.cancel(),ks.clear(),Cs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",dt(),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",_(),await Promise.all([Ze(),He()]),ws())}catch{}finally{q===u&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let C=e.branches.filter(B=>B.name==e.source.branch)[0];if(!C)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=C.commit),e.readme=C.readme,await He(),ws()}),e.getBranches=async C=>{let q=parseGithubUrl(e.sourceUrl),B=m();try{let W=await t.get(`/api/repo/${q.owner}/${q.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0||e.reconnectingSource?"1":"0",repositoryID:Ee()}});if(!y(B))return;e.branches=W.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&&!C&&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(C))}catch(W){if(!y(B))return;e.branches=[],e.sourceUnreachable=W&&(W.status===404||W.data&&W.data.error==="repo_not_found");let ue=W&&W.data&&W.data.error||(W&&W.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 X=="function"&&X("sourceUrl","missing",!1)}finally{w(B)}};async function Ze(){let C=parseGithubUrl(e.sourceUrl),q=m();try{Es();let B=await t.get(`/api/repo/${C.owner}/${C.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ee(),force:"1"}});if(!y(q))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(!y(q))return;throw B.data&&(r("ERRORS."+B.data.error).then(W=>{e.addToast({title:"Error",date:new Date,body:W}),e.error=W},console.error),Ss(B.data.error)),X("sourceUrl","missing",!1),B}finally{w(q)}}async function He(C){if(e.readme&&!C)return e.readme;let q=parseGithubUrl(e.sourceUrl),B=m();try{let W=await t.get(`/api/repo/${q.owner}/${q.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0?"1":"0",branch:e.source.branch,repositoryID:Ee()}});y(B,!0)&&(e.readme=W.data)}catch{y(B,!0)&&(e.readme="")}finally{w(B)}}let tt={magicalBraces:!0},Re=C=>C.startsWith("/")&&!C.endsWith("/")&&zn(vs(C.slice(1),tt),tt)===C.slice(1),Ue=()=>Object.keys(e.preserve.picked).filter(C=>e.preserve.pick Line truncated
`).map(C=>C.trim()).filter(Boolean),ce=null,ve=null,Me=new Set,A=0,I=null,F=()=>!1;function x(){let C=A+"\0"+e.preserve.patterns;if(C!==I){I=C;try{F=ja(Ha([...Ue(),...de()]))}catch{F=()=>!1}}return F}function G(C){let q=new Map([["",{dirs:[],files:[]}]]);for(let B of C){let W=B.split("/"),ue="";for(let ye=0;ye<W.length-1;ye++){let Ke=W.slice(0,ye+1).join("/");q.has(Ke)||(q.set(Ke,{dirs:[],files:[]}),q.get(ue).dirs.push(Ke)),ue=Ke}q.get(ue).files.push(B)}for(let B of q.values())B.dirs.sort();return{files:C,dirs:q,descendants:new Map}}function te(C){return ce.descendants.has(C)||ce.descendants.set(C,ce.files.filter(q=>q.startsWith(C+"/"))),ce.descendants.get(C)}let le=C=>x()(C);function oe(C){let q=te(C),B=0;for(let W of q)le(W)&&B++;return B===0?"none":B===q.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let C=(e.options?.preserveFiles||[]).map(q=>String(q).trim()).filter(Boolean).map(q=>Re(q)?vs(q.slice(1),tt):q);return C.length?C.slice(0,2).join(", ")+(C.length>2?` and ${C.length-2} more`:""):"None. Every file is redacted."};async function ie(){let C=e.source?.commit;if(!(ce&&e.preserve.commit===C)){e.preserve.loading=!0,e.preserve.error="",ce=null,ve=null;try{let q=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${q.owner}/${q.repo}/tree`,{params:{commit:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()}});if(e.source?.commit!==C)return;let W=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];ce=un(G(B.data.files||[])),ve=W.length?un(G([...B.data.files||[],...W])):ce,Me=un(new Set(W)),e.preserve.commit=C,e.preserve.truncated=!!B.data.truncated,e.previewFile||Yt()}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",C=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&C&&e.sourceUrl&&ie().catch(()=>{})}),e.openPreserveFiles=()=>{let C={},q=[];for(let W of e.options?.preserveFiles||[]){let ue=String(W).trim();ue&&(!q.length&&Re(ue)?C[vs(ue.slice(1),tt)]=!0:q.push(ue))}let B={};for(let W of Object.keys(C)){let ue=W.split("/");for(let ye=1;ye<ue.length;ye++)B[ue.slice(0,ye).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:C,expanded:B,patterns:q.join(`
`),patternsOpen:q.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),A++,d(()=>{let W=document.getElementById("preserve-files-dialog");W?.showModal&&!W.open&&W.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ie()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ha([...Ue(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ce)return[];let C=x(),q=(ye,Ke,Lt)=>{let bt=!!e.preserve.picked[ye],Xn=C(ye);return{kind:"file",path:ye,label:Lt,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=>q(ye,0,ye));let W=[],ue=(ye,Ke)=>{let Lt=ce.dirs.get(ye);for(let bt of Lt.dirs){let Xn=!!e.preserve.expanded[bt],xa=de().includes(Y(bt));W.push({kind:"dir",path:bt,label:bt.slice(ye?ye.length+1:0)+"/",depth:Ke,open:Xn,state:oe(bt),locked:!1,note:xa?"whole folder":""}),Xn&&ue(bt,Ke+1)}for(let bt of Lt.files)W.push(q(bt,Ke,bt.slice(ye?ye.length+1:0)))};return ue("",0),W},e.preserveCount=()=>ce?ce.files.filter(le).length:0,e.togglePreserveDir=C=>{e.preserve.expanded[C]=!e.preserve.expanded[C]},e.togglePreserveFile=C=>{e.preserve.picked[C]=!e.preserve.picked[C],A++},e.togglePreserveFolder=C=>{let q=Y(C),B=fe(C),W=de().filter(ye=>ye!==q&&ye!==B),ue=oe(C)==="all"||de().includes(q);for(let ye of te(C))e.preserve.picked[ye]=!1;A++,e.preserve.patterns=(ue?W:[...W,q]).join(`
`),patternsOpen:q.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),A++,d(()=>{let W=document.getElementById("preserve-files-dialog");W?.showModal&&!W.open&&W.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ie()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ha([...Ue(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ce)return[];let C=x(),q=(ye,Ke,Lt)=>{let bt=!!e.preserve.picked[ye],Jn=C(ye);return{kind:"file",path:ye,label:Lt,depth:Ke,state:Jn?"all":"none",locked:!bt&&Jn,note:!bt&&Jn?"matched by a pattern":bt&&!Jn?"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=>q(ye,0,ye));let W=[],ue=(ye,Ke)=>{let Lt=ce.dirs.get(ye);for(let bt of Lt.dirs){let Jn=!!e.preserve.expanded[bt],xa=de().includes(Y(bt));W.push({kind:"dir",path:bt,label:bt.slice(ye?ye.length+1:0)+"/",depth:Ke,open:Jn,state:oe(bt),locked:!1,note:xa?"whole folder":""}),Jn&&ue(bt,Ke+1)}for(let bt of Lt.files)W.push(q(bt,Ke,bt.slice(ye?ye.length+1:0)))};return ue("",0),W},e.preserveCount=()=>ce?ce.files.filter(le).length:0,e.togglePreserveDir=C=>{e.preserve.expanded[C]=!e.preserve.expanded[C]},e.togglePreserveFile=C=>{e.preserve.picked[C]=!e.preserve.picked[C],A++},e.togglePreserveFolder=C=>{let q=Y(C),B=fe(C),W=de().filter(ye=>ye!==q&&ye!==B),ue=oe(C)==="all"||de().includes(q);for(let ye of te(C))e.preserve.picked[ye]=!1;A++,e.preserve.patterns=(ue?W:[...W,q]).join(`
`),ue&&te(C).some(le)&&(e.preserve.patterns=[...W,B].join(`
`))};let ne=/^readme(\.[^/]*)?$/i,ke=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],pe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Se=C=>{let q=H(C),B=q.indexOf("."),W=ke.indexOf(B===-1?"":q.slice(B).toLowerCase());return W===-1?ke.length:W},Te=()=>!!ce&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!Te())return"";for(let C of[".github","","docs"]){let q=(ce.dirs.get(C)?.files||[]).filter(B=>ne.test(H(B)));if(q.length)return q.sort((B,W)=>Se(B)-Se(W)||K(B,W))[0]}return""},e.readmeName=()=>H(e.readmePath())||"README.md";let Ve={key:null,fn:()=>!1},Ge=()=>{let C=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),q=C.join(`
`);if(q!==Ve.key){let B=()=>!1;try{C.length&&(B=ja(C))}catch{}Ve={key:q,fn:B}}return Ve.fn};e.pathPreserved=C=>!!C&&Ge()(C),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let C=Ge();if(Te()){let q=e.readmePath();return!!q&&C(q)}return pe.some(q=>C(q))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function ze(){let C={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&&(C.branchName=e.source.branch);try{let q=parseGithubUrl(e.sourceUrl);C.repoName=`${q.owner}/${q.repo}`}catch{}return C}function we(C,q,B){let W=null,ue=0,ye=()=>{if(e.detectedType!==C)return;W&&d.cancel(W);let Ke=++ue;e.previewStatus="loading",W=d(()=>{W=null;let Lt=q();if(!Lt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Lt).then(bt=>{Ke===ue&&(B(bt.data,Lt),e.previewStatus="ready")}).catch(()=>{Ke===ue&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ue++,W&&d.cancel(W),W=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof lt!="string"?ft(e.previewFile):Yt()),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()};let be=un(qo(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),ha(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=C=>C===be.filePath&&typeof lt=="string"?new Blob([lt]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let it=C=>Me.has(C)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(C),at=(C="")=>({path:C,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=at();let yt=0,lt=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=C=>{if(C=C||"",C&&C===e.readmePath()&&(C=""),yt++,lt=null,Yn(),Yt.cancel(),e.previewFile=C,e.previewDoc=at(C),be.sidebarCollapsed=!0,be.content=null,!C){e.readme?Yt():e.previewStatus="idle";return}if(it(C)){cr("binary"),e.previewStatus="ready";return}ft(C)};function dt(){yt++,lt=null,e.previewFile="",e.previewDoc=at(),be.sidebarCollapsed=!0,be.content=null}function ft(C){let q=++yt;lt=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:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()},transformResponse:W=>W}).then(W=>{if(q!==yt)return;e.previewDoc.loading=!1;let ue=typeof W.headers=="function"&&W.headers("content-type")||"";if(/json/i.test(ue)){let ye=null;try{ye=JSON.parse(W.data)}catch{}if(ye&&ye.binary===!0){cr("binary"),e.previewStatus="ready";return}}lt=typeof W.data=="string"?W.data:"",Yt()},W=>{if(q!==yt)return;e.previewDoc.loading=!1;let ue=ar(W);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 qt;function Yn(){qt&&window.URL.revokeObjectURL(qt),qt=void 0,be.url=void 0}e.on("dispose",Yn);function cr(C){Yn(),e.previewDoc.note=C,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=C==="too_big"?"error":"binary",be.content=C==="too_big"?"file_too_big":"binary"}function ef(C){try{let q=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",W=C&&C.includes("/")?C.slice(0,C.lastIndexOf("/")+1):"";return`https://github.com/${q.owner}/${q.repo}/raw/${B}/${W}`}catch{return""}}let Ja=we("repo",()=>e.previewFile?typeof lt!="string"?null:{content:lt,options:ze()}:e.readme?{content:e.readme,options:ze()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");Yn(),window.URL?.createObjectURL&&(be.url=qt=window.URL.createObjectURL(new Blob([C.content],{type:"text/plain"})));let q=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(q)),be.fileBaseUrl=ef(q),be.renderFileContent(C.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=C.content)}),Yt=()=>{e.previewFile&&typeof lt!="string"||Ja()};Yt.cancel=Ja.cancel;let bs=ot(new Map),pr=new Set,fr=new Set,Zs="",xs=null,xo=()=>String(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&&(C.branchName=e.source.branch);try{let q=parseGithubUrl(e.sourceUrl);C.repoName=`${q.owner}/${q.repo}`}catch{}return C}function we(C,q,B){let W=null,ue=0,ye=()=>{if(e.detectedType!==C)return;W&&d.cancel(W);let Ke=++ue;e.previewStatus="loading",W=d(()=>{W=null;let Lt=q();if(!Lt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Lt).then(bt=>{Ke===ue&&(B(bt.data,Lt),e.previewStatus="ready")}).catch(()=>{Ke===ue&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ue++,W&&d.cancel(W),W=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof lt!="string"?ft(e.previewFile):Yt()),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()};let be=un(qo(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),ha(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=C=>C===be.filePath&&typeof lt=="string"?new Blob([lt]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let it=C=>Me.has(C)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(C),at=(C="")=>({path:C,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=at();let yt=0,lt=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=C=>{if(C=C||"",C&&C===e.readmePath()&&(C=""),yt++,lt=null,Yn(),Yt.cancel(),e.previewFile=C,e.previewDoc=at(C),be.sidebarCollapsed=!0,be.content=null,!C){e.readme?Yt():e.previewStatus="idle";return}if(it(C)){cr("binary"),e.previewStatus="ready";return}ft(C)};function dt(){yt++,lt=null,e.previewFile="",e.previewDoc=at(),be.sidebarCollapsed=!0,be.content=null}function ft(C){let q=++yt;lt=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:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&me(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()},transformResponse:W=>W}).then(W=>{if(q!==yt)return;e.previewDoc.loading=!1;let ue=typeof W.headers=="function"&&W.headers("content-type")||"";if(/json/i.test(ue)){let ye=null;try{ye=JSON.parse(W.data)}catch{}if(ye&&ye.binary===!0){cr("binary"),e.previewStatus="ready";return}}lt=typeof W.data=="string"?W.data:"",Yt()},W=>{if(q!==yt)return;e.previewDoc.loading=!1;let ue=ar(W);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 qt;function Yn(){qt&&window.URL.revokeObjectURL(qt),qt=void 0,be.url=void 0}e.on("dispose",Yn);function cr(C){Yn(),e.previewDoc.note=C,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=C==="too_big"?"error":"binary",be.content=C==="too_big"?"file_too_big":"binary"}function ef(C){try{let q=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",W=C&&C.includes("/")?C.slice(0,C.lastIndexOf("/")+1):"";return`https://github.com/${q.owner}/${q.repo}/raw/${B}/${W}`}catch{return""}}let Xa=we("repo",()=>e.previewFile?typeof lt!="string"?null:{content:lt,options:ze()}:e.readme?{content:e.readme,options:ze()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");Yn(),window.URL?.createObjectURL&&(be.url=qt=window.URL.createObjectURL(new Blob([C.content],{type:"text/plain"})));let q=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(q)),be.fileBaseUrl=ef(q),be.renderFileContent(C.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=C.content)}),Yt=()=>{e.previewFile&&typeof lt!="string"||Xa()};Yt.cancel=Xa.cancel;let bs=ot(new Map),pr=new Set,fr=new Set,Zs="",xs=null,xo=()=>String(e.terms||"").split(`
`).filter(C=>C.trim());function tf(){xs=null;let C=xo(),q=C.join(`
`);q!==Zs&&(bs.clear(),fr.clear(),Zs=q);let B=[...pr].filter(W=>!bs.has(W));if(pr.clear(),!(!B.length||!C.length))for(let W=0;W<B.length;W+=400){let ue=B.slice(W,W+400);t.post("/api/anonymize-preview",{contents:ue,options:{terms:C,image:!0,link:!0}}).then(ye=>{if(Zs!==q||xo().join(`
`)!==q)return;let Ke=ye.data?.contents;if(!Array.isArray(Ke)||Ke.length!==ue.length)throw Error("Invalid preview response");ue.forEach((Lt,bt)=>bs.set(Lt,typeof Ke[bt]=="string"?Ke[bt]:Lt))}).catch(()=>{Zs===q&&ue.forEach(ye=>fr.add(ye))})}}e.previewName=C=>{if(!C||!xo().length)return C;if(Zs===xo().join(`
`)){if(bs.has(C))return bs.get(C);if(fr.has(C))return C}return pr.add(C),xs||(xs=d(tf,120)),C},e.previewPathName=C=>{C=String(C||"");let q=C.lastIndexOf("/");return q<0?e.previewName(C):e.previewName(C.slice(0,q))+"/"+e.previewName(C.slice(q+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([...ve?.dirs.keys()||[]].map(C=>[e.previewName(C),!0]))},!0),e.on("dispose",()=>{xs&&d.cancel(xs)});function ws(){!e.anonymize||!e.anonymize.terms||Yt()}async function Qa(){let C=parseGithubUrl(e.sourceUrl),q=m();try{Es();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(q))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!y(q))return;throw B.data&&(r("ERRORS."+B.data.error).then(W=>{e.addToast({title:"Error",date:new Date,body:W}),e.error=W},console.error),Ss(B.data.error)),J("sourceUrl","missing",!1),B}finally{w(q)}}let ks=ot(new Map);function nf(){let C=new Set,q=e.details&&e.details.pullRequest;if(!q)return C;typeof q.title=="string"&&C.add(q.title),typeof q.body=="string"&&C.add(q.body),typeof q.diff=="string"&&C.add(q.diff);let B=q.comments||[];for(let W of B)typeof W.author=="string"&&C.add(W.author),typeof W.body=="string"&&C.add(W.body);return C}let An=we("pr",()=>{let C=nf(),q=Array.from(C);return q.length===0?null:{contents:q,options:ze()}},(C,q)=>{if(!Array.isArray(C?.contents)||C.contents.length!==q.contents.length||C.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=q.contents,W=new Map;for(let ue=0;ue<B.length&&ue<C.contents.length;ue++)W.set(B[ue],C.contents[ue]);ks.clear(),W.forEach((ue,ye)=>ks.set(ye,ue))});e.anonymizePrContent=function(C){return C&&(ks.has(C)?ks.get(C):"")};async function Za(){let C=parseGithubUrl(e.sourceUrl),q=m();try{Es(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!y(q))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!y(q))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,J("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,J("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(W=>{e.addToast({title:"Error",date:new Date,body:W}),e.error=W},console.error),Ss(B.data.error)),J("sourceUrl","missing",!1),B}finally{w(q)}}let Cs=ot(new Map);function sf(){let C=new Set,q=e.details&&e.details.gist;if(!q)return C;typeof q.description=="string"&&C.add(q.description),typeof q.ownerLogin=="string"&&C.add(q.ownerLogin);let B=q.files||[];for(let ue of B)typeof ue.filename=="string"&&C.add(ue.filename),typeof ue.content=="string"&&C.add(ue.content);let W=q.comments||[];for(let ue of W)typeof ue.author=="string"&&C.add(ue.author),typeof ue.body=="string"&&C.add(ue.body);return C}let In=we("gist",()=>{let C=sf(),q=Array.from(C);return q.length===0?null:{contents:q,options:ze()}},(C,q)=>{if(!Array.isArray(C?.contents)||C.contents.length!==q.contents.length||C.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=q.contents,W=new Map;for(let ue=0;ue<B.length&&ue<C.contents.length;ue++)W.set(B[ue],C.contents[ue]);Cs.clear(),W.forEach((ue,ye)=>Cs.set(ye,ue)),mr()});e.anonymizeGistContent=function(C){return C&&(Cs.has(C)?Cs.get(C):"")},e.previewGistFiles=[];function mr(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(q=>({filename:e.anonymizeGistContent(q.filename),content:e.anonymizeGistContent(q.content),language:q.language}))}e.watch("details.gist.files",mr,!0),e.watch("terms",mr);function of(){let C=e.conference;if(e.conference_data=null,!C)return;let q=C===b||e.isUpdate&&C===e._originalConference;C!==b&&(b=null),t.get("/api/conferences/"+C).then(B=>{e.conference===C&&(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),!q&&(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===C&&(e.conference_data=null)})}function Es(){J("repoId","used",!0),J("repoId","format",!0),J("pullRequestId","used",!0),J("pullRequestId","format",!0),J("gistId","used",!0),J("gistId","format",!0),J("sourceUrl","used",!0),J("sourceUrl","missing",!0),J("sourceUrl","access",!0),J("sourceUrl","github",!0),J("commit","exi Line truncated
`).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&&(W.options.pageSource=e.details.pageSource),Es();let ue=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ue,W,{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(Lt=>{e.error=Lt},console.error),Ss(ye.data.error),Ke&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Xe(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{q.disabled=!1})},e.anonymizeGist=C=>{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 q=C.currentTarget||C.target.closest?.("button")||C.target;q.disabled=!0;let B=parseGithubUrl(e.sourceUrl),W={gistId:e.gistId,terms:e.terms.trim().split(`
`)){if(bs.has(C))return bs.get(C);if(fr.has(C))return C}return pr.add(C),xs||(xs=d(tf,120)),C},e.previewPathName=C=>{C=String(C||"");let q=C.lastIndexOf("/");return q<0?e.previewName(C):e.previewName(C.slice(0,q))+"/"+e.previewName(C.slice(q+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([...ve?.dirs.keys()||[]].map(C=>[e.previewName(C),!0]))},!0),e.on("dispose",()=>{xs&&d.cancel(xs)});function ws(){!e.anonymize||!e.anonymize.terms||Yt()}async function Qa(){let C=parseGithubUrl(e.sourceUrl),q=m();try{Es();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(q))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!y(q))return;throw B.data&&(r("ERRORS."+B.data.error).then(W=>{e.addToast({title:"Error",date:new Date,body:W}),e.error=W},console.error),Ss(B.data.error)),X("sourceUrl","missing",!1),B}finally{w(q)}}let ks=ot(new Map);function nf(){let C=new Set,q=e.details&&e.details.pullRequest;if(!q)return C;typeof q.title=="string"&&C.add(q.title),typeof q.body=="string"&&C.add(q.body),typeof q.diff=="string"&&C.add(q.diff);let B=q.comments||[];for(let W of B)typeof W.author=="string"&&C.add(W.author),typeof W.body=="string"&&C.add(W.body);return C}let An=we("pr",()=>{let C=nf(),q=Array.from(C);return q.length===0?null:{contents:q,options:ze()}},(C,q)=>{if(!Array.isArray(C?.contents)||C.contents.length!==q.contents.length||C.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=q.contents,W=new Map;for(let ue=0;ue<B.length&&ue<C.contents.length;ue++)W.set(B[ue],C.contents[ue]);ks.clear(),W.forEach((ue,ye)=>ks.set(ye,ue))});e.anonymizePrContent=function(C){return C&&(ks.has(C)?ks.get(C):"")};async function Za(){let C=parseGithubUrl(e.sourceUrl),q=m();try{Es(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!y(q))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!y(q))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,X("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,X("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(W=>{e.addToast({title:"Error",date:new Date,body:W}),e.error=W},console.error),Ss(B.data.error)),X("sourceUrl","missing",!1),B}finally{w(q)}}let Cs=ot(new Map);function sf(){let C=new Set,q=e.details&&e.details.gist;if(!q)return C;typeof q.description=="string"&&C.add(q.description),typeof q.ownerLogin=="string"&&C.add(q.ownerLogin);let B=q.files||[];for(let ue of B)typeof ue.filename=="string"&&C.add(ue.filename),typeof ue.content=="string"&&C.add(ue.content);let W=q.comments||[];for(let ue of W)typeof ue.author=="string"&&C.add(ue.author),typeof ue.body=="string"&&C.add(ue.body);return C}let In=we("gist",()=>{let C=sf(),q=Array.from(C);return q.length===0?null:{contents:q,options:ze()}},(C,q)=>{if(!Array.isArray(C?.contents)||C.contents.length!==q.contents.length||C.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=q.contents,W=new Map;for(let ue=0;ue<B.length&&ue<C.contents.length;ue++)W.set(B[ue],C.contents[ue]);Cs.clear(),W.forEach((ue,ye)=>Cs.set(ye,ue)),mr()});e.anonymizeGistContent=function(C){return C&&(Cs.has(C)?Cs.get(C):"")},e.previewGistFiles=[];function mr(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(q=>({filename:e.anonymizeGistContent(q.filename),content:e.anonymizeGistContent(q.content),language:q.language}))}e.watch("details.gist.files",mr,!0),e.watch("terms",mr);function of(){let C=e.conference;if(e.conference_data=null,!C)return;let q=C===b||e.isUpdate&&C===e._originalConference;C!==b&&(b=null),t.get("/api/conferences/"+C).then(B=>{e.conference===C&&(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),!q&&(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===C&&(e.conference_data=null)})}function Es(){X("repoId","used",!0),X("repoId","format",!0),X("pullRequestId","used",!0),X("pullRequestId","format",!0),X("gistId","used",!0),X("gistId","format",!0),X("sourceUrl","used",!0),X("sourceUrl","missing",!0),X("sourceUrl","access",!0),X("sourceUrl","github",!0),X("commit","exi Line truncated
`).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&&(W.options.pageSource=e.details.pageSource),Es();let ue=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ue,W,{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(Lt=>{e.error=Lt},console.error),Ss(ye.data.error),Ke&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Je(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{q.disabled=!1})},e.anonymizeGist=C=>{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 q=C.currentTarget||C.target.closest?.("button")||C.target;q.disabled=!0;let B=parseGithubUrl(e.sourceUrl),W={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,W,{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(()=>{q.disabled=!1})},e.anonymizePullRequest=C=>{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 q=C.currentTarget||C.target.closest?.("button")||C.target;q.disabled=!0;let B=parseGithubUrl(e.sourceUrl),W={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,W,{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(()=>{q.disabled=!1})},e.watch("conference",()=>{of()}),e.termHints=[],e.matchTermAsWritten=C=>{e.terms=Ic(e.terms,C)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Yt()}),e.watch("terms",()=>{e.termHints=Ac(e.terms),e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("details",()=>{e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()},!0)},Ka=function(e,t,s,i,o,r){ha(e);let d=kt();Mc();let p=Bt(),u=0,v=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),h&&(d.timeout.cancel(h),h=null)}let m=!1;e.on("dispose",()=>{m=!0,u++,y(),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(k){if(!(m||w!==U)){w=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Ue){L[(Ue.path||"")+"/"+Ue.name]=!0});for(var K=[],H={},se=0;se<k.data.length;se++){var Z=k.data[se];if(Z.path)for(var J=Z.path.split("/"),me="",Ee=0;Ee<J.length;Ee++){var $e=me;me=me?me+"/"+J[Ee]:J[Ee];var Be=$e+"/"+J[Ee];!L[Be]&&!H[Be]&&(H[Be]=!0,K.push({name:J[Ee],path:$e}))}}K.sort(function(Ue,Y){return(Ue.path||"").split("/").length-(Y.path||"").split("/").length}),K.length>0&&e.files.push.apply(e.files,K);for(var Ze=[],He=0;He<k.data.length;He++){var tt=k.data[He],Re=(tt.path||"")+"/"+tt.name;!L[Re]&&tt.size!=null&&(Ze.push(tt),L[Re]=!0)}Ze.length>0&&e.files.push.apply(e.files,Ze),e.fileSearchResults=k.data}},function(){!m&&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(k=>k&&k.trim().length>0),j();for(let k=0;k<e.paths.length-1;k++){let L=k>0?e.paths.slice(0,k).join("/"):"";e.files.some(H=>H.path===L)||e.getFiles(L)}}});function S(){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 k=null;for(let L of O)if(U[L]){k=L;break}if(!k&&Object.keys(U).length>0&&(k=Object.keys(U)[0]),k){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(U[k]))}}e.fileCounts=null;let E=0,N=new Set,b=!1;e.getFiles=function(O,U=!1){let k=e.repoId,L=E;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(K){if(m||k!==e.repoId||L!==E)return[];let H=O||"";return e.files=e.files.filter(se=>se.path!==H),e.files.push(...K.data),e.loadedFolders={...e.loadedFolders,[H]:!0},P(H,L),K.data},function(K){if(m||k!==e.repoId||L!==E)return[];U||(e.type="error",e.content=ar(K),e.files=[])})};function P(O,U){if(b||N.has(O))return;N.add(O);let k=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(O)}`).then(function(L){m||k!==e.repoId||U!==E||(e.fileCounts={...e.fileCounts,...L.data})},function(){m|| Line truncated
`).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,W,{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(()=>{q.disabled=!1})},e.watch("conference",()=>{of()}),e.termHints=[],e.matchTermAsWritten=C=>{e.terms=Ic(e.terms,C)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Yt()}),e.watch("terms",()=>{e.termHints=Ac(e.terms),e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("details",()=>{e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()},!0)},Ka=function(e,t,s,i,o,r){ha(e);let d=kt();Mc();let p=Bt(),u=0,v=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),h&&(d.timeout.cancel(h),h=null)}let m=!1;e.on("dispose",()=>{m=!0,u++,y(),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(k){if(!(m||w!==U)){w=null,e.fileSearchLoading=!1;var _={};e.files.forEach(function(Ue){_[(Ue.path||"")+"/"+Ue.name]=!0});for(var K=[],H={},se=0;se<k.data.length;se++){var Z=k.data[se];if(Z.path)for(var X=Z.path.split("/"),me="",Ee=0;Ee<X.length;Ee++){var $e=me;me=me?me+"/"+X[Ee]:X[Ee];var Be=$e+"/"+X[Ee];!_[Be]&&!H[Be]&&(H[Be]=!0,K.push({name:X[Ee],path:$e}))}}K.sort(function(Ue,Y){return(Ue.path||"").split("/").length-(Y.path||"").split("/").length}),K.length>0&&e.files.push.apply(e.files,K);for(var Ze=[],He=0;He<k.data.length;He++){var tt=k.data[He],Re=(tt.path||"")+"/"+tt.name;!_[Re]&&tt.size!=null&&(Ze.push(tt),_[Re]=!0)}Ze.length>0&&e.files.push.apply(e.files,Ze),e.fileSearchResults=k.data}},function(){!m&&w===U&&(w=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(O,U){if(e.repoId!=i.repoId)return J();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(k=>k&&k.trim().length>0),j();for(let k=0;k<e.paths.length-1;k++){let _=k>0?e.paths.slice(0,k).join("/"):"";e.files.some(H=>H.path===_)||e.getFiles(_)}}});function S(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let _ of e.files)_.name.toLowerCase().indexOf("readme")>-1&&(U[_.name.toLowerCase()]=_.name);let k=null;for(let _ of O)if(U[_]){k=_;break}if(!k&&Object.keys(U).length>0&&(k=Object.keys(U)[0]),k){let _=s.url();_[_.length-1]!="/"&&(_+="/"),s.url(_+encodePathForUrl(U[k]))}}e.fileCounts=null;let E=0,N=new Set,b=!1;e.getFiles=function(O,U=!1){let k=e.repoId,_=E;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(K){if(m||k!==e.repoId||_!==E)return[];let H=O||"";return e.files=e.files.filter(se=>se.path!==H),e.files.push(...K.data),e.loadedFolders={...e.loadedFolders,[H]:!0},D(H,_),K.data},function(K){if(m||k!==e.repoId||_!==E)return[];U||(e.type="error",e.content=ar(K),e.files=[])})};function D(O,U){if(b||N.has(O))return;N.add(O);let k=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(O)}`).then(function(_){m||k!==e.repoId||U!==E||(e.fileCounts={...e.fileCounts,..._.data})},function(){m|| Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,10,aO),[[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",lO,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=g()),n("small",dO,[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(_,null,Q((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:v=>e.matchTermAsWritten(u.line)},"Match as written",8,uO)]))),128)),(e.termHints||[]).length>3?(a(),l("div",cO,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",pO,"Terms are in an invalid format.",512),[[ee,e.anonymize?.terms?.errors?.format]])]),D(n("div",fO,[n("div",mO,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",hO,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,gO)],512),[[ee,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),[[nt,e.preserve.search]]),n("div",vO,[e.preserve.loading?(a(),l("p",yO,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",bO,c(e.preserve.error),1)):(a(),l(_,{key:2},[(a(!0),l(_,null,Q(e.preserveRows(),(u,v)=>(a(),l("div",{class:"preserve-item",key:u.kind+":"+u.path,style:Ae({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)},c(u.open?"\u25BE":"\u25B8"),9,wO)):(a(),l("span",kO)),n("input",{type:"checkbox",id:"pf-"+v,"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,CO),n("label",{for:u.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:h=>u.kind==="dir"&&e.togglePreserveDir(u.path)},c(u.label),9,EO),u.note?(a(),l("span",SO,c(u.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",NO,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",RO,"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),[[nt,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,TO),n("div",PO,[n("span",DO,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",AO,[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),[[ee,e.detectedType]]),D(n("section",IO,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),D(n("div",null,[n("div",OO,[D(n("input",MO,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",VO,[D(n("input",qO,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",LO,[D(n("input",_O,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",$O,[D(n("input",FO,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",UO,[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,BO),[[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",zO,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",HO,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[ee,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",jO,[...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",GO,[D(n("input",WO,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",KO,[D(n("input",YO,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",XO,[D(n("input",JO,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",QO,[D(n("input",ZO,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",xO,[D(n("input",e5,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",t5,[D(n("input",n5,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),[[ee,e.detectedType==="gist"]]),D(n("div",null,[n("div",s5,[D(n("input",o5,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",i5,[D(n("input",r5,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",a5,[D(n( Line truncated
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",{cla Line truncated
jane.smith@example.org`},null,10,NO),[[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",RO,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=g()),n("small",TO,[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(L,null,Q((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:v=>e.matchTermAsWritten(u.line)},"Match as written",8,DO)]))),128)),(e.termHints||[]).length>3?(a(),l("div",PO,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),P(n("div",AO,"Terms are in an invalid format.",512),[[ee,e.anonymize?.terms?.errors?.format]])]),P(n("div",IO,[n("div",OO,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",MO,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,VO)],512),[[ee,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)),P(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),[[nt,e.preserve.search]]),n("div",qO,[e.preserve.loading?(a(),l("p",LO,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",_O,c(e.preserve.error),1)):(a(),l(L,{key:2},[(a(!0),l(L,null,Q(e.preserveRows(),(u,v)=>(a(),l("div",{class:"preserve-item",key:u.kind+":"+u.path,style:Ae({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)},c(u.open?"\u25BE":"\u25B8"),9,$O)):(a(),l("span",FO)),n("input",{type:"checkbox",id:"pf-"+v,"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,UO),n("label",{for:u.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:h=>u.kind==="dir"&&e.togglePreserveDir(u.path)},c(u.label),9,BO),u.note?(a(),l("span",zO,c(u.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",HO,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",jO,"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)),P(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),[[nt,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,GO),n("div",WO,[n("span",KO,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",YO,[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),[[ee,e.detectedType]]),P(n("section",JO,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),P(n("div",null,[n("div",XO,[P(n("input",QO,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",ZO,[P(n("input",xO,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",e5,[P(n("input",t5,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",n5,[P(n("input",s5,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",o5,[P(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,i5),[[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",r5,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",a5,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[ee,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",l5,[...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),P(n("div",null,[n("div",d5,[P(n("input",u5,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",c5,[P(n("input",p5,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",f5,[P(n("input",m5,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",h5,[P(n("input",g5,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",v5,[P(n("input",y5,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",b5,[P(n("input",w5,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),[[ee,e.detectedType==="gist"]]),P(n("div",null,[n("div",k5,[P(n("input",C5,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",E5,[P(n("input",S5,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",N5,[P(n( Line truncated
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",{cla Line truncated
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:R(["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:R(["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",w9,[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",k9,[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",C9,[...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",E9,[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",S9,[n("a",N9,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,R9)):f("v-if",!0),n("span",T9,c(e.user?.username),1)]),n("div",P9,[n("h6",D9,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ce('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item um-extra" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(a(),l("a",A9,[...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,I9)):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,O9),[[nt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
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:R(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",j9,[e.statsEmpty()?f("v-if",!0):(a(),l("div",G9,[...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",W9,[(a(!0),l(_,null,Q(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:R(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",K9,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",Y9," +"+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",X9,[n("div",J9,[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]=Vt(ae(()=>{},["prevent"]),["enter"]))},null,544),[[nt,e.demoTerms]])]),n("div",Q9,[n("div",Z9,[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",x9,[n("div",eB,[(a(!0),l(_,null,Q(e.demoParts(),(i,o)=>(a(),l(_,{key:o},[i.redacted?(a(),l("mark",tB,c(i.original),1)):(a(),l(_,{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),[[nt,e.demoText]])])]),n("div",nB,[n("div",sB,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",oB,[n("span",iB,c(e.demoCount())+" redacted",1)])]),n("div",rB,[(a(!0),l(_,null,Q(e.demoParts(),(i,o)=>(a(),l(_,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,aB)):(a(),l(_,{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",lB,[n("div",dB,[(a(!0),l(_,null,Q(e.features,(i,o)=>(a(),l("div",{class:R(["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",cB,[n("span",pB,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",fB,c(i?.eyebrow),1)]),n("span",mB,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",hB,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,uB),n("div",gB,[n("span",vB,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",yB,"-")):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,bB)])],2))),128))]),n("div",wB,[(a(!0),l(_,null,Q(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",CB,[n("div",EB,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",SB,c(i?.url),1)]),n("div",{class:R(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",RB,[...t[19]||(t[19]=[Ce('<div class="fm-label">GitHub reposit Line truncated
label names the service and the tooltip says who to contact. `),n("li",{class:R(["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:R(["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",$9,[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",F9,[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",U9,[...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",B9,[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",z9,[n("a",H9,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,j9)):f("v-if",!0),n("span",G9,c(e.user?.username),1)]),n("div",W9,[n("h6",K9,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ce('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item um-extra" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(a(),l("a",Y9,[...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,J9)):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)),P(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,X9),[[nt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
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:R(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",lB,[e.statsEmpty()?f("v-if",!0):(a(),l("div",dB,[...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",uB,[(a(!0),l(L,null,Q(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:R(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",cB,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",pB," +"+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",fB,[n("div",mB,[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)),P(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]=Vt(ae(()=>{},["prevent"]),["enter"]))},null,544),[[nt,e.demoTerms]])]),n("div",hB,[n("div",gB,[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",vB,[n("div",yB,[(a(!0),l(L,null,Q(e.demoParts(),(i,o)=>(a(),l(L,{key:o},[i.redacted?(a(),l("mark",bB,c(i.original),1)):(a(),l(L,{key:1},[g(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=g("\u200B",-1))]),P(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),[[nt,e.demoText]])])]),n("div",wB,[n("div",kB,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",CB,[n("span",EB,c(e.demoCount())+" redacted",1)])]),n("div",SB,[(a(!0),l(L,null,Q(e.demoParts(),(i,o)=>(a(),l(L,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,NB)):(a(),l(L,{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",RB,[n("div",TB,[(a(!0),l(L,null,Q(e.features,(i,o)=>(a(),l("div",{class:R(["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",PB,[n("span",AB,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",IB,c(i?.eyebrow),1)]),n("span",OB,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",MB,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,DB),n("div",VB,[n("span",qB,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",LB,"-")):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,_B)])],2))),128))]),n("div",$B,[(a(!0),l(L,null,Q(e.features,(i,o)=>P((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",UB,[n("div",BB,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",zB,c(i?.url),1)]),n("div",{class:R(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",jB,[...t[19]||(t[19]=[Ce('<div class="fm-label">GitHub reposit Line truncated
<span class="ln">2</span><span class="c"># Author: <span class="redact">XXXX-1</span>, <span class="redact">XXXX-2</span></span>
<span class="ln">3</span><span class="k">import</span> torch
<span class="ln">4</span><span class="k">from</span> utils <span class="k">import</span> load_config
@@ -55,18 +55,18 @@ python experiments/run.py`),n("p",null,[g("Contact: "),n("span",{class:"redact",
<span class="ln">7</span> model = build_model(config)
<span class="ln">8</span> <span class="k">for</span> epoch <span class="k">in</span> range(config.epochs):
<span class="ln">9</span> loss = step(model)
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",PB,[...t[21]||(t[21]=[Ce('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,NB)])],8,kB)),[[ee,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ce('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> 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. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> 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. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var DB={class:"paper-empty"},AB={class:"paper-empty-inner"},IB={key:0,class:"paper-eyebrow"},OB={key:1,class:"paper-eyebrow"},MB={key:2,class:"paper-empty-title"},VB=["textContent"];function bp(e,t){return a(),l("div",DB,[n("div",AB,[e.error?f("v-if",!0):(a(),l("div",IB,"Working")),e.error?(a(),l("div",OB,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",MB,[...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,VB)):f("v-if",!0)])])}var qB={class:"container paper-page paper-settings"},LB={class:"paper-crumbs"},_B={class:"here"},$B={class:"paper-page-title"},FB={class:"paper-settings-body"},UB={class:"paper-settings-toc"},BB={href:"#conf-billing"},zB={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},HB={id:"conf-basics",class:"paper-settings-section"},jB={class:"form-group"},GB={class:"invalid-feedback"},WB={class:"invalid-feedback"},KB={class:"form-group"},YB={class:"invalid-feedback"},XB={class:"form-group"},JB={class:"invalid-feedback"},QB={class:"invalid-feedback"},ZB={id:"conf-window",class:"paper-settings-section"},xB={class:"form-grid-2"},ez={class:"form-group"},tz={class:"invalid-feedback"},nz={class:"invalid-feedback"},sz={class:"form-group"},oz={class:"invalid-feedback"},iz={class:"invalid-feedback"},rz={id:"conf-rendering",class:"paper-settings-section"},az={class:"form-check"},lz={class:"form-check-input",type:"checkbox",id:"link",name:"link"},dz={class:"form-check"},uz={class:"form-check-input",type:"checkbox",id:"image",name:"image"},cz={class:"form-check"},pz={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},fz={class:"form-check"},mz={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},hz={id:"conf-features",class:"paper-settings-section"},gz={class:"form-check"},vz={class:"form-check-input",type:"checkbox",id:"update",name:"update"},yz={class:"form-check"},bz={class:"form-check-input",type:"checkbox",id:"page",name:"page"},wz={id:"conf-plan",class:"paper-settings-section"},kz={key:0,class:"paper-section-copy"},Cz={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"}Line truncated
`).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",hH,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,gH)]))],8,mH),[[ee,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",vH,[e.redactionCount()?(a(),l(_,{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,yH),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",bH,[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",wH,[e.redactionCount()?(a(),l(_,{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,kH),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(_,{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",CH,[e.isCsv()?(a(),l("div",EH,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,SH),n("button",{type:"button",role:"radio",class:R(["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,NH)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",RH,[n("button",{type:"button",class:R(["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,TH),e.symbolsOpen?(a(),l("div",PH,[n("div",DH,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(_,null,Q(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:R(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",IH,c(d.name),1),n("span",OH,c(d.line),1)],8,AH))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:R(["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,MH)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",VH,[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,qH)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:R(["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,LH)):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,_H)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",$H,[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,FH),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",BH,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,zH)]))],8,UH)):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,HH)])):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",GH,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,WH)]))],8,jH)):f("v-if",!0),e.type=="html"&&e.r Line truncated
`).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",tj)):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",nj)):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",oj,"\u2713")):f("v-if",!0)],8,sj)):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",ij,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,rj)])),g(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",aj)):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,lj)):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,dj)):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,uj)):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,cj)):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,pj)):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,fj)):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]=Vt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,mj),[[nt,e.gotoValue]]),n("span",{class:R(["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",gj,[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(_,null,Q(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:R({"is-num":e.csvNumCol(p)})},[(a(!0),l(_,null,Q(e.redactParts(d),(u,v)=>(a(),l(_,{key:v},[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,vj)):(a(),l(_,{key:1},[g(c(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(_,null,Q(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",yj,c(p+1),1),(a(!0),l(_,null,Q(d,(u,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(_,null,Q(e.redactParts(u),(h,y)=>(a(),l(_,{key:y},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,c(h.n),1)],8,bj)):(a(),l(_,{key:1},[g(c(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,hj)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?D((a(),l("div",wj,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",kj,[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]=Vt(ae(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Vt(ae(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,Cj),n("span",Ej,[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,Sj),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,Nj)]),n("span",Rj,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:R(["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,Tj),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",Pj,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,Dj),e.readmeToc().length>=3?(a(),l("aside",Aj,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",Ij,[n("a",{href:"#",class:R(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=ae(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(_,null,Q(e.readmeToc(),(d,p)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:R(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:ae(u=>e.scrollToHeading(d.id),["prevent"])},c(d.text),11,Oj))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Wt(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:R(["file-card file-card-media","view-"+e.type])},[n("header",Mj,[n("div",Vj,[n("button",{type:"button",class:R(["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",qj,[n("li",Lj,[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,_j)]),(a(!0),l(_,null,Q(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(_,null,Q(e.redactParts(d),(u,v)=>(a(),l(_,{key:v},[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,Fj)):(a(),l(_,{key:1},[g(c(u.t),1)],64))],64))),128))],8,$j))),256))]),n("span",Uj,[e.type=="IPython Line truncated
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",WB,[...t[21]||(t[21]=[Ce('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,HB)])],8,FB)),[[ee,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ce('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> 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. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> 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. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var KB={class:"paper-empty"},YB={class:"paper-empty-inner"},JB={key:0,class:"paper-eyebrow"},XB={key:1,class:"paper-eyebrow"},QB={key:2,class:"paper-empty-title"},ZB=["textContent"];function bp(e,t){return a(),l("div",KB,[n("div",YB,[e.error?f("v-if",!0):(a(),l("div",JB,"Working")),e.error?(a(),l("div",XB,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",QB,[...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,ZB)):f("v-if",!0)])])}var xB={class:"container paper-page paper-settings"},ez={class:"paper-crumbs"},tz={class:"here"},nz={class:"paper-page-title"},sz={class:"paper-settings-body"},oz={class:"paper-settings-toc"},iz={href:"#conf-billing"},rz={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},az={id:"conf-basics",class:"paper-settings-section"},lz={class:"form-group"},dz={class:"invalid-feedback"},uz={class:"invalid-feedback"},cz={class:"form-group"},pz={class:"invalid-feedback"},fz={class:"form-group"},mz={class:"invalid-feedback"},hz={class:"invalid-feedback"},gz={id:"conf-window",class:"paper-settings-section"},vz={class:"form-grid-2"},yz={class:"form-group"},bz={class:"invalid-feedback"},wz={class:"invalid-feedback"},kz={class:"form-group"},Cz={class:"invalid-feedback"},Ez={class:"invalid-feedback"},Sz={id:"conf-rendering",class:"paper-settings-section"},Nz={class:"form-check"},Rz={class:"form-check-input",type:"checkbox",id:"link",name:"link"},Tz={class:"form-check"},Dz={class:"form-check-input",type:"checkbox",id:"image",name:"image"},Pz={class:"form-check"},Az={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},Iz={class:"form-check"},Oz={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},Mz={id:"conf-features",class:"paper-settings-section"},Vz={class:"form-check"},qz={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Lz={class:"form-check"},_z={class:"form-check-input",type:"checkbox",id:"page",name:"page"},$z={id:"conf-plan",class:"paper-settings-section"},Fz={key:0,class:"paper-section-copy"},Uz={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"}Line truncated
`).length))+" lines",1)):f("v-if",!0)]),P(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",MH,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,VH)]))],8,OH),[[ee,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",qH,[e.redactionCount()?(a(),l(L,{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,LH),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",_H,[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",$H,[e.redactionCount()?(a(),l(L,{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,FH),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(L,{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",UH,[e.isCsv()?(a(),l("div",BH,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,zH),n("button",{type:"button",role:"radio",class:R(["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,HH)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",jH,[n("button",{type:"button",class:R(["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,GH),e.symbolsOpen?(a(),l("div",WH,[n("div",KH,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(L,null,Q(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:R(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",JH,c(d.name),1),n("span",XH,c(d.line),1)],8,YH))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:R(["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,QH)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",ZH,[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,xH)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:R(["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,ej)):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,tj)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",nj,[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,sj),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",ij,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,rj)]))],8,oj)):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,aj)])):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",dj,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,uj)]))],8,lj)):f("v-if",!0),e.type=="html"&&e.r Line truncated
`).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",bj)):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",wj)):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",Cj,"\u2713")):f("v-if",!0)],8,kj)):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",Ej,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,Sj)])),g(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",Nj)):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,Rj)):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,Tj)):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,Dj)):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,Pj)):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,Aj)):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,Ij)):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)),P(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]=Vt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,Oj),[[nt,e.gotoValue]]),n("span",{class:R(["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",Vj,[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(L,null,Q(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:R({"is-num":e.csvNumCol(p)})},[(a(!0),l(L,null,Q(e.redactParts(d),(u,v)=>(a(),l(L,{key:v},[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,qj)):(a(),l(L,{key:1},[g(c(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(L,null,Q(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",Lj,c(p+1),1),(a(!0),l(L,null,Q(d,(u,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(L,null,Q(e.redactParts(u),(h,y)=>(a(),l(L,{key:y},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,c(h.n),1)],8,_j)):(a(),l(L,{key:1},[g(c(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,Mj)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?P((a(),l("div",$j,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",Fj,[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]=Vt(ae(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=Vt(ae(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,Uj),n("span",Bj,[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,zj),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,Hj)]),n("span",jj,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:R(["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,Gj),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",Wj,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,Kj),e.readmeToc().length>=3?(a(),l("aside",Yj,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",Jj,[n("a",{href:"#",class:R(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=ae(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(L,null,Q(e.readmeToc(),(d,p)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:R(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:ae(u=>e.scrollToHeading(d.id),["prevent"])},c(d.text),11,Xj))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Wt(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:R(["file-card file-card-media","view-"+e.type])},[n("header",Qj,[n("div",Zj,[n("button",{type:"button",class:R(["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",xj,[n("li",eG,[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,tG)]),(a(!0),l(L,null,Q(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(L,null,Q(e.redactParts(d),(u,v)=>(a(),l(L,{key:v},[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,sG)):(a(),l(L,{key:1},[g(c(u.t),1)],64))],64))),128))],8,nG))),256))]),n("span",oG,[e.type=="IPython Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,8,JW),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",QW,[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",ZW,"Terms are in an invalid format.",512),[[ee,e.defaultsForm?.terms?.errors?.format]])])]),n("section",xW,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",eK,[n("label",tK,[D(n("input",nK,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",sK,[D(n("input",oK,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",iK,[D(n("input",rK,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",aK,[D(n("input",lK,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",dK,[D(n("input",uK,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",cK,[D(n("input",pK,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",fK,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",mK,[D(n("input",hK,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",gK,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[D((a(),l("select",vK,[...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",yK,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",bK,[n("div",wK,[e.draftRestored?(a(),l("span",kK,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",CK,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",EK,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:R(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,SK),e.error?(a(),l("div",NK,c(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[ee,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",TK,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",PK,[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,DK)])):f("v-if",!0),e.billingNotice?(a(),l("p",AK,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",IK,[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,OK)])):f("v-if",!0),n("section",MK,[n("div",VK,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",qK,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",LK,[g(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access Line truncated
jane.smith@example.org`},null,8,mK),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",hK,[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))])]),P(n("div",gK,"Terms are in an invalid format.",512),[[ee,e.defaultsForm?.terms?.errors?.format]])])]),n("section",vK,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",yK,[n("label",bK,[P(n("input",wK,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",kK,[P(n("input",CK,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",EK,[P(n("input",SK,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",NK,[P(n("input",RK,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",TK,[P(n("input",DK,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",PK,[P(n("input",AK,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",IK,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",OK,[P(n("input",MK,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",VK,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[P((a(),l("select",qK,[...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",LK,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",_K,[n("div",$K,[e.draftRestored?(a(),l("span",FK,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",UK,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",BK,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:R(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,zK),e.error?(a(),l("div",HK,c(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[ee,e.settingsTab==="defaults"]]),P(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",GK,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",WK,[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,KK)])):f("v-if",!0),e.billingNotice?(a(),l("p",YK,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",JK,[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,XK)])):f("v-if",!0),n("section",QK,[n("div",ZK,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",xK,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",eY,[g(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access Line truncated
`);t.innerHTML=s.map(i=>{let o=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":o==="+"?"add":o==="-"?"remove":"";return`<span class="md-diff-line${r?" is-"+r:""}">${i||" "}</span>`}).join(`
`)}),Lp=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},Fp=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",Lp(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("</")?i.pop():i.push(p),p));let d=o.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Lp(d)}ch">${r}${o||" "}${"</span>".repeat(i.length)}</span>`}).join(`
`)})},Up={props:["content","terms","options"],setup(e){let t=Et(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),$p(t.value),Fp(t.value)};return mn(()=>{s(),ut(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},fx={props:["file","terms","options"],setup(e){let t=Et(null),s=()=>Xe(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),$p(t.value),Fp(t.value)});return mn(s),ut(()=>[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(Up,{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||"")))}}},mx=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()}),hx={props:["file","content"],setup(e){let t=Et(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=Lo(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),mx(t.value)}catch(d){r===s&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return mn(()=>{o(),ut(()=>[e.file,e.content],o)}),is(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},gx={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]}})))}}},Bp={Markdown:Up,GistFile:fx,Notebook:hx,Loc:gx,HtmlDoc:Mp,QuotaUsage:cx,Pdfviewer:id(async()=>(await Jn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Vp))},zp={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),_p(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),_p(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function _p(e,t={}){let s=px.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 Hp={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});Xe(()=>{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 jp(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<e.length&&t.push(e.slice(s)),t):e}function vx(e){let t=jp(e),s=[];for(let i of Array.isArray(t)?t:[t]){if(typeof i!="string"){s.push(i);continue}let o=i.split(/(?<=[._-])/);o.forEach((r,d)=>{s.push(r),d<o.length-1&&s.push(De("wbr"))})}return s}function yx(e){if(e<1024)return`${e} B`;let t=["KB","MB","GB"],s=e/1024,i=0;for(;s>=1024&&i<t.length-1;)s/=1024,i++;return`${s.toFixed(1)} ${t[i]}`}function bx(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o.lastIndexOf( Line truncated
`)})},Up={props:["content","terms","options"],setup(e){let t=Et(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),$p(t.value),Fp(t.value)};return mn(()=>{s(),ut(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>Pe("markdown",{ref:t})}},Ix={props:["file","terms","options"],setup(e){let t=Et(null),s=()=>Je(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),$p(t.value),Fp(t.value)});return mn(s),ut(()=>[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 Pe("gist-file",{ref:t},Pe(Up,{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 Pe("gist-file",{ref:t},Pe("pre",{class:"line-numbers"},Pe("code",{class:"language-"+(r[d]||d),key:i.content},i.content||"")))}}},Ox=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()}),Mx={props:["file","content"],setup(e){let t=Et(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 Xn("notebook"),r!==s)return;t.value.innerHTML=Lo(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),Ox(t.value)}catch(d){r===s&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return mn(()=>{o(),ut(()=>[e.file,e.content],o)}),is(()=>{s++,i?.abort()}),()=>Pe("notebook",{ref:t})}},Vx={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 Pe("loc",t.map(([i,o])=>Pe("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},Bp={Markdown:Up,GistFile:Ix,Notebook:Mx,Loc:Vx,HtmlDoc:Mp,QuotaUsage:Px,Pdfviewer:id(async()=>(await Xn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Vp))},zp={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),_p(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),_p(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function _p(e,t={}){let s=Ax.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 Hp={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});Je(()=>{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 jp(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(Pe("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[Pe("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s<e.length&&t.push(e.slice(s)),t):e}function qx(e){let t=jp(e),s=[];for(let i of Array.isArray(t)?t:[t]){if(typeof i!="string"){s.push(i);continue}let o=i.split(/(?<=[._-])/);o.forEach((r,d)=>{s.push(r),d<o.length-1&&s.push(Pe("wbr"))})}return s}function Lx(e){if(e<1024)return`${e} B`;let t=["KB","MB","GB"],s=e/1024,i=0;for(;s>=1024&&i<t.length-1;)s/=1024,i++;return`${s.toFixed(1)} ${t[i]}`}function _x(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o.lastIndexOf( Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js:
+20 -2
View File
@@ -111,9 +111,11 @@ describe("Vue 3 UI", function () {
it("filters returned groups without hiding edge 5xx and restores investigation focus", async () => {
const requestId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa";
const now = new Date().toISOString();
const historySample = {requestId, jobId:"bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb", service:"worker", event:"job_failed", severity:"error", status:502};
const historyEntry = {ts:now,level:"error",module:"queue",message:"history_only",raw:[historySample]};
ui = await browser("/", {
"/api/user": {username:"admin",isAdmin:true,status:"ready"},
"/api/admin/errors": {entries:[{ts:now,level:"error",module:"queue",message:"history_only",raw:[]}],available:true,total:1},
"/api/admin/errors": {entries:[historyEntry],available:true,total:1},
"/api/admin/errors/investigation": {state:"ready",window:"1h",captured:12,end:now,groups:[
{fingerprint:"edge",count:9,last:now,first:now,sample:{event:"http_access",service:"nginx",severity:"info",status:504,requestId}},
{fingerprint:"warn",count:3,last:now,first:now,sample:{event:"retry",service:"worker",severity:"warn"}},
@@ -136,6 +138,14 @@ describe("Vue 3 UI", function () {
expect(doc.querySelector('#log-detail-title').textContent).to.equal('http_access');
expect([...doc.querySelectorAll('.log-detail dt')].map(node => node.textContent)).to.have.members(['First returned', 'Last returned', 'event', 'service', 'severity', 'status', 'requestId']);
expect(doc.querySelector('.log-detail-row').previousElementSibling.contains(detail)).to.equal(true);
const identifier = doc.querySelector('.log-detail .log-value-reveal');
expect(identifier.open).to.equal(false);
expect(identifier.querySelector('summary').textContent).not.to.include(requestId);
expect(identifier.querySelector('span').textContent).to.equal(requestId);
let copiedIdentifier;
Object.defineProperty(ui.window.navigator, 'clipboard', {configurable:true,value:{writeText:async value => { copiedIdentifier = value; }}});
doc.querySelector('.log-detail .log-copy-value').click(); await delay(30);
expect(copiedIdentifier).to.equal(requestId);
doc.querySelector('.log-detail button').click(); await delay(30);
expect(doc.activeElement).to.equal(detail);
const trigger = doc.querySelector('.log-trace-button'); trigger.focus(); trigger.click(); await delay(30);
@@ -148,6 +158,13 @@ describe("Vue 3 UI", function () {
expect(row.getAttribute('aria-expanded')).to.equal('false'); row.click(); await delay(30);
expect(row.getAttribute('aria-expanded')).to.equal('true');
expect(doc.getElementById(row.getAttribute('aria-controls'))).not.to.equal(null);
expect(doc.querySelector('.history-fields')).not.to.equal(null);
expect(doc.querySelector('.detail-main pre')).to.equal(null);
[...doc.querySelectorAll('.detail-tabs button')].find(button => button.textContent === 'Raw').click(); await delay(30);
expect(JSON.parse(doc.querySelector('.detail-main pre').textContent)).to.deep.equal(historyEntry);
[...doc.querySelectorAll('.detail-actions button')].find(button => button.textContent.includes('Copy JSON')).click(); await delay(30);
expect(JSON.parse(copiedIdentifier)).to.deep.equal(historyEntry);
expect(doc.querySelector('.history-management').open).to.equal(false);
expect(ui.requests.filter(r=>r.url.pathname==='/api/admin/errors/investigation')).to.have.length(1);
expect(ui.errors).to.deep.equal([]);
});
@@ -204,7 +221,8 @@ describe("Vue 3 UI", function () {
const button=ui.window.document.querySelector(".errors-pager button");
expect(button).not.to.equal(null); button.click(); await delay(40);
expect(ui.window.document.body.textContent).to.include("upstream_error").and.include("invalid legacy records were omitted");
ui.window.document.querySelector('button[aria-label="Refresh"]').click(); await delay(40);
ui.window.document.querySelector('#error-source-history').click(); await delay(30);
ui.window.document.querySelector('.error-health-strip button').click(); await delay(40);
expect(ui.requests.filter(r => r.url.pathname === "/api/admin/errors").at(-1).url.searchParams.get("limit")).to.equal("251");
expect(ui.window.document.body.textContent).to.include("upstream_error");
expect(ui.errors).to.deep.equal([]);