fix(anonymize): one message and one next step when a source fails to load

A repository URL that could not be read produced a pile of messages:
"Does not exist or is not accessible", a "Repository not listed?" label,
two access notes, a private-content warning, an empty branch/commit grid
with "The commit SHA is not valid", a toast, and an enabled-looking
"Create anonymous link" whose reason pointed to the preview.

- Under the URL, one error block per case (malformed URL, missing or no
  access, organization restriction or SSO, already anonymized), naming
  the source and giving its fix: Manage GitHub access and Try again.
  The preview shows the same wording and actions; no toast.
- Drop "Repository not listed?". The landing picker gets a quiet
  "Don't see your repository? Manage GitHub access" link instead.
- New anonymizations hide branch/commit, auto-update and the other
  sections until the source loads. Edit mode keeps them editable.
- The publication warning shows only once a private source has loaded;
  the repository metadata now includes GitHub's `private` flag.
- The primary button is disabled until the source loads, with a short
  local reason, and the draft line waits for a loaded source.
- dev-mock: failing, slow, PR, gist and edit-mode fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thomas DurieuxandClaude Opus 5.5 committed 2026-11-14 22:22:33 +00:00
1 parent 3fbf2cbad7
commit 1412de9d9f
11 files changed
+219 -138

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
{
"core.min.js": "core.d23af1c652.min.js",
"vendor.min.js": "vendor.80335936ff.min.js",
"vendor.min.js": "vendor.2a3d4c5ec3.min.js",
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
"all.min.css": "all.f9ba9c23e7.min.css",
"all.min.css": "all.d1d175cb25.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
+10
View File
@@ -14738,3 +14738,13 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.errors-page .log-investigation-body .log-timeline { padding:16px; }
.errors-page .log-investigation-body .log-events li { grid-template-columns:minmax(0,1fr); gap:6px; }
}
/* ===== Source errors (anonymize workspace) ===== */
/* One block under the URL: what happened, an optional note, then the fix. */
.source-error { margin-top: 6px; }
.source-error .invalid-feedback { display: block; margin: 0; font-size: 13px; line-height: 1.5; }
.source-error-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }
.source-error .repo-access-controls { margin-top: 10px; gap: 8px; }
.anonymize-page .source-error .repo-access-controls .btn { display: inline-flex; align-items: center; gap: 6px; }
.anonymize-page .source-public-note { margin: 12px 0 16px; font-size: 12.5px; }
/* "Don't see your repository?" sits under the picker list as a quiet link. */
.repo-picker-access { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 12px 16px 0; font-size: 13px; color: var(--ink-muted); }
+29 -50
View File
@@ -56,15 +56,7 @@
<p class="repo-picker-state" v-if="userReposStatus === 'ready' &amp;&amp; userRepos.length &gt; 0 &amp;&amp; filteredUserRepos().length === 0">No repository matches “{{ userRepoFilter }}”.</p>
<p class="repo-picker-state" v-if="userReposStatus === 'ready' &amp;&amp; userRepos.length === 0">No repositories found for your GitHub account. Paste a URL above, or grant access below.</p>
<p class="repo-picker-state" role="alert" v-if="userReposStatus === 'error'">Your repositories could not be loaded. <button type="button" class="task-text-button" @click="loadUserRepos(true)">Try again</button></p>
<aside class="repo-access-details" aria-label="GitHub access" v-if="!sourceUrl &amp;&amp; githubConnections?.appEnabled &amp;&amp; githubConnections.appConnected">
<div class="repo-access-main">
<div class="repo-access-controls">
<span class="access-q" v-if="detectedType !== 'gist' &amp;&amp; githubConnection !== 'oauth'">Repository not listed?</span><button type="button" class="btn btn-outline-ink" v-if="detectedType !== 'gist' &amp;&amp; githubConnection !== 'oauth'" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button>
<a class="connection-link" href="/connections" v-if="isUpdate || detectedType === 'gist' || githubConnection === 'oauth'">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></a>
</div>
</div>
<div class="repo-access-note"><span v-if="error &amp;&amp; detectedType !== 'gist' &amp;&amp; githubConnection === 'github-app'">Signing in does not grant access to private repositories. Use Manage GitHub access to select this repository, then return here. Organization access may require administrator approval.</span><span><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-info"></use></svg> Anonymized content is public, even from private repositories.</span></div>
</aside>
<p class="repo-picker-access" v-if="!sourceUrl &amp;&amp; githubConnections?.appEnabled &amp;&amp; githubConnections.appConnected &amp;&amp; userReposStatus === 'ready'">Don&rsquo;t see your repository? <button type="button" class="connection-link" v-if="githubConnection !== 'oauth'" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button><a class="connection-link" href="/connections" v-else>Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></a></p>
</section>
</div>
</div>
@@ -124,17 +116,15 @@
</div>
<input type="text" class="form-control" name="sourceUrl" id="sourceUrl" onblur="this.scrollLeft=0" :disabled="isUpdate &amp;&amp; detectedType !== &#x27;repo&#x27;" placeholder="Paste a GitHub repo or pull request URL" v-field="{ state: viewState, set: value =&gt; { sourceUrl = value }, value: sourceUrl, form: &quot;anonymize&quot;, options: { debounce: {default: 1000, blur: 0, click: 0}, updateOn: &#x27;default blur click&#x27; }, change: () =&gt; { urlSelected() } }" :class="{&#x27;is-invalid&#x27;: anonymize?.sourceUrl?.invalid}">
<p class="source-summary" v-if="sourceSummary() &amp;&amp; !anonymize?.sourceUrl?.invalid"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-check"></use></svg>{{ sourceSummary() }}</p>
<div class="invalid-feedback" v-show="anonymize?.sourceUrl?.errors?.github">
Please provide a valid GitHub URL.
</div>
<div class="invalid-feedback" v-show="anonymize?.sourceUrl?.errors?.access">
Not accessible. The organization may restrict access.
</div>
<div class="invalid-feedback" v-show="anonymize?.sourceUrl?.errors?.missing">
Does not exist or is not accessible.
</div>
<div class="invalid-feedback" v-show="anonymize?.sourceUrl?.errors?.used">
Already anonymized.
<div class="source-error" role="alert" v-if="sourceProblem() &amp;&amp; sourceProblem().kind !== 'connect'">
<p class="invalid-feedback">{{ sourceProblem().text }}</p>
<p class="source-error-note" v-if="sourceProblem().note">{{ sourceProblem().note }}</p>
<div class="repo-access-controls" v-if="sourceProblem().manage || sourceProblem().retry || sourceProblem().dashboard">
<button type="button" class="btn btn-ink" v-if="sourceProblem().manage === 'app'" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button>
<a class="btn btn-ink" href="/connections" v-if="sourceProblem().manage === 'link'">Manage GitHub access</a>
<a class="btn btn-ink" href="/dashboard" v-if="sourceProblem().dashboard">Open My work</a>
<button type="button" class="btn btn-outline-ink" v-if="sourceProblem().retry" @click="urlSelected(true)">Try again</button>
</div>
</div>
</div>
@@ -154,17 +144,12 @@
</div>
</aside>
<aside class="repo-access-details" aria-label="GitHub access" v-if="sourceUrl &amp;&amp; githubConnections?.appEnabled &amp;&amp; githubConnections.appConnected">
<div class="repo-access-main">
<div class="repo-access-controls">
<span class="access-q" v-if="detectedType !== 'gist' &amp;&amp; githubConnection !== 'oauth' &amp;&amp; !details">Repository not listed?</span><button type="button" class="btn btn-outline-ink" v-if="detectedType !== 'gist' &amp;&amp; githubConnection !== 'oauth' &amp;&amp; !details" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button>
<a class="connection-link" href="/connections" v-if="isUpdate || detectedType === 'gist' || githubConnection === 'oauth'">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></a>
</div>
</div>
<div class="repo-access-note"><span v-if="error &amp;&amp; detectedType !== 'gist' &amp;&amp; githubConnection === 'github-app'">Signing in does not grant access to private repositories. Use Manage GitHub access to select this repository, then return here. Organization access may require administrator approval.</span><span v-if="detectedType !== 'gist' &amp;&amp; githubConnection !== 'oauth' &amp;&amp; !details">Select repositories on GitHub, then return here.</span><span><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-info"></use></svg> Selected content will be published, including content from private repositories.</span></div>
<aside class="repo-access-details" aria-label="Publication" v-if="details &amp;&amp; sourceIsPrivate()">
<div class="repo-access-note"><span><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-info"></use></svg> {{ detectedType === 'gist' ? 'This secret gist will be published at a public link.' : 'Selected content will be published, including content from private repositories.' }}</span></div>
</aside>
<p class="form-text text-muted source-public-note" v-else-if="details">Anonymized content is public.</p>
<details class="repair-disclosure" v-if="isUpdate &amp;&amp; detectedType === 'repo' &amp;&amp; role === 'owner' &amp;&amp; sourceUrl === 'https://github.com/' + _originalFullName" :open="!!(error || accessRepairMessage || reconnectRepositoryId)">
<details class="repair-disclosure" v-if="isUpdate &amp;&amp; detectedType === 'repo' &amp;&amp; role === 'owner' &amp;&amp; sourceUrl === 'https://github.com/' + _originalFullName" :open="!!(error || sourceError || accessRepairMessage || reconnectRepositoryId)">
<summary>Connection problems?</summary>
<div class="repair-step" v-if="accessRepairAllowed &amp;&amp; githubConnections?.appEnabled &amp;&amp; githubConnection === 'github-app' &amp;&amp; sourceUrl === 'https://github.com/' + _originalFullName">
<p>If this repository became private or its App installation changed, repair its access here. This keeps the same anonymous URL and published commit.</p>
@@ -180,7 +165,7 @@
</div>
</details>
<div class="form-grid-2" v-if="detectedType === &#x27;repo&#x27;">
<div class="form-grid-2" v-if="detectedType === &#x27;repo&#x27;" v-show="sourceReady()">
<div class="form-group">
<label class="paper-field-label" for="branch">Branch</label>
<div class="input-group">
@@ -208,7 +193,7 @@
</div>
</div>
<div class="form-check auto-update-check" v-show="detectedType" :class="{ 'is-paid': !liveUpdatesIncluded() }">
<div class="form-check auto-update-check" v-show="detectedType &amp;&amp; sourceReady()" :class="{ 'is-paid': !liveUpdatesIncluded() }">
<input class="form-check-input" type="checkbox" id="update" name="update" aria-describedby="update-help" v-field="{ state: viewState, set: value =&gt; { options.update = value }, value: options?.update, form: &quot;anonymize&quot;, options: {} }">
<label class="form-check-label" for="update">Auto-update from GitHub<span class="paid-tag" v-if="!liveUpdatesIncluded()">Paid</span></label>
<small class="form-text text-muted" id="update-help" v-if="liveUpdatesIncluded()">Follows the latest version, at most once an hour.</small>
@@ -216,7 +201,7 @@
</div>
</section>
<section class="paper-settings-section" v-show="detectedType">
<section class="paper-settings-section" v-show="detectedType &amp;&amp; sourceReady()">
<h2 class="paper-section-eyebrow">Anonymization</h2>
<div class="form-group" v-show="detectedType === &#x27;repo&#x27;">
@@ -300,7 +285,7 @@
</dialog>
</section>
<section class="paper-settings-section" v-show="detectedType">
<section class="paper-settings-section" v-show="detectedType &amp;&amp; sourceReady()">
<h2 class="paper-section-eyebrow">Display</h2>
<div v-show="detectedType === &#x27;repo&#x27;">
@@ -394,7 +379,7 @@
</div>
</section>
<section class="paper-settings-section hosting-settings" id="repository-hosting" v-show="detectedType" aria-labelledby="hosting-heading">
<section class="paper-settings-section hosting-settings" id="repository-hosting" v-show="detectedType &amp;&amp; sourceReady()" aria-labelledby="hosting-heading">
<h2 class="paper-section-eyebrow" id="hosting-heading">Hosting &amp; expiration</h2>
<div class="form-group conference-field">
<label class="paper-field-label" for="conference">Conference code <span class="paper-optional">(optional)</span></label>
@@ -504,7 +489,7 @@
<div class="anonymize-submit-bar" v-show="detectedType">
<template v-if="detectedType === 'repo'">
<button type="button" class="btn btn-ink" v-if="billingPending" @click="refreshBilling()" :disabled="billingBusy">Check payment status</button>
<button type="submit" class="btn btn-ink" v-else :disabled="sourceLoading || billingBusy || hostingSaving || billingLoading || (hostingNeedsPayment() &amp;&amp; ((!authorPlans().length &amp;&amp; !hostingOneTime()) || billing?.checkoutEnabled === false))" @click.prevent="submitForm($event, () =&gt; { submitRepository($event) })">{{ hostingSaving ? 'Saving draft…' : hostingNeedsPayment() ? 'Continue to checkout' : isUpdate ? 'Save changes' : 'Create anonymous link' }}</button>
<button type="submit" class="btn btn-ink" v-else :disabled="sourceLoading || !sourceReady() || billingBusy || hostingSaving || billingLoading || (hostingNeedsPayment() &amp;&amp; ((!authorPlans().length &amp;&amp; !hostingOneTime()) || billing?.checkoutEnabled === false))" @click.prevent="submitForm($event, () =&gt; { submitRepository($event) })">{{ hostingSaving ? 'Saving draft…' : hostingNeedsPayment() ? 'Continue to checkout' : isUpdate ? 'Save changes' : 'Create anonymous link' }}</button>
</template>
<button type="submit" :disabled="sourceLoading || !details" class="btn btn-ink" v-if="detectedType === &#x27;pr&#x27; &amp;&amp; !isUpdate" @click.prevent="submitForm($event, () =&gt; { anonymizePullRequest($event) })">
@@ -519,11 +504,10 @@
<button type="submit" :disabled="sourceLoading" class="btn btn-ink" v-if="detectedType === &#x27;gist&#x27; &amp;&amp; isUpdate" @click.prevent="submitForm($event, () =&gt; { anonymizeGist($event) })">
Save changes
</button>
<p class="submit-reason" role="status" v-if="sourceLoading">{{ detectedType === 'pr' ? 'Waiting for the pull request to load from GitHub…' : detectedType === 'gist' ? 'Waiting for the gist to load from GitHub…' : 'Waiting for the repository to load from GitHub…' }}</p>
<p class="submit-reason" role="status" v-else-if="!details &amp;&amp; !isUpdate">Load an accessible source to continue. See the preview for details.</p>
<p class="submit-reason" role="status" v-if="submitBlockedReason()">{{ submitBlockedReason() }}</p>
<p class="checkout-return-note" v-if="hostingNeedsPayment() &amp;&amp; !billingPending">You pay in Stripe, then come back here to finish.</p>
<div class="draft-status" role="status" v-if="draftRestored">Your unsaved draft was restored. <button type="button" class="draft-discard" @click="discardDraft()">Discard draft</button></div>
<div class="draft-status" v-else-if="unsavedChanges">{{ draftSaved ? "Draft saved ·" : "Unsaved changes ·" }} <button type="button" class="draft-discard" @click="discardDraft()">{{ isUpdate ? "Restore saved" : "Discard" }}</button></div>
<div class="draft-status" v-else-if="unsavedChanges &amp;&amp; sourceReady()">{{ draftSaved ? "Draft saved ·" : "Unsaved changes ·" }} <button type="button" class="draft-discard" @click="discardDraft()">{{ isUpdate ? "Restore saved" : "Discard" }}</button></div>
</div>
</form>
</div>
@@ -532,7 +516,7 @@
<div id="workspace-preview" :role="mobileWorkspace ? 'tabpanel' : null" :aria-labelledby="mobileWorkspace ? 'workspace-preview-tab' : null" class="anonymize-preview-col reviewer-preview" v-if="detectedType">
<div class="rp-caption">
<span class="rp-title">What reviewers will see</span>
<button type="button" class="rp-open" v-if="detectedType === 'repo'" @click="previewViewer.sidebarCollapsed = !previewViewer.sidebarCollapsed" :aria-expanded="!previewViewer.sidebarCollapsed" aria-controls="preview-file-tree">Files</button>
<button type="button" class="rp-open" v-if="detectedType === 'repo' &amp;&amp; details" @click="previewViewer.sidebarCollapsed = !previewViewer.sidebarCollapsed" :aria-expanded="!previewViewer.sidebarCollapsed" aria-controls="preview-file-tree">Files</button>
<span class="rp-count" v-if="previewStatus === 'ready' &amp;&amp; previewRedactions() &gt; 0" :title="previewRedactions() + ' redacted terms in this preview'"><span class="redact-slot" aria-hidden="true"><i>{{ previewRedactions() }}</i></span> redacted</span>
<span class="rp-count rp-count-none" v-else-if="previewStatus === 'ready' &amp;&amp; !String(terms || '').trim()">No terms yet</span>
<button type="button" class="rp-count rp-count-none" v-else-if="previewStatus === 'ready' &amp;&amp; previewPreserved()" @click="openPreserveFiles()" title="Change it in Leave files unredacted">{{ previewName(previewFile ? previewFile.slice(previewFile.lastIndexOf('/') + 1) : readmeName()) }} left unredacted</button>
@@ -544,7 +528,7 @@
<div class="rp-chrome" aria-hidden="true"><i></i><i></i><i></i><span class="rp-url">{{ previewUrl() || 'anonymous.4open.science' }}</span></div>
<div class="rp-bar" aria-hidden="true"><span class="vb-logo">Anonymous <em>GitHub</em></span><span class="rp-bar-id" v-if="previewId()">{{ previewId() }}</span><span class="rp-bar-kind" v-if="detectedType !== 'repo'">{{ detectedType === 'pr' ? 'Pull request' : 'Gist' }}</span></div>
<div class="rp-body" :class="{ 'reviewer-explorer': detectedType === 'repo' }">
<aside id="preview-file-tree" class="leftCol" :class="{ collapsed: previewViewer.sidebarCollapsed }" v-if="detectedType === 'repo'" aria-label="Files reviewers will see">
<aside id="preview-file-tree" class="leftCol" :class="{ collapsed: previewViewer.sidebarCollapsed }" v-if="detectedType === 'repo'" v-show="details" aria-label="Files reviewers will see">
<div class="leftCol-head"><span class="leftCol-eyebrow">Files</span><button type="button" class="leftCol-close" aria-label="Close files" @click="previewViewer.sidebarCollapsed = true"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-close"></use></svg></button></div>
<div class="leftCol-body">
<tree class="files" :file="previewTreeFiles()" :page="previewViewer" :selected-path="'/' + previewPathName(previewOpenPath())" @select="selectPreviewPath($event)"></tree>
@@ -559,16 +543,11 @@
<i class="rp-skel rp-skel-title"></i><i class="rp-skel" style="width:92%"></i><i class="rp-skel" style="width:86%"></i><i class="rp-skel" style="width:58%"></i>
<i class="rp-skel rp-skel-block"></i><i class="rp-skel" style="width:80%"></i><i class="rp-skel" style="width:66%"></i>
</div>
<!-- The source itself could not be loaded -->
<div class="rp-state rp-error" role="alert" v-else-if="!details &amp;&amp; detectedType !== 'repo'">
<strong>Couldn't load {{ sourceSummary() || (detectedType === 'pr' ? 'this pull request' : 'this gist') }}</strong>
<p>{{ error || 'GitHub did not return it. Check that the link is right and that Anonymous GitHub can read it.' }}</p>
<div class="rp-state-actions"><button type="button" class="btn btn-ink btn-sm" @click="urlSelected(true)">Retry</button><button type="button" class="btn btn-outline-ink btn-sm" v-if="detectedType === 'pr' &amp;&amp; githubConnection !== 'oauth'" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button><a class="btn btn-outline-ink btn-sm" v-else href="/connections">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></a></div>
</div>
<div class="rp-state rp-error" role="alert" v-else-if="!details &amp;&amp; detectedType === 'repo' &amp;&amp; !isUpdate &amp;&amp; error">
<strong>Couldn't load this repository</strong>
<p>{{ error }}</p>
<div class="rp-state-actions"><button type="button" class="btn btn-ink btn-sm" @click="urlSelected(true)">Retry</button><button type="button" class="btn btn-outline-ink btn-sm" v-if="githubConnection !== 'oauth'" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button></div>
<!-- The source itself could not be loaded: the form's message, with the same actions -->
<div class="rp-state rp-error" v-else-if="!details &amp;&amp; sourceProblem()">
<strong>{{ sourceProblem().title }}</strong>
<p>{{ sourceProblem().text }}</p>
<div class="rp-state-actions" v-if="sourceProblem().manage || sourceProblem().retry || sourceProblem().dashboard"><button type="button" class="btn btn-ink btn-sm" v-if="sourceProblem().manage === 'app'" @click="grantGitHubAccess()">Manage GitHub access <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-external-link"></use></svg></button><a class="btn btn-ink btn-sm" href="/connections" v-if="sourceProblem().manage === 'link'">Manage GitHub access</a><a class="btn btn-ink btn-sm" href="/dashboard" v-if="sourceProblem().dashboard">Open My work</a><button type="button" class="btn btn-outline-ink btn-sm" v-if="sourceProblem().retry" @click="urlSelected(true)">Try again</button></div>
</div>
<!-- The open file could not be read from GitHub -->
<div class="rp-state rp-error" role="alert" v-else-if="previewStatus === 'error' &amp;&amp; previewDoc.loadError">
+87 -33
View File
@@ -1962,6 +1962,79 @@ export const anonymizeController = function (state, http, html, params, location
if (m) return m[1] + " · gist " + (m[2].length > 12 ? m[2].slice(0, 7) + "…" + m[2].slice(-4) : m[2]);
return "";
};
// A source that failed to load gets one message with its fix, shared by
// the form (under the URL) and the preview pane. `sourceError` is the
// server's error code; `sourceErrorText` its translation, used for codes
// without their own wording here.
state.sourceError = "";
state.sourceErrorText = "";
const sourceErrorKinds = {
repo_access_limited: "access", repo_not_accessible: "access", repo_saml_enforcement: "access",
repo_already_anonymized: "used",
repo_not_found: "missing", github_app_access_required: "missing", pull_request_not_found: "missing", gist_not_found: "missing", token_expired: "missing",
};
const recordSourceError = (error) => {
const code = error?.data?.error || (error?.status === 404 ? "repo_not_found" : "unknown_error");
state.sourceError = code;
state.sourceErrorText = "";
if (!sourceErrorKinds[code]) translate("ERRORS." + code).then(text => { if (state.sourceError === code && text !== "ERRORS." + code) state.sourceErrorText = text; }, () => {});
displayErrorMessage(code);
setValidity("sourceUrl", "missing", false);
};
const clearSourceError = () => { state.sourceError = ""; state.sourceErrorText = ""; };
// Fields that depend on the source wait for it, except when editing a
// saved anonymization: its settings stay editable even if GitHub fails.
state.sourceReady = () => !!state.isUpdate || !!state.details;
state.sourceProblem = () => {
const field = state.anonymize?.sourceUrl?.errors || {};
if (field.github || (state.sourceUrlError && state.workspaceOpen)) {
return { kind: "github", title: "Not a GitHub URL", text: "Paste a repository, pull request, or gist URL from github.com." };
}
if (state.sourceLoading || state.details && !field.used) return null;
if (state.gistAppRequired || state.gistOAuthRequired) return { kind: "connect", title: "Couldn't load this gist", text: "Connect GitHub to read gists." };
const code = state.sourceError || (field.used ? "repo_already_anonymized" : field.access ? "repo_not_accessible" : field.missing ? "repo_not_found" : "");
if (!code) return null;
const kind = sourceErrorKinds[code] || "other";
const type = state.detectedType;
let name = "this gist";
try {
const o = parseGithubUrl(String(state.sourceUrl || "").trim());
if (type === "pr") name = `pull request #${o.pullRequestId} in ${o.owner}/${o.repo}`;
else if (type !== "gist") name = `${o.owner}/${o.repo}`;
} catch (_) { /* named generically */ }
const what = type === "pr" ? "this pull request" : type === "gist" ? "this gist" : "this repository";
const app = type !== "gist" && state.githubConnection === "github-app";
// "app": the GitHub installation page; "link": the connections page.
// When editing a repository, "Connection problems?" below the URL opens with the repair steps.
const manage = state.isUpdate && type === "repo" ? null : type === "gist" || !state.githubConnection ? "link" : app ? "app" : "link";
const title = "Couldn't load " + what;
if (kind === "used") return { kind, title: "Already anonymized", text: `You've already anonymized ${name}. Open it from My work to change its settings.`, dashboard: true };
if (kind === "access") {
const reason = code === "repo_saml_enforcement" ? "Its organization requires single sign-on." : "Its organization restricts third-party apps.";
const note = code === "repo_saml_enforcement"
? "Authorize your GitHub session for the organization, then try again."
: "An organization owner may need to approve Anonymous GitHub. You can also anonymize a personal fork.";
return { kind, title, text: `We can't read ${name}. ${reason}`, note, manage, retry: true };
}
if (kind === "missing") {
const who = app ? "the Anonymous GitHub app hasn't been given access to it" : "your GitHub account can't see it";
return { kind, title, text: `We can't read ${name}. It doesn't exist, or ${who}.`, manage, retry: true };
}
return { kind, title, text: state.sourceErrorText || "GitHub didn't return it. Try again in a moment.", retry: true };
};
// Why the primary button is disabled, said next to it.
state.submitBlockedReason = () => {
if (state.sourceLoading) return state.detectedType === "pr" ? "Waiting for the pull request to load from GitHub…" : state.detectedType === "gist" ? "Waiting for the gist to load from GitHub…" : "Waiting for the repository to load from GitHub…";
if (state.sourceReady()) return "";
if (state.sourceProblem()?.kind === "github") return "Enter a GitHub URL to continue.";
return state.detectedType === "pr" ? "Add a pull request you can access to continue." : state.detectedType === "gist" ? "Add a gist you can access to continue." : "Add a repository you can access to continue.";
};
// The publication warning applies once the source is known to be private.
state.sourceIsPrivate = () => {
if (!state.details) return false;
if (state.detectedType === "gist") return state.details.gist ? !state.details.gist.isPublic : true;
return state.details.private !== false;
};
// "What reviewers will see": the anonymous URL being configured, shown in
// the preview window's address bar and kept in sync with the ID field.
state.previewId = () => state.detectedType === "pr" ? state.pullRequestId : state.detectedType === "gist" ? state.gistId : state.repoId;
@@ -2264,6 +2337,8 @@ export const anonymizeController = function (state, http, html, params, location
try { o = parseGithubUrl(state.sourceUrl.trim()); }
catch (_) {
state.sourceLoading = false;
state.details = null;
clearSourceError();
scheduleRepoPreview.cancel();
refreshPrPreview.cancel();
refreshGistPreview.cancel();
@@ -2277,6 +2352,7 @@ export const anonymizeController = function (state, http, html, params, location
selectedSourceKey = key;
state.sourceUrlError = "";
setValidity("sourceUrl", "github", true);
clearSourceError();
const transferFocus = document.activeElement?.id === "sourceUrl-landing";
state.workspaceOpen = true;
// Show the pasted URL from its start, not scrolled to the caret.
@@ -2386,15 +2462,9 @@ export const anonymizeController = function (state, http, html, params, location
if (!isCurrentSource(request)) return;
state.branches = [];
state.sourceUnreachable = error && (error.status === 404 || (error.data && error.data.error === "repo_not_found"));
const code = (error && error.data && error.data.error) || (error && error.status === 404 ? "repo_not_found" : "unknown_error");
translate("ERRORS." + code).then((translation) => {
state.toasts = state.toasts || [];
state.addToast({ title: "Error", date: new Date(), body: translation });
state.error = translation;
}, console.error);
if (typeof setValidity === "function") {
setValidity("sourceUrl", "missing", false);
}
// Without branches the source is not usable: report it like a failed load.
state.details = null;
recordSourceError(error);
} finally { finishSourceRequest(request); }
};
@@ -2404,6 +2474,7 @@ export const anonymizeController = function (state, http, html, params, location
const request = beginSourceRequest();
try {
resetValidity();
clearSourceError();
// force=1 so newly enabled features (e.g. GitHub Pages — see
// #364) are reflected without waiting for the cached metadata to
// expire. The endpoint hits the GitHub API once.
@@ -2422,14 +2493,8 @@ export const anonymizeController = function (state, http, html, params, location
await state.getBranches(state.reconnectingSource);
} catch (error) {
if (!isCurrentSource(request)) return;
if (error.data) {
translate("ERRORS." + error.data.error).then((translation) => {
state.addToast({ title: "Error", date: new Date(), body: translation });
state.error = translation;
}, console.error);
displayErrorMessage(error.data.error);
}
setValidity("sourceUrl", "missing", false);
// The form and the preview show it; no toast on top.
recordSourceError(error);
throw error;
} finally { finishSourceRequest(request); }
}
@@ -2972,6 +3037,7 @@ export const anonymizeController = function (state, http, html, params, location
const request = beginSourceRequest();
try {
resetValidity();
clearSourceError();
const res = await http.get(`/api/pr/${o.owner}/${o.repo}/${o.pullRequestId}`, { params: { connection: state.githubConnection } });
if (!isCurrentSource(request)) return;
state.details = res.data;
@@ -2980,14 +3046,8 @@ export const anonymizeController = function (state, http, html, params, location
}
} catch (error) {
if (!isCurrentSource(request)) return;
if (error.data) {
translate("ERRORS." + error.data.error).then((translation) => {
state.addToast({ title: "Error", date: new Date(), body: translation });
state.error = translation;
}, console.error);
displayErrorMessage(error.data.error);
}
setValidity("sourceUrl", "missing", false);
// The form and the preview show it; no toast on top.
recordSourceError(error);
throw error;
} finally { finishSourceRequest(request); }
}
@@ -3043,6 +3103,7 @@ export const anonymizeController = function (state, http, html, params, location
const request = beginSourceRequest();
try {
resetValidity();
clearSourceError();
state.gistOAuthRequired = false;
state.gistAppRequired = false;
const res = await http.get(`/api/gist/source/${o.gistId}`);
@@ -3063,14 +3124,7 @@ export const anonymizeController = function (state, http, html, params, location
setValidity("sourceUrl", "missing", false);
return;
}
if (error.data) {
translate("ERRORS." + error.data.error).then((translation) => {
state.addToast({ title: "Error", date: new Date(), body: translation });
state.error = translation;
}, console.error);
displayErrorMessage(error.data.error);
}
setValidity("sourceUrl", "missing", false);
recordSourceError(error);
throw error;
} finally { finishSourceRequest(request); }
}
+50 -50
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)),Le=(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),_e=(e,t,s,i)=>(hr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),$e=(e,t,s)=>(hr(e,t,"access private method"),s);var nl=(e,t,s,i)=>({set _(o){_e(e,t,o,s)},get _(){return re(e,t,i)}});var ge=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function ol(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let 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 sl(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),d=r?{clientId:r.clientId,intentId:r.intentId}:null,p,c,v,g,y,m=!0,b,E=i.defer(),S=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(_=>_.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>m&&e.user?.username===y;function w(){m=!1,r=p=c=void 0,E.resolve(),o.clearTimeout(b)}e.on("dispose",w),e.on("routeLeave",w),e.watch(()=>e.user?.username,_=>{!y&&_?y=_:y&&_!==y&&(w(),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:E.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":c}}),O=_=>_?.status===404?"Artifact linking is not available on this server.":_?.status===401?"Sign in, then open a new artifact link from your submission.":_?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!m||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let _=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(_)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,o.clearTimeout(b),g||(g=S());try{let j=(await s.get("/api/review-consent/csrf",{timeout:E.promise})).data;if(!N())return;if(c=j.csrf,e.handoffEnabled=j.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(c||""))throw new Error("invalid_csrf");let oe=(await s.post("/api/review-consent/preview",{repositoryId:_,intent:{...r,requestId:g}},D())).data;if(!N())return;if(!oe||typeof oe.ticket!="string"||!oe.ticket||oe.ticket.length>8192||typeof oe.repositoryName!="string"||!["restricted-review","anonymous-liLine truncated
`))),e[hn]=Fo(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]=Fo(d),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Io(e.value):e.value,c=t??"";if(p===c)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===c)||(e.value=c)}},oa={deep:!0,created(e,t,s){e[hn]=Fo(s),Vn(e,"change",()=>{let i=e._modelValue,o=Ms(e),r=e.checked,d=e[hn];if(Ne(i)){let p=li(i,o),c=p!==-1;if(r&&!c)d(i.concat(o));else if(!r&&c){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]=Fo(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,c=>c.selected).map(c=>s?Io(Ms(c)):Ms(c)),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]=Fo(i)},mounted(e,{value:t}){Wd(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[hn]=Fo(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=Ms(d);if(s)if(i){let c=typeof p;c==="string"||c==="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(Ms(d),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(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=sn(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 lo=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 Ze=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 Uo=()=>{},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,Sh=/\?/g,tu=/\+/g,Eh=/%5B/g,Nh=/%5D/g,nu=/%5E/g,Rh=/%60/g,ou=/%7B/g,Th=/%7C/g,su=/%7D/g,Dh=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(Th,"|").replace(Eh,"[").replace(Nh,"]")}function iu(e){return aa(e).replace(ou,"{").replace(su,"}").replace(nu,"^")}function sa(e){return aa(e).replace(tu,"%2B").replace(Dh,"+").replace(eu,"%23").replace(wh,"%26").replace(Rh,"`").replace(ou,"{").replace(su,"}").replace(nu,"^")}function Ph(e){return sa(e).replace(Ch,"%3D")}function Ah(e){return aLine truncated
"use strict";(()=>{var ol=Object.defineProperty;var sl=e=>{throw TypeError(e)};var df=(e,t,s)=>t in e?ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var uf=(e,t)=>{for(var s in t)ol(e,s,{get:t[s],enumerable:!0})};var tt=(e,t,s)=>df(e,typeof t!="symbol"?t+"":t,s),yr=(e,t,s)=>t.has(e)||sl("Cannot "+s);var re=(e,t,s)=>(yr(e,t,"read from private field"),s?s.call(e):t.get(e)),$e=(e,t,s)=>t.has(e)?sl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),ze=(e,t,s,i)=>(yr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Fe=(e,t,s)=>(yr(e,t,"access private method"),s);var il=(e,t,s,i)=>({set _(o){ze(e,t,o,s)},get _(){return re(e,t,i)}});var ge=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function rl(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 al(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),d=r?{clientId:r.clientId,intentId:r.intentId}:null,p,c,v,g,y,m=!0,b,S=i.defer(),E=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(_=>_.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>m&&e.user?.username===y;function w(){m=!1,r=p=c=void 0,S.resolve(),o.clearTimeout(b)}e.on("dispose",w),e.on("routeLeave",w),e.watch(()=>e.user?.username,_=>{!y&&_?y=_:y&&_!==y&&(w(),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":c}}),M=_=>_?.status===404?"Artifact linking is not available on this server.":_?.status===401?"Sign in, then open a new artifact link from your submission.":_?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!m||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let _=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(_)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,o.clearTimeout(b),g||(g=E());try{let j=(await s.get("/api/review-consent/csrf",{timeout:S.promise})).data;if(!N())return;if(c=j.csrf,e.handoffEnabled=j.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(c||""))throw new Error("invalid_csrf");let oe=(await s.post("/api/review-consent/preview",{repositoryId:_,intent:{...r,requestId:g}},P())).data;if(!N())return;if(!oe||typeof oe.ticket!="string"||!oe.ticket||oe.ticket.length>8192||typeof oe.repositoryName!="string"||!["restricted-review","anonymous-liLine truncated
`))),e[gn]=Lo(o);let r=i||o.props&&o.props.type==="number";qn(e,t?"change":"input",d=>{d.target.composing||e[gn](sa(e.value,s,r))}),(s||r)&&qn(e,"change",()=>{e.value=sa(e.value,s,r)}),t||(qn(e,"compositionstart",fh),qn(e,"compositionend",Kd),qn(e,"change",Kd))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[$i];delete e[$i],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[gn](sa(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},d){if(e[gn]=Lo(d),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Do(e.value):e.value,c=t??"";if(p===c)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===c)||(e.value=c)}},ra={deep:!0,created(e,t,s){e[gn]=Lo(s),qn(e,"change",()=>{let i=e._modelValue,o=Is(e),r=e.checked,d=e[gn];if(Re(i)){let p=ci(i,o),c=p!==-1;if(r&&!c)d(i.concat(o));else if(!r&&c){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(xd(e,r))})},mounted:Yd,beforeUpdate(e,t,s){e[gn]=Lo(s),Yd(e,t,s)}};function Yd(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Re(t))o=ci(t,i.props.value)>-1;else if(Xt(t))o=t.has(i.props.value);else{if(t===s)return;o=Qt(t,xd(e,!0))}e.checked!==o&&(e.checked=o)}var Tt={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,qn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>s?Do(Is(c)):Is(c)),r=e.multiple,d=r?Xt(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Re(d)?o.slice():o:d];try{e[gn](d)}finally{Ke(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[gn]=Lo(i)},mounted(e,{value:t}){Jd(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[gn]=Lo(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!mh(t,s[1],s[0]))&&Jd(e,t)}};function mh(e,t,s){if(!s)return Qt(e,t);if(Re(e))return Qt(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 Jd(e,t){let s=e.multiple,i=Re(t);if(!(s&&!i&&!Xt(t))){for(let o=0,r=e.options.length;o<r;o++){let d=e.options[o],p=Is(d);if(s)if(i){let c=typeof p;c==="string"||c==="number"?d.selected=t.some(v=>String(v)===String(p)):d.selected=ci(t,p)>-1}else d.selected=t.has(p);else if(Qt(Is(d),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Is(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 hh=["ctrl","shift","alt","meta"],gh={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)=>hh.some(s=>e[`${s}Key`]&&!t.includes(s))},le=(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=gh[t[d]];if(p&&p(o,t))return}return e(o,...r)}))},vh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$t=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=rn(o.key);if(t.some(d=>d===r||vh[d]===r))return e(o)}))},yh=mt({patchProp:uh},Ym),Xd;function bh(){return Xd||(Xd=Dd(yh))}var eu=((...e)=>{let t=bh().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=kh(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,wh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),d},t});function wh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function kh(e){return dt(e)?document.querySelector(e):e}var ao=typeof document<"u";function nu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ch(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&nu(e.default)}var xe=Object.assign;function _i(e,t){let s={};for(let i in t){let o=t[i];s[i]=Yt(o)?o.map(e):e(o)}return s}var Fo=()=>{},Yt=Array.isArray;function da(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var ou=/#/g,Eh=/&/g,Sh=/\//g,Nh=/=/g,Rh=/\?/g,su=/\+/g,Th=/%5B/g,Ph=/%5D/g,iu=/%5E/g,Dh=/%60/g,ru=/%7B/g,Ah=/%7C/g,au=/%7D/g,Ih=/%20/g;function ua(e){return e==null?"":encodeURI(""+e).replace(Ah,"|").replace(Th,"[").replace(Ph,"]")}function lu(e){return ua(e).replace(ru,"{").replace(au,"}").replace(iu,"^")}function aa(e){return ua(e).replace(su,"%2B").replace(Ih,"+").replace(ou,"%23").replace(Eh,"%26").replace(Dh,"`").replace(ru,"{").replace(au,"}").replace(iu,"^")}function Oh(e){return aa(e).replace(Nh,"%3D")}function Mh(e){return uLine 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 "${_h(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 ao(e,t){return Ze(new Error,{type:e,[mu]:!0},t)}function gn(e,t){return e instanceof Error&&mu in e&&(t==null||!!(e.type&t))}var Fh=["params","query","hash"];function _h(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Fh)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=_o(r<0?o:o.slice(0,r)),p=r<0?null:_o(o.slice(r+1));if(d in t){let c=t[d];Kt(c)||(c=t[d]=[c]),c.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&&sa(o)):[i&&sa(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 Bo(){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,c)=>{let v=m=>{m===!1?c(ao(ct.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?c(m):$h(m)?c(ao(ct.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(d&&i.enterCallbacks[o]===d&&typeof m=="function"&&d.push(m),p())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(g);e.length<3&&(y=y.then(v)),y.catch(m=>c(m))})}function Hi(e,t,s,i,o=r=>r()){let r=[];for(let d of e)for(let p in d.components){let c=d.components[p];if(!(t!=="beforeRouteEnter"&&!d.instances[p]))if(xd(c)){let v=(c.__vccOpts||c)[t];v&&r.push(Nn(v,s,i,d,p,o))}else{let v=c();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${p}" at "${d.path}"`);let y=bh(g)?g.default:g;d.mods[p]=g,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=>ro(v,p))?i.push(p):s.push(p));let c=e.matched[d];c&&(t.matched.find(v=>ro(v,c))||o.push(c))}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 b=Pu(e,location),E=s.value,S=t.value,N=0;if(m){if(s.value=b,t.value=m,d&&d===E){d=null;return}N=S?m.position-S.position:0}else i(b);o.forEach(w=>{w(s.value,E,{delta:N,type:Fi.pop,direction:N?N>0?_i.forward:_i.back:_i.unknown})})};function c(){d=s.value}function v(m){o.push(m);let b=()=>{let E=o.indexOf(m);E>-1&&o.splice(E,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Ze({},m.state,{scroll:Vs()}),"")}}function y(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:c,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?Vs():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(c,v,g){let y=e.indexOf("#"),m=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+c:Uh()+e+c;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function d(c,v){r(c,Ze({},t.state,bu(o.value.back,c,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=c}function p(c,v){let g=Ze({},o.value,t.state,{forward:c,scroll:Vs()});r(g.current,g,!0),r(c,Ze({},bu(i.value,c,null),{position:g.position+1},v),!1),i.value=c}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=Ze({locatLine truncated
`).forEach((q,k)=>{for(let[L,W]of b){let z=L.exec(q);if(z&&!/^(if|for|while|switch|return|catch)$/.test(z[1])){I.push({name:z[1],kind:W,line:k+1});break}}}),E={content:e.content,list:I.slice(0,300)},E.list},e.goToSymbol=function(I){e.symbolsOpen=!1;let q=e.codeEditor;q&&(q.scrollToLine(I-1,!0,!0,()=>{}),q.gotoLine(I,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+I),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 I=window.document.getElementById("goto-input");I&&(I.focus(),I.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let I=e.codeEditor;if(!I)return;let q=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),k=I.session.getLength();if(!q||+q[1]<1||+q[1]>k){e.gotoError="Enter a line from 1 to "+k;return}I.gotoLine(+q[1],q[2]?Math.max(0,+q[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",I.focus()},e.rootEntries=function(){return[...e.files||[]].sort((I,q)=>{let k=I.size==null,L=q.size==null;return k!==L?k?-1:1:I.name.localeCompare(q.name)})},e.formatSize=function(I){if(I==null)return"";if(I<1024)return I+" B";let q=I/1024,k=L=>L.toFixed(1).replace(/\.0$/,"");return q<1024?k(q)+" KB":q<1024*1024?k(q/1024)+" MB":k(q/1024/1024)+" GB"},e.fileSize=function(I){if(!I)return null;let q=I.replace(/^\/+/,""),k=(e.files||[]).find(L=>(L.path?L.path+"/":"")+L.name===q);return k&&k.size!=null?k.size:null},e.revealFolder=function(I){e.sidebarHidden=!1,e.sidebarCollapsed=!1,je(()=>{let q=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(I):I)+'"]');q&&(q.closest("li")?.classList.contains("open")||q.click(),q.scrollIntoView({block:"nearest"}),q.focus())})};let S={content:null,n:0},N=I=>{if(S.content===I)return S.n;let q=I;if(typeof q=="string")try{q=JSON.parse(q)}catch{q=null}let k=[],L=z=>{Array.isArray(z)?k.push(z.join("")):typeof z=="string"&&k.push(z)};(q&&(q.cells||(q.worksheets||[]).flatMap(z=>z.cells||[]))||[]).forEach(z=>{L(z?.source??z?.input),(z?.outputs||[]).forEach(J=>{L(J?.text),J?.data&&(L(J.data["text/plain"]),L(J.data["text/markdown"]),L(J.data["text/html"])),L(J?.traceback)})});let W=k.reduce((z,J)=>z+(J.match(s)||[]).length,0);return S={content:I,n:W},W};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=Ls;let w=I=>I.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(I){let q=e.renderRedacted(I);if(!q||typeof window.DOMParser!="function")return q;let k=new window.DOMParser().parseFromString("<div>"+q+"</div>","text/html"),L={};return k.querySelectorAll("h1, h2, h3").forEach(W=>{let z=W.id||w(W.textContent);L[z]?z+="-"+ ++L[z]:L[z]=1,W.id=z}),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 q=[...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:q},q},e.activeHeading=null,o(window,"scroll",()=>{let I=e.readmeToc?e.readmeToc():[];if(!I.length)return;let q=150,k="",L="";for(let W of I){let z=window.document.getElementById(W.id);if(!z)continue;let J=z.getBoundingClientRect().top;J<q?k=W.id:!L&&J<window.innerHeight-80&&(L=W.id)}L&&(k=L),e.activeHeading!==k&&(e.activeHeading=k)},{capture:!0,passive:!0}),e.scrollToHeading=function(I){if(!I){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let q=window.document.getElementById(I);q&&q.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=I},e.csvView="table";let O={content:null,rows:[]},_=(I,q)=>{let k=[],L=[],W="",z=!1;for(let J=0;J<I.length;J++){let ne=I[J];z?ne==='"'?I[J+1]==='"'?(W+='"',J++):z=!1:W+=ne:ne==='"'&&W===""?z=!0:ne===q?(L.push(W),W=""):ne===`
`||ne==="\r"?(ne==="\r"&&I[J+1]===`
`&&J++,L.push(W),k.push(L),L=[],W=""):W+=ne}return(W!==""||L.length)&&(L.push(W),k.push(L)),k.filter(J=>J.length>1||J[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(O.content!==e.content){let I=/\.tsv$/i.test(e.filePath||"")?" ":",";O={content:e.content,rows:_(e.content,I)}}return O.rows},e.csvNumCol=I=>{let q=e.csvRows().slice(1).map(k=>k[I]).filter(k=>k!=null&&String(k).trim()!=="");return q.length>0&&q.every(k=>e.csvNumeric(k))},e.csvNumeric=I=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(I)&&/\d/.test(I),e.redactParts=function(I){let q=[],k=0,L,W=/\bXXXX-(\d+)\b/g;for(I=String(I||"");L=W.exec(I);)L.index>k&&q.push({t:I.slice(k,L.index)}),q.push({n:L[1]}),k=L.index+L[0].length;return k<I.length&&q.push({t:I.slice(k)}),q},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 I=e.content;if(e.type==="html"&&e.url)if(e.preview)I=e.sourceContent;else try{I=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(I),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function j(I){return r[I]?r[I]:I}function oe(I){return I=="pdf"?"pdf":I=="html"||I=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(I)?"md":I=="org"?"org":I=="ipynb"?"IPython":d.indexOf(I)>-1?"text":p.indexOf(I)>-1?"image":v.indexOf(I)>-1?"media":c.indexOf(I)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(I){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=I,e.paths=I.split("/").filter(Boolean);let q=e.filePath.toLowerCase(),k=q.lastIndexOf(".");k>-1&&(q=q.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:""},W=j(q);e.languageName=L[W]??(W?W.charAt(0).toUpperCase()+W.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:j(q),onLoad:function(z){e.codeEditor=un(z);{let Re=z.session,Be=Re.getTokens.bind(Re),X=/\bXXXX-\d+\b/g;if(Re.getTokens=function(me){let de=Be(me);if(!de.some(ye=>ye.value.indexOf("XXXX-")!==-1))return de;let pe=[];for(let ye of de){if(ye.value.indexOf("XXXX-")===-1){pe.push(ye);continue}let Ve=0;X.lastIndex=0;let P;for(;P=X.exec(ye.value);)P.index>Ve&&pe.push({type:ye.type,value:ye.value.slice(Ve,P.index)}),pe.push({type:"redacted.n"+P[0].slice(5),value:P[0]}),Ve=P.index+P[0].length;Ve<ye.value.length&&pe.push({type:ye.type,value:ye.value.slice(Ve)})}return pe},!window.document.getElementById("redact-index-rules")){let me=window.document.createElement("style");me.id="redact-index-rules",me.textContent=Array.from({length:99},(de,pe)=>`.ace_redacted.ace_n${pe+1}::after{content:"${pe+1}"}`).join(""),window.document.head.appendChild(me)}z.renderer.updateFull(!0)}z.session.setUseWrapMode(e.wrapLines!==!1);let J=z.container.closest?.(".file-card"),ne=()=>{if(!J)return;let Re=z.renderer,Be=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);J.classList.toggle("at-right-edge",Be<=2||Re.getScrollLeft()>=Be-2)};z.session.on("changeScrollLeft",ne),z.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&z.setOption("hScrollBarAlwaysVisible",!0);let G=ace.require("ace/range").Range,ue=null;function he(Re,Be){ue!==null&&(z.session.removeMarker(ue),ue=null),Re!=null&&(ue=z.session.addMarker(new G(Re,0,Be,1),"highlighted-line","fullLine"))}function Me(Re){let Be=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Be){he(null);return}let X=parseInt(Be[1])-1,me=Be[2]?parseInt(Be[2])-1:X;he(X,me),Re&&i.timeout(()=>{z.scrollToLine(X,!0,!0,function(){})},100)}Me(!0);let Ue=null;z.on("guttermousedown",function(Re){let Be=Re.getDocumentPosition().row,X=Re.domEvent&&Re.domEvent.shiftKey,me=Be,de=Be;X&&Ue!==null?(me=Math.min(Ue,Be),de=Math.max(Ue,Be)):Ue=Be;let pe=me===de?`#L${me+1}`:`#L${me+1}-L${de+1}`,ye=window.location.pathname+window.location.search+pe;e.preview||window.history.replaceState(null,"",ye),he(me,de),Re.stop()});let We=o(window,"hashcha Line truncated
`);for(let y=0;y<g.length;y++){let m=g[y];if(m.startsWith("diff --git")){v(),c();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),c().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){c().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 b=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(d=parseInt(b[1],10),p=parseInt(b[2],10)),c().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,g)=>v?.[g],i),c=r.split(".").reduce((v,g)=>v?.[g],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof c=="string"&&(c=c.toLowerCase()),p!==c)return(p==null?-1:c==null?1:p<c?-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),c=Math.round(p/30.44),v=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:c<18?[c,"month"]:[Math.round(p/365.25),"year"],g=v[0]+" "+v[1]+(v[0]===1?"":"s");d=r>0?"in "+g:g+" 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 _u=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=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let d=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showSta Line truncated
`+S.join(`
`)],{type:"text/csv"}),w=document.createElement("a");w.href=URL.createObjectURL(N),w.download=i.username+"-repositories.csv",w.click()},e.showStatusMessage=m=>{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(E=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(E.data,null,2).replace(/[<>]/g,S=>S==="<"?"&lt;":"&gt;")+"</pre>"),b.document.close())},E=>{let S=E&&E.data?JSON.stringify(E.data,null,2):String(E);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})};function c(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),c(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 g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),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="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>c(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>c(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=st({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(E=>{E.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},E=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=E.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{c(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=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let d=()=>{let E=[];(e.query.dateFrom||e.query.dateTo)&&E.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=E};e.statusCountFor=E=>{let S=(e.statusCounts||[]).find(N=>N._id===E);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=E=>{e.query.sort===E?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=E,e.query.direction="desc"),e.query.page=1},e.sortIcon=E=>e.query.sort===E?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",c={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({},c,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==E),e.presets.push({name:E,query:S}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(S=>S.name!==E.name),localStorage.setItem(y,JS Line truncated
`).map((We,ze)=>ze===0?We:Ue+We).join(`
`)}else typeof J=="number"||typeof J=="boolean"?Me=String(J):Me=JSON.stringify(J);W.push(`${ue}${Me}${he}`)}),W.push("}"),W.join(`
`)}function S(F){let H=[],I="",q=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,k=0,L;for(;L=q.exec(F);)I+=F.slice(k,L.index),k=q.lastIndex,H.push({key:L[1],op:L[2]||"=",val:L[3]});return I+=F.slice(k),{filters:H,free:I.trim().toLowerCase()}}function N(F,H){for(let I of H.filters){let q=(L,W,z)=>{let J=parseFloat(L),ne=parseFloat(W);return z==="="?String(L)===String(W):z==="!="?String(L)!==String(W):z===">="?J>=ne:z==="<="?J<=ne:z===">"?J>ne:z==="<"?J<ne:!0},k;if(I.key==="code")k=F.displayMessage;else if(I.key==="module")k=F.module;else if(I.key==="status")k=F._status;else if(I.key==="url")k=F._url;else if(I.key==="repo")k=F._repoId;else if(I.key==="level")k=F.level;else continue;if(k==null||!q(k,I.val,I.op))return!1}return!(H.free&&((F.displayMessage||"")+" "+(F.module||"")+" "+(F._url||"")+" "+JSON.stringify(F.raw||[])).toLowerCase().indexOf(H.free)===-1)}function w(){let F=S(e.query.search||"");e.parsedFilterCount=F.filters.length;let H=e.query.bucket,I=e.entries.filter(z=>H&&z._bucket!==H?!1:N(z,F)),q=e.query.group;if(q){let z=G=>JSON.stringify(q==="module"?[G.module,G._bucket]:[G.raw?.[0]?.service||"unknown",G.module,G.displayMessage||G.message||"_",G._bucket,G._status]),J=new Map;for(let G of I){let ue=z(G);if(J.has(ue)){let he=J.get(ue);he.count++,he._related.push(G),new Date(G.ts)>new Date(he.ts)&&(he.ts=G.ts,he._url=G._url,he._status=G._status),new Date(G.ts)<new Date(he._firstSeen)&&(he._firstSeen=G.ts)}else{let he=Object.assign({},G);he._key=`${q}:${ue}`,he._related=[G],he._firstSeen=G.ts,he._lastHourCount=0,he.count=1,J.set(ue,he)}}let ne=Date.now()-3600*1e3;for(let G of J.values())G._lastHourCount=G._related.filter(ue=>new Date(ue.ts).getTime()>=ne).length;I=Array.from(J.values())}else I=I.map((z,J)=>(z._key="row:"+J+":"+z.ts,z._related=[z],z._firstSeen=z.ts,z._lastHourCount=0,z.count=1,z));let k=z=>({error:0,warn:1,info:2})[z._bucket]??1;e.query.sort==="count"?I.sort((z,J)=>k(z)-k(J)||J.count-z.count||new Date(J.ts)-new Date(z.ts)):I.sort((z,J)=>k(z)-k(J)||new Date(J.ts)-new Date(z.ts)),e.visible=I;let L=!!(e.query.bucket||(e.query.search||"").trim()),W=!L&&(e.stats?.severity?.error||0)>0&&!I.some(z=>z._bucket==="error")&&e.entries.length<1500;(L&&!I.length||W)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,D(!0))}function D(F){if(F&&e.redisLoading)return;let H=++o;e.redisLoading=!0;let I=F?e.redisNextOffset||e.entries.length:0,q=F?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:I,limit:q}}).then(k=>{if(p||H!==o)return;e.redisLoading=!1;let L=(k.data.entries||[]).map(b);e.entries=F?e.entries.concat(L):L,e.redisRedacted=(F&&e.redisRedacted||0)+(k.data.redactedEntries||0),e.redisNextOffset=k.data.nextOffset??I+(k.data.entries||[]).length,e.available=!!k.data.available,e.redisCollecting=k.data.redisCollecting!==!1,e.cap=k.data.max||e.cap,e.total=k.data.total||e.entries.length,e._autoLoading=!1,w()},()=>{p||H!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>D(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function O(F=!1){if(F&&d)return;let H=++r;d=!0,t.get("/api/admin/errors/stats").then(I=>{if(p||H!==r)return;d=!1;let q=I.data||{};e.redisStatsState=q.available===!1?"unavailable":"ready";let k=q.prev24h?Math.round((q.last24h-q.prev24h)/q.prev24h*100):0;e.stats={last24h:q.last24h||0,prev24h:q.prev24h||0,delta:k,severity:q.severity||{error:0,warn:0,info:0},unique:q.unique||{error:0,warn:0,info:0},buckets:q.buckets||[],dropped:q.dropped||0},w()},()=>{!p&&H===r&&(d=!1,e.redisStatsState="unavailable")})}function _(F=!1){(!F||!e.redisLoading)&&D(),O(F)}e.barPx=(F,H)=>{let I=e.stats.buckets||[],q=0,k=0;for(let J of I)q=Math.max(q,(J.error||0)+(J.warn||0)),k=Math.max(k,J.info||0);let L=F[H]||0;if(!L)return 0;if(H==="info")return k?Math.max(2,Math.round(L/k*(q?16:60))):0;let W=(F.error||0)+(F.warn||0),z=Math.round(W/q*44);return Math.max(4,Math.round(L/W*z))},e.bucketTitle=F=>`${new Date(F.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${F.error||0} err \xB7 ${F.warn||0} warn \xB7 ${F.info||0} info`,e.toggle=async(F,H)=>{v=H||document.activeElement,g=e.captureErrorScroll(v),e.historySelected=F,e.historyView="overview",e.expanded={[F._key]:!0},await je(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=F=>{if(e.historyView="timeline",e.traceSelection)return;let H=["requestId","jobId"].find(I=>e.logTraceId(e.historySelected,I));H&&e.lookupTrace(H,e.logTraceId(e.historySelected,H),F,e.historySelected)},e.closeHistory=async()=>{let F=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await je(),(v?.isConnected?v:[...document.querySelectorAll("[data-history-key]")].find(I=>I.dataset.historyKey===F))?.focus({preventScroll:!0}),e.restoreErrorScroll(g)},e.setBucket=F Line truncated
`)],{type:"text/csv;charset=utf-8"}),q=URL.createObjectURL(I),k=document.createElement("a");k.href=q,k.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(q)};function j(F){e.copyHint=`${F} copied`,c.timeout(()=>{e.copyHint=""},1500)}e.copyJson=F=>{navigator.clipboard.writeText(F._rawJson).then(()=>j("JSON"))},e.copyCurl=F=>{if(!F._url)return;let I=`curl -X ${F._method||"GET"} '${window.location.origin}${F._url}'`;navigator.clipboard.writeText(I).then(()=>j("curl"))},_();let oe=i(()=>{e.query.autoRefresh&&_(!0)},15e3);e.on("dispose",()=>{p=!0,o++,r++,i.cancel(oe)}),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},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(w){e.ovView=w;try{window.history.replaceState(null,"",w==="summary"?window.location.pathname:"#"+w)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var w=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:w}}).then(function(D){w===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,w!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(w){return e.cacheTraffic==="all"||w.traffic===e.cacheTraffic})},e.cacheRate=function(w,D){var O=e.cacheRows(),_=function(F){return O.filter(function(H){return H.name===F}).reduce(function(H,I){return H+I[D]},0)},j=_(w+"_hit"),oe=_(w+"_miss");return j+oe?(100*j/(j+oe)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(w){return w.replaceAll("_"," ")},e.cacheP95=function(w){var D=0,O=e.cacheReport?.latencyBucketsMs||[];if(!w.count)return"No samples";if(!w.ms)return"Not timed";for(var _=0;_<=O.length;_++)if(D+=w["b"+_]||0,D>=Math.ceil(w.count*.95))return _<O.length?"\u2264 "+qn(O[_]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let w=e.data&&e.data.system||{},D=[["Memory",w.memPercent],["Disk",w.diskPercent]].filter(([,_])=>_>90);return D.length?D.map(([_,j])=>_+" is at "+j+"%").join(" and ")+". New anonymizations may fail until "+(D.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(w){return w==null?"":qn(w)},e.latencyBound=function(w,D){return w.count?w[D]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(w[D]):"No samples"},e.firstByteBound=function(w){return e.latencyBound({count:w.firstByteCount,p95UpperMs:w.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(w){return Math.max(0,Math.round((Date.now()-w.sampledAt)/1e3))},e.peakRss=function(w){return(e.performance.runtimeSeries||[]).filter(function(D){return D.instance===w.instance}).reduce(function(D,O){return Math.max(D,O.rss)},w.memory.rss)},e.performanceWarning=function(w){return e.sampleAge(w)>45||w.droppedBatches||w.droppedMetrics||w.sockets?.closeWait>0||w.eventLoop?.p95Ms>100||w.memoryLimitBytes&&w.memory.rss>w.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var w=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==w&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:w}}).then(function(D){w===e.performanceMinutes&&(e.performance=D.data,e.performanceError=D.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){w===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,w!==e.performanceMinutes&&e.loadPerformance()}))};function d(w){if(w==null)return"\u2014";for(var D=["B","KB","MB","GB","TB"],O=0,_=w;_>=1024&&O<D.length-1;)_/=1024,O++;return _.toFixed(O>0?1:0).replace(/\.0$/,"")+" "+D[O]}e.humanBytes=d;function p(w){if(!w)return"\u2014";var D=Math.floor(w/86400),O=Math.floor(w%86400/3600),_=Math.floor(w%3600/60);return D>0?D+"d "+(O<10?"0":"")+O+"h":O>0?O+"h "+(_<10?"0":"")+_+"m":_+"m"}e.humanDuration=p;function c(w){return w==null?"\u2014":w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":String(w)}e.humanNum=c,e.queueTotal=function(w){return w?(w.waiting||0)+(w.active||0)+(w.delayed||0)+(w.failed||0):0},e.statusCount=function(w){if(!e.data||!e.data.repos)return 0;for(var D=e.data.repos.statusBreakdown||[],O=0;O<D.length;O++)if(D[O]._id===w)return D[O].count;return 0},e.barPct=function(w){var D=e.data&&e.data.repos?e.data.repos.total:0;if(!D)return 0;var O=[w];w==="expired"&&O.push("expiring"),w==="remov 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}),po,Bn,Pa,Aa,Us=class{constructor(t,s,i){Le(this,Bn);et(this,"dots");et(this,"dotStart");Le(this,po);this.dots=t,this.dotStart=s,_e(this,po,i)}state(){return new Da(++re(this,po).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(!$e(this,Bn,Pa).call(this,t,s))return;for(let d of s.out)this.add(t,d,i,o);return;case"neg":if(!$e(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;$e(this,Bn,Aa).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:$e(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)}};po=new WeakMap,Bn=new WeakSet,Pa=function(t,s){let{seen:i}=re(this,po);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Aa=function(t,s){let{has:i}=re(this,po);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,zo,Ho,Ln,fo,$n,Fn,_n,on,Oa,xi,cc,Ia=class{constructor(t,s){Le(this,on);Le(this,zo);Le(this,Ho,new Map);Le(this,Ln,0);Le(this,fo);Le(this,$n);Le(this,Fn);Le(this,_n);_e(this,zo,t),_e(this,Fn,new Us(!1,!1,s)),_e(this,_n,new Us(!1,!0,s))}start(t){if(t){if(re(this,$n))return re(this,$n);let i=re(this,_n).state();return re(this,_n).add(i,re(this,zo),0,!0),_e(this,$n,$e(this,on,Oa).call(this,re(this,_n).done(i)))}if(re(this,fo))return re(this,fo);let s=re(this,Fn).state();return re(this,Fn).add(s,re(this,zo),0,!0),_e(this,fo,$e(this,on,xi).call(this,re(this,Fn).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===re(this,$n)?$e(this,on,xi).call(this,re(this,_n).step(t.state,s,0,!0)):$e(this,on,xi).call(this,re(this,Fn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),_e(this,Ln,re(this,Ln)+128)),t.ascii[i]=r):t.next.set(s,r),nl(this,Ln)._++,r}};zo=new WeakMap,Ho=new WeakMap,Ln=new WeakMap,fo=new WeakMap,$n=new WeakMap,Fn=new WeakMap,_n=new WeakMap,on=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,Ho).get(s);if(i)return i;re(this,Ln)>nv&&$e(this,on,cc).call(this);let o=$e(this,on,Oa).call(this,t);return re(this,Ho).set(s,o),_e(this,Ln,re(this,Ln)+(s.length+1)),o},cc=function(){re(this,Ho).clear(),_e(this,Ln,0),_e(this,fo,void 0),_e(this,$n,void 0)};var ov=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},sv=(e,t,s,i)=>{let o=0,r=s,d=-1,p=0;for(;r<i;){let c=e[o];if(c?.t==="star"){d=o++,p=r;continue}let v=t[r];if(c&&(c.t==="any"||c.t==="lit"&&Ma(c,v)||c.t==="class"&&c.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]},oc=(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,sc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Un,jo,mo,er,ho,zs,tr,go,Hs,js,Gs,Tn,vn,Go,Wo,Ws,nr,nn,vo,_s,Bs=class{constructor(t,s={}){Le(this,vo);et(this,"pattern");et(this,"options");Le(this,Un);Le(this,jo);Le(this,mo);Le(this,er);Le(this,ho);Le(this,zs,!1);Le(this,tr);Le(this,go);Le(this,Hs,!1);Le(this,js,0);Le(this,Gs,1/0);Le(this,Tn,[]);Le(this,vn,[]);Le(this,Go);Le(this,Wo);Le(this,Ws,!1);Le(this,nr);Le(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
`+JSON.stringify(t):""}`},[pt.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${zh(t)}" via a navigation guard.`},[pt.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[pt.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[pt.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ro(e,t){return xe(new Error,{type:e,[vu]:!0},t)}function vn(e,t){return e instanceof Error&&vu in e&&(t==null||!!(e.type&t))}var Bh=["params","query","hash"];function zh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Bh)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function yu(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(su," "),r=o.indexOf("="),d=$o(r<0?o:o.slice(0,r)),p=r<0?null:$o(o.slice(r+1));if(d in t){let c=t[d];Yt(c)||(c=t[d]=[c]),c.push(p)}else t[d]=p}return t}function ha(e){let t="";for(let s in e){let i=e[s];if(s=Oh(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(Yt(i)?i.map(o=>o&&aa(o)):[i&&aa(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function bu(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Yt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var wu=Symbol(""),ga=Symbol(""),Hi=Symbol(""),ji=Symbol(""),Gi=Symbol("");function _o(){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 Rn(e,t,s,i,o,r=d=>d()){let d=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,c)=>{let v=m=>{m===!1?c(ro(pt.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?c(m):Uh(m)?c(ro(pt.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(d&&i.enterCallbacks[o]===d&&typeof m=="function"&&d.push(m),p())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(g);e.length<3&&(y=y.then(v)),y.catch(m=>c(m))})}function Wi(e,t,s,i,o=r=>r()){let r=[];for(let d of e)for(let p in d.components){let c=d.components[p];if(!(t!=="beforeRouteEnter"&&!d.instances[p]))if(nu(c)){let v=(c.__vccOpts||c)[t];v&&r.push(Rn(v,s,i,d,p,o))}else{let v=c();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${p}" at "${d.path}"`);let y=Ch(g)?g.default:g;d.mods[p]=g,d.components[p]=y;let m=(y.__vccOpts||y)[t];return m&&Rn(m,s,i,d,p,o)()}))}}return r}function ku(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=>io(v,p))?i.push(p):s.push(p));let c=e.matched[d];c&&(t.matched.find(v=>io(v,c))||o.push(c))}return[s,i,o]}var Hh=()=>location.protocol+"//"+location.host;function Ou(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),ca(p,"")}return ca(s,e)+i+o}function jh(e,t,s,i){let o=[],r=[],d=null,p=({state:m})=>{let b=Ou(e,location),S=s.value,E=t.value,N=0;if(m){if(s.value=b,t.value=m,d&&d===S){d=null;return}N=E?m.position-E.position:0}else i(b);o.forEach(w=>{w(s.value,S,{delta:N,type:Bi.pop,direction:N?N>0?zi.forward:zi.back:zi.unknown})})};function c(){d=s.value}function v(m){o.push(m);let b=()=>{let S=o.indexOf(m);S>-1&&o.splice(S,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(xe({},m.state,{scroll:Os()}),"")}}function y(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:c,listen:v,destroy:y}}function Cu(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?Os():null}}function Gh(e){let{history:t,location:s}=window,i={value:Ou(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(c,v,g){let y=e.indexOf("#"),m=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+c:Hh()+e+c;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function d(c,v){r(c,xe({},t.state,Cu(o.value.back,c,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=c}function p(c,v){let g=xe({},o.value,t.state,{forward:c,scroll:Os()});r(g.current,g,!0),r(c,xe({},Cu(i.value,c,null),{position:g.position+1},v),!1),i.value=c}return{location:i,state:o,push:p,replace:d}}function Mu(e){e=pu(e);let t=Gh(e),s=jh(e,t.state,t.location,t.replace);function i(r,d=!0){d||s.pauseListeners(),history.go(r)}let o=xe({locatLine truncated
`).forEach((q,k)=>{for(let[L,G]of b){let z=L.exec(q);if(z&&!/^(if|for|while|switch|return|catch)$/.test(z[1])){I.push({name:z[1],kind:G,line:k+1});break}}}),S={content:e.content,list:I.slice(0,300)},S.list},e.goToSymbol=function(I){e.symbolsOpen=!1;let q=e.codeEditor;q&&(q.scrollToLine(I-1,!0,!0,()=>{}),q.gotoLine(I,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+I),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 I=window.document.getElementById("goto-input");I&&(I.focus(),I.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let I=e.codeEditor;if(!I)return;let q=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),k=I.session.getLength();if(!q||+q[1]<1||+q[1]>k){e.gotoError="Enter a line from 1 to "+k;return}I.gotoLine(+q[1],q[2]?Math.max(0,+q[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",I.focus()},e.rootEntries=function(){return[...e.files||[]].sort((I,q)=>{let k=I.size==null,L=q.size==null;return k!==L?k?-1:1:I.name.localeCompare(q.name)})},e.formatSize=function(I){if(I==null)return"";if(I<1024)return I+" B";let q=I/1024,k=L=>L.toFixed(1).replace(/\.0$/,"");return q<1024?k(q)+" KB":q<1024*1024?k(q/1024)+" MB":k(q/1024/1024)+" GB"},e.fileSize=function(I){if(!I)return null;let q=I.replace(/^\/+/,""),k=(e.files||[]).find(L=>(L.path?L.path+"/":"")+L.name===q);return k&&k.size!=null?k.size:null},e.revealFolder=function(I){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Ke(()=>{let q=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(I):I)+'"]');q&&(q.closest("li")?.classList.contains("open")||q.click(),q.scrollIntoView({block:"nearest"}),q.focus())})};let E={content:null,n:0},N=I=>{if(E.content===I)return E.n;let q=I;if(typeof q=="string")try{q=JSON.parse(q)}catch{q=null}let k=[],L=z=>{Array.isArray(z)?k.push(z.join("")):typeof z=="string"&&k.push(z)};(q&&(q.cells||(q.worksheets||[]).flatMap(z=>z.cells||[]))||[]).forEach(z=>{L(z?.source??z?.input),(z?.outputs||[]).forEach(K=>{L(K?.text),K?.data&&(L(K.data["text/plain"]),L(K.data["text/markdown"]),L(K.data["text/html"])),L(K?.traceback)})});let G=k.reduce((z,K)=>z+(K.match(s)||[]).length,0);return E={content:I,n:G},G};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=Vs;let w=I=>I.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(I){let q=e.renderRedacted(I);if(!q||typeof window.DOMParser!="function")return q;let k=new window.DOMParser().parseFromString("<div>"+q+"</div>","text/html"),L={};return k.querySelectorAll("h1, h2, h3").forEach(G=>{let z=G.id||w(G.textContent);L[z]?z+="-"+ ++L[z]:L[z]=1,G.id=z}),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 q=[...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:q},q},e.activeHeading=null,o(window,"scroll",()=>{let I=e.readmeToc?e.readmeToc():[];if(!I.length)return;let q=150,k="",L="";for(let G of I){let z=window.document.getElementById(G.id);if(!z)continue;let K=z.getBoundingClientRect().top;K<q?k=G.id:!L&&K<window.innerHeight-80&&(L=G.id)}L&&(k=L),e.activeHeading!==k&&(e.activeHeading=k)},{capture:!0,passive:!0}),e.scrollToHeading=function(I){if(!I){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let q=window.document.getElementById(I);q&&q.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=I},e.csvView="table";let M={content:null,rows:[]},_=(I,q)=>{let k=[],L=[],G="",z=!1;for(let K=0;K<I.length;K++){let ne=I[K];z?ne==='"'?I[K+1]==='"'?(G+='"',K++):z=!1:G+=ne:ne==='"'&&G===""?z=!0:ne===q?(L.push(G),G=""):ne===`
`||ne==="\r"?(ne==="\r"&&I[K+1]===`
`&&K++,L.push(G),k.push(L),L=[],G=""):G+=ne}return(G!==""||L.length)&&(L.push(G),k.push(L)),k.filter(K=>K.length>1||K[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 I=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:_(e.content,I)}}return M.rows},e.csvNumCol=I=>{let q=e.csvRows().slice(1).map(k=>k[I]).filter(k=>k!=null&&String(k).trim()!=="");return q.length>0&&q.every(k=>e.csvNumeric(k))},e.csvNumeric=I=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(I)&&/\d/.test(I),e.redactParts=function(I){let q=[],k=0,L,G=/\bXXXX-(\d+)\b/g;for(I=String(I||"");L=G.exec(I);)L.index>k&&q.push({t:I.slice(k,L.index)}),q.push({n:L[1]}),k=L.index+L[0].length;return k<I.length&&q.push({t:I.slice(k)}),q},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 I=e.content;if(e.type==="html"&&e.url)if(e.preview)I=e.sourceContent;else try{I=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(I),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function j(I){return r[I]?r[I]:I}function oe(I){return I=="pdf"?"pdf":I=="html"||I=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(I)?"md":I=="org"?"org":I=="ipynb"?"IPython":d.indexOf(I)>-1?"text":p.indexOf(I)>-1?"image":v.indexOf(I)>-1?"media":c.indexOf(I)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(I){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=I,e.paths=I.split("/").filter(Boolean);let q=e.filePath.toLowerCase(),k=q.lastIndexOf(".");k>-1&&(q=q.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:""},G=j(q);e.languageName=L[G]??(G?G.charAt(0).toUpperCase()+G.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:j(q),onLoad:function(z){e.codeEditor=cn(z);{let Ne=z.session,Ue=Ne.getTokens.bind(Ne),Y=/\bXXXX-\d+\b/g;if(Ne.getTokens=function(pe){let ue=Ue(pe);if(!ue.some(be=>be.value.indexOf("XXXX-")!==-1))return ue;let he=[];for(let be of ue){if(be.value.indexOf("XXXX-")===-1){he.push(be);continue}let Oe=0;Y.lastIndex=0;let T;for(;T=Y.exec(be.value);)T.index>Oe&&he.push({type:be.type,value:be.value.slice(Oe,T.index)}),he.push({type:"redacted.n"+T[0].slice(5),value:T[0]}),Oe=T.index+T[0].length;Oe<be.value.length&&he.push({type:be.type,value:be.value.slice(Oe)})}return he},!window.document.getElementById("redact-index-rules")){let pe=window.document.createElement("style");pe.id="redact-index-rules",pe.textContent=Array.from({length:99},(ue,he)=>`.ace_redacted.ace_n${he+1}::after{content:"${he+1}"}`).join(""),window.document.head.appendChild(pe)}z.renderer.updateFull(!0)}z.session.setUseWrapMode(e.wrapLines!==!1);let K=z.container.closest?.(".file-card"),ne=()=>{if(!K)return;let Ne=z.renderer,Ue=(Ne.layerConfig?.width||0)-(Ne.$size?.scrollerWidth||0);K.classList.toggle("at-right-edge",Ue<=2||Ne.getScrollLeft()>=Ue-2)};z.session.on("changeScrollLeft",ne),z.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&z.setOption("hScrollBarAlwaysVisible",!0);let x=ace.require("ace/range").Range,fe=null;function me(Ne,Ue){fe!==null&&(z.session.removeMarker(fe),fe=null),Ne!=null&&(fe=z.session.addMarker(new x(Ne,0,Ue,1),"highlighted-line","fullLine"))}function ke(Ne){let Ue=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Ue){me(null);return}let Y=parseInt(Ue[1])-1,pe=Ue[2]?parseInt(Ue[2])-1:Y;me(Y,pe),Ne&&i.timeout(()=>{z.scrollToLine(Y,!0,!0,function(){})},100)}ke(!0);let Ve=null;z.on("guttermousedown",function(Ne){let Ue=Ne.getDocumentPosition().row,Y=Ne.domEvent&&Ne.domEvent.shiftKey,pe=Ue,ue=Ue;Y&&Ve!==null?(pe=Math.min(Ve,Ue),ue=Math.max(Ve,Ue)):Ve=Ue;let he=pe===ue?`#L${pe+1}`:`#L${pe+1}-L${ue+1}`,be=window.location.pathname+window.location.search+he;e.preview||window.history.replaceState(null,"",be),me(pe,ue),Ne.stop()});let je=o(window,"hashcha Line truncated
`);for(let y=0;y<g.length;y++){let m=g[y];if(m.startsWith("diff --git")){v(),c();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),c().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){c().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 b=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(d=parseInt(b[1],10),p=parseInt(b[2],10)),c().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 vg(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function yg(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 bg(e){return String(e??"").toUpperCase()}function wg(e,t,s=0){return(e||[]).slice(s,s+t)}function kg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Cg(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,g)=>v?.[g],i),c=r.split(".").reduce((v,g)=>v?.[g],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof c=="string"&&(c=c.toLowerCase()),p!==c)return(p==null?-1:c==null?1:p<c?-1:1)*d}return 0})}function Eg(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 Sg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function ka(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),c=Math.round(p/30.44),v=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:c<18?[c,"month"]:[Math.round(p/365.25),"year"],g=v[0]+" "+v[1]+(v[0]===1?"":"s");d=r>0?"in "+g:g+" ago"}return i+" \xB7 "+d}function Ln(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 Ca(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 Zi=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 zu=function(e,t,s){let i=kt(),o=zt();Ju(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"}),w=document.createElement("a");w.href=URL.createObjectURL(N),w.download=i.username+"-repositories.csv",w.click()},e.showStatusMessage=m=>{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(S=>{b&&(b.document.open(),b.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>"),b.document.close())},S=>{let E=S&&S.data?JSON.stringify(S.data,null,2):String(S);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+E+"</pre>")})};function c(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),c(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 g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),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="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>c(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>c(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=rt({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(S=>{S.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},S=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=S.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{c(i.username)},500)},!0)},Gu=function(e,t,s){let i=kt(),o=zt();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",c={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({},c,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.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((je,He)=>He===0?je:Ve+je).join(`
`)}else typeof K=="number"||typeof K=="boolean"?ke=String(K):ke=JSON.stringify(K);G.push(`${fe}${ke}${me}`)}),G.push("}"),G.join(`
`)}function E(F){let H=[],I="",q=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,k=0,L;for(;L=q.exec(F);)I+=F.slice(k,L.index),k=q.lastIndex,H.push({key:L[1],op:L[2]||"=",val:L[3]});return I+=F.slice(k),{filters:H,free:I.trim().toLowerCase()}}function N(F,H){for(let I of H.filters){let q=(L,G,z)=>{let K=parseFloat(L),ne=parseFloat(G);return z==="="?String(L)===String(G):z==="!="?String(L)!==String(G):z===">="?K>=ne:z==="<="?K<=ne:z===">"?K>ne:z==="<"?K<ne:!0},k;if(I.key==="code")k=F.displayMessage;else if(I.key==="module")k=F.module;else if(I.key==="status")k=F._status;else if(I.key==="url")k=F._url;else if(I.key==="repo")k=F._repoId;else if(I.key==="level")k=F.level;else continue;if(k==null||!q(k,I.val,I.op))return!1}return!(H.free&&((F.displayMessage||"")+" "+(F.module||"")+" "+(F._url||"")+" "+JSON.stringify(F.raw||[])).toLowerCase().indexOf(H.free)===-1)}function w(){let F=E(e.query.search||"");e.parsedFilterCount=F.filters.length;let H=e.query.bucket,I=e.entries.filter(z=>H&&z._bucket!==H?!1:N(z,F)),q=e.query.group;if(q){let z=x=>JSON.stringify(q==="module"?[x.module,x._bucket]:[x.raw?.[0]?.service||"unknown",x.module,x.displayMessage||x.message||"_",x._bucket,x._status]),K=new Map;for(let x of I){let fe=z(x);if(K.has(fe)){let me=K.get(fe);me.count++,me._related.push(x),new Date(x.ts)>new Date(me.ts)&&(me.ts=x.ts,me._url=x._url,me._status=x._status),new Date(x.ts)<new Date(me._firstSeen)&&(me._firstSeen=x.ts)}else{let me=Object.assign({},x);me._key=`${q}:${fe}`,me._related=[x],me._firstSeen=x.ts,me._lastHourCount=0,me.count=1,K.set(fe,me)}}let ne=Date.now()-3600*1e3;for(let x of K.values())x._lastHourCount=x._related.filter(fe=>new Date(fe.ts).getTime()>=ne).length;I=Array.from(K.values())}else I=I.map((z,K)=>(z._key="row:"+K+":"+z.ts,z._related=[z],z._firstSeen=z.ts,z._lastHourCount=0,z.count=1,z));let k=z=>({error:0,warn:1,info:2})[z._bucket]??1;e.query.sort==="count"?I.sort((z,K)=>k(z)-k(K)||K.count-z.count||new Date(K.ts)-new Date(z.ts)):I.sort((z,K)=>k(z)-k(K)||new Date(K.ts)-new Date(z.ts)),e.visible=I;let L=!!(e.query.bucket||(e.query.search||"").trim()),G=!L&&(e.stats?.severity?.error||0)>0&&!I.some(z=>z._bucket==="error")&&e.entries.length<1500;(L&&!I.length||G)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,P(!0))}function P(F){if(F&&e.redisLoading)return;let H=++o;e.redisLoading=!0;let I=F?e.redisNextOffset||e.entries.length:0,q=F?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:I,limit:q}}).then(k=>{if(p||H!==o)return;e.redisLoading=!1;let L=(k.data.entries||[]).map(b);e.entries=F?e.entries.concat(L):L,e.redisRedacted=(F&&e.redisRedacted||0)+(k.data.redactedEntries||0),e.redisNextOffset=k.data.nextOffset??I+(k.data.entries||[]).length,e.available=!!k.data.available,e.redisCollecting=k.data.redisCollecting!==!1,e.cap=k.data.max||e.cap,e.total=k.data.total||e.entries.length,e._autoLoading=!1,w()},()=>{p||H!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>P(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function M(F=!1){if(F&&d)return;let H=++r;d=!0,t.get("/api/admin/errors/stats").then(I=>{if(p||H!==r)return;d=!1;let q=I.data||{};e.redisStatsState=q.available===!1?"unavailable":"ready";let k=q.prev24h?Math.round((q.last24h-q.prev24h)/q.prev24h*100):0;e.stats={last24h:q.last24h||0,prev24h:q.prev24h||0,delta:k,severity:q.severity||{error:0,warn:0,info:0},unique:q.unique||{error:0,warn:0,info:0},buckets:q.buckets||[],dropped:q.dropped||0},w()},()=>{!p&&H===r&&(d=!1,e.redisStatsState="unavailable")})}function _(F=!1){(!F||!e.redisLoading)&&P(),M(F)}e.barPx=(F,H)=>{let I=e.stats.buckets||[],q=0,k=0;for(let K of I)q=Math.max(q,(K.error||0)+(K.warn||0)),k=Math.max(k,K.info||0);let L=F[H]||0;if(!L)return 0;if(H==="info")return k?Math.max(2,Math.round(L/k*(q?16:60))):0;let G=(F.error||0)+(F.warn||0),z=Math.round(G/q*44);return Math.max(4,Math.round(L/G*z))},e.bucketTitle=F=>`${new Date(F.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${F.error||0} err \xB7 ${F.warn||0} warn \xB7 ${F.info||0} info`,e.toggle=async(F,H)=>{v=H||document.activeElement,g=e.captureErrorScroll(v),e.historySelected=F,e.historyView="overview",e.expanded={[F._key]:!0},await Ke(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=F=>{if(e.historyView="timeline",e.traceSelection)return;let H=["requestId","jobId"].find(I=>e.logTraceId(e.historySelected,I));H&&e.lookupTrace(H,e.logTraceId(e.historySelected,H),F,e.historySelected)},e.closeHistory=async()=>{let F=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await Ke(),(v?.isConnected?v:[...document.querySelectorAll("[data-history-key]")].find(I=>I.dataset.historyKey===F))?.focus({preventScroll:!0}),e.restoreErrorScroll(g)},e.setBucket=F Line truncated
`)],{type:"text/csv;charset=utf-8"}),q=URL.createObjectURL(I),k=document.createElement("a");k.href=q,k.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(q)};function j(F){e.copyHint=`${F} copied`,c.timeout(()=>{e.copyHint=""},1500)}e.copyJson=F=>{navigator.clipboard.writeText(F._rawJson).then(()=>j("JSON"))},e.copyCurl=F=>{if(!F._url)return;let I=`curl -X ${F._method||"GET"} '${window.location.origin}${F._url}'`;navigator.clipboard.writeText(I).then(()=>j("curl"))},_();let oe=i(()=>{e.query.autoRefresh&&_(!0)},15e3);e.on("dispose",()=>{p=!0,o++,r++,i.cancel(oe)}),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},Yu=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(w){e.ovView=w;try{window.history.replaceState(null,"",w==="summary"?window.location.pathname:"#"+w)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var w=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:w}}).then(function(P){w===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,w!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(w){return e.cacheTraffic==="all"||w.traffic===e.cacheTraffic})},e.cacheRate=function(w,P){var M=e.cacheRows(),_=function(F){return M.filter(function(H){return H.name===F}).reduce(function(H,I){return H+I[P]},0)},j=_(w+"_hit"),oe=_(w+"_miss");return j+oe?(100*j/(j+oe)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(w){return w.replaceAll("_"," ")},e.cacheP95=function(w){var P=0,M=e.cacheReport?.latencyBucketsMs||[];if(!w.count)return"No samples";if(!w.ms)return"Not timed";for(var _=0;_<=M.length;_++)if(P+=w["b"+_]||0,P>=Math.ceil(w.count*.95))return _<M.length?"\u2264 "+Ln(M[_]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let w=e.data&&e.data.system||{},P=[["Memory",w.memPercent],["Disk",w.diskPercent]].filter(([,_])=>_>90);return P.length?P.map(([_,j])=>_+" is at "+j+"%").join(" and ")+". New anonymizations may fail until "+(P.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(w){return w==null?"":Ln(w)},e.latencyBound=function(w,P){return w.count?w[P]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(w[P]):"No samples"},e.firstByteBound=function(w){return e.latencyBound({count:w.firstByteCount,p95UpperMs:w.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(w){return Math.max(0,Math.round((Date.now()-w.sampledAt)/1e3))},e.peakRss=function(w){return(e.performance.runtimeSeries||[]).filter(function(P){return P.instance===w.instance}).reduce(function(P,M){return Math.max(P,M.rss)},w.memory.rss)},e.performanceWarning=function(w){return e.sampleAge(w)>45||w.droppedBatches||w.droppedMetrics||w.sockets?.closeWait>0||w.eventLoop?.p95Ms>100||w.memoryLimitBytes&&w.memory.rss>w.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var w=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==w&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:w}}).then(function(P){w===e.performanceMinutes&&(e.performance=P.data,e.performanceError=P.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){w===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,w!==e.performanceMinutes&&e.loadPerformance()}))};function d(w){if(w==null)return"\u2014";for(var P=["B","KB","MB","GB","TB"],M=0,_=w;_>=1024&&M<P.length-1;)_/=1024,M++;return _.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+P[M]}e.humanBytes=d;function p(w){if(!w)return"\u2014";var P=Math.floor(w/86400),M=Math.floor(w%86400/3600),_=Math.floor(w%3600/60);return P>0?P+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(_<10?"0":"")+_+"m":_+"m"}e.humanDuration=p;function c(w){return w==null?"\u2014":w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":String(w)}e.humanNum=c,e.queueTotal=function(w){return w?(w.waiting||0)+(w.active||0)+(w.delayed||0)+(w.failed||0):0},e.statusCount=function(w){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===w)return P[M].count;return 0},e.barPct=function(w){var P=e.data&&e.data.repos?e.data.repos.total:0;if(!P)return 0;var M=[w];w==="expired"&&M.push("expiring"),w==="remov Line truncated
`)},Ia=class{constructor(t){tt(this,"gen");tt(this,"threads",[]);tt(this,"match",!1);tt(this,"runs",[]);tt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},pc=(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&&pc(i.state,s.state))),ic=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),co,zn,Oa,Ma,Fs=class{constructor(t,s,i){$e(this,zn);tt(this,"dots");tt(this,"dotStart");$e(this,co);this.dots=t,this.dotStart=s,ze(this,co,i)}state(){return new Ia(++re(this,co).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Aa.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!Fe(this,zn,Oa).call(this,t,s))return;for(let d of s.out)this.add(t,d,i,o);return;case"neg":if(!Fe(this,zn,Oa).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;Fe(this,zn,Ma).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:Fe(this,zn,Ma).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&pc(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":La(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)}};co=new WeakMap,zn=new WeakSet,Oa=function(t,s){let{seen:i}=re(this,co);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ma=function(t,s){let{has:i}=re(this,co);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var fc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${fc(i.state)})`);return`${t}|${s.sort().join("|")}`},iv=1<<18,Uo,Bo,$n,po,Fn,_n,Un,sn,qa,nr,mc,Va=class{constructor(t,s){$e(this,sn);$e(this,Uo);$e(this,Bo,new Map);$e(this,$n,0);$e(this,po);$e(this,Fn);$e(this,_n);$e(this,Un);ze(this,Uo,t),ze(this,_n,new Fs(!1,!1,s)),ze(this,Un,new Fs(!1,!0,s))}start(t){if(t){if(re(this,Fn))return re(this,Fn);let i=re(this,Un).state();return re(this,Un).add(i,re(this,Uo),0,!0),ze(this,Fn,Fe(this,sn,qa).call(this,re(this,Un).done(i)))}if(re(this,po))return re(this,po);let s=re(this,_n).state();return re(this,_n).add(s,re(this,Uo),0,!0),ze(this,po,Fe(this,sn,nr).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,Fn)?Fe(this,sn,nr).call(this,re(this,Un).step(t.state,s,0,!0)):Fe(this,sn,nr).call(this,re(this,_n).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),ze(this,$n,re(this,$n)+128)),t.ascii[i]=r):t.next.set(s,r),il(this,$n)._++,r}};Uo=new WeakMap,Bo=new WeakMap,$n=new WeakMap,po=new WeakMap,Fn=new WeakMap,_n=new WeakMap,Un=new WeakMap,sn=new WeakSet,qa=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},nr=function(t){let s=fc(t),i=re(this,Bo).get(s);if(i)return i;re(this,$n)>iv&&Fe(this,sn,mc).call(this);let o=Fe(this,sn,qa).call(this,t);return re(this,Bo).set(s,o),ze(this,$n,re(this,$n)+(s.length+1)),o},mc=function(){re(this,Bo).clear(),ze(this,$n,0),ze(this,po,void 0),ze(this,Fn,void 0)};var rv=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},av=(e,t,s,i)=>{let o=0,r=s,d=-1,p=0;for(;r<i;){let c=e[o];if(c?.t==="star"){d=o++,p=r;continue}let v=t[r];if(c&&(c.t==="any"||c.t==="lit"&&La(c,v)||c.t==="class"&&c.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},hc=e=>{let t=0,s=0;for(let i of e){let[o,r]=lv(i);t+=o,s+=r}return[t,s]},lv=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(hc),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]},rc=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!La(e[i],t[s+i]))return!1;return!0},dv=/[/\ud800-\udfff]/,uv=/[\ud800-\udfff]/,tr=e=>uv.test(e)?[...e]:e,ac=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Bn,zo,fo,or,mo,Us,sr,ho,Bs,zs,Hs,Pn,yn,Ho,jo,js,ir,on,go,$s,_s=class{constructor(t,s={}){$e(this,go);tt(this,"pattern");tt(this,"options");$e(this,Bn);$e(this,zo);$e(this,fo);$e(this,or);$e(this,mo);$e(this,Us,!1);$e(this,sr);$e(this,ho);$e(this,Bs,!1);$e(this,zs,0);$e(this,Hs,1/0);$e(this,Pn,[]);$e(this,yn,[]);$e(this,Ho);$e(this,jo);$e(this,js,!1);$e(this,ir);$e(this,on);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:o}=Ya(s.trim());if(!o)return;let r=[];for(let d=0;d<o.length;d++){if(o[d]==="\\"){d++;continue}Oc.has(o[d])&&!r.includes(o[d])&&r.push(o[d])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function Vc(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:o}=Ya(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+=Oc.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 Yn={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()})}c();let v=null;e.saveDefault=g=>{if(g&&g.preventDefault&&g.preventDefault(),e.saving)return;let y=p.checkpoint(),m={terms:e.terms.split(`
`).map(b=>b.trim()).filter(b=>b.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)},b=>{e.saving=!1;let E=b&&b.data&&b.data.error,S="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+E),s("ERRORS.unknown_error")]).then(([N,w])=>{e.error=E&&N!==w?N:S},()=>{e.error=S})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Fc=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{s.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},_c=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,c){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(v===void 0)return;p.preventDefault();let g=e.features.length,y=v==="first"?0:v==="last"?g-1:(c+v+g)%g;e.feature=e.features[y].key,o(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},e.demoText=`# DeepLearnUtils
`).map(b=>b.trim()).filter(b=>b.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)},b=>{e.saving=!1;let S=b&&b.data&&b.data.error,E="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+S),s("ERRORS.unknown_error")]).then(([N,w])=>{e.error=S&&N!==w?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."}))}},Bc=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)})}},zc=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,c){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(v===void 0)return;p.preventDefault();let g=e.features.length,y=v==="first"?0:v==="last"?g-1:(c+v+g)%g;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,b)=>b.length-m.length),c=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let v=new RegExp("("+p.map(c).join("|")+")","gi"),g={},y=0;return(e.demoText||"").split(v).filter(m=>m!=="").map(m=>{let b=p.find(E=>E.toLowerCase()===m.toLowerCase());return b?(g[b.toLowerCase()]||(g[b.toLowerCase()]=++y),{text:String(g[b.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 c={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return c;let v=new Array(p.length-1);for(let S=1;S<p.length;S++)v[S-1]=p[S]-p[S-1];let g=v.length,y=Math.max.apply(null,v),m=Math.min.apply(null,v),b=Math.min(0,m),E=y-b||1;c.viewW=g*2,c.bars=new Array(g);for(let S=0;S<g;S++){let N=(v[S]-b)/E,w=Math.max(1.5,N*34);c.bars[S]={x:(S*2+.25).toFixed(2),y:(36-w).toFixed(2),w:"1.5",h:w.toFixed(2)}}if(c.deltaToday=v[g-1],g>=2){let S=v[g-2];S&&(c.pctChange=(c.deltaToday-S)/S*100)}return c.pctAbs=Math.round(Math.abs(c.pctChange)),c.isUp=c.pctChange>=0,c}e.history={repositories:d([]),users:d([]),pageViews:d([]),pullRequests:d([])},t.get("/api/stat/history?days=60").then(p=>{let c=p.data||[];e.history={repositories:d(c.map(v=>v.nbRepositories||0)),users:d(c.map(v=>v.nbUsers||0)),pageViews:d(c.map(v=>v.nbPageViews||0)),pullRequests:d(c.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||c(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 je();let L=document.getElementById(e.projectDetailsId(k));L?.focus(),L?.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 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 W=await t.post("/api/user/project-name",{type:k._type,id:k._id,name:L});k.projectName=W.data.name,k._label=k.projectName||k._fallbackLabel,e.selectedProject===k&&(e.nameMessage=L?"Project name saved.":"Default project name restored."),D||(e.dashboardCursor=null,await _(),e.selectedProject===k&&(e.selectedProject=e.items.find(z=>z._type===k._type&&z._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):F(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function G(C,M,B){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(M,B)}function ue(C){try{let M=parseGithubUrl(C);if(M&&M.owner&&M.repo)return M.owner+"/"+M.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"||ue(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let C=m();try{let M=await t.get("/github/connections");if(e.githubConnections=M.data,!M.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":M.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,b(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 We()}catch{}}};function he(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ue(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Me(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Ue(){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");w=B.values.conference||null;for(let Y of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,Y)&&(e[Y]=B.values[Y]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),D=B.id,O=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Me(),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 M;try{M=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!M||M.path!==o.path()||Date.now()-M.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await Me(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(M.draft,B)&&(e[B]=M.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Me(),sessionStorage.removeItem("github-access-draft"),!0}ne(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&d(Ue,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(M=>M).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)),E=S(parseGithubUrl(e.sourceUrl)),!await Ue()&&(await Promise.all([We(),ze()]),ko())},()=>{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(M=>M).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)),E=S(parseGithubUrl(e.sourceUrl)),!await Ue())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(M=>M).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)),E=S(parseGithubUrl(e.sourceUrl)),!await Ue()&&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&&Me())}).catch(()=>{}),e.urlSelected=async(C=!1)=>{let M=++c;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.":"",G("sourceUrl","github",!1);return}let Y=S(B),ce=C||E===Y;E=Y,e.sourceUrlError="",G("sourceUrl","github",!0);let be=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Je=window.document.getElementById("sourceUrl");if(Je){try{Je.setSelectionRange(0,0)}catch{}Je.scrollLeft=0}},50),be&&d(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ce&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ce||(e.source={type:"GitHubStream",branch:"",commit:""}),Yt.cancel(),An.cancel(),In.cancel(),Co.clear(),So.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",dt(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ce;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([We(),ze()]),ko())}catch{}finally{M===c&&(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 ze(),ko()}),e.getBranches=async C=>{let M=parseGithubUrl(e.sourceUrl),B=m();try{let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0||e.reconnectingSource?"1":"0",repositoryID:he()}});if(!y(B))return;e.branches=Y.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ce=e.branches.filter(be=>be.name==e.source.branch);ce.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=ce[0].commit),e.readme=ce[0].readme,await ze(C))}catch(Y){if(!y(B))return;e.branches=[],e.sourceUnreachable=Y&&(Y.status===404||Y.data&&Y.data.error==="repo_not_found");let ce=Y&&Y.data&&Y.data.error||(Y&&Y.status===404?"repo_not_found":"unknown_error");r("ERRORS."+ce).then(be=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:be}),e.error=be},console.error),typeof G=="function"&&G("sourceUrl","missing",!1)}finally{b(B)}};async function We(){let C=parseGithubUrl(e.sourceUrl),M=m();try{Eo();let B=await t.get(`/api/repo/${C.owner}/${C.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:he(),force:"1"}});if(!y(M))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(M))return;throw B.data&&(r("ERRORS."+B.data.error).then(Y=>{e.addToast({title:"Error",date:new Date,body:Y}),e.error=Y},console.error),No(B.data.error)),G("sourceUrl","missing",!1),B}finally{b(M)}}async function ze(C){if(e.readme&&!C)return e.readme;let M=parseGithubUrl(e.sourceUrl),B=m();try{let Y=await t.get(`/api/repo/${M.owner}/${M.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0?"1":"0",branch:e.source.branch,repositoryID:he()}});y(B,!0)&&(e.readme=Y.data)}catch{y(B,!0)&&(e.readme="")}finally{b(B)}}let tt={magicalBraces:!0},Re=C=>C.startsWith("/")&&!C.endsWith("/")&&zn(yo(C.slice(1),tt),tt)===C.slice(1),Be=()=>Object.keys(e.preserve.picked).filter(C=>e.preserve.pick Line truncated
`).map(C=>C.trim()).filter(Boolean),pe=null,ye=null,Ve=new Set,P=0,A=null,U=()=>!1;function x(){let C=P+"\0"+e.preserve.patterns;if(C!==A){A=C;try{U=ja(Ha([...Be(),...de()]))}catch{U=()=>!1}}return U}function K(C){let M=new Map([["",{dirs:[],files:[]}]]);for(let B of C){let Y=B.split("/"),ce="";for(let be=0;be<Y.length-1;be++){let Je=Y.slice(0,be+1).join("/");M.has(Je)||(M.set(Je,{dirs:[],files:[]}),M.get(ce).dirs.push(Je)),ce=Je}M.get(ce).files.push(B)}for(let B of M.values())B.dirs.sort();return{files:C,dirs:M,descendants:new Map}}function ee(C){return pe.descendants.has(C)||pe.descendants.set(C,pe.files.filter(M=>M.startsWith(C+"/"))),pe.descendants.get(C)}let le=C=>x()(C);function se(C){let M=ee(C),B=0;for(let Y of M)le(Y)&&B++;return B===0?"none":B===M.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(M=>String(M).trim()).filter(Boolean).map(M=>Re(M)?yo(M.slice(1),tt):M);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(!(pe&&e.preserve.commit===C)){e.preserve.loading=!0,e.preserve.error="",pe=null,ye=null;try{let M=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${M.owner}/${M.repo}/tree`,{params:{commit:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:he()}});if(e.source?.commit!==C)return;let Y=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];pe=un(K(B.data.files||[])),ye=Y.length?un(K([...B.data.files||[],...Y])):pe,Ve=un(new Set(Y)),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={},M=[];for(let Y of e.options?.preserveFiles||[]){let ce=String(Y).trim();ce&&(!M.length&&Re(ce)?C[yo(ce.slice(1),tt)]=!0:M.push(ce))}let B={};for(let Y of Object.keys(C)){let ce=Y.split("/");for(let be=1;be<ce.length;be++)B[ce.slice(0,be).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:C,expanded:B,patterns:M.join(`
`),patternsOpen:M.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),P++,d(()=>{let Y=document.getElementById("preserve-files-dialog");Y?.showModal&&!Y.open&&Y.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([...Be(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!pe)return[];let C=x(),M=(be,Je,Lt)=>{let bt=!!e.preserve.picked[be],Jn=C(be);return{kind:"file",path:be,label:Lt,depth:Je,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 pe.files.filter(be=>be.toLowerCase().includes(B)).slice(0,300).map(be=>M(be,0,be));let Y=[],ce=(be,Je)=>{let Lt=pe.dirs.get(be);for(let bt of Lt.dirs){let Jn=!!e.preserve.expanded[bt],xa=de().includes(X(bt));Y.push({kind:"dir",path:bt,label:bt.slice(be?be.length+1:0)+"/",depth:Je,open:Jn,state:se(bt),locked:!1,note:xa?"whole folder":""}),Jn&&ce(bt,Je+1)}for(let bt of Lt.files)Y.push(M(bt,Je,bt.slice(be?be.length+1:0)))};return ce("",0),Y},e.preserveCount=()=>pe?pe.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],P++},e.togglePreserveFolder=C=>{let M=X(C),B=me(C),Y=de().filter(be=>be!==M&&be!==B),ce=se(C)==="all"||de().includes(M);for(let be of ee(C))e.preserve.picked[be]=!1;P++,e.preserve.patterns=(ce?Y:[...Y,M]).join(`
`),ce&&ee(C).some(le)&&(e.preserve.patterns=[...Y,B].join(`
`))};let te=/^readme(\.[^/]*)?$/i,Ce=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],fe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Ee=C=>{let M=z(C),B=M.indexOf("."),Y=Ce.indexOf(B===-1?"":M.slice(B).toLowerCase());return Y===-1?Ce.length:Y},Te=()=>!!pe&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!Te())return"";for(let C of[".github","","docs"]){let M=(pe.dirs.get(C)?.files||[]).filter(B=>te.test(z(B)));if(M.length)return M.sort((B,Y)=>Ee(B)-Ee(Y)||W(B,Y))[0]}return""},e.readmeName=()=>z(e.readmePath())||"README.md";let qe={key:null,fn:()=>!1},Ke=()=>{let C=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),M=C.join(`
`);if(M!==qe.key){let B=()=>!1;try{C.length&&(B=ja(C))}catch{}qe={key:M,fn:B}}return qe.fn};e.pathPreserved=C=>!!C&&Ke()(C),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let C=Ke();if(Te()){let M=e.readmePath();return!!M&&C(M)}return fe.some(M=>C(M))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function He(){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 M=parseGithubUrl(e.sourceUrl);C.repoName=`${M.owner}/${M.repo}`}catch{}return C}function ke(C,M,B){let Y=null,ce=0,be=()=>{if(e.detectedType!==C)return;Y&&d.cancel(Y);let Je=++ce;e.previewStatus="loading",Y=d(()=>{Y=null;let Lt=M();if(!Lt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Lt).then(bt=>{Je===ce&&(B(bt.data,Lt),e.previewStatus="ready")}).catch(()=>{Je===ce&&(e.previewStatus="error")})},200)};return be.cancel=()=>{ce++,Y&&d.cancel(Y),Y=null},e.on("dispose",be.cancel),be}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof lt!="string"?ft(e.previewFile):Yt()),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()};let we=un(qs(e));Object.defineProperty(e,"previewViewer",{get:()=>we}),ha(we,e),Object.assign(we,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),we.preview=!0,we.fileSize=C=>C===we.filePath&&typeof lt=="string"?new Blob([lt]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,we.openPreserveFiles=()=>e.openPreserveFiles(),we.previewPreserved=()=>e.previewPreserved(),we.retryContent=()=>e.retryPreview();let it=C=>Ve.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),we.sidebarCollapsed=!0,we.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(),we.sidebarCollapsed=!0,we.content=null}function ft(C){let M=++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&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:he()},transformResponse:Y=>Y}).then(Y=>{if(M!==yt)return;e.previewDoc.loading=!1;let ce=typeof Y.headers=="function"&&Y.headers("content-type")||"";if(/json/i.test(ce)){let be=null;try{be=JSON.parse(Y.data)}catch{}if(be&&be.binary===!0){cr("binary"),e.previewStatus="ready";return}}lt=typeof Y.data=="string"?Y.data:"",Yt()},Y=>{if(M!==yt)return;e.previewDoc.loading=!1;let ce=ar(Y);if(ce==="file_too_big"){cr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Kn.ERRORS[ce]||"GitHub did not return this file.",e.previewStatus="error"})}let qt;function Yn(){qt&&window.URL.revokeObjectURL(qt),qt=void 0,we.url=void 0}e.on("dispose",Yn);function cr(C){Yn(),e.previewDoc.note=C,we.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),we.type=C==="too_big"?"error":"binary",we.content=C==="too_big"?"file_too_big":"binary"}function ef(C){try{let M=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",Y=C&&C.includes("/")?C.slice(0,C.lastIndexOf("/")+1):"";return`https://github.com/${M.owner}/${M.repo}/raw/${B}/${Y}`}catch{return""}}let Xa=ke("repo",()=>e.previewFile?typeof lt!="string"?null:{content:lt,options:He()}:e.readme?{content:e.readme,options:He()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");Yn(),window.URL?.createObjectURL&&(we.url=qt=window.URL.createObjectURL(new Blob([C.content],{type:"text/plain"})));let M=e.previewOpenPath()||e.readmeName();we.prepareFile(e.previewPathName(M)),we.fileBaseUrl=ef(M),we.renderFileContent(C.content,we.type,we.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=C.content)}),Yt=()=>{e.previewFile&&typeof lt!="string"||Xa()};Yt.cancel=Xa.cancel;let wo=st(new Map),pr=new Set,fr=new Set,xo="",es=null,xs=()=>String(e.terms||"").split(`
`).filter(C=>C.trim());function tf(){es=null;let C=xs(),M=C.join(`
`);M!==xo&&(wo.clear(),fr.clear(),xo=M);let B=[...pr].filter(Y=>!wo.has(Y));if(pr.clear(),!(!B.length||!C.length))for(let Y=0;Y<B.length;Y+=400){let ce=B.slice(Y,Y+400);t.post("/api/anonymize-preview",{contents:ce,options:{terms:C,image:!0,link:!0}}).then(be=>{if(xo!==M||xs().join(`
`)!==M)return;let Je=be.data?.contents;if(!Array.isArray(Je)||Je.length!==ce.length)throw Error("Invalid preview response");ce.forEach((Lt,bt)=>wo.set(Lt,typeof Je[bt]=="string"?Je[bt]:Lt))}).catch(()=>{xo===M&&ce.forEach(be=>fr.add(be))})}}e.previewName=C=>{if(!C||!xs().length)return C;if(xo===xs().join(`
`)){if(wo.has(C))return wo.get(C);if(fr.has(C))return C}return pr.add(C),es||(es=d(tf,120)),C},e.previewPathName=C=>{C=String(C||"");let M=C.lastIndexOf("/");return M<0?e.previewName(C):e.previewName(C.slice(0,M))+"/"+e.previewName(C.slice(M+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{we.repoId=e.repoId||"repository",we.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),we.paths=we.filePath.split("/"),we.files=e.previewTreeFiles(),we.loadedFolders=Object.fromEntries([...ye?.dirs.keys()||[]].map(C=>[e.previewName(C),!0]))},!0),e.on("dispose",()=>{es&&d.cancel(es)});function ko(){!e.anonymize||!e.anonymize.terms||Yt()}async function Qa(){let C=parseGithubUrl(e.sourceUrl),M=m();try{Eo();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(M))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!y(M))return;throw B.data&&(r("ERRORS."+B.data.error).then(Y=>{e.addToast({title:"Error",date:new Date,body:Y}),e.error=Y},console.error),No(B.data.error)),G("sourceUrl","missing",!1),B}finally{b(M)}}let Co=st(new Map);function nf(){let C=new Set,M=e.details&&e.details.pullRequest;if(!M)return C;typeof M.title=="string"&&C.add(M.title),typeof M.body=="string"&&C.add(M.body),typeof M.diff=="string"&&C.add(M.diff);let B=M.comments||[];for(let Y of B)typeof Y.author=="string"&&C.add(Y.author),typeof Y.body=="string"&&C.add(Y.body);return C}let An=ke("pr",()=>{let C=nf(),M=Array.from(C);return M.length===0?null:{contents:M,options:He()}},(C,M)=>{if(!Array.isArray(C?.contents)||C.contents.length!==M.contents.length||C.contents.some(ce=>typeof ce!="string"))throw Error("Invalid preview response");let B=M.contents,Y=new Map;for(let ce=0;ce<B.length&&ce<C.contents.length;ce++)Y.set(B[ce],C.contents[ce]);Co.clear(),Y.forEach((ce,be)=>Co.set(be,ce))});e.anonymizePrContent=function(C){return C&&(Co.has(C)?Co.get(C):"")};async function Za(){let C=parseGithubUrl(e.sourceUrl),M=m();try{Eo(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!y(M))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!y(M))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,G("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,G("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(Y=>{e.addToast({title:"Error",date:new Date,body:Y}),e.error=Y},console.error),No(B.data.error)),G("sourceUrl","missing",!1),B}finally{b(M)}}let So=st(new Map);function of(){let C=new Set,M=e.details&&e.details.gist;if(!M)return C;typeof M.description=="string"&&C.add(M.description),typeof M.ownerLogin=="string"&&C.add(M.ownerLogin);let B=M.files||[];for(let ce of B)typeof ce.filename=="string"&&C.add(ce.filename),typeof ce.content=="string"&&C.add(ce.content);let Y=M.comments||[];for(let ce of Y)typeof ce.author=="string"&&C.add(ce.author),typeof ce.body=="string"&&C.add(ce.body);return C}let In=ke("gist",()=>{let C=of(),M=Array.from(C);return M.length===0?null:{contents:M,options:He()}},(C,M)=>{if(!Array.isArray(C?.contents)||C.contents.length!==M.contents.length||C.contents.some(ce=>typeof ce!="string"))throw Error("Invalid preview response");let B=M.contents,Y=new Map;for(let ce=0;ce<B.length&&ce<C.contents.length;ce++)Y.set(B[ce],C.contents[ce]);So.clear(),Y.forEach((ce,be)=>So.set(be,ce)),mr()});e.anonymizeGistContent=function(C){return C&&(So.has(C)?So.get(C):"")},e.previewGistFiles=[];function mr(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(M=>({filename:e.anonymizeGistContent(M.filename),content:e.anonymizeGistContent(M.content),language:M.language}))}e.watch("details.gist.files",mr,!0),e.watch("terms",mr);function sf(){let C=e.conference;if(e.conference_data=null,!C)return;let M=C===w||e.isUpdate&&C===e._originalConference;C!==w&&(w=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),!M&&(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 Eo(){G("repoId","used",!0),G("repoId","format",!0),G("pullRequestId","used",!0),G("pullRequestId","format",!0),G("gistId","used",!0),G("gistId","format",!0),G("sourceUrl","used",!0),G("sourceUrl","missing",!0),G("sourceUrl","access",!0),G("sourceUrl","github",!0),G("commit","exi Line truncated
`).filter(be=>be),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&&(Y.options.pageSource=e.details.pageSource),Eo();let ce=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ce,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},be=>{if(be.data){let Je=["quota_exceeded","subscription_required_for_never_expiration"].includes(be.data.error);Je||r("ERRORS."+be.data.error).then(Lt=>{e.error=Lt},console.error),No(be.data.error),Je&&(be.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(()=>{M.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 M=C.currentTarget||C.target.closest?.("button")||C.target;M.disabled=!0;let B=parseGithubUrl(e.sourceUrl),Y={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(be=>be),source:{gistId:B.gistId},options:e.options,conference:e.conference};Eo();let ce=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ce,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},be=>{be.data&&(r("ERRORS."+be.data.error).then(Je=>{e.error=Je},console.error),No(be.data.error))}).finally(()=>{M.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 M=C.currentTarget||C.target.closest?.("button")||C.target;M.disabled=!0;let B=parseGithubUrl(e.sourceUrl),Y={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(be=>be),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};Eo();let ce=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ce,Y,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},be=>{be.data&&(r("ERRORS."+be.data.error).then(Je=>{e.error=Je},console.error),No(be.data.error))}).finally(()=>{M.disabled=!1})},e.watch("conference",()=>{sf()}),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"&&ko(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&An(),e.detectedType==="gist"&&In()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ko(),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(),c=0,v=null,g=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),g&&(d.timeout.cancel(g),g=null)}let m=!1;e.on("dispose",()=>{m=!0,c++,y(),b&&b.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",I=>{e.symbolsOpen&&!I.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!I.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!I.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!I.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!I.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",I=>{I.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(I.ctrlKey||I.metaKey)&&!I.altKey&&I.key&&I.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(I.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var q=document.querySelector(".tree-search-input");q&&(q.focus(),q.select())}});var b=null;e.onFileSearchChange=function(){b&&(b.resolve(),b=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let q=r.defer();b=q,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:q.promise}).then(function(k){if(!(m||b!==q)){b=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Be){L[(Be.path||"")+"/"+Be.name]=!0});for(var W=[],z={},J=0;J<k.data.length;J++){var ne=k.data[J];if(ne.path)for(var G=ne.path.split("/"),ue="",he=0;he<G.length;he++){var Me=ue;ue=ue?ue+"/"+G[he]:G[he];var Ue=Me+"/"+G[he];!L[Ue]&&!z[Ue]&&(z[Ue]=!0,W.push({name:G[he],path:Me}))}}W.sort(function(Be,X){return(Be.path||"").split("/").length-(X.path||"").split("/").length}),W.length>0&&e.files.push.apply(e.files,W);for(var We=[],ze=0;ze<k.data.length;ze++){var tt=k.data[ze],Re=(tt.path||"")+"/"+tt.name;!L[Re]&&tt.size!=null&&(We.push(tt),L[Re]=!0)}We.length>0&&e.files.push.apply(e.files,We),e.fileSearchResults=k.data}},function(){!m&&b===q&&(b=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(I,q){if(e.repoId!=i.repoId)return H();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),F();for(let k=0;k<e.paths.length-1;k++){let L=k>0?e.paths.slice(0,k).join("/"):"";e.files.some(z=>z.path===L)||e.getFiles(L)}}});function E(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],q={};for(let L of e.files)L.name.toLowerCase().indexOf("readme")>-1&&(q[L.name.toLowerCase()]=L.name);let k=null;for(let L of I)if(q[L]){k=L;break}if(!k&&Object.keys(q).length>0&&(k=Object.keys(q)[0]),k){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(q[k]))}}e.fileCounts=null;let S=0,N=new Set,w=!1;e.getFiles=function(I,q=!1){let k=e.repoId,L=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(W){if(m||k!==e.repoId||L!==S)return[];let z=I||"";return e.files=e.files.filter(J=>J.path!==z),e.files.push(...W.data),e.loadedFolders={...e.loadedFolders,[z]:!0},D(z,L),W.data},function(W){if(m||k!==e.repoId||L!==S)return[];q||(e.type="error",e.content=ar(W),e.files=[])})};function D(I,q){if(w||N.has(I))return;N.add(I);let k=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(I)}`).then(function(L){m||k!==e.repoId||q!==S||(e.fileCounts={...e.fileCounts,...L.data})},function(){m||k!= Line truncated
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,b)=>b.length-m.length),c=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let v=new RegExp("("+p.map(c).join("|")+")","gi"),g={},y=0;return(e.demoText||"").split(v).filter(m=>m!=="").map(m=>{let b=p.find(S=>S.toLowerCase()===m.toLowerCase());return b?(g[b.toLowerCase()]||(g[b.toLowerCase()]=++y),{text:String(g[b.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 c={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return c;let v=new Array(p.length-1);for(let E=1;E<p.length;E++)v[E-1]=p[E]-p[E-1];let g=v.length,y=Math.max.apply(null,v),m=Math.min.apply(null,v),b=Math.min(0,m),S=y-b||1;c.viewW=g*2,c.bars=new Array(g);for(let E=0;E<g;E++){let N=(v[E]-b)/S,w=Math.max(1.5,N*34);c.bars[E]={x:(E*2+.25).toFixed(2),y:(36-w).toFixed(2),w:"1.5",h:w.toFixed(2)}}if(c.deltaToday=v[g-1],g>=2){let E=v[g-2];E&&(c.pctChange=(c.deltaToday-E)/E*100)}return c.pctAbs=Math.round(Math.abs(c.pctChange)),c.isUp=c.pctChange>=0,c}e.history={repositories:d([]),users:d([]),pageViews:d([]),pullRequests:d([])},t.get("/api/stat/history?days=60").then(p=>{let c=p.data||[];e.history={repositories:d(c.map(v=>v.nbRepositories||0)),users:d(c.map(v=>v.nbUsers||0)),pageViews:d(c.map(v=>v.nbPageViews||0)),pullRequests:d(c.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Hc=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,Ke(()=>document.querySelector(".dashboard-quota > summary")?.focus())},zt()(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||c(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=wa(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 Ke();let L=document.getElementById(e.projectDetailsId(k));L?.focus(),L?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=k=>{e.selectedProject=null,Ke(()=>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 G=await t.post("/api/user/project-name",{type:k._type,id:k._id,name:L});k.projectName=G.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 _(),e.selectedProject===k&&(e.selectedProject=e.items.find(z=>z._type===k._type&&z._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 Ja(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):F(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function ke(C,O,B){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(O,B)}function Ve(C){try{let O=parseGithubUrl(C);if(O&&O.owner&&O.repo)return O.owner+"/"+O.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"||Ve(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let C=m();try{let O=await t.get("/github/connections");if(e.githubConnections=O.data,!O.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":O.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,b(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 Ne()}catch{}}};function je(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:Ve(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function He(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function at(){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");w=B.values.conference||null;for(let J of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,J)&&(e[J]=B.values[J]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),P=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await He(),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 O;try{O=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!O||O.path!==o.path()||Date.now()-O.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await He(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(O.draft,B)&&(e[B]=O.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await He(),sessionStorage.removeItem("github-access-draft"),!0}me(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&d(at,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(O=>O).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 at()&&(await Promise.all([Ne(),Ue()]),wo())},()=>{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(O=>O).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 at())try{await tl()}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(O=>O).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 at()&&await nl()},()=>{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&&He())}).catch(()=>{}),e.urlSelected=async(C=!1)=>{let O=++c;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,K(),Jt.cancel(),In.cancel(),On.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",ke("sourceUrl","github",!1);return}let J=E(B),ae=C||S===J;S=J,e.sourceUrlError="",ke("sourceUrl","github",!0),K();let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let We=window.document.getElementById("sourceUrl");if(We){try{We.setSelectionRange(0,0)}catch{}We.scrollLeft=0}},50),ye&&d(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ae&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ae||(e.source={type:"GitHubStream",branch:"",commit:""}),Jt.cancel(),In.cancel(),On.cancel(),ko.clear(),Co.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",Qs(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ae;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await nl()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await tl()):(e.detectedType="repo",L(),await Promise.all([Ne(),Ue()]),wo())}catch{}finally{O===c&&(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 Ue(),wo()}),e.getBranches=async C=>{let O=parseGithubUrl(e.sourceUrl),B=m();try{let J=await t.get(`/api/repo/${O.owner}/${O.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Ve(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0||e.reconnectingSource?"1":"0",repositoryID:je()}});if(!y(B))return;e.branches=J.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ae=e.branches.filter(ye=>ye.name==e.source.branch);ae.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=ae[0].commit),e.readme=ae[0].readme,await Ue(C))}catch(J){if(!y(B))return;e.branches=[],e.sourceUnreachable=J&&(J.status===404||J.data&&J.data.error==="repo_not_found"),e.details=null,z(J)}finally{b(B)}};async function Ne(){let C=parseGithubUrl(e.sourceUrl),O=m();try{Eo(),K();let B=await t.get(`/api/repo/${C.owner}/${C.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Ve(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:je(),force:"1"}});if(!y(O))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(O))return;throw z(B),B}finally{b(O)}}async function Ue(C){if(e.readme&&!C)return e.readme;let O=parseGithubUrl(e.sourceUrl),B=m();try{let J=await t.get(`/api/repo/${O.owner}/${O.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Ve(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:C===!0?"1":"0",branch:e.source.branch,repositoryID:je()}});y(B,!0)&&(e.readme=J.data)}catch{y(B,!0)&&(e.readme="")}finally{b(B)}}let Y={magicalBraces:!0},pe=C=>C.startsWith("/")&&!C.endsWith("/")&&Hn(vo(C.slice(1),Y),Y)===C.slice(1),ue=()=>Object.keys(e.preserve.picked).filter(C=>e.preserve.picked[C]).sort().map(C=>"/"+Hn(C,Y)),he=C=>"/"+Hn(C,Y)+"/**",be=C=>"!/"+Hn(C,Y)+"/",Oe=()=>String(e.preserve.patterns||"").split(`
`).map(C=>C.trim()).filter(Boolean),T=null,A=null,U=new Set,Q=0,W=null,ee=()=>!1;function de(){let C=Q+"\0"+e.preserve.patterns;if(C!==W){W=C;try{ee=Ka(Wa([...ue(),...Oe()]))}catch{ee=()=>!1}}return ee}function se(C){let O=new Map([["",{dirs:[],files:[]}]]);for(let B of C){let J=B.split("/"),ae="";for(let ye=0;ye<J.length-1;ye++){let We=J.slice(0,ye+1).join("/");O.has(We)||(O.set(We,{dirs:[],files:[]}),O.get(ae).dirs.push(We)),ae=We}O.get(ae).files.push(B)}for(let B of O.values())B.dirs.sort();return{files:C,dirs:O,descendants:new Map}}function ie(C){return T.descendants.has(C)||T.descendants.set(C,T.files.filter(O=>O.startsWith(C+"/"))),T.descendants.get(C)}let te=C=>de()(C);function Ce(C){let O=ie(C),B=0;for(let J of O)te(J)&&B++;return B===0?"none":B===O.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(O=>String(O).trim()).filter(Boolean).map(O=>pe(O)?vo(O.slice(1),Y):O);return C.length?C.slice(0,2).join(", ")+(C.length>2?` and ${C.length-2} more`:""):"None. Every file is redacted."};async function ce(){let C=e.source?.commit;if(!(T&&e.preserve.commit===C)){e.preserve.loading=!0,e.preserve.error="",T=null,A=null;try{let O=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${O.owner}/${O.repo}/tree`,{params:{commit:C,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&Ve(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:je()}});if(e.source?.commit!==C)return;let J=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];T=cn(se(B.data.files||[])),A=J.length?cn(se([...B.data.files||[],...J])):T,U=cn(new Set(J)),e.preserve.commit=C,e.preserve.truncated=!!B.data.truncated,e.previewFile||Jt()}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&&ce().catch(()=>{})}),e.openPreserveFiles=()=>{let C={},O=[];for(let J of e.options?.preserveFiles||[]){let ae=String(J).trim();ae&&(!O.length&&pe(ae)?C[vo(ae.slice(1),Y)]=!0:O.push(ae))}let B={};for(let J of Object.keys(C)){let ae=J.split("/");for(let ye=1;ye<ae.length;ye++)B[ae.slice(0,ye).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:C,expanded:B,patterns:O.join(`
`),patternsOpen:O.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),Q++,d(()=>{let J=document.getElementById("preserve-files-dialog");J?.showModal&&!J.open&&J.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ce()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Wa([...ue(),...Oe()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!T)return[];let C=de(),O=(ye,We,Pt)=>{let ft=!!e.preserve.picked[ye],Ct=C(ye);return{kind:"file",path:ye,label:Pt,depth:We,state:Ct?"all":"none",locked:!ft&&Ct,note:!ft&&Ct?"matched by a pattern":ft&&!Ct?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return T.files.filter(ye=>ye.toLowerCase().includes(B)).slice(0,300).map(ye=>O(ye,0,ye));let J=[],ae=(ye,We)=>{let Pt=T.dirs.get(ye);for(let ft of Pt.dirs){let Ct=!!e.preserve.expanded[ft],oi=Oe().includes(he(ft));J.push({kind:"dir",path:ft,label:ft.slice(ye?ye.length+1:0)+"/",depth:We,open:Ct,state:Ce(ft),locked:!1,note:oi?"whole folder":""}),Ct&&ae(ft,We+1)}for(let ft of Pt.files)J.push(O(ft,We,ft.slice(ye?ye.length+1:0)))};return ae("",0),J},e.preserveCount=()=>T?T.files.filter(te).length:0,e.togglePreserveDir=C=>{e.preserve.expanded[C]=!e.preserve.expanded[C]},e.togglePreserveFile=C=>{e.preserve.picked[C]=!e.preserve.picked[C],Q++},e.togglePreserveFolder=C=>{let O=he(C),B=be(C),J=Oe().filter(ye=>ye!==O&&ye!==B),ae=Ce(C)==="all"||Oe().includes(O);for(let ye of ie(C))e.preserve.picked[ye]=!1;Q++,e.preserve.patterns=(ae?J:[...J,O]).join(`
`),ae&&ie(C).some(te)&&(e.preserve.patterns=[...J,B].join(`
`))};let Se=/^readme(\.[^/]*)?$/i,Te=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],Be=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Je=C=>{let O=x(C),B=O.indexOf("."),J=Te.indexOf(B===-1?"":O.slice(B).toLowerCase());return J===-1?Te.length:J},Ge=()=>!!T&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!Ge())return"";for(let C of[".github","","docs"]){let O=(T.dirs.get(C)?.files||[]).filter(B=>Se.test(x(B)));if(O.length)return O.sort((B,J)=>Je(B)-Je(J)||ne(B,J))[0]}return""},e.readmeName=()=>x(e.readmePath())||"README.md";let we={key:null,fn:()=>!1},qe=()=>{let C=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),O=C.join(`
`);if(O!==we.key){let B=()=>!1;try{C.length&&(B=Ka(C))}catch{}we={key:O,fn:B}}return we.fn};e.pathPreserved=C=>!!C&&qe()(C),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let C=qe();if(Ge()){let O=e.readmePath();return!!O&&C(O)}return Be.some(O=>C(O))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function nt(){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 O=parseGithubUrl(e.sourceUrl);C.repoName=`${O.owner}/${O.repo}`}catch{}return C}function ut(C,O,B){let J=null,ae=0,ye=()=>{if(e.detectedType!==C)return;J&&d.cancel(J);let We=++ae;e.previewStatus="loading",J=d(()=>{J=null;let Pt=O();if(!Pt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Pt).then(ft=>{We===ae&&(B(ft.data,Pt),e.previewStatus="ready")}).catch(()=>{We===ae&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ae++,J&&d.cancel(J),J=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof ht!="string"?xa(e.previewFile):Jt()),e.detectedType==="pr"&&In(),e.detectedType==="gist"&&On()};let Le=cn(Ms(e));Object.defineProperty(e,"previewViewer",{get:()=>Le}),ya(Le,e),Object.assign(Le,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),Le.preview=!0,Le.fileSize=C=>C===Le.filePath&&typeof ht=="string"?new Blob([ht]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,Le.openPreserveFiles=()=>e.openPreserveFiles(),Le.previewPreserved=()=>e.previewPreserved(),Le.retryContent=()=>e.retryPreview();let Ot=C=>U.has(C)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(C),it=(C="")=>({path:C,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=it();let lt=0,ht=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=C=>{if(C=C||"",C&&C===e.readmePath()&&(C=""),lt++,ht=null,xs(),Jt.cancel(),e.previewFile=C,e.previewDoc=it(C),Le.sidebarCollapsed=!0,Le.content=null,!C){e.readme?Jt():e.previewStatus="idle";return}if(Ot(C)){mr("binary"),e.previewStatus="ready";return}xa(C)};function Qs(){lt++,ht=null,e.previewFile="",e.previewDoc=it(),Le.sidebarCollapsed=!0,Le.content=null}function xa(C){let O=++lt;ht=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&&Ve(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:je()},transformResponse:J=>J}).then(J=>{if(O!==lt)return;e.previewDoc.loading=!1;let ae=typeof J.headers=="function"&&J.headers("content-type")||"";if(/json/i.test(ae)){let ye=null;try{ye=JSON.parse(J.data)}catch{}if(ye&&ye.binary===!0){mr("binary"),e.previewStatus="ready";return}}ht=typeof J.data=="string"?J.data:"",Jt()},J=>{if(O!==lt)return;e.previewDoc.loading=!1;let ae=ur(J);if(ae==="file_too_big"){mr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Yn.ERRORS[ae]||"GitHub did not return this file.",e.previewStatus="error"})}let Zs;function xs(){Zs&&window.URL.revokeObjectURL(Zs),Zs=void 0,Le.url=void 0}e.on("dispose",xs);function mr(C){xs(),e.previewDoc.note=C,Le.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),Le.type=C==="too_big"?"error":"binary",Le.content=C==="too_big"?"file_too_big":"binary"}function of(C){try{let O=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",J=C&&C.includes("/")?C.slice(0,C.lastIndexOf("/")+1):"";return`https://github.com/${O.owner}/${O.repo}/raw/${B}/${J}`}catch{return""}}let el=ut("repo",()=>e.previewFile?typeof ht!="string"?null:{content:ht,options:nt()}:e.readme?{content:e.readme,options:nt()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");xs(),window.URL?.createObjectURL&&(Le.url=Zs=window.URL.createObjectURL(new Blob([C.content],{type:"text/plain"})));let O=e.previewOpenPath()||e.readmeName();Le.prepareFile(e.previewPathName(O)),Le.fileBaseUrl=of(O),Le.renderFileContent(C.content,Le.type,Le.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=C.content)}),Jt=()=>{e.previewFile&&typeof ht!="string"||el()};Jt.cancel=el.cancel;let bo=rt(new Map),hr=new Set,gr=new Set,Qo="",Zo=null,ei=()=>String(e.terms||"").split(`
`).filter(C=>C.trim());function sf(){Zo=null;let C=ei(),O=C.join(`
`);O!==Qo&&(bo.clear(),gr.clear(),Qo=O);let B=[...hr].filter(J=>!bo.has(J));if(hr.clear(),!(!B.length||!C.length))for(let J=0;J<B.length;J+=400){let ae=B.slice(J,J+400);t.post("/api/anonymize-preview",{contents:ae,options:{terms:C,image:!0,link:!0}}).then(ye=>{if(Qo!==O||ei().join(`
`)!==O)return;let We=ye.data?.contents;if(!Array.isArray(We)||We.length!==ae.length)throw Error("Invalid preview response");ae.forEach((Pt,ft)=>bo.set(Pt,typeof We[ft]=="string"?We[ft]:Pt))}).catch(()=>{Qo===O&&ae.forEach(ye=>gr.add(ye))})}}e.previewName=C=>{if(!C||!ei().length)return C;if(Qo===ei().join(`
`)){if(bo.has(C))return bo.get(C);if(gr.has(C))return C}return hr.add(C),Zo||(Zo=d(sf,120)),C},e.previewPathName=C=>{C=String(C||"");let O=C.lastIndexOf("/");return O<0?e.previewName(C):e.previewName(C.slice(0,O))+"/"+e.previewName(C.slice(O+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{Le.repoId=e.repoId||"repository",Le.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),Le.paths=Le.filePath.split("/"),Le.files=e.previewTreeFiles(),Le.loadedFolders=Object.fromEntries([...A?.dirs.keys()||[]].map(C=>[e.previewName(C),!0]))},!0),e.on("dispose",()=>{Zo&&d.cancel(Zo)});function wo(){!e.anonymize||!e.anonymize.terms||Jt()}async function tl(){let C=parseGithubUrl(e.sourceUrl),O=m();try{Eo(),K();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(O))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!y(O))return;throw z(B),B}finally{b(O)}}let ko=rt(new Map);function rf(){let C=new Set,O=e.details&&e.details.pullRequest;if(!O)return C;typeof O.title=="string"&&C.add(O.title),typeof O.body=="string"&&C.add(O.body),typeof O.diff=="string"&&C.add(O.diff);let B=O.comments||[];for(let J of B)typeof J.author=="string"&&C.add(J.author),typeof J.body=="string"&&C.add(J.body);return C}let In=ut("pr",()=>{let C=rf(),O=Array.from(C);return O.length===0?null:{contents:O,options:nt()}},(C,O)=>{if(!Array.isArray(C?.contents)||C.contents.length!==O.contents.length||C.contents.some(ae=>typeof ae!="string"))throw Error("Invalid preview response");let B=O.contents,J=new Map;for(let ae=0;ae<B.length&&ae<C.contents.length;ae++)J.set(B[ae],C.contents[ae]);ko.clear(),J.forEach((ae,ye)=>ko.set(ye,ae))});e.anonymizePrContent=function(C){return C&&(ko.has(C)?ko.get(C):"")};async function nl(){let C=parseGithubUrl(e.sourceUrl),O=m();try{Eo(),K(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!y(O))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!y(O))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,ke("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,ke("sourceUrl","missing",!1);return}throw z(B),B}finally{b(O)}}let Co=rt(new Map);function af(){let C=new Set,O=e.details&&e.details.gist;if(!O)return C;typeof O.description=="string"&&C.add(O.description),typeof O.ownerLogin=="string"&&C.add(O.ownerLogin);let B=O.files||[];for(let ae of B)typeof ae.filename=="string"&&C.add(ae.filename),typeof ae.content=="string"&&C.add(ae.content);let J=O.comments||[];for(let ae of J)typeof ae.author=="string"&&C.add(ae.author),typeof ae.body=="string"&&C.add(ae.body);return C}let On=ut("gist",()=>{let C=af(),O=Array.from(C);return O.length===0?null:{contents:O,options:nt()}},(C,O)=>{if(!Array.isArray(C?.contents)||C.contents.length!==O.contents.length||C.contents.some(ae=>typeof ae!="string"))throw Error("Invalid preview response");let B=O.contents,J=new Map;for(let ae=0;ae<B.length&&ae<C.contents.length;ae++)J.set(B[ae],C.contents[ae]);Co.clear(),J.forEach((ae,ye)=>Co.set(ye,ae)),vr()});e.anonymizeGistContent=function(C){return C&&(Co.has(C)?Co.get(C):"")},e.previewGistFiles=[];function vr(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(O=>({filename:e.anonymizeGistContent(O.filename),content:e.anonymizeGistContent(O.content),language:O.language}))}e.watch("details.gist.files",vr,!0),e.watch("terms",vr);function lf(){let C=e.conference;if(e.conference_data=null,!C)return;let O=C===w||e.isUpdate&&C===e._originalConference;C!==w&&(w=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),!O&&(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 Eo(){ke("repoId","used",!0),ke("repoId","format",!0),ke("pullRequestId","used",!0),ke("pullRequestId","format",!0),ke("gistId","used",!0),ke("gistId","format",!0),ke("sourceUrl","used",!0),ke("sourceUrl","missing",!0),ke("sourceUrl","access",!0),ke("sourceUrl","github",!0),ke("commit","exists",!0),ke("conference","activated",!0),ke("terms","format",!0),e.termHints=[]}function ti(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let C=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||C&&C.invalid?(C&&C.setDirty&&C.setDirty(),e.error="Plea 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&&(J.options.pageSource=e.details.pageSource),Eo();let ae=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ae,J,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ye=>{if(ye.data){let We=["quota_exceeded","subscription_required_for_never_expiration"].includes(ye.data.error);We||r("ERRORS."+ye.data.error).then(Pt=>{e.error=Pt},console.error),ni(ye.data.error),We&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ke(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{O.disabled=!1})},e.anonymizeGist=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ti())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let B=parseGithubUrl(e.sourceUrl),J={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(ye=>ye),source:{gistId:B.gistId},options:e.options,conference:e.conference};Eo();let ae=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ae,J,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(We=>{e.error=We},console.error),ni(ye.data.error))}).finally(()=>{O.disabled=!1})},e.anonymizePullRequest=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ti())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=C.currentTarget||C.target.closest?.("button")||C.target;O.disabled=!0;let B=parseGithubUrl(e.sourceUrl),J={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(ye=>ye),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};Eo();let ae=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ae,J,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(We=>{e.error=We},console.error),ni(ye.data.error))}).finally(()=>{O.disabled=!1})},e.watch("conference",()=>{lf()}),e.termHints=[],e.matchTermAsWritten=C=>{e.terms=Vc(e.terms,C)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Jt()}),e.watch("terms",()=>{e.termHints=Mc(e.terms),e.detectedType==="repo"&&wo(),e.detectedType==="pr"&&In(),e.detectedType==="gist"&&On()}),e.watch("options.image",()=>{e.detectedType==="repo"&&wo(),e.detectedType==="pr"&&In(),e.detectedType==="gist"&&On()}),e.watch("options.link",()=>{e.detectedType==="repo"&&wo(),e.detectedType==="pr"&&In(),e.detectedType==="gist"&&On()}),e.watch("details",()=>{e.detectedType==="pr"&&In(),e.detectedType==="gist"&&On()},!0)},Xa=function(e,t,s,i,o,r){ya(e);let d=kt();Lc();let p=zt(),c=0,v=null,g=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),g&&(d.timeout.cancel(g),g=null)}let m=!1;e.on("dispose",()=>{m=!0,c++,y(),b&&b.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",I=>{e.symbolsOpen&&!I.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!I.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!I.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!I.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!I.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",I=>{I.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(I.ctrlKey||I.metaKey)&&!I.altKey&&I.key&&I.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(I.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var q=document.querySelector(".tree-search-input");q&&(q.focus(),q.select())}});var b=null;e.onFileSearchChange=function(){b&&(b.resolve(),b=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let q=r.defer();b=q,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:q.promise}).then(function(k){if(!(m||b!==q)){b=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Ue){L[(Ue.path||"")+"/"+Ue.name]=!0});for(var G=[],z={},K=0;K<k.data.length;K++){var ne=k.data[K];if(ne.path)for(var x=ne.path.split("/"),fe="",me=0;me<x.length;me++){var ke=fe;fe=fe?fe+"/"+x[me]:x[me];var Ve=ke+"/"+x[me];!L[Ve]&&!z[Ve]&&(z[Ve]=!0,G.push({name:x[me],path:ke}))}}G.sort(function(Ue,Y){return(Ue.path||"").split("/").length-(Y.path||"").split("/").length}),G.length>0&&e.files.push.apply(e.files,G);for(var je=[],He=0;He<k.data.length;He++){var at=k.data[He],Ne=(at.path||"")+"/"+at.name;!L[Ne]&&at.size!=null&&(je.push(at),L[Ne]=!0)}je.length>0&&e.files.push.apply(e.files,je),e.fileSearchResults=k.data}},function(){!m&&b===q&&(b=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(I,q){if(e.repoId!=i.repoId)return H();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),F();for(let k=0;k<e.paths.length-1;k++){let L=k>0?e.paths.slice(0,k).join("/"):"";e.files.some(z=>z.path===L)||e.getFiles(L)}}});function S(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],q={};for(let L of e.files)L.name.toLowerCase().indexOf("readme")>-1&&(q[L.name.toLowerCase()]=L.name);let k=null;for(let L of I)if(q[L]){k=L;break}if(!k&&Object.keys(q).length>0&&(k=Object.keys(q)[0]),k){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(q[k]))}}e.fileCounts=null;let E=0,N=new Set,w=!1;e.getFiles=function(I,q=!1){let k=e.repoId,L=E;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(G){if(m||k!==e.repoId||L!==E)return[];let z=I||"";return e.files=e.files.filter(K=>K.path!==z),e.files.push(...G.data),e.loadedFolders={...e.loadedFolders,[z]:!0},P(z,L),G.data},function(G){if(m||k!==e.repoId||L!==E)return[];q||(e.type="error",e.content=ur(G),e.files=[])})};function P(I,q){if(w||N.has(I))return;N.add(I);let k=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(I)}`).then(function(L){m||k!==e.repoId||q!==E||(e.fileCounts={...e.fileCounts,...L.data})},function(){m||k!= Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,10,o5),[[d,{state:e.viewState,set:c=>{e.terms=c},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",s5,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=h()),n("small",i5,[t[115]||(t[115]=h("Regex is supported. Replaced by ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[116]||(t[116]=h(", or use ",-1)),t[117]||(t[117]=n("code",null,"term=>replacement",-1)),t[118]||(t[118]=h(" to pick your own (e.g. ",-1)),t[119]||(t[119]=n("code",null,"Anonymous=>ABC",-1)),t[120]||(t[120]=h(").",-1))])]),(a(!0),l(V,null,Q((e.termHints||[]).slice(0,3),c=>(a(),l("div",{class:"term-hint",key:c.line},[n("span",null,[t[123]||(t[123]=h("In ",-1)),n("code",null,u(c.term),1),t[124]||(t[124]=h(", ",-1)),n("code",null,u(c.symbols.join(" ")),1),h(" "+u(c.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(c.line)},"Match as written",8,r5)]))),128)),(e.termHints||[]).length>3?(a(),l("div",a5,u(e.termHints.length-3)+" more "+u(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),T(n("div",l5,"Terms are in an invalid format.",512),[[Z,e.anonymize?.terms?.errors?.format]])]),T(n("div",d5,[n("div",u5,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",c5,u(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]=c=>e.openPreserveFiles())},u((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,p5)],512),[[Z,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=ae(c=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=ae(c=>e.savePreserveFiles(),["prevent"]))},[t[131]||(t[131]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[132]||(t[132]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),T(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=c=>e.preserve.search=c)},null,512),[[nt,e.preserve.search]]),n("div",f5,[e.preserve.loading?(a(),l("p",m5,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",h5,u(e.preserve.error),1)):(a(),l(V,{key:2},[(a(!0),l(V,null,Q(e.preserveRows(),(c,v)=>(a(),l("div",{class:"preserve-item",key:c.kind+":"+c.path,style:Ae({paddingLeft:c.depth*18+6+"px"})},[c.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":c.open?"true":"false","aria-label":(c.open?"Collapse ":"Expand ")+c.label,onClick:g=>e.togglePreserveDir(c.path)},u(c.open?"\u25BE":"\u25B8"),9,g5)):(a(),l("span",v5)),n("input",{type:"checkbox",id:"pf-"+v,"aria-label":c.kind==="dir"?"Leave folder "+c.path+" unredacted":null,checked:c.state==="all",".indeterminate":c.state==="some",disabled:c.locked,onChange:g=>c.kind==="dir"?e.togglePreserveFolder(c.path):e.togglePreserveFile(c.path)},null,40,y5),n("label",{for:c.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:g=>c.kind==="dir"&&e.togglePreserveDir(c.path)},u(c.label),9,b5),c.note?(a(),l("span",w5,u(c.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",k5,u(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",C5,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[128]||(t[128]=n("summary",null,"Patterns",-1)),T(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=c=>e.preserve.patterns=c)},null,512),[[nt,e.preserve.patterns]]),t[129]||(t[129]=n("small",{class:"form-text text-muted"},[h("One per line, as in .gitignore: "),n("code",null,"*.bib"),h(" matches in any folder; "),n("code",null,"/refs.bib"),h(" and "),n("code",null,"paper/refs.bib"),h(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),h(" covers everything inside it; "),n("code",null,"!private.bib"),h(" excludes again.")],-1))],8,S5),n("div",E5,[n("span",N5,u(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",R5,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=c=>e.closePreserveFiles())},"Cancel"),t[130]||(t[130]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[Z,e.detectedType]]),T(n("section",T5,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),T(n("div",null,[n("div",D5,[T(n("input",P5,null,512),[[d,{state:e.viewState,set:c=>{e.options.link=c},value:e.options?.link,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",A5,[T(n("input",I5,null,512),[[d,{state:e.viewState,set:c=>{e.options.image=c},value:e.options?.image,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",O5,[T(n("input",M5,null,512),[[d,{state:e.viewState,set:c=>{e.options.pdf=c},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",V5,[T(n("input",q5,null,512),[[d,{state:e.viewState,set:c=>{e.options.notebook=c},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",L5,[T(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,$5),[[d,{state:e.viewState,set:c=>{e.options.page=c},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",F5,u(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",_5,u(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[Z,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",U5,[...t[139]||(t[139]=[h("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),T(n("div",null,[n("div",B5,[T(n("input",z5,null,512),[[d,{state:e.viewState,set:c=>{e.options.title=c},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",H5,[T(n("input",j5,null,512),[[d,{state:e.viewState,set:c=>{e.options.content=c},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",G5,[T(n("input",W5,null,512),[[d,{state:e.viewState,set:c=>{e.options.comments=c},value:e.options?.comments,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",K5,[T(n("input",Y5,null,512),[[d,{state:e.viewState,set:c=>{e.options.username=c},value:e.options?.username,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",J5,[T(n("input",X5,null,512),[[d,{state:e.viewState,set:c=>{e.options.date=c},value:e.options?.date,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",Q5,[T(n("input",Z5,null,512),[[d,{state:e.viewState,set:c=>{e.options.origin=c},value:e.options?.origin,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Z,e.detectedType==="gist"]]),T(n("div",null,[n("div",x5,[T(n("input",e8,null,512),[[d,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",t8,[T(n("input",n8,null,512),[[d,{state:e.viewState,set:c=>{e.options.body=c},value:e.options?.body,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",o8,[T(n("in 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"})]),h("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"})]),h("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,[h("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"),h(" 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"})]),h("Self"),n("span",{class:"serif-hy"},"-"),h("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,ZO),[[d,{state:e.viewState,set:c=>{e.terms=c},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[124]||(t[124]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",xO,[t[119]||(t[119]=n("summary",null,"Regex & replacement syntax",-1)),t[120]||(t[120]=h()),n("small",e5,[t[113]||(t[113]=h("Regex is supported. Replaced by ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[114]||(t[114]=h(", or use ",-1)),t[115]||(t[115]=n("code",null,"term=>replacement",-1)),t[116]||(t[116]=h(" to pick your own (e.g. ",-1)),t[117]||(t[117]=n("code",null,"Anonymous=>ABC",-1)),t[118]||(t[118]=h(").",-1))])]),(a(!0),l(V,null,X((e.termHints||[]).slice(0,3),c=>(a(),l("div",{class:"term-hint",key:c.line},[n("span",null,[t[121]||(t[121]=h("In ",-1)),n("code",null,u(c.term),1),t[122]||(t[122]=h(", ",-1)),n("code",null,u(c.symbols.join(" ")),1),h(" "+u(c.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(c.line)},"Match as written",8,t5)]))),128)),(e.termHints||[]).length>3?(a(),l("div",n5,u(e.termHints.length-3)+" more "+u(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),D(n("div",o5,"Terms are in an invalid format.",512),[[Z,e.anonymize?.terms?.errors?.format]])]),D(n("div",s5,[n("div",i5,[t[125]||(t[125]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",r5,u(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[23]||(t[23]=c=>e.openPreserveFiles())},u((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,a5)],512),[[Z,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[28]||(t[28]=le(c=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[27]||(t[27]=le(c=>e.savePreserveFiles(),["prevent"]))},[t[129]||(t[129]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[130]||(t[130]=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[24]||(t[24]=c=>e.preserve.search=c)},null,512),[[ot,e.preserve.search]]),n("div",l5,[e.preserve.loading?(a(),l("p",d5,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",u5,u(e.preserve.error),1)):(a(),l(V,{key:2},[(a(!0),l(V,null,X(e.preserveRows(),(c,v)=>(a(),l("div",{class:"preserve-item",key:c.kind+":"+c.path,style:Ae({paddingLeft:c.depth*18+6+"px"})},[c.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":c.open?"true":"false","aria-label":(c.open?"Collapse ":"Expand ")+c.label,onClick:g=>e.togglePreserveDir(c.path)},u(c.open?"\u25BE":"\u25B8"),9,c5)):(a(),l("span",p5)),n("input",{type:"checkbox",id:"pf-"+v,"aria-label":c.kind==="dir"?"Leave folder "+c.path+" unredacted":null,checked:c.state==="all",".indeterminate":c.state==="some",disabled:c.locked,onChange:g=>c.kind==="dir"?e.togglePreserveFolder(c.path):e.togglePreserveFile(c.path)},null,40,f5),n("label",{for:c.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:g=>c.kind==="dir"&&e.togglePreserveDir(c.path)},u(c.label),9,m5),c.note?(a(),l("span",h5,u(c.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",g5,u(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",v5,"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[126]||(t[126]=n("summary",null,"Patterns",-1)),D(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
paper/appendix/**`,"onUpdate:modelValue":t[25]||(t[25]=c=>e.preserve.patterns=c)},null,512),[[ot,e.preserve.patterns]]),t[127]||(t[127]=n("small",{class:"form-text text-muted"},[h("One per line, as in .gitignore: "),n("code",null,"*.bib"),h(" matches in any folder; "),n("code",null,"/refs.bib"),h(" and "),n("code",null,"paper/refs.bib"),h(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),h(" covers everything inside it; "),n("code",null,"!private.bib"),h(" excludes again.")],-1))],8,y5),n("div",b5,[n("span",w5,u(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",k5,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[26]||(t[26]=c=>e.closePreserveFiles())},"Cancel"),t[128]||(t[128]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[Z,e.detectedType&&e.sourceReady()]]),D(n("section",C5,[t[151]||(t[151]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),D(n("div",null,[n("div",E5,[D(n("input",S5,null,512),[[d,{state:e.viewState,set:c=>{e.options.link=c},value:e.options?.link,form:"anonymize",options:{}}]]),t[132]||(t[132]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",N5,[D(n("input",R5,null,512),[[d,{state:e.viewState,set:c=>{e.options.image=c},value:e.options?.image,form:"anonymize",options:{}}]]),t[133]||(t[133]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",T5,[D(n("input",P5,null,512),[[d,{state:e.viewState,set:c=>{e.options.pdf=c},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",D5,[D(n("input",A5,null,512),[[d,{state:e.viewState,set:c=>{e.options.notebook=c},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",I5,[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,O5),[[d,{state:e.viewState,set:c=>{e.options.page=c},value:e.options?.page,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",M5,u(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",V5,u(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[Z,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",q5,[...t[137]||(t[137]=[h("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",L5,[D(n("input",$5,null,512),[[d,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",F5,[D(n("input",_5,null,512),[[d,{state:e.viewState,set:c=>{e.options.content=c},value:e.options?.content,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",U5,[D(n("input",B5,null,512),[[d,{state:e.viewState,set:c=>{e.options.comments=c},value:e.options?.comments,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",z5,[D(n("input",H5,null,512),[[d,{state:e.viewState,set:c=>{e.options.username=c},value:e.options?.username,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",j5,[D(n("input",G5,null,512),[[d,{state:e.viewState,set:c=>{e.options.date=c},value:e.options?.date,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",W5,[D(n("input",K5,null,512),[[d,{state:e.viewState,set:c=>{e.options.origin=c},value:e.options?.origin,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Z,e.detectedType==="gist"]]),D(n("div",null,[n("div",Y5,[D(n("input",J5,null,512),[[d,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",X5,[D(n("input",Q5,null,512),[[d,{state:e.viewState,set:c=>{e.options.body=c},value:e.options?.body,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),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"})]),h("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"})]),h("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,[h("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"),h(" 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"})]),h("Self"),n("span",{class:"serif-hy"},"-"),h("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"})]),h("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"})]),h("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",gB,[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",vB,[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",yB,[...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"}),h(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",bB,[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",wB,[n("a",kB,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,CB)):f("v-if",!0),n("span",SB,u(e.user?.username),1)]),n("div",EB,[n("h6",NB,"Signed in as @"+u(e.user?.username),1),t[25]||(t[25]=Se('<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",RB,[...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,TB)):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)),T(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,DB),[[nt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
python experiments/run.py`),n("p",null,[h("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",UB,[e.statsEmpty()?f("v-if",!0):(a(),l("div",BB,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),h(),n("span",null,[h("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",zB,[(a(!0),l(V,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}])},u(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",HB,u(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",jB," +"+u(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,[h("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",GB,[n("div",WB,[t[13]||(t[13]=n("label",{for:"demo-terms"},[h("Terms to redact "),n("span",null,[h("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),T(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=Vt(ae(()=>{},["prevent"]),["enter"]))},null,544),[[nt,e.demoTerms]])]),n("div",KB,[n("div",YB,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[h("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",JB,[n("div",XB,[(a(!0),l(V,null,Q(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("mark",QB,u(i.original),1)):(a(),l(V,{key:1},[h(u(i.text),1)],64))],64))),128)),t[14]||(t[14]=h("\u200B",-1))]),T(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[nt,e.demoText]])])]),n("div",ZB,[n("div",xB,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",ez,[n("span",tz,u(e.demoCount())+" redacted",1)])]),n("div",nz,[(a(!0),l(V,null,Q(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},u(i.text),9,oz)):(a(),l(V,{key:1},[h(u(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",sz,[n("div",iz,[(a(!0),l(V,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",az,[n("span",lz,u(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",dz,u(i?.eyebrow),1)]),n("span",uz,[h(u(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",cz,"-")):f("v-if",!0),h(u(i?.title.split("-").slice(1).join("-"))+" "+u(i?.accent),1)])],40,rz),n("div",pz,[n("span",fz,[h(u(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",mz,"-")):f("v-if",!0),h(u(i?.title.split("-").slice(1).join("-"))+" "+u(i?.accent),1)]),n("p",null,u(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},u(i?.cta)+" \u2192",9,hz)])],2))),128))]),n("div",gz,[(a(!0),l(V,null,Q(e.features,(i,o)=>T((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",yz,[n("div",bz,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",wz,u(i?.url),1)]),n("div",{class:R(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",Cz,[...t[19]||(t[19]=[Se('<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"})]),h("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"})]),h("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",dB,[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",uB,[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",cB,[...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"}),h(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",pB,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=le(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",fB,[n("a",mB,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,hB)):f("v-if",!0),n("span",gB,u(e.user?.username),1)]),n("div",vB,[n("h6",yB,"Signed in as @"+u(e.user?.username),1),t[25]||(t[25]=Ee('<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",bB,[...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,wB)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=le(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=le(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,kB),[[ot,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
python experiments/run.py`),n("p",null,[h("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",MB,[e.statsEmpty()?f("v-if",!0):(a(),l("div",VB,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),h(),n("span",null,[h("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",qB,[(a(!0),l(V,null,X(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}])},u(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",LB,u(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",$B," +"+u(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,[h("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",_B,[t[13]||(t[13]=n("label",{for:"demo-terms"},[h("Terms to redact "),n("span",null,[h("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]=$t(le(()=>{},["prevent"]),["enter"]))},null,544),[[ot,e.demoTerms]])]),n("div",UB,[n("div",BB,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[h("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",zB,[n("div",HB,[(a(!0),l(V,null,X(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("mark",jB,u(i.original),1)):(a(),l(V,{key:1},[h(u(i.text),1)],64))],64))),128)),t[14]||(t[14]=h("\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),[[ot,e.demoText]])])]),n("div",GB,[n("div",WB,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",KB,[n("span",YB,u(e.demoCount())+" redacted",1)])]),n("div",JB,[(a(!0),l(V,null,X(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},u(i.text),9,XB)):(a(),l(V,{key:1},[h(u(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",QB,[n("div",ZB,[(a(!0),l(V,null,X(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",ez,[n("span",tz,u(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",nz,u(i?.eyebrow),1)]),n("span",oz,[h(u(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",sz,"-")):f("v-if",!0),h(u(i?.title.split("-").slice(1).join("-"))+" "+u(i?.accent),1)])],40,xB),n("div",iz,[n("span",rz,[h(u(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",az,"-")):f("v-if",!0),h(u(i?.title.split("-").slice(1).join("-"))+" "+u(i?.accent),1)]),n("p",null,u(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},u(i?.cta)+" \u2192",9,lz)])],2))),128))]),n("div",dz,[(a(!0),l(V,null,X(e.features,(i,o)=>D((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",cz,[n("div",pz,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",fz,u(i?.url),1)]),n("div",{class:R(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",hz,[...t[19]||(t[19]=[Ee('<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,[h("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",Ez,[...t[21]||(t[21]=[Se('<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,kz)])],8,vz)),[[Z,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Se('<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 Nz={class:"paper-empty"},Rz={class:"paper-empty-inner"},Tz={key:0,class:"paper-eyebrow"},Dz={key:1,class:"paper-eyebrow"},Pz={key:2,class:"paper-empty-title"},Az=["textContent"];function bp(e,t){return a(),l("div",Nz,[n("div",Rz,[e.error?f("v-if",!0):(a(),l("div",Tz,"Working")),e.error?(a(),l("div",Dz,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",Pz,[...t[0]||(t[0]=[h(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:u(e.fmt.translate(e.error))},null,8,Az)):f("v-if",!0)])])}var Iz={class:"container paper-page paper-settings"},Oz={class:"paper-crumbs"},Mz={class:"here"},Vz={class:"paper-page-title"},qz={class:"paper-settings-body"},Lz={class:"paper-settings-toc"},$z={href:"#conf-billing"},Fz={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},_z={id:"conf-basics",class:"paper-settings-section"},Uz={class:"form-group"},Bz={class:"invalid-feedback"},zz={class:"invalid-feedback"},Hz={class:"form-group"},jz={class:"invalid-feedback"},Gz={class:"form-group"},Wz={class:"invalid-feedback"},Kz={class:"invalid-feedback"},Yz={id:"conf-window",class:"paper-settings-section"},Jz={class:"form-grid-2"},Xz={class:"form-group"},Qz={class:"invalid-feedback"},Zz={class:"invalid-feedback"},xz={class:"form-group"},eH={class:"invalid-feedback"},tH={class:"invalid-feedback"},nH={id:"conf-rendering",class:"paper-settings-section"},oH={class:"form-check"},sH={class:"form-check-input",type:"checkbox",id:"link",name:"link"},iH={class:"form-check"},rH={class:"form-check-input",type:"checkbox",id:"image",name:"image"},aH={class:"form-check"},lH={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},dH={class:"form-check"},uH={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},cH={id:"conf-features",class:"paper-settings-section"},pH={class:"form-check"},fH={class:"form-check-input",type:"checkbox",id:"update",name:"update"},mH={class:"form-check"},hH={class:"form-check-input",type:"checkbox",id:"page",name:"page"},gH={id:"conf-plan",class:"paper-settings-section"},vH={key:0,class:"paper-section-copy"},yH={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
`).length))+" lines",1)):f("v-if",!0)]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",cj,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,pj)]))],8,uj),[[Z,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",fj,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(u(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,mj),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),h(u(e.languageName||"Text"),1),n("span",hj,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),h(u(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)),h(u(e.fmt?.number(e.content.split(`
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",gj,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(u(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,vj),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=h("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(V,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),h(u(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",yj,[e.isCsv()?(a(),l("div",bj,[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,wj),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,kj)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",Cj,[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,Sj),e.symbolsOpen?(a(),l("div",Ej,[n("div",Nj,u(e.symbols().length)+" "+u(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(V,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])},u(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",Tj,u(d.name),1),n("span",Dj,u(d.line),1)],8,Rj))),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,Pj)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",Aj,[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,Ij)):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,Oj)):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,Mj)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",Vj,[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,qj),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",$j,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,Fj)]))],8,Lj)):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,_j)])):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",Bj,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,zj)]))],8,Uj)):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",Qj)):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),h("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",Zj)):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),h("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),h("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]=h("Wrap lines",-1)),e.wrapLines?(a(),l("span",eG,"\u2713")):f("v-if",!0)],8,xj)):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",tG,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,nG)])),h(u(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",oG)):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),h("View raw",-1)])],8,sG)):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),h("View raw",-1)])],8,iG)):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),h("Download file",-1)])],8,rG)):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),h("Open website",-1)])],8,aG)):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),h("Edit anonymization",-1)])],8,lG)):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),h("Download ZIP",-1)])],8,dG)):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),h("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"})]),h("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"})]),h("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)),T(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=Vt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,uG),[[nt,e.gotoValue]]),n("span",{class:R(["goto-hint",{"is-error":e.gotoError}])},u(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",pG,[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(V,null,Q(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:R({"is-num":e.csvNumCol(p)})},[(a(!0),l(V,null,Q(e.redactParts(d),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,u(c.n),1)],8,fG)):(a(),l(V,{key:1},[h(u(c.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(V,null,Q(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",mG,u(p+1),1),(a(!0),l(V,null,Q(d,(c,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(V,null,Q(e.redactParts(c),(g,y)=>(a(),l(V,{key:y},[g.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+g.n},[n("i",null,u(g.n),1)],8,hG)):(a(),l(V,{key:1},[h(u(g.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,cG)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?T((a(),l("div",gG,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",vG,[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,yG),n("span",bG,[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,wG),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,kG)]),n("span",CG,u(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,SG),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",EG,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,NG),e.readmeToc().length>=3?(a(),l("aside",RG,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",TG,[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(V,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(c=>e.scrollToHeading(d.id),["prevent"])},u(d.text),11,DG))),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",PG,[n("div",AG,[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",IG,[n("li",OG,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:u(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,MG)]),(a(!0),l(V,null,Q(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(V,null,Q(e.redactParts(d),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,u(c.n),1)],8,qG)):(a(),l(V,{key:1},[h(u(c.t),1)],64))],64))),128))],8,VG))),256))]),n("span",LG,[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",vz,[...t[21]||(t[21]=[Ee('<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,mz)])],8,uz)),[[Z,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ee('<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)),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var yz={class:"paper-empty"},bz={class:"paper-empty-inner"},wz={key:0,class:"paper-eyebrow"},kz={key:1,class:"paper-eyebrow"},Cz={key:2,class:"paper-empty-title"},Ez=["textContent"];function Cp(e,t){return a(),l("div",yz,[n("div",bz,[e.error?f("v-if",!0):(a(),l("div",wz,"Working")),e.error?(a(),l("div",kz,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",Cz,[...t[0]||(t[0]=[h(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:u(e.fmt.translate(e.error))},null,8,Ez)):f("v-if",!0)])])}var Sz={class:"container paper-page paper-settings"},Nz={class:"paper-crumbs"},Rz={class:"here"},Tz={class:"paper-page-title"},Pz={class:"paper-settings-body"},Dz={class:"paper-settings-toc"},Az={href:"#conf-billing"},Iz={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},Oz={id:"conf-basics",class:"paper-settings-section"},Mz={class:"form-group"},Vz={class:"invalid-feedback"},qz={class:"invalid-feedback"},Lz={class:"form-group"},$z={class:"invalid-feedback"},Fz={class:"form-group"},_z={class:"invalid-feedback"},Uz={class:"invalid-feedback"},Bz={id:"conf-window",class:"paper-settings-section"},zz={class:"form-grid-2"},Hz={class:"form-group"},jz={class:"invalid-feedback"},Gz={class:"invalid-feedback"},Wz={class:"form-group"},Kz={class:"invalid-feedback"},Yz={class:"invalid-feedback"},Jz={id:"conf-rendering",class:"paper-settings-section"},Xz={class:"form-check"},Qz={class:"form-check-input",type:"checkbox",id:"link",name:"link"},Zz={class:"form-check"},xz={class:"form-check-input",type:"checkbox",id:"image",name:"image"},eH={class:"form-check"},tH={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},nH={class:"form-check"},oH={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},sH={id:"conf-features",class:"paper-settings-section"},iH={class:"form-check"},rH={class:"form-check-input",type:"checkbox",id:"update",name:"update"},aH={class:"form-check"},lH={class:"form-check-input",type:"checkbox",id:"page",name:"page"},dH={id:"conf-plan",class:"paper-settings-section"},uH={key:0,class:"paper-section-copy"},cH={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",sj,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,ij)]))],8,oj),[[Z,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",rj,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(u(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,aj),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),h(u(e.languageName||"Text"),1),n("span",lj,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),h(u(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)),h(u(e.fmt?.number(e.content.split(`
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",dj,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[h(u(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,uj),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=h("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(V,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),h(u(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",cj,[e.isCsv()?(a(),l("div",pj,[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,fj),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,mj)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",hj,[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,gj),e.symbolsOpen?(a(),l("div",vj,[n("div",yj,u(e.symbols().length)+" "+u(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(V,null,X(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:p=>e.goToSymbol(d.line)},[n("span",{class:R(["symbols-kind","is-"+d.kind])},u(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",wj,u(d.name),1),n("span",kj,u(d.line),1)],8,bj))),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,Cj)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",Ej,[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,Sj)):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,Nj)):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,Rj)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",Tj,[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,Pj),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",Aj,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,Ij)]))],8,Dj)):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,Oj)])):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",Vj,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,qj)]))],8,Mj)):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",jj)):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),h("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",Gj)):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),h("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),h("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]=h("Wrap lines",-1)),e.wrapLines?(a(),l("span",Kj,"\u2713")):f("v-if",!0)],8,Wj)):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",Yj,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,Jj)])),h(u(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",Xj)):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),h("View raw",-1)])],8,Qj)):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),h("View raw",-1)])],8,Zj)):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),h("Download file",-1)])],8,xj)):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),h("Open website",-1)])],8,eG)):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),h("Edit anonymization",-1)])],8,tG)):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),h("Download ZIP",-1)])],8,nG)):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),h("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"})]),h("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"})]),h("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=le(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),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]=$t(le(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,oG),[[ot,e.gotoValue]]),n("span",{class:R(["goto-hint",{"is-error":e.gotoError}])},u(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",iG,[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(V,null,X(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:R({"is-num":e.csvNumCol(p)})},[(a(!0),l(V,null,X(e.redactParts(d),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,u(c.n),1)],8,rG)):(a(),l(V,{key:1},[h(u(c.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(V,null,X(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",aG,u(p+1),1),(a(!0),l(V,null,X(d,(c,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(V,null,X(e.redactParts(c),(g,y)=>(a(),l(V,{key:y},[g.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+g.n},[n("i",null,u(g.n),1)],8,lG)):(a(),l(V,{key:1},[h(u(g.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,sG)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?D((a(),l("div",dG,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",uG,[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]=$t(le(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=$t(le(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,cG),n("span",pG,[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,fG),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,mG)]),n("span",hG,u(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,gG),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",vG,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,yG),e.readmeToc().length>=3?(a(),l("aside",bG,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",wG,[n("a",{href:"#",class:R(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=le(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(V,null,X(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:le(c=>e.scrollToHeading(d.id),["prevent"])},u(d.text),11,kG))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Kt(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",CG,[n("div",EG,[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",SG,[n("li",NG,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:u(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,RG)]),(a(!0),l(V,null,X(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(V,null,X(e.redactParts(d),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,u(c.n),1)],8,PG)):(a(),l(V,{key:1},[h(u(c.t),1)],64))],64))),128))],8,TG))),256))]),n("span",DG,[e.type=="IPython Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,8,WK),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",KK,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),T(n("div",YK,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",JK,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",XK,[n("label",QK,[T(n("input",ZK,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",xK,[T(n("input",eY,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Display images",-1))]),n("label",tY,[T(n("input",nY,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=h("Display PDFs",-1))]),n("label",oY,[T(n("input",sY,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=h("Display notebooks",-1))]),n("label",iY,[T(n("input",rY,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=h("Show line counts",-1))]),n("label",aY,[T(n("input",lY,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=h("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",dY,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",uY,[T(n("input",cY,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=h("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",pY,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[T((a(),l("select",fY,[...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",mY,u(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",hY,[n("div",gY,[e.draftRestored?(a(),l("span",vY,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",yY,"Unsaved changes"+u(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",bY,u(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)},u(e.saving?"Saving\u2026":"Save defaults"),11,wY),e.error?(a(),l("div",kY,u(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Z,e.settingsTab==="defaults"]]),T(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",SY,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",EY,[h(u(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,NY)])):f("v-if",!0),e.billingNotice?(a(),l("p",RY,u(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",TY,[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,DY)])):f("v-if",!0),n("section",PY,[n("div",AY,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",IY,u(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",OY,[h(u(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u Line truncated
jane.smith@example.org`},null,8,_K),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",UK,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),D(n("div",BK,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",zK,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",HK,[n("label",jK,[D(n("input",GK,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",WK,[D(n("input",KK,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Display images",-1))]),n("label",YK,[D(n("input",JK,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=h("Display PDFs",-1))]),n("label",XK,[D(n("input",QK,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=h("Display notebooks",-1))]),n("label",ZK,[D(n("input",xK,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=h("Show line counts",-1))]),n("label",eY,[D(n("input",tY,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=h("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",nY,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",oY,[D(n("input",sY,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=h("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",iY,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[D((a(),l("select",rY,[...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",aY,u(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",lY,[n("div",dY,[e.draftRestored?(a(),l("span",uY,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",cY,"Unsaved changes"+u(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",pY,u(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)},u(e.saving?"Saving\u2026":"Save defaults"),11,fY),e.error?(a(),l("div",mY,u(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Z,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",gY,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",vY,[h(u(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,yY)])):f("v-if",!0),e.billingNotice?(a(),l("p",bY,u(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",wY,[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,kY)])):f("v-if",!0),n("section",CY,[n("div",EY,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",SY,u(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",NY,[h(u(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u 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)},_p=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(o=>{o.classList.contains("is-hunk")||o.style.setProperty("--hang",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=St(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Fp(t.value),_p(t.value)};return mn(()=>{s(),ut(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>Pe("markdown",{ref:t})}},dee={props:["file","terms","options"],setup(e){let t=St(null),s=()=>je(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Fp(t.value),_p(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||"")))}}},uee=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()}),cee={props:["file","content"],setup(e){let t=St(null),s=0,i,o=async()=>{let r=++s;i?.abort(),i=new AbortController;try{let d=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(p=>{if(!p.ok)throw Error("Notebook request failed");return p.json()});if(await Xn("notebook"),r!==s)return;t.value.innerHTML=Ls(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),uee(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)}),io(()=>{s++,i?.abort()}),()=>Pe("notebook",{ref:t})}},pee={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:dee,Notebook:cee,Loc:pee,HtmlDoc:Mp,QuotaUsage:aee,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=lee.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 fee(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 mee(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 hee(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o Line truncated
`)}),_p=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},zp=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",_p(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:${_p(d)}ch">${r}${o||" "}${"</span>".repeat(i.length)}</span>`}).join(`
`)})},Hp={props:["content","terms","options"],setup(e){let t=St(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Bp(t.value),zp(t.value)};return hn(()=>{s(),ct(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},nee={props:["file","terms","options"],setup(e){let t=St(null),s=()=>Ke(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Bp(t.value),zp(t.value)});return hn(s),ct(()=>[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(Hp,{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||"")))}}},oee=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()}),see={props:["file","content"],setup(e){let t=St(null),s=0,i,o=async()=>{let r=++s;i?.abort(),i=new AbortController;try{let d=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(p=>{if(!p.ok)throw Error("Notebook request failed");return p.json()});if(await Jn("notebook"),r!==s)return;t.value.innerHTML=Vs(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),oee(t.value)}catch(d){r===s&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return hn(()=>{o(),ct(()=>[e.file,e.content],o)}),so(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},iee={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]}})))}}},jp={Markdown:Hp,GistFile:nee,Notebook:see,Loc:iee,HtmlDoc:Lp,QuotaUsage:eee,Pdfviewer:ld(async()=>(await Jn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",$p))},Gp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ii(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),Up(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),Up(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Up(e,t={}){let s=tee.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 Wp={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});Ke(()=>{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 Kp(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 ree(e){let t=Kp(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 aee(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 lee(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js:
+26 -1
View File
@@ -277,6 +277,8 @@ app.get("/api/user/quota", (req, res) => res.json(quota));
app.get("/api/user/anonymized_repositories", (req, res) => res.json(repositories));
app.get("/api/user/anonymized_pull_requests", (req, res) => res.json(pullRequests));
app.get("/api/user/anonymized_gists", (req, res) => res.json(gists));
// The landing picker: repositories the GitHub App can read.
app.get("/api/user/all_repositories", (req, res) => res.json(["jsmith/robust-repair", "jsmith/thesis-code", "tdurieux/anonymous_github", "acme-lab/benchmarks"].map((fullName, i) => ({ id: "r" + i, fullName }))));
app.get("/api/user/default", (req, res) =>
res.json({ terms: ["Jane Smith", "MIT CSAIL", "jsmith"], options: { link: true, image: true, pdf: true, notebook: true, loc: true, page: false, update: false, mode: "GitHubStream", expirationMode: "remove" } })
);
@@ -457,7 +459,7 @@ const sourceAccess = (req, res) => {
const SOURCE_BASE = `/api/repo/${SOURCE.owner}/${SOURCE.repo}`;
app.get(SOURCE_BASE + "/", (req, res) => res.json({
id: "mock-source-1", externalId: "gh_910001", repo: SOURCE.repo, owner: SOURCE.owner,
hasPage: false, fullName: `${SOURCE.owner}/${SOURCE.repo}`, defaultBranch: "main", size: 2048,
hasPage: false, private: true, fullName: `${SOURCE.owner}/${SOURCE.repo}`, defaultBranch: "main", size: 2048,
}));
app.get(SOURCE_BASE + "/branches", (req, res) => res.json([
{ name: "main", commit: SOURCE.commit, readme: sourceText["README.md"] },
@@ -484,6 +486,29 @@ app.get(SOURCE_BASE + "/file", (req, res) => {
res.type("text/plain; charset=utf-8").send(sourceText[file]);
}, Number(process.env.MOCK_FILE_DELAY || 150));
});
// Source URLs that fail, for the workspace's source error states:
// jsmith/missing-repo not found, or the GitHub App was not given access
// acme-lab/restricted-tool the organization restricts third-party access
// jsmith/slow-repo never answers within a capture (loading state)
// plus a pull request and a gist that cannot be read.
const failingSources = { "jsmith/missing-repo": [404, "repo_not_found"], "acme-lab/restricted-tool": [403, "repo_access_limited"] };
app.get("/api/repo/:owner/:repo/{*rest}", (req, res, next) => {
const name = `${req.params.owner}/${req.params.repo}`;
if (name === "jsmith/slow-repo") return global.setTimeout(() => res.status(404).json({ error: "repo_not_found" }), 120000);
const failure = failingSources[name];
if (!failure) return next();
res.status(failure[0]).json({ error: failure[1] });
});
app.get("/api/pr/jsmith/missing-repo/:id", (req, res) => res.status(404).json({ error: "pull_request_not_found" }));
app.get("/api/gist/source/:id", (req, res) => res.status(404).json({ error: "gist_not_found" }));
// Edit mode: one saved anonymization whose source loads, one whose source no longer does.
const editFixture = (repoId, fullName) => ({
repoId, status: "ready", role: "owner", connection: "github-app", anonymizeDate: ago(12), coauthors: [],
source: { type: "GitHubStream", fullName, branch: "main", commit: SOURCE.commit },
options: opts({ terms: ["Jane Smith", "MIT CSAIL", "jsmith"], expirationDate: ahead(160) }),
});
app.get("/api/repo/robust-repair-preview", (req, res) => res.json(editFixture("robust-repair-preview", `${SOURCE.owner}/${SOURCE.repo}`)));
app.get("/api/repo/missing-repo-4F2A", (req, res) => res.json(editFixture("missing-repo-4F2A", "jsmith/missing-repo")));
// Use the production anonymizer for both sides of the visual comparison.
require("ts-node/register/transpile-only");
const { ContentAnonimizer } = require("../src/core/anonymize-utils");
@@ -15,6 +15,7 @@ const RepositorySchema = new Schema({
default: "github",
},
hasPage: { type: Boolean, default: false },
private: Boolean,
pageSource: {
branch: { type: String },
path: String,
@@ -8,6 +8,8 @@ export interface IRepository {
size?: number;
defaultBranch?: string;
hasPage: boolean;
/** GitHub visibility, refreshed each time the metadata is fetched. */
private?: boolean;
pageSource?: {
branch: string;
path: string;
+3
View File
@@ -25,6 +25,7 @@ export class GitHubRepository {
repo: this.repo,
owner: this.owner,
hasPage: this._data.hasPage,
private: this._data.private,
pageSource: this._data.pageSource,
fullName: this.fullName,
defaultBranch: this._data.defaultBranch,
@@ -392,6 +393,7 @@ export async function getRepositoryFromGitHub(opt: {
model.size = r.size;
model.defaultBranch = r.default_branch;
model.hasPage = r.has_pages;
model.private = r.private;
if (pageSource) model.pageSource = pageSource;
return new GitHubRepository(model);
}
@@ -405,6 +407,7 @@ export async function getRepositoryFromGitHub(opt: {
size: r.size,
defaultBranch: r.default_branch,
hasPage: r.has_pages,
private: r.private,
...(pageSource ? { pageSource } : {}),
},
$setOnInsert: { externalId: "gh_" + r.id },
+8 -1
View File
@@ -1826,7 +1826,14 @@ describe("Vue 3 UI", function () {
const button = [...workspace.querySelectorAll("button")].find(b => b.textContent.trim() === "Manage GitHub access");
expect(button).not.to.equal(undefined);
for (let node = button; node; node = node.parentElement) expect(ui.window.getComputedStyle(node).display).not.to.equal("none");
expect(workspace.textContent).to.include("Signing in does not grant access to private repositories");
const message = workspace.querySelector(".source-error");
expect(message.textContent).to.include("We can't read " + (type === "pr" ? "pull request #7 in owner/private" : "owner/private"));
expect(message.textContent).to.include("the Anonymous GitHub app hasn't been given access to it");
expect(workspace.textContent).not.to.include("Repository not listed?");
// Nothing that depends on the source (branch, commit and its validation) is shown.
const commit = workspace.querySelector("#commit");
if (commit) expect(ui.window.getComputedStyle(commit.closest(".form-grid-2")).display).to.equal("none");
expect(workspace.querySelector(".anonymize-submit-bar .btn-ink").disabled).to.equal(true);
button.click();
const draft = JSON.parse(ui.window.sessionStorage.getItem("github-access-draft"));
expect(draft.draft.sourceUrl).to.equal(sourceUrl);