mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-18 21:57:20 +02:00
fix: clean up the admin queue controls
The range picker drew a border around every segment inside the group's border, and Drain used a filled pill that made the most destructive action the loudest. Segments are now borderless inside one outline with a tinted selection, all header controls share one height, and Drain and Clear all use a red outline. Queue labels drop the mono caps. ADMIN=1 signs the mock server in as an administrator. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
57412d0610
commit
fd1bce74b4
7 files changed
+30
-31
No files matched your search
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"core.min.js": "core.3b07189932.min.js",
|
||||
"vendor.min.js": "vendor.c738e37308.min.js",
|
||||
"vendor.min.js": "vendor.849545b8cc.min.js",
|
||||
"mermaid.min.js": "mermaid.f848a72d16.min.js",
|
||||
"all.min.css": "all.6fe0a1cb9b.min.css",
|
||||
"all.min.css": "all.983e02c7a0.min.css",
|
||||
"markdown.min.js": "markdown.44f2e93820.min.js",
|
||||
"pdf.min.js": "pdf.4d9cc6ff49.min.js",
|
||||
"notebook.min.js": "notebook.c3144c18ae.min.js",
|
||||
|
||||
Vendored
+1
-1
@@ -6,4 +6,4 @@
|
||||
*/:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unsLine truncated
|
||||
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
|
||||
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
|
||||
+11
-13
@@ -5326,18 +5326,6 @@ textarea::selection {
|
||||
background: var(--color);
|
||||
color: var(--paper-card);
|
||||
}
|
||||
.btn-dark {
|
||||
background: var(--color) !important;
|
||||
color: var(--paper-card) !important;
|
||||
border-color: var(--color) !important;
|
||||
border-radius: 999px;
|
||||
padding: 5px 18px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
/* Queue overview cards */
|
||||
.q-cards {
|
||||
display: flex;
|
||||
@@ -7700,7 +7688,6 @@ input[type="date"], select { color-scheme: light; }
|
||||
.q-range-btns { border-radius: var(--radius-control); }
|
||||
.q-range-btns .btn, .q-job-detail-actions .btn { font-family: var(--font-sans); font-size: 13px; }
|
||||
.q-range-btns .btn.active { background: var(--accent-soft); color: var(--accent); }
|
||||
.btn-dark { border-radius: var(--radius-control); font-family: var(--font-sans); font-size: 12px; }
|
||||
@media (max-width: 900px) {
|
||||
.paper-settings .quota-usage { grid-template-columns: 1fr; gap: 16px; }
|
||||
.paper-settings .quota-usage .quota-item + .quota-item { padding-left: 0; border-left: 0; border-top: 1px solid var(--border-color); padding-top: 16px; }
|
||||
@@ -7840,3 +7827,14 @@ input[type="date"], select { color-scheme: light; }
|
||||
.share-link-actions .btn { justify-content: center; }
|
||||
.status-page .paper-support-grid { row-gap: 20px; }
|
||||
}
|
||||
/* Segmented control: one outlined group, borderless segments, tinted selection. */
|
||||
.paper-page .q-range-btns { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--paper-card); overflow: visible; }
|
||||
.paper-page .q-range-btns .btn, .paper-page .q-range-btns .btn + .btn { min-height: 0; height: 28px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-muted); font: 500 13px/1 var(--font-sans); }
|
||||
.paper-page .q-range-btns .btn:hover { background: var(--hover-bg-color); color: var(--color); }
|
||||
.paper-page .q-range-btns .btn.active { background: var(--accent-soft); color: var(--accent); }
|
||||
.q-header-actions > .btn { height: 34px; min-height: 34px; }
|
||||
/* Destructive actions are outlined in red rather than filled. */
|
||||
.paper-page .btn.btn-danger-soft { background: transparent; border-color: var(--status-error); color: var(--status-error); }
|
||||
.paper-page .btn.btn-danger-soft:hover { background: var(--status-error-soft-hover); border-color: var(--status-error); color: var(--status-error); }
|
||||
.q-section-label, .q-state-chip, .q-auto-refresh { font-family: var(--font-sans); letter-spacing: 0; text-transform: none; }
|
||||
.q-state-chip { font-size: 12px; text-transform: capitalize; }
|
||||
@@ -5,7 +5,7 @@
|
||||
<h1 class="paper-page-title">Errors</h1>
|
||||
<div class="errors-actions">
|
||||
<button class="btn btn-sm" type="button" @click="exportCsv()"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-export"></use></svg> Export CSV</button>
|
||||
<button class="btn btn-sm btn-danger" type="button" @click="clearAll()"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-trash"></use></svg> Clear all</button>
|
||||
<button class="btn btn-sm btn-danger-soft" type="button" @click="clearAll()"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-trash"></use></svg> Clear all</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<button class="btn btn-sm" :class="{active: range == '7d'}" @click="setRange('7d')">7d</button>
|
||||
</div>
|
||||
<button class="btn btn-sm" @click="pauseAll()">Pause all</button>
|
||||
<button class="btn btn-sm btn-dark" @click="drainSelected()">Drain {{ selectedQueue }}</button>
|
||||
<button class="btn btn-sm btn-danger-soft" @click="drainSelected()">Drain {{ selectedQueue }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<!-- Jobs table -->
|
||||
<div class="q-jobs">
|
||||
<div class="q-jobs-header">
|
||||
<div class="q-section-label">ALL JOBS · {{ fmt?.uppercase(selectedQueue) }}</div>
|
||||
<div class="q-section-label">All jobs · {{ selectedQueue }}</div>
|
||||
<div class="q-state-filters">
|
||||
<label class="q-state-toggle" v-for="(s, index) in allStates">
|
||||
<input type="checkbox" v-field="{ state: viewState, set: value => { stateFilter[s] = value }, value: stateFilter[s], form: null, options: {} }">
|
||||
|
||||
Vendored
+10
-10
@@ -1,30 +1,30 @@
|
||||
"use strict";(()=>{var id=Object.defineProperty;var ad=(e,t)=>{for(var s in t)id(e,s,{get:t[s],enumerable:!0})};var he=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={editor:"/script/editor.e243722d87.min.js",notebook:"/script/notebook.8844e2735f.min.js",markdown:"/script/markdown.ad7b1d71c3.min.js",org:"/script/org.f4e2a3f59f.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};var cs=new Map,ud=ve;function Xt(e){if(!cs.has(e)){let t=document.createElement("script");t.src=ud[e];let s=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{cs.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});cs.set(e,s),document.head.appendChild(t)}return cs.get(e)}async function cr(){await Xt("editor"),ace.config.set("basePath","/script/external/ace/")}function ho(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var Pe={},Zt=[],at=()=>{},rn=()=>!1,vo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),go=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Po=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},cd=Object.prototype.hasOwnProperty,De=(e,t)=>cd.call(e,t),ye=Array.isArray,$t=e=>Vo(e)==="[object Map]",Ut=e=>Vo(e)==="[object Set]",pr=e=>Vo(e)==="[object Date]";var we=e=>typeof e=="function",ze=e=>typeof e=="string",mt=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",an=e=>(Ae(e)||we(e))&&we(e.then)&&we(e.catch),hr=Object.prototype.toString,Vo=e=>hr.call(e),ln=e=>Vo(e).slice(8,-1),ps=e=>Vo(e)==="[object Object]",fs=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=ho(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var ms=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},pd=/-\w/g,Je=ms(e=>e.replace(pd,t=>t.slice(1).toUpperCase())),fd=/\B([A-Z])/g,St=ms(e=>e.replace(fd,"-$1").toLowerCase()),xt=ms(e=>e.charAt(0).toUpperCase()+e.slice(1)),qo=ms(e=>e?`on${xt(e)}`:""),gt=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},hs=(e,t,s,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:s})},wo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var fr,Mo=()=>fr||(fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qe(e){if(ye(e)){let t={};for(let s=0;s<e.length;s++){let r=e[s],n=ze(r)?gd(r):qe(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(ze(e)||Ae(e))return e}var md=/;(?![^(]*\))/g,hd=/:([^]+)/,vd=/\/\*[^]*?\*\//g;function gd(e){let t={};return e.replace(vd,"").split(md).forEach(s=>{if(s){let r=s.split(hd);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function T(e){let t="";if(ze(e))t=e;else if(ye(e))for(let s=0;s<e.length;s++){let r=T(e[s]);r&&(t+=r+" ")}else if(Ae(e))for(let s in e)e[s]&&(t+=s+" ");return t.trim()}var vr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",gr=ho(vr),yd=ho(vr+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function vs(e){return!!e||e===""}function bd(e,t){if(e.length!==t.length)return!1;let s=!0;for(let r=0;s&&r<e.length;r++)s=Nt(e[r],t[r]);return s}function mr(e,t){if(e.size!==t.size)return!1;let s=Array.from(t),r=new Uint8Array(s.length);for(let n of e){let i=-1;for(let a=0;a<s.length;a++)if(!r[a]&&Nt(n,s[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function Nt(e,t){if(e===t)return!0;let s=pr(e),r=pr(t);if(s||r)returLine truncated
|
||||
"use strict";(()=>{var id=Object.defineProperty;var ad=(e,t)=>{for(var s in t)id(e,s,{get:t[s],enumerable:!0})};var he=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={editor:"/script/editor.e243722d87.min.js",notebook:"/script/notebook.8844e2735f.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",markdown:"/script/markdown.ad7b1d71c3.min.js",org:"/script/org.f4e2a3f59f.min.js"};var cs=new Map,ud=ve;function Xt(e){if(!cs.has(e)){let t=document.createElement("script");t.src=ud[e];let s=new Promise((r,n)=>{t.onload=r,t.onerror=()=>{cs.delete(e),t.remove(),n(new Error(`Unable to load ${e}. Please retry.`))}});cs.set(e,s),document.head.appendChild(t)}return cs.get(e)}async function cr(){await Xt("editor"),ace.config.set("basePath","/script/external/ace/")}function ho(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var Pe={},Zt=[],at=()=>{},rn=()=>!1,vo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),go=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Po=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},cd=Object.prototype.hasOwnProperty,De=(e,t)=>cd.call(e,t),ye=Array.isArray,Lt=e=>Vo(e)==="[object Map]",Ut=e=>Vo(e)==="[object Set]",pr=e=>Vo(e)==="[object Date]";var we=e=>typeof e=="function",ze=e=>typeof e=="string",mt=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",an=e=>(Ae(e)||we(e))&&we(e.then)&&we(e.catch),hr=Object.prototype.toString,Vo=e=>hr.call(e),ln=e=>Vo(e).slice(8,-1),ps=e=>Vo(e)==="[object Object]",fs=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=ho(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var ms=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},pd=/-\w/g,Je=ms(e=>e.replace(pd,t=>t.slice(1).toUpperCase())),fd=/\B([A-Z])/g,St=ms(e=>e.replace(fd,"-$1").toLowerCase()),xt=ms(e=>e.charAt(0).toUpperCase()+e.slice(1)),qo=ms(e=>e?`on${xt(e)}`:""),gt=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},hs=(e,t,s,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:s})},wo=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var fr,Mo=()=>fr||(fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qe(e){if(ye(e)){let t={};for(let s=0;s<e.length;s++){let r=e[s],n=ze(r)?gd(r):qe(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(ze(e)||Ae(e))return e}var md=/;(?![^(]*\))/g,hd=/:([^]+)/,vd=/\/\*[^]*?\*\//g;function gd(e){let t={};return e.replace(vd,"").split(md).forEach(s=>{if(s){let r=s.split(hd);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function T(e){let t="";if(ze(e))t=e;else if(ye(e))for(let s=0;s<e.length;s++){let r=T(e[s]);r&&(t+=r+" ")}else if(Ae(e))for(let s in e)e[s]&&(t+=s+" ");return t.trim()}var vr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",gr=ho(vr),yd=ho(vr+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function vs(e){return!!e||e===""}function bd(e,t){if(e.length!==t.length)return!1;let s=!0;for(let r=0;s&&r<e.length;r++)s=Nt(e[r],t[r]);return s}function mr(e,t){if(e.size!==t.size)return!1;let s=Array.from(t),r=new Uint8Array(s.length);for(let n of e){let i=-1;for(let a=0;a<s.length;a++)if(!r[a]&&Nt(n,s[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function Nt(e,t){if(e===t)return!0;let s=pr(e),r=pr(t);if(s||r)returLine truncated
|
||||
`))),e[uo]=Ws(n);let i=r||n.props&&n.props.type==="number";lo(e,t?"change":"input",a=>{a.target.composing||e[uo](Hn(e.value,s,i))}),(s||i)&&lo(e,"change",()=>{e.value=Hn(e.value,s,i)}),t||(lo(e,"compositionstart",dc),lo(e,"compositionend",Yi),lo(e,"change",Yi))},mounted(e,{value:t,modifiers:{trim:s,number:r}}){let n=t??"",i=e[js];delete e[js],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[uo](Hn(e.value,s,r)):e.value=n},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:r,trim:n,number:i}},a){if(e[uo]=Ws(a),e.composing)return;let u=(i||e.type==="number")&&!/^0\d/.test(e.value)?wo(e.value):e.value,f=t??"";if(u===f)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(r&&t===s||n&&e.value.trim()===f)||(e.value=f)}};var ea={deep:!0,created(e,{value:t,modifiers:{number:s}},r){e._modelValue=t,lo(e,"change",()=>{let n=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>s?wo(Ks(f)):Ks(f)),i=e.multiple,a=i?Ut(e._modelValue)?new Set(n):n:n[0],u=e._pendingValue=[i,i?ye(a)?n.slice():n:a];try{e[uo](a)}finally{st(()=>{e._pendingValue===u&&(e._pendingValue=void 0)})}}),e[uo]=Ws(r)},mounted(e,{value:t}){Ji(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[uo]=Ws(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!uc(t,s[1],s[0]))&&Ji(e,t)}};function uc(e,t,s){if(!s)return Nt(e,t);if(ye(e))return Nt(e,t);if(Ut(e)){if(e.size!==t.length)return!1;for(let r of t)if(!e.has(r))return!1;return!0}return!1}function Ji(e,t){let s=e.multiple,r=ye(t);if(!(s&&!r&&!Ut(t))){for(let n=0,i=e.options.length;n<i;n++){let a=e.options[n],u=Ks(a);if(s)if(r){let f=typeof u;f==="string"||f==="number"?a.selected=t.some(v=>String(v)===String(u)):a.selected=yr(t,u)>-1}else a.selected=t.has(u);else if(Nt(Ks(a),t)){e.selectedIndex!==n&&(e.selectedIndex=n);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ks(e){return"_value"in e?e._value:e.value}var cc=["ctrl","shift","alt","meta"],pc={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)=>cc.some(s=>e[`${s}Key`]&&!t.includes(s))},me=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),r=t.join(".");return s[r]||(s[r]=((n,...i)=>{for(let a=0;a<t.length;a++){let u=pc[t[a]];if(u&&u(n,t))return}return e(n,...i)}))},fc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ro=(e,t)=>{let s=e._withKeys||(e._withKeys={}),r=t.join(".");return s[r]||(s[r]=(n=>{if(!("key"in n))return;let i=St(n.key);if(t.some(a=>a===i||fc[a]===i))return e(n)}))},mc=Ge({patchProp:ic},ju),Qi;function hc(){return Qi||(Qi=Ai(mc))}var ta=((...e)=>{let t=hc().createApp(...e),{mount:s}=t;return t.mount=r=>{let n=gc(r);if(!n)return;let i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");let a=s(n,!1,vc(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t});function vc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function gc(e){return ze(e)?document.querySelector(e):e}var fo=typeof document<"u";function sa(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function yc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&sa(e.default)}var Oe=Object.assign;function Ys(e,t){let s={};for(let r in t){let n=t[r];s[r]=wt(n)?n.map(e):e(n)}return s}var Ao=()=>{},wt=Array.isArray;function Wn(e,t){let s={};for(let r in e)s[r]=r in t?t[r]:e[r];return s}var na=/#/g,bc=/&/g,wc=/\//g,kc=/=/g,Ec=/\?/g,ra=/\+/g,Cc=/%5B/g,_c=/%5D/g,ia=/%5E/g,Sc=/%60/g,aa=/%7B/g,Nc=/%7C/g,la=/%7D/g,Dc=/%20/g;function Kn(e){return e==null?"":encodeURI(""+e).replace(Nc,"|").replace(Cc,"[").replace(_c,"]")}function da(e){return Kn(e).replace(aa,"{").replace(la,"}").replace(ia,"^")}function jn(e){return Kn(e).replace(ra,"%2B").replace(Dc,"+").replace(na,"%23").replace(bc,"%26").replace(Sc,"`").replace(aa,"{").replace(la,"}").replace(ia,"^")}function Rc(e){return jn(e).replace(kc,"%3D")}function Tc(e){return Kn(e).replace(na,"%23").replace(Ec,"%3F")}function ua(e){return Tc(e).replace(wc,"%2F")}function To(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Ac=/\/$/,Oc=e=>e.replace(Ac,"");function Js(e,t,s="/"){let r,n={},i="",a="",u=t.indexOf("#"),f=t.indexOf("?");return f=u>=0&&f>u?-1:f,f>=0&&(r=t.slice(0,f),i=t.slice(f,u>0?u:t.length),n=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=Pc(r??t,s),{fullPath:r+i+a,path:r,query:n,hash:To(a)}}function ca(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function Yn(e,t){return!t||!e.toLowerCase().sLine truncated
|
||||
${JSON.stringify(e)}${t?`
|
||||
while being at
|
||||
`+JSON.stringify(t):""}`},[je.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${$c(t)}" via a navigation guard.`},[je.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[je.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[je.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function po(e,t){return Oe(new Error,{type:e,[ya]:!0},t)}function Lt(e,t){return e instanceof Error&&ya in e&&(t==null||!!(e.type&t))}var Lc=["params","query","hash"];function $c(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Lc)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function ba(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<s.length;++r){let n=s[r].replace(ra," "),i=n.indexOf("="),a=To(i<0?n:n.slice(0,i)),u=i<0?null:To(n.slice(i+1));if(a in t){let f=t[a];wt(f)||(f=t[a]=[f]),f.push(u)}else t[a]=u}return t}function Zn(e){let t="";for(let s in e){let r=e[s];if(s=Rc(s),r==null){r!==void 0&&(t+=(t.length?"&":"")+s);continue}(wt(r)?r.map(n=>n&&jn(n)):[r&&jn(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+s,n!=null&&(t+="="+n))})}return t}function wa(e){let t={};for(let s in e){let r=e[s];r!==void 0&&(t[s]=wt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var ka=Symbol(""),xn=Symbol(""),Zs=Symbol(""),xs=Symbol(""),en=Symbol("");function Oo(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Kt(e,t,s,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,f)=>{let v=m=>{m===!1?f(po(je.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?f(m):Mc(m)?f(po(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&r.enterCallbacks[n]===a&&typeof m=="function"&&a.push(m),u())},h=i(()=>e.call(r&&r.instances[n],t,s,v)),w=Promise.resolve(h);e.length<3&&(w=w.then(v)),w.catch(m=>f(m))})}function tn(e,t,s,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let f=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(sa(f)){let v=(f.__vccOpts||f)[t];v&&i.push(Kt(v,s,r,a,u,n))}else{let v=f();i.push(()=>v.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let w=yc(h)?h.default:h;a.mods[u]=h,a.components[u]=w;let m=(w.__vccOpts||w)[t];return m&&Kt(m,s,r,a,u,n)()}))}}return i}function Ea(e,t){let s=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){let u=t.matched[a];u&&(e.matched.find(v=>co(v,u))?r.push(u):s.push(u));let f=e.matched[a];f&&(t.matched.find(v=>co(v,f))||n.push(f))}return[s,r,n]}var Uc=()=>location.protocol+"//"+location.host;function Pa(e,t){let{pathname:s,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),Yn(u,"")}return Yn(s,e)+r+n}function Fc(e,t,s,r){let n=[],i=[],a=null,u=({state:m})=>{let g=Pa(e,location),E=s.value,k=t.value,R=0;if(m){if(s.value=g,t.value=m,a&&a===E){a=null;return}R=k?m.position-k.position:0}else r(g);n.forEach(D=>{D(s.value,E,{delta:R,type:Qs.pop,direction:R?R>0?Xs.forward:Xs.back:Xs.unknown})})};function f(){a=s.value}function v(m){n.push(m);let g=()=>{let E=n.indexOf(m);E>-1&&n.splice(E,1)};return i.push(g),g}function h(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Oe({},m.state,{scroll:us()}),"")}}function w(){for(let m of i)m();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:f,listen:v,destroy:w}}function Ca(e,t,s,r=!1,n=!1){return{back:e,current:t,forward:s,replaced:r,position:window.history.length,scroll:n?us():null}}function zc(e){let{history:t,location:s}=window,r={value:Pa(e,s)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(f,v,h){let w=e.indexOf("#"),m=w>-1?(s.host&&document.querySelector("base")?e:e.slice(w))+f:Uc()+e+f;try{t[h?"replaceState":"pushState"](v,"",m),n.value=v}catch(g){console.error(g),s[h?"replace":"assign"](m)}}function a(f,v){i(f,Oe({},t.state,Ca(n.value.back,f,n.value.forward,!0),v,{position:n.value.position}),!0),r.value=f}function u(f,v){let h=Oe({},n.value,t.state,{forward:f,scroll:us()});i(h.current,h,!0),i(f,Oe({},Ca(r.value,f,null),{position:h.position+1},v),!1),r.value=f}return{location:r,state:n,push:u,replace:a}}function Va(e){e=fa(e);let t=zc(e),s=Fc(e,t.state,t.location,t.replace);function r(i,a=!0){a||s.pauseListeners(),history.go(i)}let n=Oe({locatLine truncated
|
||||
`+JSON.stringify(t):""}`},[je.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Lc(t)}" via a navigation guard.`},[je.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[je.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[je.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function po(e,t){return Oe(new Error,{type:e,[ya]:!0},t)}function $t(e,t){return e instanceof Error&&ya in e&&(t==null||!!(e.type&t))}var $c=["params","query","hash"];function Lc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of $c)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function ba(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<s.length;++r){let n=s[r].replace(ra," "),i=n.indexOf("="),a=To(i<0?n:n.slice(0,i)),u=i<0?null:To(n.slice(i+1));if(a in t){let f=t[a];wt(f)||(f=t[a]=[f]),f.push(u)}else t[a]=u}return t}function Zn(e){let t="";for(let s in e){let r=e[s];if(s=Rc(s),r==null){r!==void 0&&(t+=(t.length?"&":"")+s);continue}(wt(r)?r.map(n=>n&&jn(n)):[r&&jn(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+s,n!=null&&(t+="="+n))})}return t}function wa(e){let t={};for(let s in e){let r=e[s];r!==void 0&&(t[s]=wt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var ka=Symbol(""),xn=Symbol(""),Zs=Symbol(""),xs=Symbol(""),en=Symbol("");function Oo(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Kt(e,t,s,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,f)=>{let v=m=>{m===!1?f(po(je.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?f(m):Mc(m)?f(po(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&r.enterCallbacks[n]===a&&typeof m=="function"&&a.push(m),u())},h=i(()=>e.call(r&&r.instances[n],t,s,v)),w=Promise.resolve(h);e.length<3&&(w=w.then(v)),w.catch(m=>f(m))})}function tn(e,t,s,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let f=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(sa(f)){let v=(f.__vccOpts||f)[t];v&&i.push(Kt(v,s,r,a,u,n))}else{let v=f();i.push(()=>v.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let w=yc(h)?h.default:h;a.mods[u]=h,a.components[u]=w;let m=(w.__vccOpts||w)[t];return m&&Kt(m,s,r,a,u,n)()}))}}return i}function Ea(e,t){let s=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){let u=t.matched[a];u&&(e.matched.find(v=>co(v,u))?r.push(u):s.push(u));let f=e.matched[a];f&&(t.matched.find(v=>co(v,f))||n.push(f))}return[s,r,n]}var Uc=()=>location.protocol+"//"+location.host;function Pa(e,t){let{pathname:s,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),Yn(u,"")}return Yn(s,e)+r+n}function Fc(e,t,s,r){let n=[],i=[],a=null,u=({state:m})=>{let g=Pa(e,location),E=s.value,k=t.value,R=0;if(m){if(s.value=g,t.value=m,a&&a===E){a=null;return}R=k?m.position-k.position:0}else r(g);n.forEach(D=>{D(s.value,E,{delta:R,type:Qs.pop,direction:R?R>0?Xs.forward:Xs.back:Xs.unknown})})};function f(){a=s.value}function v(m){n.push(m);let g=()=>{let E=n.indexOf(m);E>-1&&n.splice(E,1)};return i.push(g),g}function h(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Oe({},m.state,{scroll:us()}),"")}}function w(){for(let m of i)m();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:f,listen:v,destroy:w}}function Ca(e,t,s,r=!1,n=!1){return{back:e,current:t,forward:s,replaced:r,position:window.history.length,scroll:n?us():null}}function zc(e){let{history:t,location:s}=window,r={value:Pa(e,s)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(f,v,h){let w=e.indexOf("#"),m=w>-1?(s.host&&document.querySelector("base")?e:e.slice(w))+f:Uc()+e+f;try{t[h?"replaceState":"pushState"](v,"",m),n.value=v}catch(g){console.error(g),s[h?"replace":"assign"](m)}}function a(f,v){i(f,Oe({},t.state,Ca(n.value.back,f,n.value.forward,!0),v,{position:n.value.position}),!0),r.value=f}function u(f,v){let h=Oe({},n.value,t.state,{forward:f,scroll:us()});i(h.current,h,!0),i(f,Oe({},Ca(r.value,f,null),{position:h.position+1},v),!1),r.value=f}return{location:r,state:n,push:u,replace:a}}function Va(e){e=fa(e);let t=zc(e),s=Fc(e,t.state,t.location,t.replace);function r(i,a=!0){a||s.pauseListeners(),history.go(i)}let n=Oe({locatLine truncated
|
||||
`)),e.options=Object.assign({},e.options,v.options),i.restore()})}a();let u=null;e.saveDefault=f=>{if(f&&f.preventDefault&&f.preventDefault(),e.saving)return;let v=i.checkpoint(),h={terms:e.terms.split(`
|
||||
`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",h).then(()=>{i.accept(v),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",u&&r.cancel(u),u=r(()=>{e.message=null},2500)},w=>{e.saving=!1;let m=w&&w.data&&w.data.error,g="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+m),s("ERRORS.unknown_error")]).then(([E,k])=>{e.error=m&&E!==k?E:g},()=>{e.error=g})})},e.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Wa=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{s.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ka=function(e,t,s,r,n){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(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/signin":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,f){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(v===void 0)return;u.preventDefault();let h=e.features.length,w=v==="first"?0:v==="last"?h-1:(f+v+h)%h;e.feature=e.features[w].key,n(()=>{let m=r.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},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"}];function i(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests})}i();function a(u){let f={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return f;let v=new Array(u.length-1);for(let k=1;k<u.length;k++)v[k-1]=u[k]-u[k-1];let h=v.length,w=Math.max.apply(null,v),m=Math.min.apply(null,v),g=Math.min(0,m),E=w-g||1;f.viewW=h*2,f.bars=new Array(h);for(let k=0;k<h;k++){let R=(v[k]-g)/E,D=Math.max(1.5,R*34);f.bars[k]={x:(k*2+.25).toFixed(2),y:(36-D).toFixed(2),w:"1.5",h:D.toFixed(2)}}if(f.deltaToday=v[h-1],h>=2){let k=v[h-2];k&&(f.pctChange=(f.deltaToday-k)/k*100)}return f.pctAbs=Math.round(Math.abs(f.pctChange)),f.isUp=f.pctChange>=0,f}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let f=u.data||[];e.history={repositories:a(f.map(v=>v.nbRepositories||0)),users:a(f.map(v=>v.nbUsers||0)),pageViews:a(f.map(v=>v.nbPageViews||0)),pullRequests:a(f.map(v=>v.nbPullRequests||0))}})},Ya=function(e,t,s,r,n,i){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,st(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Jt()(document,"click",_=>{e.quotaExpanded&&!_.target.closest?.(".dashboard-quota")&
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):A(),!r.repoId&&!r.pullRequestId&&!r.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),C&&C()})}function U(C,I,B){e.anonymize&&e.anonymize[C]&&e.anonymize[C].setValidity(I,B)}function ae(C){try{let I=parseGithubUrl(C);if(I&&I.owner&&I.repo)return I.owner+"/"+I.repo}catch{}return null}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 Y()}catch{}}};function ie(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ae(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function _(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function O(){let C;try{C=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!C||C.path!==n.path()||Date.now()-C.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await _(),!0):!1;R.restore();for(let I of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(C.draft,I)&&(e[I]=C.draft[I]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await _(),sessionStorage.removeItem("github-access-draft"),!0}q(()=>{!r.repoId&&!r.pullRequestId&&!r.gistId&&a(O,0),r.repoId&&r.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=r.repoId,t.get("/api/repo/"+e.repoId).then(async C=>{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(I=>I).join(`
|
||||
`),e.source=C.data.source,e.role=C.data.role||"owner",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=k(parseGithubUrl(e.sourceUrl)),!await O()&&(await Promise.all([Y(),Z()]),ue())},()=>{n.url("/404")})),r.pullRequestId&&r.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=r.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(I=>I).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=k(parseGithubUrl(e.sourceUrl)),!await O())try{await pe()}catch{}},()=>{n.url("/404")})),r.gistId&&r.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=r.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(I=>I).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=k(parseGithubUrl(e.sourceUrl)),!await O()&&await Fe()},()=>{n.url("/404")}))}),t.get("/github/connections").then(C=>{e.githubConnections=C.data,!r.repoId&&!r.pullRequestId&&!r.gistId&&e.githubConnection===void 0&&C.data.appEnabled&&C.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&_())}).catch(()=>{}),e.urlSelected=async(C=!1)=>{let I=++f,B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,se.cancel(),Se.cancel(),Me.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",U("sourceUrl","github",!1);return}let M=k(B),y=C||E===M;E=M,e.sourceUrlError="",U("sourceUrl","github",!0);let S=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,S&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!y&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],y||(e.source={type:"GitHubStream",branch:"",commit:""}),se.cancel(),Se.cancel(),Me.cancel(),le.clear(),Te.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=y;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await Fe()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await pe()):(e.detectedType="repo",await Promise.all([Y(),Z()]),ue())}catch{}finally{I===f&&(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 Z(),ue()}),e.getBranches=async C=>{let I=parseGithubUrl(e.sourceUrl),B=m();try{let M=await t.get(`/api/repo/${I.owner}/${I.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ae(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:C===!0||e.reconnectingSource?"1":"0",repositoryID:ie()}});if(!w(B))return;e.branches=M.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let y=e.branches.filter(S=>S.name==e.source.branch);y.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=y[0].commit),e.readme=y[0].readme,await Z(C))}catch(M){if(!w(B))return;e.branches=[],e.sourceUnreachable=M&&(M.status===404||M.data&&M.data.error==="repo_not_found");let y=M&&M.data&&M.data.error||(M&&M.status===404?"repo_not_found":"unknown_error");i("ERRORS."+y).then(S=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:S}),e.error=S},console.error),typeof U=="function"&&U("sourceUrl","missing",!1)}finally{g(B)}};async function Y(){let C=parseGithubUrl(e.sourceUrl),I=m();try{F();let B=await t.get(`/api/repo/${C.owner}/${C.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ae(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,repositoryID:ie(),force:"1"}});if(!w(I))return;e.details=B.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(B){if(!w(I))return;throw B.data&&(i("ERRORS."+B.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),X(B.data.error)),U("sourceUrl","missing",!1),B}finally{g(I)}}async function Z(C){if(e.readme&&!C)return e.readme;let I=parseGithubUrl(e.sourceUrl),B=m();try{let M=await t.get(`/api/repo/${I.owner}/${I.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&r.repoId&&ae(e.sourceUrl)===e._originalFullName?r.repoId:void 0,connection:e.githubConnection,force:C===!0?"1":"0",branch:e.source.branch,repositoryID:ie()}});w(B,!0)&&(e.readme=M.data)}catch{w(B,!0)&&(e.readme="")}finally{g(B)}}function te(){let C={terms:e.terms?e.terms.split(`
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(C.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);C.repoName=`${I.owner}/${I.repo}`}catch{}return C}function J(C,I,B){let M=null,y=0,S=()=>{if(e.detectedType!==C)return;M&&a.cancel(M);let V=++y;e.previewStatus="loading",M=a(()=>{M=null;let z=I();if(!z){e.previewStatus="idle";return}t.post("/api/anonymize-preview",z).then(j=>{V===y&&(B(j.data,z),e.previewStatus="ready")}).catch(()=>{V===y&&(e.previewStatus="error")})},200)};return S.cancel=()=>{y++,M&&a.cancel(M),M=null},e.on("dispose",S.cancel),S}e.retryPreview=()=>{e.detectedType==="repo"&&se(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()};let se=J("repo",()=>e.readme?{content:e.readme,options:te()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=C.content;let I="";try{let M=parseGithubUrl(e.sourceUrl),y=e.source.branch||e.details&&e.details.defaultBranch||"main";I=`https://github.com/${M.owner}/${M.repo}/raw/${y}/`}catch{}let B=renderMD(e.anonymize_readme,I);e.html_readme=B,a(Prism.highlightAll,150)});function ue(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),se())}async function pe(){let C=parseGithubUrl(e.sourceUrl),I=m();try{F();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!w(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!w(I))return;throw B.data&&(i("ERRORS."+B.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),X(B.data.error)),U("sourceUrl","missing",!1),B}finally{g(I)}}let le=He(new Map);function Ie(){let C=new Set,I=e.details&&e.details.pullRequest;if(!I)return C;typeof I.title=="string"&&C.add(I.title),typeof I.body=="string"&&C.add(I.body),typeof I.diff=="string"&&C.add(I.diff);let B=I.comments||[];for(let M of B)typeof M.author=="string"&&C.add(M.author),typeof M.body=="string"&&C.add(M.body);return C}let Se=J("pr",()=>{let C=Ie(),I=Array.from(C);return I.length===0?null:{contents:I,options:te()}},(C,I)=>{if(!Array.isArray(C?.contents)||C.contents.length!==I.contents.length||C.contents.some(y=>typeof y!="string"))throw Error("Invalid preview response");let B=I.contents,M=new Map;for(let y=0;y<B.length&&y<C.contents.length;y++)M.set(B[y],C.contents[y]);le.clear(),M.forEach((y,S)=>le.set(S,y))});e.anonymizePrContent=function(C){return C&&(le.has(C)?le.get(C):"")};async function Fe(){let C=parseGithubUrl(e.sourceUrl),I=m();try{F(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!w(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!w(I))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,U("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,U("sourceUrl","missing",!1);return}throw B.data&&(i("ERRORS."+B.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),X(B.data.error)),U("sourceUrl","missing",!1),B}finally{g(I)}}let Te=He(new Map);function $e(){let C=new Set,I=e.details&&e.details.gist;if(!I)return C;typeof I.description=="string"&&C.add(I.description),typeof I.ownerLogin=="string"&&C.add(I.ownerLogin);let B=I.files||[];for(let y of B)typeof y.filename=="string"&&C.add(y.filename),typeof y.content=="string"&&C.add(y.content);let M=I.comments||[];for(let y of M)typeof y.author=="string"&&C.add(y.author),typeof y.body=="string"&&C.add(y.body);return C}let Me=J("gist",()=>{let C=$e(),I=Array.from(C);return I.length===0?null:{contents:I,options:te()}},(C,I)=>{if(!Array.isArray(C?.contents)||C.contents.length!==I.contents.length||C.contents.some(y=>typeof y!="string"))throw Error("Invalid preview response");let B=I.contents,M=new Map;for(let y=0;y<B.length&&y<C.contents.length;y++)M.set(B[y],C.contents[y]);Te.clear(),M.forEach((y,S)=>Te.set(S,y)),_e()});e.anonymizeGistContent=function(C){return C&&(Te.has(C)?Te.get(C):"")},e.previewGistFiles=[];function _e(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",_e,!0),e.watch("terms",_e);function Ee(){let C=e.conference;if(e.conference_data=null,!C)return;let I=e.isUpdate&&C===e._originalConference;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),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.confe
Line truncated
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(C.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);C.repoName=`${I.owner}/${I.repo}`}catch{}return C}function J(C,I,B){let M=null,y=0,S=()=>{if(e.detectedType!==C)return;M&&a.cancel(M);let V=++y;e.previewStatus="loading",M=a(()=>{M=null;let z=I();if(!z){e.previewStatus="idle";return}t.post("/api/anonymize-preview",z).then(j=>{V===y&&(B(j.data,z),e.previewStatus="ready")}).catch(()=>{V===y&&(e.previewStatus="error")})},200)};return S.cancel=()=>{y++,M&&a.cancel(M),M=null},e.on("dispose",S.cancel),S}e.retryPreview=()=>{e.detectedType==="repo"&&se(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()};let se=J("repo",()=>e.readme?{content:e.readme,options:te()}:null,C=>{if(typeof C?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=C.content;let I="";try{let M=parseGithubUrl(e.sourceUrl),y=e.source.branch||e.details&&e.details.defaultBranch||"main";I=`https://github.com/${M.owner}/${M.repo}/raw/${y}/`}catch{}let B=renderMD(e.anonymize_readme,I);e.html_readme=B,a(Prism.highlightAll,150)});function ue(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),se())}async function pe(){let C=parseGithubUrl(e.sourceUrl),I=m();try{F();let B=await t.get(`/api/pr/${C.owner}/${C.repo}/${C.pullRequestId}`,{params:{connection:e.githubConnection}});if(!w(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=C.repo+"-PR"+C.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!w(I))return;throw B.data&&(i("ERRORS."+B.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),X(B.data.error)),U("sourceUrl","missing",!1),B}finally{g(I)}}let le=He(new Map);function Ie(){let C=new Set,I=e.details&&e.details.pullRequest;if(!I)return C;typeof I.title=="string"&&C.add(I.title),typeof I.body=="string"&&C.add(I.body),typeof I.diff=="string"&&C.add(I.diff);let B=I.comments||[];for(let M of B)typeof M.author=="string"&&C.add(M.author),typeof M.body=="string"&&C.add(M.body);return C}let Se=J("pr",()=>{let C=Ie(),I=Array.from(C);return I.length===0?null:{contents:I,options:te()}},(C,I)=>{if(!Array.isArray(C?.contents)||C.contents.length!==I.contents.length||C.contents.some(y=>typeof y!="string"))throw Error("Invalid preview response");let B=I.contents,M=new Map;for(let y=0;y<B.length&&y<C.contents.length;y++)M.set(B[y],C.contents[y]);le.clear(),M.forEach((y,S)=>le.set(S,y))});e.anonymizePrContent=function(C){return C&&(le.has(C)?le.get(C):"")};async function Fe(){let C=parseGithubUrl(e.sourceUrl),I=m();try{F(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${C.gistId}`);if(!w(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+C.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!w(I))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,U("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,U("sourceUrl","missing",!1);return}throw B.data&&(i("ERRORS."+B.data.error).then(M=>{e.addToast({title:"Error",date:new Date,body:M}),e.error=M},console.error),X(B.data.error)),U("sourceUrl","missing",!1),B}finally{g(I)}}let Te=He(new Map);function Le(){let C=new Set,I=e.details&&e.details.gist;if(!I)return C;typeof I.description=="string"&&C.add(I.description),typeof I.ownerLogin=="string"&&C.add(I.ownerLogin);let B=I.files||[];for(let y of B)typeof y.filename=="string"&&C.add(y.filename),typeof y.content=="string"&&C.add(y.content);let M=I.comments||[];for(let y of M)typeof y.author=="string"&&C.add(y.author),typeof y.body=="string"&&C.add(y.body);return C}let Me=J("gist",()=>{let C=Le(),I=Array.from(C);return I.length===0?null:{contents:I,options:te()}},(C,I)=>{if(!Array.isArray(C?.contents)||C.contents.length!==I.contents.length||C.contents.some(y=>typeof y!="string"))throw Error("Invalid preview response");let B=I.contents,M=new Map;for(let y=0;y<B.length&&y<C.contents.length;y++)M.set(B[y],C.contents[y]);Te.clear(),M.forEach((y,S)=>Te.set(S,y)),_e()});e.anonymizeGistContent=function(C){return C&&(Te.has(C)?Te.get(C):"")},e.previewGistFiles=[];function _e(){let C=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=C.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",_e,!0),e.watch("terms",_e);function Ee(){let C=e.conference;if(e.conference_data=null,!C)return;let I=e.isUpdate&&C===e._originalConference;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),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.confe
Line truncated
|
||||
`).filter(S=>S),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&&(M.options.pageSource=e.details.pageSource),F();let y=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(y,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),X(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizeGist=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(oe())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=C.currentTarget||C.target.closest?.("button")||C.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),M={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(S=>S),source:{gistId:B.gistId},options:e.options,conference:e.conference};F();let y=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(y,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),X(S.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=C=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(oe())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=C.currentTarget||C.target.closest?.("button")||C.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),M={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(S=>S),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};F();let y=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(y,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),X(S.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Ee()}),e.watch("terms",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()}),e.watch("details",()=>{e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()},!0)},sr=function(e,t,s,r,n,i){let a=ct(),u=Jt();e.on("dark-mode",(O,Y)=>{e.aceOption&&(Y?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,v=!1;e.on("dispose",()=>{v=!0,f++,h&&h.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var Y=document.querySelector(".tree-search-input");Y&&(Y.focus(),Y.select())}});var h=null;e.onFileSearchChange=function(){h&&(h.resolve(),h=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let Y=i.defer();h=Y,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:Y.promise}).then(function(Z){if(!(v||h!==Y)){h=null,e.fileSearchLoading=!1;var te={};e.files.forEach(function(F){te[(F.path||"")+"/"+F.name]=!0});for(var J=[],se={},ue=0;ue<Z.data.length;ue++){var pe=Z.data[ue];if(pe.path)for(var le=pe.path.split("/"),Ie="",Se=0;Se<le.length;Se++){var Fe=Ie;Ie=Ie?Ie+"/"+le[Se]:le[Se];var Te=Fe+"/"+le[Se];!te[Te]&&!se[Te]&&(se[Te]=!0,J.push({name:le[Se],path:Fe}))}}J.sort(function(F,oe){return(F.path||"").split("/").length-(oe.path||"").split("/").length}),J.length>0&&e.files.push.apply(e.files,J);for(var $e=[],Me=0;Me<Z.data.length;Me++){var _e=Z.data[Me],Ee=(_e.path||"")+"/"+_e.name;!te[Ee]&&_e.size!=null&&($e.push(_e),te[Ee]=!0)}$e.length>0&&e.files.push.apply(e.files,$e),e.fileSearchResults=Z.data}},function(){!v&&h===Y&&(h=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let w={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},m=["license","txt"],g=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],E=["wav","mp3","ogg","wma","flac","aac","m4a"],k=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(O,Y){if(e.repoId!=r.repoId)return _();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(Z=>Z&&Z.trim().length>0),ie();for(let Z=0;Z<e.paths.length-1;Z++){let te=Z>0?e.paths.slice(0,Z).join("/"):"";e.files.some(se=>se.path===te)||e.getFiles(te)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],Y={};for(let te of e.files)te.name.toLowerCase().indexOf("readme")>-1&&(Y[te.name.toLowerCase()]=te.name);let Z=null;for(let te of O)if(Y[te]){Z=te;break}if(!Z&&Object.keys(Y).length>0&&(Z=Object.keys(Y)[0]),Z){let te=s.url();te[te.length-1]!="/"&&(te+="/"),s.url(te+encodePathForUrl(Y[Z]))}}e.fileCounts=null,e.getFiles=function(O){let Y=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(Z){if(v||Y!==e.repoId)return[];let te=O||"";return e.files=e.files.filter(J=>J.path!==te),e.files.push(...Z.data),Z.data},function(Z){if(v||Y!==e.repoId)return[];e.type="error",e.content=Z&&Z.data&&Z.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(Y){v||O!==e.repoId||(e.fileCounts=Y.data)},function(){e.fileCounts={}})}function A(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var P=null;e.on("dispose",function(){P&&a.interval.cancel(P)});function H(O){if(v)return;let Y=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(Z=>{if(!(v||Y!==e.repoId)){if(e.options=Z.data,e.options.url){window.location=e.options.url;return}O&&O(Z.data)}},Z=>{if(!(v||Y!==e.repoId)){var te=Z.data||{};if(te.error==="rate_limited"&&te.resetAt){let se=function(){var ue=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ue<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,P&&(a.interval.cancel(P),P=null),H(O);else{var pe=Math.floor(ue/60),le=ue%60;e.rateLimitCountdown=pe>0?pe+"m "+le+"s":le+"s"}};var J=se;e.type="rate_limited",e.rateLimitResetAt=te.resetAt,P&&a.interval.cance
Line truncated
|
||||
`).filter(S=>S),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};F();let y=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(y,M,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},S=>{S.data&&(i("ERRORS."+S.data.error).then(V=>{e.error=V},console.error),X(S.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Ee()}),e.watch("terms",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ue(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()}),e.watch("details",()=>{e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&Me()},!0)},sr=function(e,t,s,r,n,i){let a=ct(),u=Jt();e.on("dark-mode",(O,Y)=>{e.aceOption&&(Y?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,v=!1;e.on("dispose",()=>{v=!0,f++,h&&h.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var Y=document.querySelector(".tree-search-input");Y&&(Y.focus(),Y.select())}});var h=null;e.onFileSearchChange=function(){h&&(h.resolve(),h=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let Y=i.defer();h=Y,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:Y.promise}).then(function(Z){if(!(v||h!==Y)){h=null,e.fileSearchLoading=!1;var te={};e.files.forEach(function(F){te[(F.path||"")+"/"+F.name]=!0});for(var J=[],se={},ue=0;ue<Z.data.length;ue++){var pe=Z.data[ue];if(pe.path)for(var le=pe.path.split("/"),Ie="",Se=0;Se<le.length;Se++){var Fe=Ie;Ie=Ie?Ie+"/"+le[Se]:le[Se];var Te=Fe+"/"+le[Se];!te[Te]&&!se[Te]&&(se[Te]=!0,J.push({name:le[Se],path:Fe}))}}J.sort(function(F,oe){return(F.path||"").split("/").length-(oe.path||"").split("/").length}),J.length>0&&e.files.push.apply(e.files,J);for(var Le=[],Me=0;Me<Z.data.length;Me++){var _e=Z.data[Me],Ee=(_e.path||"")+"/"+_e.name;!te[Ee]&&_e.size!=null&&(Le.push(_e),te[Ee]=!0)}Le.length>0&&e.files.push.apply(e.files,Le),e.fileSearchResults=Z.data}},function(){!v&&h===Y&&(h=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let w={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},m=["license","txt"],g=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],E=["wav","mp3","ogg","wma","flac","aac","m4a"],k=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(O,Y){if(e.repoId!=r.repoId)return _();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(Z=>Z&&Z.trim().length>0),ie();for(let Z=0;Z<e.paths.length-1;Z++){let te=Z>0?e.paths.slice(0,Z).join("/"):"";e.files.some(se=>se.path===te)||e.getFiles(te)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],Y={};for(let te of e.files)te.name.toLowerCase().indexOf("readme")>-1&&(Y[te.name.toLowerCase()]=te.name);let Z=null;for(let te of O)if(Y[te]){Z=te;break}if(!Z&&Object.keys(Y).length>0&&(Z=Object.keys(Y)[0]),Z){let te=s.url();te[te.length-1]!="/"&&(te+="/"),s.url(te+encodePathForUrl(Y[Z]))}}e.fileCounts=null,e.getFiles=function(O){let Y=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(Z){if(v||Y!==e.repoId)return[];let te=O||"";return e.files=e.files.filter(J=>J.path!==te),e.files.push(...Z.data),Z.data},function(Z){if(v||Y!==e.repoId)return[];e.type="error",e.content=Z&&Z.data&&Z.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(Y){v||O!==e.repoId||(e.fileCounts=Y.data)},function(){e.fileCounts={}})}function A(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var P=null;e.on("dispose",function(){P&&a.interval.cancel(P)});function H(O){if(v)return;let Y=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(Z=>{if(!(v||Y!==e.repoId)){if(e.options=Z.data,e.options.url){window.location=e.options.url;return}O&&O(Z.data)}},Z=>{if(!(v||Y!==e.repoId)){var te=Z.data||{};if(te.error==="rate_limited"&&te.resetAt){let se=function(){var ue=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ue<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,P&&(a.interval.cancel(P),P=null),H(O);else{var pe=Math.floor(ue/60),le=ue%60;e.rateLimitCountdown=pe>0?pe+"m "+le+"s":le+"s"}};var J=se;e.type="rate_limited",e.rateLimitResetAt=te.resetAt,P&&a.interval.cance
Line truncated
|
||||
`+k.join(`
|
||||
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=r.username+"-repositories.csv",D.click()},e.showStatusMessage=m=>{let g=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,g)},e.fetchGithubInfo=m=>{let g=window.open("","_blank");g&&g.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(E=>{g&&(g.document.open(),g.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(E.data,null,2).replace(/[<>]/g,k=>k==="<"?"<":">")+"</pre>"),g.document.close())},E=>{let k=E&&E.data?JSON.stringify(E.data,null,2):String(E);g&&(g.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function f(m){t.get("/api/admin/users/"+m+"/repos",{}).then(g=>{e.repositories=g.data},g=>{console.error(g)})}function v(m){t.get("/api/admin/users/"+m,{}).then(g=>{e.userInfo=g.data},g=>{console.error(g)})}v(r.username),f(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>v(r.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>v(r.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>v(r.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>v(r.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),g=>console.error(g))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>f(r.username),g=>console.error(g))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>f(r.username),g=>console.error(g))},e.updateRepository=m=>{let g=He({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(g),t.post(`/api/repo/${m.repoId}/refresh`).then(E=>{E.data.status=="ready"?g.title=`${m.repoId} is refreshed.`:g.title=`Refreshing of ${m.repoId}.`},E=>{g.title=`Error during the refresh of ${m.repoId}.`,g.body=E.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(g=>{e.userInfo.repositories=g.data})};let w=null;e.watch("query",()=>{n.timeout.cancel(w),w=n.timeout(()=>{f(r.username)},500)},!0)},rl=function(e,t,s){let r=ct(),n=Jt();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 i=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let a=()=>{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 k=(e.statusCounts||[]).find(R=>R._id===E);return k?k.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 u="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},v=loadFilterPrefs(u)||{};e.query=Object.assign({},f,v,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let w="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(w)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(R=>R.name!==E),e.presets.push({name:E,query:k}),localStorage.setItem(w,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(k=>k.name!==E.name),localStorage.setItem(w,JS
Line truncated
|
||||
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=r.username+"-repositories.csv",D.click()},e.showStatusMessage=m=>{let g=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,g)},e.fetchGithubInfo=m=>{let g=window.open("","_blank");g&&g.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(E=>{g&&(g.document.open(),g.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(E.data,null,2).replace(/[<>]/g,k=>k==="<"?"<":">")+"</pre>"),g.document.close())},E=>{let k=E&&E.data?JSON.stringify(E.data,null,2):String(E);g&&(g.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function f(m){t.get("/api/admin/users/"+m+"/repos",{}).then(g=>{e.repositories=g.data},g=>{console.error(g)})}function v(m){t.get("/api/admin/users/"+m,{}).then(g=>{e.userInfo=g.data},g=>{console.error(g)})}v(r.username),f(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>v(r.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>v(r.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>v(r.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>v(r.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",h()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>h(),g=>console.error(g))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>f(r.username),g=>console.error(g))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>f(r.username),g=>console.error(g))},e.updateRepository=m=>{let g=He({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(g),t.post(`/api/repo/${m.repoId}/refresh`).then(E=>{E.data.status=="ready"?g.title=`${m.repoId} is refreshed.`:g.title=`Refreshing of ${m.repoId}.`},E=>{g.title=`Error during the refresh of ${m.repoId}.`,g.body=E.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(g=>{e.userInfo.repositories=g.data})};let w=null;e.watch("query",()=>{n.timeout.cancel(w),w=n.timeout(()=>{f(r.username)},500)},!0)},rl=function(e,t,s){let r=ct(),n=Jt();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 i=E=>{if(E.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){E.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=E=>{E==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[E]="",e.query.page=1},e.chips=[];let a=()=>{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 k=(e.statusCounts||[]).find(R=>R._id===E);return k?k.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 u="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},v=loadFilterPrefs(u)||{};e.query=Object.assign({},f,v,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let w="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(w)||"[]"),e.savePreset=()=>{let E=window.prompt("Preset name:");if(!E)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(R=>R.name!==E),e.presets.push({name:E,query:k}),localStorage.setItem(w,JSON.stringify(e.presets))},e.applyPreset=E=>{Object.assign(e.query,E.query,{page:1})},e.deletePreset=E=>{e.presets=(e.presets||[]).filter(k=>k.name!==E.name),localStorage.setItem(w,JS
Line truncated
|
||||
`).map((ue,pe)=>pe===0?ue:se+ue).join(`
|
||||
`)}else typeof _=="number"||typeof _=="boolean"?J=String(_):J=JSON.stringify(_);ae.push(`${Z}${J}${te}`)}),ae.push("}"),ae.join(`
|
||||
`)}function v(D){let A=[],P="",H=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,U;for(;U=H.exec(D);)P+=D.slice(q,U.index),q=H.lastIndex,A.push({key:U[1],op:U[2]||"=",val:U[3]});return P+=D.slice(q),{filters:A,free:P.trim().toLowerCase()}}function h(D,A){for(let P of A.filters){let H=(U,ae,ie)=>{let _=parseFloat(U),O=parseFloat(ae);return ie==="="?String(U)===String(ae):ie==="!="?String(U)!==String(ae):ie===">="?_>=O:ie==="<="?_<=O:ie===">"?_>O:ie==="<"?_<O:!0},q;if(P.key==="code")q=D.displayMessage;else if(P.key==="module")q=D.module;else if(P.key==="status")q=D._status;else if(P.key==="url")q=D._url;else if(P.key==="repo")q=D._repoId;else if(P.key==="level")q=D.level;else continue;if(q==null||!H(q,P.val,P.op))return!1}return!(A.free&&((D.displayMessage||"")+" "+(D.module||"")+" "+(D._url||"")+" "+JSON.stringify(D.raw||[])).toLowerCase().indexOf(A.free)===-1)}function w(){let D=v(e.query.search||"");e.parsedFilterCount=D.filters.length;let A=e.query.bucket,P=e.entries.filter(q=>A&&q._bucket!==A?!1:h(q,D)),H=e.query.group;if(H){let q=ie=>H==="module"?ie.module:ie.displayMessage||ie.message||"_",U=new Map;for(let ie of P){let _=q(ie);if(U.has(_)){let O=U.get(_);O.count++,O._related.push(ie),new Date(ie.ts)>new Date(O.ts)&&(O.ts=ie.ts,O._url=ie._url,O._status=ie._status),new Date(ie.ts)<new Date(O._firstSeen)&&(O._firstSeen=ie.ts)}else{let O=Object.assign({},ie);O._key=`${H}:${_}`,O._related=[ie],O._firstSeen=ie.ts,O._lastHourCount=0,O.count=1,U.set(_,O)}}let ae=Date.now()-3600*1e3;for(let ie of U.values())ie._lastHourCount=ie._related.filter(_=>new Date(_.ts).getTime()>=ae).length;P=Array.from(U.values())}else P=P.map((q,U)=>(q._key="row:"+U+":"+q.ts,q._related=[q],q._firstSeen=q.ts,q._lastHourCount=0,q.count=1,q));e.query.sort==="count"?P.sort((q,U)=>U.count-q.count||new Date(U.ts)-new Date(q.ts)):P.sort((q,U)=>new Date(U.ts)-new Date(q.ts)),e.visible=P}function m(D){let A=D?e.entries.length:0,P=D?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:A,limit:P}}).then(H=>{let q=(H.data.entries||[]).map(u);e.entries=D?e.entries.concat(q):q,e.available=!!H.data.available,e.cap=H.data.max||e.cap,e.total=H.data.total||e.entries.length,w()},H=>console.error(H))}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function g(){t.get("/api/admin/errors/stats").then(D=>{let A=D.data||{},P=A.prev24h?Math.round((A.last24h-A.prev24h)/A.prev24h*100):0;e.stats={last24h:A.last24h||0,prev24h:A.prev24h||0,delta:P,severity:A.severity||{error:0,warn:0,info:0},unique:A.unique||{error:0,warn:0,info:0},buckets:A.buckets||[],dropped:A.dropped||0}},D=>console.error(D))}function E(){m(),g()}e.barPx=(D,A)=>{let P=e.stats.buckets||[],H=0;for(let ie of P)H=Math.max(H,(ie.error||0)+(ie.warn||0)+(ie.info||0));if(!H)return 0;let q=(D.error||0)+(D.warn||0)+(D.info||0);if(!q)return 0;let U=Math.round(q/H*60),ae=D[A]||0;return Math.round(ae/q*U)},e.bucketTitle=D=>`${new Date(D.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${D.error||0} err \xB7 ${D.warn||0} warn \xB7 ${D.info||0} info`,e.toggle=D=>{e.expanded[D._key]=!e.expanded[D._key]},e.setBucket=D=>{e.query.bucket=D},e.refreshNow=E,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(E,D=>console.error(D))},e.exportCsv=()=>{let D=["ts","level","module","displayMessage","_status","_url","_repoId"],A=[D.join(",")];for(let U of e.visible)A.push(D.map(ae=>{let ie=U[ae]==null?"":String(U[ae]);return/[",\n]/.test(ie)?`"${ie.replace(/"/g,'""')}"`:ie}).join(","));let P=new Blob([A.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),H=URL.createObjectURL(P),q=document.createElement("a");q.href=H,q.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(q),q.click(),document.body.removeChild(q),URL.revokeObjectURL(H)};function k(D){e.copyHint=`${D} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>k("JSON"))},e.copyCurl=D=>{if(!D._url)return;let P=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(P).then(()=>k("curl"))},E();let R=r(()=>{e.query.autoRefresh&&E()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},ll=function(e,t,s,r){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.performanceError=null,e.latencyBound=function(g,E){return g.count?g[E]==null?"> 60 s":"\u2264 "+g[E]+" ms":"No samples"},e.firstByteBound=function(g){return e.latencyBound({count:g.firstByteCount,p95UpperMs:g.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(g){return Math.max(0,Math.round((Date.now()-g.sampledAt)/1e3))},e.peakRss=function(g){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===g.instance}).reduce(function(E,k){return Math.max(E,k.rss)},g.memory.rss)},e.performanceWarning=function(g){return e.sampleAge(g)>45||g.droppedBatches||g.droppedMetrics||g.sockets?.closeWait>0||g.eventLoop.p95Ms>100||g.memoryLimitBytes&&g.memory.rss>g.memoryLimitBytes*.8};var n=!1;e.loadPerformance=function(){var g=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==g&&(e.performance=null),!n&&(n=!0,t.get("/api/admin/performance",{params:{minutes:g}}).then(function(E){g===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){g===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){n=!1,g!==e.performanceMinutes&&e.loadPerformance()}))};function i(g){if(g==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],k=0,R=g;R>=1024&&k<E.length-1;)R/=1024,k++;return R.toFixed(k>0?1:0)+" "+E[k]}e.humanBytes=i;function a(g){if(!g)return"\u2014";var E=Math.floor(g/86400),k=Math.floor(g%86400/3600),R=Math.floor(g%3600/60);return E>0?E+"d "+(k<10?"0":"")+k+"h":k>0?k+"h "+(R<10?"0":"")+R+"m":R+"m"}e.humanDuration=a;function u(g){return g==null?"\u2014":g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":String(g)}e.humanNum=u,e.queueTotal=function(g){return g?(g.waiting||0)+(g.active||0)+(g.delayed||0)+(g.failed||0):0},e.statusCount=function(g){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],k=0;k<E.length;k++)if(E[k]._id===g)return E[k].count;return 0},e.barPct=function(g){var E=e.data&&e.data.repos?e.data.repos.total:0;if(!E)return 0;var k=[g];g==="expired"&&k.push("expiring"),g==="removed"&&k.push("removing"),g==="preparing"&&k.push("download");var R=0;return k.forEach(function(D){R+=e.statusCount(D)}),Math.max(.4,R/E*100)},e.errPct=function(g){if(!e.data||!e.data.errors)return 0;var E=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[g]/E*100};function f(g){var E=g||[];return E.map(function(k,R){var D=E[R-1]||{},A=Object.assign({},k);return A.dailyRepositories=R?Math.max(0,(k.nbRepositories||0)-(D.nbRepositories||0)):0,A.dailyUsers=R?Math.max(0,(k.nbUsers||0)-(D.nbUsers||0)):0,A.dailyPageViews=R?Math.max(0,(k.nbPageViews||0)-(D.nbPageViews||0)):0,A})}function v(g){var E=g&&g.length?g[g.length-1]:{};return{repositories:E.dailyRepositories||0,users:E.dailyUsers||0,pageViews:E.dailyPageViews||0}}var h={};e.historyBarH=function(g,E){return!g||!h[E]?0:Math.max(1,Math.round(g[E]/h[E]*140))},e.historyLabel=function(g){if(!g||!g.date)return"";var E=new Date(g.date);return E.getUTCMonth()+1+"/"+E.getUTCDate()};function w(){e.loadPerformance(),t.get("/api/admin/overview").then(function(g){g.data.history=f(g.data.history),g.data.daily={today:v(g.data.history)},e.data=g.data,e.loading=!1,e.error=null,h={},(g.data.history||[]).forEach(function(E){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(k){(!h[k]||E[k]>h[k])&&(h[k]=E[k])})})},function(g){e.loading=!1,e.error=g.data&&g.data.error||"Failed to load overview"})}w();var m=r(w,3e4);e.on("dispose",function(){r.cancel(m)})};var dl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>tl(e,t.http)}
Line truncated
|
||||
anonymous_github`)])])])])]),p(" Limitations "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})]),b("Limitations ")]),o("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[o("div",{class:"panel-body p-3"},[o("ul",null,[o("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),o("li",null," Files larger than 8 MB are not supported. "),o("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),o("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). ")])])])])]),p(" Privacy & Security "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})]),b("Privacy & Security ")]),o("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[o("div",{class:"panel-body p-3"},[o("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[o("div",{class:"panel-body p-3"},[o("p",null,[b("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),o("a",{href:"/connections"},"GitHub connections"),b(" page.")]),o("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."),o("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[o("div",{class:"panel-body p-3"},[o("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. ")])])])]),p(" Self-Hosting "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#project-icon-storage"})]),b("Self-Hosting ")]),o("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[o("div",{class:"panel-body p-3"},[o("p",null,[b(" Yes. Anonymous Git
Line truncated
|
||||
`)],{type:"text/csv;charset=utf-8"}),H=URL.createObjectURL(P),q=document.createElement("a");q.href=H,q.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(q),q.click(),document.body.removeChild(q),URL.revokeObjectURL(H)};function k(D){e.copyHint=`${D} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>k("JSON"))},e.copyCurl=D=>{if(!D._url)return;let P=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(P).then(()=>k("curl"))},E();let R=r(()=>{e.query.autoRefresh&&E()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},ll=function(e,t,s,r){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.performanceError=null,e.latencyBound=function(g,E){return g.count?g[E]==null?"> 60 s":"\u2264 "+g[E]+" ms":"No samples"},e.firstByteBound=function(g){return e.latencyBound({count:g.firstByteCount,p95UpperMs:g.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(g){return Math.max(0,Math.round((Date.now()-g.sampledAt)/1e3))},e.peakRss=function(g){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===g.instance}).reduce(function(E,k){return Math.max(E,k.rss)},g.memory.rss)},e.performanceWarning=function(g){return e.sampleAge(g)>45||g.droppedBatches||g.droppedMetrics||g.sockets?.closeWait>0||g.eventLoop.p95Ms>100||g.memoryLimitBytes&&g.memory.rss>g.memoryLimitBytes*.8};var n=!1;e.loadPerformance=function(){var g=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==g&&(e.performance=null),!n&&(n=!0,t.get("/api/admin/performance",{params:{minutes:g}}).then(function(E){g===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){g===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){n=!1,g!==e.performanceMinutes&&e.loadPerformance()}))};function i(g){if(g==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],k=0,R=g;R>=1024&&k<E.length-1;)R/=1024,k++;return R.toFixed(k>0?1:0)+" "+E[k]}e.humanBytes=i;function a(g){if(!g)return"\u2014";var E=Math.floor(g/86400),k=Math.floor(g%86400/3600),R=Math.floor(g%3600/60);return E>0?E+"d "+(k<10?"0":"")+k+"h":k>0?k+"h "+(R<10?"0":"")+R+"m":R+"m"}e.humanDuration=a;function u(g){return g==null?"\u2014":g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":String(g)}e.humanNum=u,e.queueTotal=function(g){return g?(g.waiting||0)+(g.active||0)+(g.delayed||0)+(g.failed||0):0},e.statusCount=function(g){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],k=0;k<E.length;k++)if(E[k]._id===g)return E[k].count;return 0},e.barPct=function(g){var E=e.data&&e.data.repos?e.data.repos.total:0;if(!E)return 0;var k=[g];g==="expired"&&k.push("expiring"),g==="removed"&&k.push("removing"),g==="preparing"&&k.push("download");var R=0;return k.forEach(function(D){R+=e.statusCount(D)}),Math.max(.4,R/E*100)},e.errPct=function(g){if(!e.data||!e.data.errors)return 0;var E=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[g]/E*100};function f(g){var E=g||[];return E.map(function(k,R){var D=E[R-1]||{},A=Object.assign({},k);return A.dailyRepositories=R?Math.max(0,(k.nbRepositories||0)-(D.nbRepositories||0)):0,A.dailyUsers=R?Math.max(0,(k.nbUsers||0)-(D.nbUsers||0)):0,A.dailyPageViews=R?Math.max(0,(k.nbPageViews||0)-(D.nbPageViews||0)):0,A})}function v(g){var E=g&&g.length?g[g.length-1]:{};return{repositories:E.dailyRepositories||0,users:E.dailyUsers||0,pageViews:E.dailyPageViews||0}}var h={};e.historyBarH=function(g,E){return!g||!h[E]?0:Math.max(1,Math.round(g[E]/h[E]*140))},e.historyLabel=function(g){if(!g||!g.date)return"";var E=new Date(g.date);return E.getUTCMonth()+1+"/"+E.getUTCDate()};function w(){e.loadPerformance(),t.get("/api/admin/overview").then(function(g){g.data.history=f(g.data.history),g.data.daily={today:v(g.data.history)},e.data=g.data,e.loading=!1,e.error=null,h={},(g.data.history||[]).forEach(function(E){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(k){(!h[k]||E[k]>h[k])&&(h[k]=E[k])})})},function(g){e.loading=!1,e.error=g.data&&g.data.error||"Failed to load overview"})}w();var m=r(w,3e4);e.on("dispose",function(){r.cancel(m)})};var dl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>tl(e,t.http)}
Line truncated
|
||||
anonymous_github`)])])])])]),p(" Limitations "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-warning"})]),b("Limitations ")]),o("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[o("div",{class:"panel-body p-3"},[o("ul",null,[o("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),o("li",null," Files larger than 8 MB are not supported. "),o("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),o("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). ")])])])])]),p(" Privacy & Security "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#ui-icon-shield"})]),b("Privacy & Security ")]),o("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[o("div",{class:"panel-body p-3"},[o("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[o("div",{class:"panel-body p-3"},[o("p",null,[b("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),o("a",{href:"/connections"},"GitHub connections"),b(" page.")]),o("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."),o("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[o("div",{class:"panel-body p-3"},[o("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. ")])])])]),p(" Self-Hosting "),o("h4",{class:"faq-cat"},[o("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[o("use",{href:"#project-icon-storage"})]),b("Self-Hosting ")]),o("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[o("div",{class:"panel panel-default mb-3"},[o("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[o("h3",{class:"panel-title"},[o("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? ")])]),o("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[o("div",{class:"panel-body p-3"},[o("p",null,[b(" Yes. Anonymous Git
Line truncated
|
||||
anonymized repository often think it is about the paper, so the
|
||||
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=o("li",{class:"nav-item d-none d-lg-block"},[o("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"},[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-bug"})]),b("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",XI,[o("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=me(s=>{e.darkMode(!0)},["prevent"]))},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",ZI,[o("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=me(s=>{e.darkMode(!1)},["prevent"]))},[...t[9]||(t[9]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",xI,[...t[10]||(t[10]=[o("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[o("i",{class:"fab fa-github mr-1"}),b(" Sign in ")],-1)])])):p("v-if",!0),e.user?(l(),d("li",e3,[o("a",t3,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,o3)):p("v-if",!0),o("span",s3,c(e.user?.username),1)]),o("div",n3,[o("h6",r3,"Signed in as @"+c(e.user?.username),1),t[11]||(t[11]=ce('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" 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><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,i3)):p("v-if",!0)],64)}var a3={class:"paper-landing"},l3={class:"paper-hero"},d3={class:"paper-hero-copy"},u3={class:"paper-cta-row"},c3={key:0,href:"/signin",target:"_self",class:"btn-hero"},p3={key:1,href:"/anonymize",class:"btn-hero"},f3={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},m3={class:"paper-stats-grid"},h3={class:"paper-stat-value"},v3={class:"paper-stat-label"},g3=["viewBox"],y3=["x","y","width","height"],b3={key:1,class:"paper-stat-delta"},w3={class:"paper-features paper-wrap","aria-label":"Product features"},k3={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},E3=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],C3={class:"paper-eyebrow"},_3={class:"paper-feature-title"},S3={class:"paper-feature-more"},N3={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},D3=["href","target"],R3={class:"paper-features-stage"},T3=["id","aria-labelledby"],A3={class:"paper-frame"},O3={class:"paper-frame-bar","aria-hidden":"true"},I3={class:"url"},P3=["src","alt"],V3={class:"paper-footer"},q3={class:"paper-footer-inner"},M3={class:"paper-footer-col"},L3={key:0,href:"/dashboard"},$3={key:1,href:"/conferences"},U3={class:"paper-footer-foot"};function Al(e,t){return l(),d("div",a3,[p(" Hero: copy on the left, the product on the right "),o("section",l3,[o("div",d3,[t[2]||(t[2]=o("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=o("h1",{class:"hero-title"},[b(" Share the code,"),o("br"),o("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=o("p
Line truncated
|
||||
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=o("li",{class:"nav-item d-none d-lg-block"},[o("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"},[o("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[o("use",{href:"#ui-icon-bug"})]),b("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",XI,[o("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=me(s=>{e.darkMode(!0)},["prevent"]))},[...t[8]||(t[8]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",ZI,[o("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=me(s=>{e.darkMode(!1)},["prevent"]))},[...t[9]||(t[9]=[o("svg",{class:"ui-icon","aria-hidden":"true"},[o("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",xI,[...t[10]||(t[10]=[o("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[o("i",{class:"fab fa-github mr-1"}),b(" Sign in ")],-1)])])):p("v-if",!0),e.user?(l(),d("li",e3,[o("a",t3,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,o3)):p("v-if",!0),o("span",s3,c(e.user?.username),1)]),o("div",n3,[o("h6",r3,"Signed in as @"+c(e.user?.username),1),t[11]||(t[11]=ce('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" 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><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,i3)):p("v-if",!0)],64)}var a3={class:"paper-landing"},l3={class:"paper-hero"},d3={class:"paper-hero-copy"},u3={class:"paper-cta-row"},c3={key:0,href:"/signin",target:"_self",class:"btn-hero"},p3={key:1,href:"/anonymize",class:"btn-hero"},f3={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},m3={class:"paper-stats-grid"},h3={class:"paper-stat-value"},v3={class:"paper-stat-label"},g3=["viewBox"],y3=["x","y","width","height"],b3={key:1,class:"paper-stat-delta"},w3={class:"paper-features paper-wrap","aria-label":"Product features"},k3={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},E3=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],C3={class:"paper-eyebrow"},_3={class:"paper-feature-title"},S3={class:"paper-feature-more"},N3={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},D3=["href","target"],R3={class:"paper-features-stage"},T3=["id","aria-labelledby"],A3={class:"paper-frame"},O3={class:"paper-frame-bar","aria-hidden":"true"},I3={class:"url"},P3=["src","alt"],V3={class:"paper-footer"},q3={class:"paper-footer-inner"},M3={class:"paper-footer-col"},$3={key:0,href:"/dashboard"},L3={key:1,href:"/conferences"},U3={class:"paper-footer-foot"};function Al(e,t){return l(),d("div",a3,[p(" Hero: copy on the left, the product on the right "),o("section",l3,[o("div",d3,[t[2]||(t[2]=o("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=o("h1",{class:"hero-title"},[b(" Share the code,"),o("br"),o("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=o("p
Line truncated
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},A5={id:"termsHelp",class:"form-text text-muted"},O5={class:"invalid-feedback"},I5={id:"settings-display",class:"paper-settings-section"},P5={class:"form-group paper-check-list"},V5={class:"form-check"},q5={class:"form-check-input",type:"checkbox",id:"link",name:"link"},M5={class:"form-check"},L5={class:"form-check-input",type:"checkbox",id:"image",name:"image"},$5={class:"form-check"},U5={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},F5={class:"form-check"},z5={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},H5={id:"settings-features",class:"paper-settings-section"},B5={class:"form-group paper-check-list"},j5={class:"form-check"},G5={class:"form-check-input",type:"checkbox",id:"page",name:"page"},W5={class:"form-check"},K5={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},Y5={class:"form-check"},J5={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Q5={class:"form-group"},X5={class:"form-control",id:"mode",name:"mode"},Z5={class:"form-text text-muted"},x5={id:"settings-expiration",class:"paper-settings-section"},eq={class:"form-group"},tq={class:"form-control",id:"expiration",name:"expiration"},oq={key:0,class:"draft-status",role:"status"},sq={key:1,class:"draft-status"},nq={class:"paper-settings-footer"},rq={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},iq=["textContent"],aq={class:"paper-settings-actions"},lq=["disabled"],dq={key:0,class:"ui-icon mr-1","aria-hidden":"true"},uq={id:"settings-account",class:"paper-settings-section"},cq={class:"paper-account-card"},pq=["src"],fq={class:"paper-account-identity"},mq={class:"paper-account-name"},hq={class:"paper-danger-zone"},vq={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},gq=["textContent"],yq=["disabled"];function ql(e,t){let s=We("quota-usage"),r=be("paper-scrollspy"),n=be("field"),i=be("form");return l(),d("div",w5,[t[52]||(t[52]=ce('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),o("div",k5,[N((l(),d("aside",E5,[...t[4]||(t[4]=[ce('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[r]]),o("div",C5,[p(" Account usage shares the dashboard component. "),o("section",_5,[t[6]||(t[6]=o("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[7]||(t[7]=o("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),Mt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):p("v-if",!0),e.quota?p("v-if",!0):(l(),d("div",S5,[(l(),d(Q,null,re([1,2,3],(a,u)=>o("div",N5,[...t[5]||(t[5]=[o("div",{class:"quota-header"},[o("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),o("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),o("div",{class:"quota-track"},null,-1)])])),64))]))]),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[2]||(t[2]=me(a=>e.submitForm(a,()=>{e.saveDefault(a)}),["prevent"]))},[o("section",D5,[t[13]||(t[13]=o("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[14]||(t[14]=o("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),o("div",R5,[t[12]||(t[12]=o("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),N(o("textarea",T5,null,512),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),o("small",A5,[t[8]||(t[8]=b(" One term per line (regex allowed). Each match is replaced by ",-1)),o("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[9]||(t[9]=b(", or use ",-1)),t[10]||(t[10]=o("code",null,"term=>replacement",-1)),t[11]||(t[11]=b(" to pick your own. ",-1))]),N(o("div",O5," Terms are in an invalid format ",512),[[W,e.defaultsForm?.terms?.errors?.format]])])]),o("section",I5,[t[23]||(t[23]=o("div",{class:"paper-section-eyebrow"},"Display",-1)),t[24]||(t[24]=o("p",{class:"paper-section-copy"},"What reviewers can see inside an anonymized repository.",-1)),o("div",P5,[o("div",V5,[N(o("input",q5,null,512),[[n,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"Unchecked, every link in text files is removed.",-1))]),o("div",M5,[N(o("input",L5,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.op
Line truncated
|
||||
`);for(let w=0;w<h.length;w++){let m=h[w];if(m.startsWith("diff --git")){v(),f();continue}if(m.startsWith("--- ")){i&&i.lines.length&&v(),f().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){f().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 g=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);g&&(a=parseInt(g[1],10),u=parseInt(g[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}i&&(m.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:m.slice(1)}),u++):m.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:m.startsWith(" ")?m.slice(1):m}),a++,u++))}}return s(n,i),n.join("")}})({trustAsHtml:e=>e});function qM(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function MM(e){return String(e??"").toUpperCase()}function LM(e,t,s=0){return(e||[]).slice(s,s+t)}function $M(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function UM(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of s){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((v,h)=>v?.[h],r),f=i.split(".").reduce((v,h)=>v?.[h],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),u!==f)return(u==null?-1:f==null?1:u<f?-1:1)*a}return 0})}function FM(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 r={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,n=>r[n])}function zM(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var ir={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:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",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:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",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
Line truncated
|
||||
jane.smith@example.org`},A5={id:"termsHelp",class:"form-text text-muted"},O5={class:"invalid-feedback"},I5={id:"settings-display",class:"paper-settings-section"},P5={class:"form-group paper-check-list"},V5={class:"form-check"},q5={class:"form-check-input",type:"checkbox",id:"link",name:"link"},M5={class:"form-check"},$5={class:"form-check-input",type:"checkbox",id:"image",name:"image"},L5={class:"form-check"},U5={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},F5={class:"form-check"},z5={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},H5={id:"settings-features",class:"paper-settings-section"},B5={class:"form-group paper-check-list"},j5={class:"form-check"},G5={class:"form-check-input",type:"checkbox",id:"page",name:"page"},W5={class:"form-check"},K5={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},Y5={class:"form-check"},J5={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Q5={class:"form-group"},X5={class:"form-control",id:"mode",name:"mode"},Z5={class:"form-text text-muted"},x5={id:"settings-expiration",class:"paper-settings-section"},eq={class:"form-group"},tq={class:"form-control",id:"expiration",name:"expiration"},oq={key:0,class:"draft-status",role:"status"},sq={key:1,class:"draft-status"},nq={class:"paper-settings-footer"},rq={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},iq=["textContent"],aq={class:"paper-settings-actions"},lq=["disabled"],dq={key:0,class:"ui-icon mr-1","aria-hidden":"true"},uq={id:"settings-account",class:"paper-settings-section"},cq={class:"paper-account-card"},pq=["src"],fq={class:"paper-account-identity"},mq={class:"paper-account-name"},hq={class:"paper-danger-zone"},vq={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},gq=["textContent"],yq=["disabled"];function ql(e,t){let s=We("quota-usage"),r=be("paper-scrollspy"),n=be("field"),i=be("form");return l(),d("div",w5,[t[52]||(t[52]=ce('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),o("div",k5,[N((l(),d("aside",E5,[...t[4]||(t[4]=[ce('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[r]]),o("div",C5,[p(" Account usage shares the dashboard component. "),o("section",_5,[t[6]||(t[6]=o("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[7]||(t[7]=o("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),Mt(s,{key:0,quota:e.quota,fmt:e.fmt},null,8,["quota","fmt"])):p("v-if",!0),e.quota?p("v-if",!0):(l(),d("div",S5,[(l(),d(Q,null,re([1,2,3],(a,u)=>o("div",N5,[...t[5]||(t[5]=[o("div",{class:"quota-header"},[o("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),o("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),o("div",{class:"quota-track"},null,-1)])])),64))]))]),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[2]||(t[2]=me(a=>e.submitForm(a,()=>{e.saveDefault(a)}),["prevent"]))},[o("section",D5,[t[13]||(t[13]=o("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[14]||(t[14]=o("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),o("div",R5,[t[12]||(t[12]=o("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),N(o("textarea",T5,null,512),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),o("small",A5,[t[8]||(t[8]=b(" One term per line (regex allowed). Each match is replaced by ",-1)),o("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[9]||(t[9]=b(", or use ",-1)),t[10]||(t[10]=o("code",null,"term=>replacement",-1)),t[11]||(t[11]=b(" to pick your own. ",-1))]),N(o("div",O5," Terms are in an invalid format ",512),[[W,e.defaultsForm?.terms?.errors?.format]])])]),o("section",I5,[t[23]||(t[23]=o("div",{class:"paper-section-eyebrow"},"Display",-1)),t[24]||(t[24]=o("p",{class:"paper-section-copy"},"What reviewers can see inside an anonymized repository.",-1)),o("div",P5,[o("div",V5,[N(o("input",q5,null,512),[[n,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[15]||(t[15]=o("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[16]||(t[16]=o("small",{class:"form-text text-muted"},"Unchecked, every link in text files is removed.",-1))]),o("div",M5,[N(o("input",$5,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.op
Line truncated
|
||||
`);for(let w=0;w<h.length;w++){let m=h[w];if(m.startsWith("diff --git")){v(),f();continue}if(m.startsWith("--- ")){i&&i.lines.length&&v(),f().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){f().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 g=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);g&&(a=parseInt(g[1],10),u=parseInt(g[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}i&&(m.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:m.slice(1)}),u++):m.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:m.startsWith(" ")?m.slice(1):m}),a++,u++))}}return s(n,i),n.join("")}})({trustAsHtml:e=>e});function qM(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function MM(e){return String(e??"").toUpperCase()}function $M(e,t,s=0){return(e||[]).slice(s,s+t)}function LM(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function UM(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of s){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((v,h)=>v?.[h],r),f=i.split(".").reduce((v,h)=>v?.[h],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),u!==f)return(u==null?-1:f==null?1:u<f?-1:1)*a}return 0})}function FM(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 r={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,n=>r[n])}function zM(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var ir={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:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",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:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",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
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
@vue/shared/dist/shared.esm-bundler.js:
|
||||
|
||||
+3
-2
@@ -248,11 +248,12 @@ const history = Array.from({ length: 60 }, (_, i) => ({
|
||||
nbPullRequests: prSeries[i],
|
||||
}));
|
||||
|
||||
// ANON=1 serves the signed-out experience (landing page, FAQ) instead.
|
||||
// ANON=1 serves the signed-out experience (landing page, FAQ) instead;
|
||||
// ADMIN=1 signs in as an administrator so /admin pages render.
|
||||
app.get("/api/user", (req, res) =>
|
||||
process.env.ANON
|
||||
? res.status(401).json({ error: "not_connected" })
|
||||
: res.json({ username: "tdurieux", photo: "https://avatars.githubusercontent.com/u/5577568?v=4", isAdmin: false })
|
||||
: res.json({ username: "tdurieux", photo: "https://avatars.githubusercontent.com/u/5577568?v=4", isAdmin: !!process.env.ADMIN })
|
||||
);
|
||||
// Local connection fixtures keep the account screens usable without GitHub.
|
||||
app.get("/github/connections", (req, res) => res.json({
|
||||
|
||||
Reference in new issue
Block a user